Class HtmlStyle

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.w3c.dom.Element, org.w3c.dom.Node

    public class HtmlStyle
    extends HtmlElement
    Wrapper for the HTML element "style".
    See Also:
    Serialized Form
    • Field Detail

      • TAG_NAME

        public static final java.lang.String TAG_NAME
        The HTML tag represented by this element.
        See Also:
        Constant Field Values
    • Method Detail

      • getTypeAttribute

        public final java.lang.String getTypeAttribute()
        Returns the value of the attribute type. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute type or an empty string if that attribute isn't defined
      • setTypeAttribute

        public final void setTypeAttribute​(java.lang.String type)
        Sets the value of the attribute type.
        Parameters:
        type - the new type
      • getMediaAttribute

        public final java.lang.String getMediaAttribute()
        Returns the value of the attribute media. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute media or an empty string if that attribute isn't defined
      • getTitleAttribute

        public final java.lang.String getTitleAttribute()
        Returns the value of the attribute title. Refer to the HTML 4.01 documentation for details on the use of this attribute.
        Returns:
        the value of the attribute title or an empty string if that attribute isn't defined
      • isEmptyXmlTagExpanded

        protected boolean isEmptyXmlTagExpanded()
        Indicates if a node without children should be written in expanded form as XML (i.e. with closing tag rather than with "/>")
        Overrides:
        isEmptyXmlTagExpanded in class DomElement
        Returns:
        true to make generated XML readable as HTML on Firefox 3 for instance.
      • mayBeDisplayed

        public boolean mayBeDisplayed()
        Returns true if nodes of this type can ever be displayed, false otherwise. Examples of nodes that can never be displayed are <head>, <meta>, <script>, etc.
        Overrides:
        mayBeDisplayed in class DomNode
        Returns:
        true if nodes of this type can ever be displayed, false otherwise
        See Also:
        DomNode.isDisplayed()
      • getSheet

        public org.htmlunit.css.CssStyleSheet getSheet()
        Returns:
        the referenced style sheet