Class StyleSheet

java.lang.Object
org.zkoss.html.StyleSheet
All Implemented Interfaces:
Serializable, Cloneable

public class StyleSheet extends Object implements Serializable, Cloneable
Represents a style sheet.
Since:
6.0.0
Author:
tomyeh
See Also:
  • Constructor Details

    • StyleSheet

      public StyleSheet(String href, String type)
      Creates by specifying the file to contain the style sheets.
      Parameters:
      href - URI of the file containing the style sheets.
      type - the type. If null, "text/css" is assumed.
    • StyleSheet

      public StyleSheet(String content, String type, boolean byContent)
      Creates by assigning the content (style sheets).
      Parameters:
      content - the style content or an URI to an external file.
      type - the type. If null, "text/css" is assumed.
      byContent - the content argument is the style content, or an URI to an external content
    • StyleSheet

      public StyleSheet(String content, String type, String media, boolean byContent)
      Creates by assigning the content (style sheets).
      Parameters:
      content - the style content or an URI to an external file.
      type - the type. If null, "text/css" is assumed.
      media - the media. If null, it is omitted.
      byContent - the content argument is the style content, or an URI to an external content
    • StyleSheet

      public StyleSheet(String content, String type, String media, boolean byContent, boolean disabled)
      Creates by assigning the content (style sheets).
      Parameters:
      content - the style content or an URI to an external file.
      type - the type. If null, "text/css" is assumed.
      media - the media. If null, it is omitted.
      byContent - the content argument is the style content, or an URI to an external content
      disabled - whether the style sheet is disabled.
      Since:
      9.5.0
  • Method Details

    • getHref

      public String getHref()
      Returns the href that contains the style sheets, or null if getContent() is not null.
    • getType

      public String getType()
      Returns the type.
    • getMedia

      public String getMedia()
      Returns the media, or null if not available.

      Refer to media-depedent style sheet for details.

    • getContent

      public String getContent()
      Returns the style sheets, or null if getHref() is not null.
    • isDisabled

      public boolean isDisabled()
      Returns whether the style sheet is disabled.

      Default: false.

      Returns:
      boolean
      Since:
      9.5.0
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object