Class EmptyCSSHandler
- All Implemented Interfaces:
CSSErrorHandler,CSSHandler
CSSHandler methods
except
property(String, LexicalUnit, boolean).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReceive notification of a comment.voidEnd of @counter-style rule.voidEnd of feature map.voidReceive notification of the end of a font face rule.voidEnd of font feature values rule.voidEnd of @keyframe.voidEnd of @keyframes rule.voidReceive notification of the end of a margin rule.voidendMedia(MediaQueryList media) Receive notification of the end of a media rule.voidReceive notification of the end of the stream being parsed.voidendPage(PageSelectorList pageSelectorList) Receive notification of the end of a page rule.voidendProperty(boolean discard) End of @property rule.voidendSelector(SelectorList selectors) Receive notification of the end of a style rule.voidendSupports(BooleanCondition condition) Receive notification of the end of a supports rule.voidEnd of @viewport rule.voiderror(CSSParseException exception) Receive notification of an error.voidignorableAtRule(String atRule) Receive notification of an unknown @-rule not supported by this parser.voidimportStyle(String uri, MediaQueryList media, String defaultNamespaceURI) Receive notification of a import rule in the style sheet.voidlexicalProperty(String propertyName, LexicalUnit lunit, boolean important) Receive notification of a property declaration that must be processed as a lexical value.voidnamespaceDeclaration(String prefix, String uri) Receive notification of a namespace declaration.voidparseStart(ParserControl parserctl) Receive notification of the beginning of the parse process.voidstartCounterStyle(String name) Start a @counter-style rule.voidstartFeatureMap(String mapName) Start a feature map.voidReceive notification of the beginning of a font face rule.voidstartFontFeatures(String[] familyName) Start a font feature values rule.voidstartKeyframe(LexicalUnit keyframeSelector) Start a @keyframe.voidstartKeyframes(String name) Start a @keyframes rule.voidstartMargin(String name) Receive notification of the beginning of a margin-box rule.voidstartMedia(MediaQueryList media) Receive notification of the beginning of a media rule.voidstartPage(PageSelectorList pageSelectorList) Receive notification of the beginning of a page rule.voidstartProperty(String name) Start a @property rule.voidstartSelector(SelectorList selectors) Receive notification of the beginning of a style rule.voidstartSupports(BooleanCondition condition) Receive notification of the beginning of a supports rule.voidStart a @viewport rule.voidwarning(CSSParseException exception) Receive notification of a warning.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.sf.carte.doc.style.css.nsac.CSSHandler
property
-
Constructor Details
-
EmptyCSSHandler
protected EmptyCSSHandler()
-
-
Method Details
-
parseStart
Description copied from interface:CSSHandlerReceive 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,parseRuleorparseStyleDeclarationmethods were called.- Specified by:
parseStartin interfaceCSSHandler- Parameters:
parserctl- an object that allows convenient access to certain parser functionalities.
-
endOfStream
public void endOfStream()Description copied from interface:CSSHandlerReceive 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:
endOfStreamin interfaceCSSHandler
-
comment
Description copied from interface:CSSHandlerReceive 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:
commentin interfaceCSSHandler- Parameters:
text- The comment.precededByLF-trueif a Line Feed character was found since the previous event.
-
ignorableAtRule
Description copied from interface:CSSHandlerReceive notification of an unknown @-rule not supported by this parser.- Specified by:
ignorableAtRulein interfaceCSSHandler- Parameters:
atRule- The complete @-rule.
-
namespaceDeclaration
Description copied from interface:CSSHandlerReceive notification of a namespace declaration.- Specified by:
namespaceDeclarationin interfaceCSSHandler- Parameters:
prefix-nullif this is the default namespaceuri- The URI for this namespace.
-
importStyle
Description copied from interface:CSSHandlerReceive notification of a import rule in the style sheet.- Specified by:
importStylein interfaceCSSHandler- 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
Description copied from interface:CSSHandlerReceive 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 everystartMedia()event.- Specified by:
startMediain interfaceCSSHandler- Parameters:
media- The intended destination media for style information.
-
endMedia
Description copied from interface:CSSHandlerReceive notification of the end of a media rule.- Specified by:
endMediain interfaceCSSHandler- Parameters:
media- The intended destination media for style information.
-
startPage
Description copied from interface:CSSHandlerReceive 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 everystartPage()event.- Specified by:
startPagein interfaceCSSHandler- Parameters:
pageSelectorList- the page selector list (if any,nullotherwise)
-
endPage
Description copied from interface:CSSHandlerReceive notification of the end of a page rule.- Specified by:
endPagein interfaceCSSHandler- Parameters:
pageSelectorList- the page selector list (if any,nullotherwise)
-
startMargin
Description copied from interface:CSSHandlerReceive 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 everystartMargin()event.- Specified by:
startMarginin interfaceCSSHandler- Parameters:
name- the name of the rule.
-
endMargin
public void endMargin()Description copied from interface:CSSHandlerReceive notification of the end of a margin rule.- Specified by:
endMarginin interfaceCSSHandler
-
startFontFace
public void startFontFace()Description copied from interface:CSSHandlerReceive 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 everystartFontFace()event.- Specified by:
startFontFacein interfaceCSSHandler
-
endFontFace
public void endFontFace()Description copied from interface:CSSHandlerReceive notification of the end of a font face rule.- Specified by:
endFontFacein interfaceCSSHandler
-
startCounterStyle
Description copied from interface:CSSHandlerStart a @counter-style rule.- Specified by:
startCounterStylein interfaceCSSHandler- Parameters:
name- the counter-style name.
-
endCounterStyle
public void endCounterStyle()Description copied from interface:CSSHandlerEnd of @counter-style rule.- Specified by:
endCounterStylein interfaceCSSHandler
-
startKeyframes
Description copied from interface:CSSHandlerStart a @keyframes rule.- Specified by:
startKeyframesin interfaceCSSHandler- Parameters:
name- the keyframes name.
-
endKeyframes
public void endKeyframes()Description copied from interface:CSSHandlerEnd of @keyframes rule.- Specified by:
endKeyframesin interfaceCSSHandler
-
startKeyframe
Description copied from interface:CSSHandlerStart a @keyframe.- Specified by:
startKeyframein interfaceCSSHandler- Parameters:
keyframeSelector- the keyframe selector.
-
endKeyframe
public void endKeyframe()Description copied from interface:CSSHandlerEnd of @keyframe.- Specified by:
endKeyframein interfaceCSSHandler
-
startFontFeatures
Description copied from interface:CSSHandlerStart a font feature values rule.- Specified by:
startFontFeaturesin interfaceCSSHandler- Parameters:
familyName- the font family names.
-
endFontFeatures
public void endFontFeatures()Description copied from interface:CSSHandlerEnd of font feature values rule.- Specified by:
endFontFeaturesin interfaceCSSHandler
-
startFeatureMap
Description copied from interface:CSSHandlerStart a feature map.- Specified by:
startFeatureMapin interfaceCSSHandler- Parameters:
mapName- the map name.
-
endFeatureMap
public void endFeatureMap()Description copied from interface:CSSHandlerEnd of feature map.- Specified by:
endFeatureMapin interfaceCSSHandler
-
startProperty
Description copied from interface:CSSHandlerStart a @property rule.- Specified by:
startPropertyin interfaceCSSHandler- Parameters:
name- the custom property name.
-
endProperty
public void endProperty(boolean discard) Description copied from interface:CSSHandlerEnd of @property rule.- Specified by:
endPropertyin interfaceCSSHandler- Parameters:
discard- iftrue, the rule should be discarded.
-
startSupports
Description copied from interface:CSSHandlerReceive 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 everystartSupports()event.- Specified by:
startSupportsin interfaceCSSHandler- Parameters:
condition- the supports condition.
-
endSupports
Description copied from interface:CSSHandlerReceive notification of the end of a supports rule.- Specified by:
endSupportsin interfaceCSSHandler- Parameters:
condition- the supports condition.
-
startSelector
Description copied from interface:CSSHandlerReceive notification of the beginning of a style rule.- Specified by:
startSelectorin interfaceCSSHandler- Parameters:
selectors- the intended selectors for next declarations.
-
endSelector
Description copied from interface:CSSHandlerReceive notification of the end of a style rule.- Specified by:
endSelectorin interfaceCSSHandler- Parameters:
selectors- the intended selectors for the previous declarations.
-
startViewport
public void startViewport()Description copied from interface:CSSHandlerStart a @viewport rule.Note:
@viewportrules were removed by W3C in February 2020.- Specified by:
startViewportin interfaceCSSHandler
-
endViewport
public void endViewport()Description copied from interface:CSSHandlerEnd of @viewport rule.- Specified by:
endViewportin interfaceCSSHandler
-
lexicalProperty
Description copied from interface:CSSHandlerReceive notification of a property declaration that must be processed as a lexical value.- Specified by:
lexicalPropertyin interfaceCSSHandler- Parameters:
propertyName- the name of the property.lunit- the value of the property.important- is this property important ?
-
warning
Description copied from interface:CSSErrorHandlerReceive notification of a warning.- Specified by:
warningin interfaceCSSErrorHandler- Parameters:
exception- The warning information encapsulated in a CSS parse exception.- Throws:
CSSParseException- if this handler decides that the parse process cannot continue.
-
error
Description copied from interface:CSSErrorHandlerReceive 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:
errorin interfaceCSSErrorHandler- Parameters:
exception- The error information encapsulated in a CSS parse exception.- Throws:
CSSParseException- if this handler decides that the parse process cannot continue.
-