Class AbstractCSSStyleSheetFactory

All Implemented Interfaces:
CSSStyleSheetFactory, Serializable
Direct Known Subclasses:

public abstract class AbstractCSSStyleSheetFactory extends Object implements CSSStyleSheetFactory, Serializable
Abstract class for CSS style sheet factories.
See Also:
  • Field Details

  • Constructor Details

    • AbstractCSSStyleSheetFactory

      public AbstractCSSStyleSheetFactory()
  • Method Details

    • createInlineStyle

      protected abstract InlineStyle createInlineStyle(Node owner)
      Create an inline style.
      owner - the style's owner node (an attribute node).
      the inline style.
    • createStyleSheet

      public abstract AbstractCSSStyleSheet createStyleSheet(String title, MediaQueryList media)
      Description copied from interface: CSSStyleSheetFactory
      Creates a stand-alone author style sheet.

      Specified by:
      createStyleSheet in interface CSSStyleSheetFactory
      title - the advisory title.
      media - the target media for style.
      the style sheet.
    • createRuleStyleSheet

      protected abstract AbstractCSSStyleSheet createRuleStyleSheet(AbstractCSSRule ownerRule, String title, MediaQueryList mediaList)
      Creates a CSS style sheet owned by a CSS rule.

      ownerRule - the owner rule.
      title - the advisory title.
      mediaList - the list of target media for style.
      the style sheet.
    • createLinkedStyleSheet

      protected abstract AbstractCSSStyleSheet createLinkedStyleSheet(Node ownerNode, String title, MediaQueryList mediaList)
      Creates an author (document-linked) CSS style sheet.

      ownerNode - the node that associates the style sheet to the document. In HTML it can be a link or style element. For style sheets that are included by other style sheets, the value of this parameter is null.
      title - the advisory title.
      mediaList - the target media list for style.
      the style sheet.
    • createAnonymousStyleDeclaration

      public abstract AbstractCSSStyleDeclaration createAnonymousStyleDeclaration(Node node)
      Description copied from interface: CSSStyleSheetFactory
      Create a style declaration for an anonymous inline box, associated to a text/cdata node.
      Specified by:
      createAnonymousStyleDeclaration in interface CSSStyleSheetFactory
      node - the node that has the declaration associated to it.
      the anonymous style declaration.
    • getSystemDefaultValue

      public abstract TypedValue getSystemDefaultValue(String propertyName)
      Description copied from interface: CSSStyleSheetFactory
      Get a system default value for the given property.

      If the lenientSystemValues flag is true, returns a reasonable default for the property. Otherwise, it returns a system default meta-value.

      Specified by:
      getSystemDefaultValue in interface CSSStyleSheetFactory
      propertyName - the property name.
      the system default css primitive value.
    • createSACParser

      protected abstract Parser createSACParser()
      Create a NSAC Parser with the proper flags enabled.
      the NSAC parser.
    • getParserFlags

      protected abstract EnumSet<Parser.Flag> getParserFlags()
      Get the parser flags that should be used by NSAC parsers.
      the NSAC parser flags.
    • hasCompatValueFlags

      protected abstract boolean hasCompatValueFlags()
      Check for compat value flags.
      true if the factory has compat value flags set.
    • getValueFactory

      protected abstract ValueFactory getValueFactory()
      Get a value factory set to the appropriate flags.
      the value factory.
    • getUserImportantStyleSheet

      protected abstract AbstractCSSStyleSheet getUserImportantStyleSheet()
      Get the priority-important part of the user style sheet, i.e. the style sheet with the declarations of important priority.
      the important part of the user style sheet.
    • getUserNormalStyleSheet

      protected abstract AbstractCSSStyleSheet getUserNormalStyleSheet()
      Get the normal part of the user style sheet, i.e. the style sheet with the declarations of normal priority.
      the normal part of the user style sheet.
    • setDefaultHTMLUserAgentSheet

      public abstract void setDefaultHTMLUserAgentSheet()
      Sets a default HTML default style sheet as the user agent style sheet.

      The sheet will be appropriately merged with the non-important part of the user-preference style sheet to provide the document's default sheet.

      Specified by:
      setDefaultHTMLUserAgentSheet in interface CSSStyleSheetFactory
    • getDefaultStyleSheet

      protected abstract DocumentCSSStyleSheet getDefaultStyleSheet(CSSDocument.ComplianceMode mode)
      Get the style sheet resulting from the merge of the user agent sheet and the non-important part of the user style sheet.
      mode - the compliance mode.
      the default style sheet at the top of the cascade.