Class AppletTag

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Node, Tag

    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
    • Constructor Detail

      • AppletTag

        public AppletTag()
        Create a new applet tag.
    • Method Detail

      • getIds

        public java.lang.String[] getIds()
        Return the set of names handled by this tag.
        Specified by:
        getIds in interface Tag
        Overrides:
        getIds in class TagNode
        Returns:
        The names to be matched that create tags of this type.
      • getEndTagEnders

        public java.lang.String[] getEndTagEnders()
        Return the set of end tag names that cause this tag to finish.
        Specified by:
        getEndTagEnders in interface Tag
        Overrides:
        getEndTagEnders in class TagNode
        Returns:
        The names of following end tags that stop further scanning.
      • createAppletParamsTable

        public java.util.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 java.lang.String getAppletClass()
        Get the class name of the applet.
        Returns:
        The value of the CODE attribute.
      • 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 ARCHIVE attribute, or null if it wasn't specified.
      • getCodeBase

        public java.lang.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 java.lang.String getParameter​(java.lang.String key)
        Get the PARAM 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

        public java.util.Enumeration getParameterNames()
        Get an enumeration over the (String) parameter names.
        Returns:
        An enumeration of the PARAM tag NAME attributes.
      • setAppletClass

        public void setAppletClass​(java.lang.String newAppletClass)
        Set the CODE attribute.
        Parameters:
        newAppletClass - The new applet class.
      • setAppletParams

        public void setAppletParams​(java.util.Hashtable newAppletParams)
        Set the enclosed PARM children.
        Parameters:
        newAppletParams - The new parameters.
      • setArchive

        public void setArchive​(java.lang.String newArchive)
        Set the ARCHIVE attribute.
        Parameters:
        newArchive - The new archive file.
      • setCodeBase

        public void setCodeBase​(java.lang.String newCodeBase)
        Set the CODEBASE attribute.
        Parameters:
        newCodeBase - The new applet code base.
      • toString

        public java.lang.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.