Class HtmlStyle

All Implemented Interfaces:
Serializable, Cloneable, Element, Node

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

  • Method Details

    • getTypeAttribute

      public final 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(String type)
      Sets the value of the attribute type.
      Parameters:
      type - the new type
    • getMediaAttribute

      public final 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 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.
    • getDefaultStyleDisplay

      public HtmlElement.DisplayStyle getDefaultStyleDisplay()
      INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
      Returns the default display style.
      Overrides:
      getDefaultStyleDisplay in class HtmlElement
      Returns:
      the default display style
    • 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:
    • getSheet

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