Package org.htmlparser.tags
Class AppletTag
- java.lang.Object
-
- org.htmlparser.nodes.AbstractNode
-
- org.htmlparser.nodes.TagNode
-
- org.htmlparser.tags.CompositeTag
-
- org.htmlparser.tags.AppletTag
-
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
mDefaultCompositeScanner, mEndTag
-
Fields inherited from class org.htmlparser.nodes.TagNode
breakTags, mAttributes, mDefaultScanner
-
-
Constructor Summary
Constructors Constructor Description AppletTag()Create a new applet tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.HashtablecreateAppletParamsTable()Extract the appletPARAMtags from the child list.java.lang.StringgetAppletClass()Get the class name of the applet.java.util.HashtablegetAppletParams()Get the applet parameters.java.lang.StringgetArchive()Get the jar file of the applet.java.lang.StringgetCodeBase()Get the code base of the applet.java.lang.String[]getEndTagEnders()Return the set of end tag names that cause this tag to finish.java.lang.String[]getIds()Return the set of names handled by this tag.java.lang.StringgetParameter(java.lang.String key)Get thePARAMtag with the given name.java.util.EnumerationgetParameterNames()Get an enumeration over the (String) parameter names.voidsetAppletClass(java.lang.String newAppletClass)Set theCODEattribute.voidsetAppletParams(java.util.Hashtable newAppletParams)Set the enclosedPARMchildren.voidsetArchive(java.lang.String newArchive)Set theARCHIVEattribute.voidsetCodeBase(java.lang.String newCodeBase)Set theCODEBASEattribute.java.lang.StringtoString()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, getStringText, getText, putChildrenInto, putEndTagInto, removeChild, searchByName, searchFor, searchFor, searchFor, searchFor, setEndTag, toHtml, toPlainTextString, toString
-
Methods inherited from class org.htmlparser.nodes.TagNode
breaksFlow, getAttribute, getAttributeEx, getAttributesEx, getEnders, getEndingLineNumber, getRawTagName, getStartingLineNumber, getTagBegin, getTagEnd, getTagName, getThisScanner, isEmptyXmlTag, isEndTag, removeAttribute, setAttribute, setAttribute, setAttribute, setAttributeEx, setAttributesEx, setEmptyXmlTag, setTagBegin, setTagEnd, setTagName, setText, setThisScanner
-
Methods inherited from class org.htmlparser.nodes.AbstractNode
clone, doSemanticAction, getChildren, getEndPosition, getFirstChild, getLastChild, getNextSibling, getPage, getParent, getPreviousSibling, getStartPosition, setChildren, setEndPosition, setPage, setParent, setStartPosition, toHtml
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.htmlparser.Node
clone, doSemanticAction, getChildren, getEndPosition, getFirstChild, getLastChild, getNextSibling, getPage, getParent, getPreviousSibling, getStartPosition, setChildren, setEndPosition, setPage, setParent, setStartPosition, toHtml
-
-
-
-
Method Detail
-
getIds
public java.lang.String[] getIds()
Return the set of names handled by this tag.
-
getEndTagEnders
public java.lang.String[] getEndTagEnders()
Return the set of end tag names that cause this tag to finish.- Specified by:
getEndTagEndersin interfaceTag- Overrides:
getEndTagEndersin classTagNode- Returns:
- The names of following end tags that stop further scanning.
-
createAppletParamsTable
public java.util.Hashtable createAppletParamsTable()
Extract the appletPARAMtags from the child list.- Returns:
- The list of applet parameters (keys and values are String objects).
-
getAppletClass
public java.lang.String getAppletClass()
Get the class name of the applet.- Returns:
- The value of the
CODEattribute.
-
getAppletParams
public java.util.Hashtable getAppletParams()
Get the applet parameters.- Returns:
- The list of parameter values (keys and values are String objects).
-
getArchive
public java.lang.String getArchive()
Get the jar file of the applet.- Returns:
- The value of the
ARCHIVEattribute, ornullif it wasn't specified.
-
getCodeBase
public java.lang.String getCodeBase()
Get the code base of the applet.- Returns:
- The value of the
CODEBASEattribute, ornullif it wasn't specified.
-
getParameter
public java.lang.String getParameter(java.lang.String key)
Get thePARAMtag with the given name. NOTE: This was called (erroneously) getAttribute() in previous versions.- Parameters:
key- The applet parameter name to get.- Returns:
- The value of the parameter or
nullif there is no parameter of that name.
-
getParameterNames
public java.util.Enumeration getParameterNames()
Get an enumeration over the (String) parameter names.- Returns:
- An enumeration of the
PARAMtagNAMEattributes.
-
setAppletClass
public void setAppletClass(java.lang.String newAppletClass)
Set theCODEattribute.- Parameters:
newAppletClass- The new applet class.
-
setAppletParams
public void setAppletParams(java.util.Hashtable newAppletParams)
Set the enclosedPARMchildren.- Parameters:
newAppletParams- The new parameters.
-
setArchive
public void setArchive(java.lang.String newArchive)
Set theARCHIVEattribute.- Parameters:
newArchive- The new archive file.
-
setCodeBase
public void setCodeBase(java.lang.String newCodeBase)
Set theCODEBASEattribute.- Parameters:
newCodeBase- The new applet code base.
-
toString
public java.lang.String toString()
Output a string representing this applet tag.- Specified by:
toStringin interfaceNode- Overrides:
toStringin classCompositeTag- Returns:
- A string showing the contents of the applet tag.
-
-