Class AbstractStyleSheet

java.lang.Object
io.sf.carte.doc.style.css.om.AbstractStyleSheet
All Implemented Interfaces:
Cloneable, StyleSheet
Direct Known Subclasses:
AbstractCSSStyleSheet

public abstract class AbstractStyleSheet extends Object implements StyleSheet, Cloneable
Abstract class to be inherited by all CSS style sheets.
  • Constructor Details

    • AbstractStyleSheet

      protected AbstractStyleSheet(String title)
  • Method Details

    • getTitle

      public String getTitle()
      Gets the advisory title.
      Specified by:
      getTitle in interface StyleSheet
      Returns:
      the title.
    • setTitle

      protected void setTitle(String title)
    • clone

      public abstract StyleSheet clone()
      Clone this style sheet.
      Overrides:
      clone in class Object
      Returns:
      the cloned style sheet.
    • getDocumentErrorHandler

      protected abstract ErrorHandler getDocumentErrorHandler()
    • openConnection

      public abstract URLConnection openConnection(URL url, String referrerPolicy) throws IOException
      Open a non-interactive connection to the given URL.

      If this sheet was obtained through a network connection, the returned connection should be opened by the same user agent (and appropriate credentials) that retrieved this sheet.

      Parameters:
      url - the URL to connect to.
      referrerPolicy - the content of the referrerpolicy content attribute, if any, or the empty string.
      Returns:
      the network connection.
      Throws:
      IOException - if an I/O problem occurs opening the connection.
    • setMedia

      protected abstract void setMedia(MediaQueryList media) throws DOMException
      Set the destination media for this sheet.
      Parameters:
      media - the destination media.
      Throws:
      DOMException - if the media is invalid.
    • toMinifiedString

      public abstract String toMinifiedString()
      Returns a minified parsable representation of the rule list of this sheet.
      Returns:
      a minified parsable representation of the rule list of this sheet.
    • toStyleString

      public abstract String toStyleString()
      Returns a serialization of this style sheet in the form of a STYLE element with its attributes and content.
      Returns:
      an HTML STYLE element representing this style sheet.