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
- All Implemented Interfaces:
Serializable
,Cloneable
,Node
,Tag
AppletTag represents an <Applet> tag.
It extends a basic tag by providing accessors to the class, codebase,
archive and parameters.
- See Also:
-
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 -
Method Summary
Modifier and TypeMethodDescriptionExtract the appletPARAM
tags from the child list.Get the class name of the applet.Get the applet parameters.Get the jar file of the applet.Get the code base of the applet.String[]
Return the set of end tag names that cause this tag to finish.String[]
getIds()
Return the set of names handled by this tag.getParameter
(String key) Get thePARAM
tag with the given name.
Get an enumeration over the (String) parameter names.void
setAppletClass
(String newAppletClass) Set theCODE
attribute.
void
setAppletParams
(Hashtable newAppletParams) Set the enclosedPARM
children.
void
setArchive
(String newArchive) Set theARCHIVE
attribute.
void
setCodeBase
(String newCodeBase) Set theCODEBASE
attribute.
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, 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
-
Constructor Details
-
AppletTag
public AppletTag()Create a new applet tag.
-
-
Method Details
-
getIds
Return the set of names handled by this tag. -
getEndTagEnders
Return the set of end tag names that cause this tag to finish.- Specified by:
getEndTagEnders
in interfaceTag
- Overrides:
getEndTagEnders
in classTagNode
- Returns:
- The names of following end tags that stop further scanning.
-
createAppletParamsTable
Extract the appletPARAM
tags from the child list.- Returns:
- The list of applet parameters (keys and values are String objects).
-
getAppletClass
Get the class name of the applet.- Returns:
- The value of the
CODE
attribute.
-
getAppletParams
Get the applet parameters.- Returns:
- The list of parameter values (keys and values are String objects).
-
getArchive
Get the jar file of the applet.- Returns:
- The value of the
ARCHIVE
attribute, ornull
if it wasn't specified.
-
getCodeBase
Get the code base of the applet.- Returns:
- The value of the
CODEBASE
attribute, ornull
if it wasn't specified.
-
getParameter
Get thePARAM
tag 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
null
if there is no parameter of that name.
-
getParameterNames
Get an enumeration over the (String) parameter names.- Returns:
- An enumeration of the
PARAM
tag
NAME
attributes.
-
setAppletClass
Set theCODE
attribute.
- Parameters:
newAppletClass
- The new applet class.
-
setAppletParams
Set the enclosedPARM
children.
- Parameters:
newAppletParams
- The new parameters.
-
setArchive
Set theARCHIVE
attribute.
- Parameters:
newArchive
- The new archive file.
-
setCodeBase
Set theCODEBASE
attribute.
- Parameters:
newCodeBase
- The new applet code base.
-
toString
Output a string representing this applet tag.- Specified by:
toString
in interfaceNode
- Overrides:
toString
in classCompositeTag
- Returns:
- A string showing the contents of the applet tag.
-