Class EmptyCSSHandler

java.lang.Object
io.sf.carte.doc.style.css.parser.EmptyCSSHandler
All Implemented Interfaces:
CSSErrorHandler, CSSHandler

public abstract class EmptyCSSHandler extends Object implements CSSHandler, CSSErrorHandler
Handler that implements empty bodies for all CSSHandler methods except property(String, LexicalUnit, boolean).
  • Constructor Details

    • EmptyCSSHandler

      protected EmptyCSSHandler()
  • Method Details

    • parseStart

      public void parseStart(ParserControl parserctl)
      Description copied from interface: CSSHandler
      Receive notification of the beginning of the parse process.

      The CSS parser will invoke this method only once, before any other methods in this interface, and only when one of the parseStyleSheet, parseRule or parseStyleDeclaration methods were called.

      Specified by:
      parseStart in interface CSSHandler
      Parameters:
      parserctl - an object that allows convenient access to certain parser functionalities.
    • endOfStream

      public void endOfStream()
      Description copied from interface: CSSHandler
      Receive notification of the end of the stream being parsed.

      The CSS parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method unless it has reached the end of input.

      Specified by:
      endOfStream in interface CSSHandler
    • comment

      public void comment(String text, boolean precededByLF)
      Description copied from interface: CSSHandler
      Receive notification of a comment. If the comment appears in a declaration (e.g. color: /* comment */ blue;), the parser notifies the comment before the declaration.
      Specified by:
      comment in interface CSSHandler
      Parameters:
      text - The comment.
      precededByLF - true if a Line Feed character was found since the previous event.
    • ignorableAtRule

      public void ignorableAtRule(String atRule)
      Description copied from interface: CSSHandler
      Receive notification of an unknown @-rule not supported by this parser.
      Specified by:
      ignorableAtRule in interface CSSHandler
      Parameters:
      atRule - The complete @-rule.
    • namespaceDeclaration

      public void namespaceDeclaration(String prefix, String uri)
      Description copied from interface: CSSHandler
      Receive notification of a namespace declaration.
      Specified by:
      namespaceDeclaration in interface CSSHandler
      Parameters:
      prefix - null if this is the default namespace
      uri - The URI for this namespace.
    • importStyle

      public void importStyle(String uri, MediaQueryList media, String defaultNamespaceURI)
      Description copied from interface: CSSHandler
      Receive notification of a import rule in the style sheet.
      Specified by:
      importStyle in interface CSSHandler
      Parameters:
      uri - The URI of the imported style sheet.
      media - The intended destination media for style information.
      defaultNamespaceURI - The default namespace URI for the imported style sheet.
    • startMedia

      public void startMedia(MediaQueryList media)
      Description copied from interface: CSSHandler
      Receive notification of the beginning of a media rule.

      The Parser will invoke this method at the beginning of every media rule in the style sheet. There will be a corresponding endMedia() event for every startMedia() event.

      Specified by:
      startMedia in interface CSSHandler
      Parameters:
      media - The intended destination media for style information.
    • endMedia

      public void endMedia(MediaQueryList media)
      Description copied from interface: CSSHandler
      Receive notification of the end of a media rule.
      Specified by:
      endMedia in interface CSSHandler
      Parameters:
      media - The intended destination media for style information.
    • startPage

      public void startPage(PageSelectorList pageSelectorList)
      Description copied from interface: CSSHandler
      Receive notification of the beginning of a page rule.

      The Parser will invoke this method at the beginning of every page rule in the style sheet. There will be a corresponding endPage() event for every startPage() event.

      Specified by:
      startPage in interface CSSHandler
      Parameters:
      pageSelectorList - the page selector list (if any, null otherwise)
    • endPage

      public void endPage(PageSelectorList pageSelectorList)
      Description copied from interface: CSSHandler
      Receive notification of the end of a page rule.
      Specified by:
      endPage in interface CSSHandler
      Parameters:
      pageSelectorList - the page selector list (if any, null otherwise)
    • startMargin

      public void startMargin(String name)
      Description copied from interface: CSSHandler
      Receive notification of the beginning of a margin-box rule.

      The Parser will invoke this method at the beginning of every margin rule in the style sheet. There will be a corresponding endMargin() event for every startMargin() event.

      Specified by:
      startMargin in interface CSSHandler
      Parameters:
      name - the name of the rule.
    • endMargin

      public void endMargin()
      Description copied from interface: CSSHandler
      Receive notification of the end of a margin rule.
      Specified by:
      endMargin in interface CSSHandler
    • startFontFace

      public void startFontFace()
      Description copied from interface: CSSHandler
      Receive notification of the beginning of a font face rule.

      The Parser will invoke this method at the beginning of every font face statement in the style sheet. There will be a corresponding endFontFace() event for every startFontFace() event.

      Specified by:
      startFontFace in interface CSSHandler
    • endFontFace

      public void endFontFace()
      Description copied from interface: CSSHandler
      Receive notification of the end of a font face rule.
      Specified by:
      endFontFace in interface CSSHandler
    • startCounterStyle

      public void startCounterStyle(String name)
      Description copied from interface: CSSHandler
      Start a @counter-style rule.
      Specified by:
      startCounterStyle in interface CSSHandler
      Parameters:
      name - the counter-style name.
    • endCounterStyle

      public void endCounterStyle()
      Description copied from interface: CSSHandler
      End of @counter-style rule.
      Specified by:
      endCounterStyle in interface CSSHandler
    • startKeyframes

      public void startKeyframes(String name)
      Description copied from interface: CSSHandler
      Start a @keyframes rule.
      Specified by:
      startKeyframes in interface CSSHandler
      Parameters:
      name - the keyframes name.
    • endKeyframes

      public void endKeyframes()
      Description copied from interface: CSSHandler
      End of @keyframes rule.
      Specified by:
      endKeyframes in interface CSSHandler
    • startKeyframe

      public void startKeyframe(LexicalUnit keyframeSelector)
      Description copied from interface: CSSHandler
      Start a @keyframe.
      Specified by:
      startKeyframe in interface CSSHandler
      Parameters:
      keyframeSelector - the keyframe selector.
    • endKeyframe

      public void endKeyframe()
      Description copied from interface: CSSHandler
      End of @keyframe.
      Specified by:
      endKeyframe in interface CSSHandler
    • startFontFeatures

      public void startFontFeatures(String[] familyName)
      Description copied from interface: CSSHandler
      Start a font feature values rule.
      Specified by:
      startFontFeatures in interface CSSHandler
      Parameters:
      familyName - the font family names.
    • endFontFeatures

      public void endFontFeatures()
      Description copied from interface: CSSHandler
      End of font feature values rule.
      Specified by:
      endFontFeatures in interface CSSHandler
    • startFeatureMap

      public void startFeatureMap(String mapName)
      Description copied from interface: CSSHandler
      Start a feature map.
      Specified by:
      startFeatureMap in interface CSSHandler
      Parameters:
      mapName - the map name.
    • endFeatureMap

      public void endFeatureMap()
      Description copied from interface: CSSHandler
      End of feature map.
      Specified by:
      endFeatureMap in interface CSSHandler
    • startProperty

      public void startProperty(String name)
      Description copied from interface: CSSHandler
      Start a @property rule.
      Specified by:
      startProperty in interface CSSHandler
      Parameters:
      name - the custom property name.
    • endProperty

      public void endProperty(boolean discard)
      Description copied from interface: CSSHandler
      End of @property rule.
      Specified by:
      endProperty in interface CSSHandler
      Parameters:
      discard - if true, the rule should be discarded.
    • startSupports

      public void startSupports(BooleanCondition condition)
      Description copied from interface: CSSHandler
      Receive notification of the beginning of a supports rule.

      The Parser will invoke this method at the beginning of every supports rule in the style sheet. There will be a corresponding endSupports() event for every startSupports() event.

      Specified by:
      startSupports in interface CSSHandler
      Parameters:
      condition - the supports condition.
    • endSupports

      public void endSupports(BooleanCondition condition)
      Description copied from interface: CSSHandler
      Receive notification of the end of a supports rule.
      Specified by:
      endSupports in interface CSSHandler
      Parameters:
      condition - the supports condition.
    • startSelector

      public void startSelector(SelectorList selectors)
      Description copied from interface: CSSHandler
      Receive notification of the beginning of a style rule.
      Specified by:
      startSelector in interface CSSHandler
      Parameters:
      selectors - the intended selectors for next declarations.
    • endSelector

      public void endSelector(SelectorList selectors)
      Description copied from interface: CSSHandler
      Receive notification of the end of a style rule.
      Specified by:
      endSelector in interface CSSHandler
      Parameters:
      selectors - the intended selectors for the previous declarations.
    • startViewport

      public void startViewport()
      Description copied from interface: CSSHandler
      Start a @viewport rule.

      Note: @viewport rules were removed by W3C in February 2020.

      Specified by:
      startViewport in interface CSSHandler
    • endViewport

      public void endViewport()
      Description copied from interface: CSSHandler
      End of @viewport rule.
      Specified by:
      endViewport in interface CSSHandler
    • lexicalProperty

      public void lexicalProperty(String propertyName, LexicalUnit lunit, boolean important)
      Description copied from interface: CSSHandler
      Receive notification of a property declaration that must be processed as a lexical value.
      Specified by:
      lexicalProperty in interface CSSHandler
      Parameters:
      propertyName - the name of the property.
      lunit - the value of the property.
      important - is this property important ?
    • warning

      public void warning(CSSParseException exception) throws CSSParseException
      Description copied from interface: CSSErrorHandler
      Receive notification of a warning.
      Specified by:
      warning in interface CSSErrorHandler
      Parameters:
      exception - The warning information encapsulated in a CSS parse exception.
      Throws:
      CSSParseException - if this handler decides that the parse process cannot continue.
    • error

      public void error(CSSParseException exception) throws CSSParseException
      Description copied from interface: CSSErrorHandler
      Receive notification of an error.

      This corresponds to the definition of "error" in section 1.2 of the W3C XML 1.0 Recommendation. For example, a validating parser would use this callback to report the violation of a validity constraint. The default behaviour is to take no action.

      Specified by:
      error in interface CSSErrorHandler
      Parameters:
      exception - The error information encapsulated in a CSS parse exception.
      Throws:
      CSSParseException - if this handler decides that the parse process cannot continue.