HTML Parser Home Page

org.htmlparser.tags
Class AppletTag

java.lang.Object
  extended byorg.htmlparser.AbstractNode
      extended byorg.htmlparser.lexer.nodes.TagNode
          extended byorg.htmlparser.tags.Tag
              extended byorg.htmlparser.tags.CompositeTag
                  extended byorg.htmlparser.tags.AppletTag
All Implemented Interfaces:
Cloneable, Node, Serializable

public class AppletTag
extends CompositeTag

AppletTag represents an <Applet> tag. It extends a basic tag by providing accessors to the class, codebase, archive and parameters.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.htmlparser.tags.CompositeTag
mDefaultScanner, mEndTag
 
Fields inherited from class org.htmlparser.lexer.nodes.TagNode
breakTags, mAttributes
 
Fields inherited from class org.htmlparser.AbstractNode
children, mPage, nodeBegin, nodeEnd, parent
 
Constructor Summary
AppletTag()
          Create a new applet tag.
 
Method Summary
 Hashtable createAppletParamsTable()
          Extract the applet PARAM tags from the child list.
 String getAppletClass()
          Get the class name of the applet.
 Hashtable getAppletParams()
          Get the applet parameters.
 String getArchive()
          Get the jar file of the applet.
 String getCodeBase()
          Get the code base of the applet.
 String[] getEndTagEnders()
          Return the set of end tag names that cause this tag to finish.
 String[] getIds()
          Return the set of names handled by this tag.
 String getParameter(String key)
          Get the PARAM tag with the given name.
 Enumeration getParameterNames()
          Get an enumeration over the (String) parameter names.
 void setAppletClass(String newAppletClass)
          Set the CODE attribute.
 void setAppletParams(Hashtable newAppletParams)
          Set the enclosed PARM children.
 void setArchive(String newArchive)
          Set the ARCHIVE attribute.
 void setCodeBase(String newCodeBase)
          Set the CODEBASE attribute.
 String toString()
          Output a string representing this applet tag.
 
Methods inherited from class org.htmlparser.tags.CompositeTag
accept, childAt, children, collectInto, digupStringNode, elements, findPositionOf, findPositionOf, findPositionOf, getChild, getChildCount, getChildrenAsNodeArray, getChildrenHTML, getEndTag, getStartTag, getStringText, getText, putChildrenInto, putEndTagInto, removeChild, searchByName, searchFor, searchFor, searchFor, searchFor, setEndTag, setStartTag, toHtml, toPlainTextString, toString
 
Methods inherited from class org.htmlparser.tags.Tag
accept, clone, getEnders, getThisScanner, setThisScanner
 
Methods inherited from class org.htmlparser.lexer.nodes.TagNode
breaksFlow, getAttribute, getAttributeEx, getAttributes, getAttributesEx, getEndingLineNumber, getParsed, getRawTagName, getStartingLineNumber, getTagBegin, getTagEnd, getTagName, isEmptyXmlTag, isEndTag, removeAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributesEx, setEmptyXmlTag, setTagBegin, setTagEnd, setTagName, setText
 
Methods inherited from class org.htmlparser.AbstractNode
doSemanticAction, elementBegin, elementEnd, getChildren, getEndPosition, getPage, getParent, getStartPosition, setChildren, setEndPosition, setPage, setParent, setStartPosition, toHTML
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppletTag

public AppletTag()
Create a new applet tag.

Method Detail

getIds

public String[] getIds()
Return the set of names handled by this tag.

Overrides:
getIds in class Tag
Returns:
The names to be matched that create tags of this type.

getEndTagEnders

public String[] getEndTagEnders()
Return the set of end tag names that cause this tag to finish.

Overrides:
getEndTagEnders in class Tag
Returns:
The names of following end tags that stop further scanning.

createAppletParamsTable

public Hashtable createAppletParamsTable()
Extract the applet PARAM tags from the child list.

Returns:
The list of applet parameters (keys and values are String objects).

getAppletClass

public String getAppletClass()
Get the class name of the applet.

Returns:
The value of the CODE attribute.

getAppletParams

public Hashtable getAppletParams()
Get the applet parameters.

Returns:
The list of parameter values (keys and values are String objects).

getArchive

public String getArchive()
Get the jar file of the applet.

Returns:
The value of the ARCHIVE attribute, or null if it wasn't specified.

getCodeBase

public String getCodeBase()
Get the code base of the applet.

Returns:
The value of the CODEBASE attribute, or null if it wasn't specified.

getParameter

public String getParameter(String key)
Get the PARAM tag with the given name. NOTE: This was called (erroneously) getAttribute() in previous versions.

Overrides:
getParameter in class TagNode
Parameters:
key - The applet parameter name to get.
Returns:
The value of the parameter or null if there is no parameter of that name.

getParameterNames

public Enumeration getParameterNames()
Get an enumeration over the (String) parameter names.

Returns:
An enumeration of the PARAM tag NAME attributes.

setAppletClass

public void setAppletClass(String newAppletClass)
Set the CODE attribute.

Parameters:
newAppletClass - The new applet class.

setAppletParams

public void setAppletParams(Hashtable newAppletParams)
Set the enclosed PARM children.

Parameters:
newAppletParams - The new parameters.

setArchive

public void setArchive(String newArchive)
Set the ARCHIVE attribute.

Parameters:
newArchive - The new archive file.

setCodeBase

public void setCodeBase(String newCodeBase)
Set the CODEBASE attribute.

Parameters:
newCodeBase - The new applet code base.

toString

public String toString()
Output a string representing this applet tag.

Specified by:
toString in interface Node
Overrides:
toString in class CompositeTag
Returns:
A string showing the contents of the applet tag.

© 2004 Somik Raha
Mar 14, 2004

HTML Parser is an open source library released under LGPL.