• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java DomHTMLAppletElement类的典型用法和代码示例

java 4次浏览

本文整理汇总了Java中gnu.xml.dom.html2.DomHTMLAppletElement的典型用法代码示例。如果您正苦于以下问题:Java DomHTMLAppletElement类的具体用法?Java DomHTMLAppletElement怎么用?Java DomHTMLAppletElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

DomHTMLAppletElement类属于gnu.xml.dom.html2包,在下文中一共展示了DomHTMLAppletElement类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: parseAppletTags

点赞 2

import gnu.xml.dom.html2.DomHTMLAppletElement; //导入依赖的package包/类
/**
 * Parses all applet tags in document.
 *
 * @return a list of AppletTag objects representing the applet tags
 * in document
 */
ArrayList parseAppletTags()
{
  ArrayList allTags = new ArrayList();
  if (document == null)
    return null;

  recurseDocument(document.getChildNodes());

  int sz = tags.size();
  for (int j = 0; j < sz; j++)
    {
      Object curr = tags.get(j);
      // Order of checking is important here.
      // Must check embed element before applet element
      // because DomHTMLEmbedElement extends DomHTMLAppletElement
      AppletTag a = null;
      if (curr instanceof DomHTMLEmbedElement)
        a = new AppletTag((DomHTMLEmbedElement) curr);
      else if (curr instanceof DomHTMLAppletElement)
        a = new AppletTag((DomHTMLAppletElement) curr);
      else if (curr instanceof DomHTMLObjectElement)
        a = new AppletTag((DomHTMLObjectElement) curr);
      a.documentbase = documentbase;
      allTags.add(a);
    }

  return allTags;
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:35,
代码来源:TagParser.java

示例2: recurseDocument

点赞 2

import gnu.xml.dom.html2.DomHTMLAppletElement; //导入依赖的package包/类
/**
 * Recurses the document in search for the appropriate tags.
 *
 * @param list - the Node list.
 */
private void recurseDocument(NodeList list)
{
  // Recurse and store all APPLET, OBJECT and EMBED tags.
  int length = list.getLength();
  for (int i = 0; i < length; i++)
    {
      DomNode curr = (DomNode) list.item(i);
      if ((curr instanceof DomHTMLEmbedElement) ||
          (curr instanceof DomHTMLAppletElement) ||
          (curr instanceof DomHTMLObjectElement))
        tags.add(curr);
      recurseDocument(curr.getChildNodes());
    }
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:20,
代码来源:TagParser.java

示例3: parseAppletTags

点赞 2

import gnu.xml.dom.html2.DomHTMLAppletElement; //导入依赖的package包/类
/**
 * Parses all applet tags in document.
 * 
 * @return a list of AppletTag objects representing the applet tags
 * in document
 */
ArrayList parseAppletTags()
{    
  ArrayList allTags = new ArrayList();
  if (document == null)
    return null;
  
  recurseDocument(document.getChildNodes());

  int sz = tags.size();
  for (int j = 0; j < sz; j++)
    {
      Object curr = tags.get(j);
      // Order of checking is important here.
      // Must check embed element before applet element
      // because DomHTMLEmbedElement extends DomHTMLAppletElement
      AppletTag a = null;
      if (curr instanceof DomHTMLEmbedElement)
        a = new AppletTag((DomHTMLEmbedElement) curr);
      else if (curr instanceof DomHTMLAppletElement)
        a = new AppletTag((DomHTMLAppletElement) curr);
      else if (curr instanceof DomHTMLObjectElement)
        a = new AppletTag((DomHTMLObjectElement) curr);
      a.documentbase = documentbase;
      allTags.add(a);
    }
  
  return allTags;
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:35,
代码来源:TagParser.java

示例4: recurseDocument

点赞 2

import gnu.xml.dom.html2.DomHTMLAppletElement; //导入依赖的package包/类
/**
 * Recurses the document in search for the appropriate tags.
 * 
 * @param list - the Node list.
 */
private void recurseDocument(NodeList list)
{
  // Recurse and store all APPLET, OBJECT and EMBED tags.
  int length = list.getLength();
  for (int i = 0; i < length; i++)
    {
      DomNode curr = (DomNode) list.item(i);
      if ((curr instanceof DomHTMLEmbedElement) || 
          (curr instanceof DomHTMLAppletElement) ||
          (curr instanceof DomHTMLObjectElement))
        tags.add(curr);
      recurseDocument(curr.getChildNodes());
    }
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:20,
代码来源:TagParser.java

示例5: AppletTag

点赞 2

import gnu.xml.dom.html2.DomHTMLAppletElement; //导入依赖的package包/类
/**
 * Constructs an AppletTag and parses the given applet element.
 *
 * @param appElement - the Applet element to parse.
 */
AppletTag(DomHTMLAppletElement appElement)
{
  name = appElement.getName();
  parameters.put("name", name);

  parameters.put("object", appElement.getObject());
  parameters.put("align", appElement.getAlign());
  parameters.put("alt", appElement.getAlt());
  parameters.put("height", appElement.getHeight());
  parameters.put("hspace", Integer.toString(appElement.getHspace()));
  parameters.put("vspace", Integer.toString(appElement.getVspace()));
  parameters.put("width", appElement.getWidth());

  TagParser.parseParams(appElement, this);

  if (code.equals(""))
    {
      code = appElement.getCode();
      if (code.equals(""))
        code = appElement.getCls();
    }

  // Must initialize codebase before archives
  if (codebase.equals(""))
    {
      codebase = appElement.getCodeBase();
      if (codebase.equals(""))
        codebase = appElement.getSrc();
    }

  if (archives.size() == 0)
    {
      String arcs = "";
      String arch = appElement.getArchive();

      if (code.indexOf(".") < 0)
        arcs = code + ".jar";

      if (!arch.equals(""))
        arcs += "," + arch;

      if (!arcs.equals(""))
        archives = TagParser.parseArchives(arcs, this);
    }
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:51,
代码来源:AppletTag.java

示例6: AppletTag

点赞 2

import gnu.xml.dom.html2.DomHTMLAppletElement; //导入依赖的package包/类
/**
 * Constructs an AppletTag and parses the given applet element.
 * 
 * @param appElement - the Applet element to parse.
 */
AppletTag(DomHTMLAppletElement appElement)
{    
  name = appElement.getName();
  parameters.put("name", name);

  parameters.put("object", appElement.getObject());
  parameters.put("align", appElement.getAlign());
  parameters.put("alt", appElement.getAlt());
  parameters.put("height", appElement.getHeight());
  parameters.put("hspace", Integer.toString(appElement.getHspace()));
  parameters.put("vspace", Integer.toString(appElement.getVspace()));
  parameters.put("width", appElement.getWidth());
  
  TagParser.parseParams(appElement, this);
  
  if (code.equals(""))
    {
      code = appElement.getCode();
      if (code.equals(""))
        code = appElement.getCls();
    }

  // Must initialize codebase before archives
  if (codebase.equals(""))
    {
      codebase = appElement.getCodeBase();
      if (codebase.equals(""))
        codebase = appElement.getSrc();
    }
  
  if (archives.size() == 0)
    {
      String arcs = "";
      String arch = appElement.getArchive();
      
      if (code.indexOf(".") < 0)
        arcs = code + ".jar";
      
      if (!arch.equals(""))
        arcs += "," + arch;
      
      if (!arcs.equals(""))
        archives = TagParser.parseArchives(arcs, this);
    }
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:51,
代码来源:AppletTag.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)