- All Implemented Interfaces:
CSSErrorHandler
,CSSHandler
CSSHandler
methods
except
property(String, LexicalUnit, boolean)
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Receive notification of a comment.void
End of @counter-style rule.void
End of feature map.void
Receive notification of the end of a font face rule.void
End of font feature values rule.void
End of @keyframe.void
End of @keyframes rule.void
Receive notification of the end of a margin rule.void
endMedia
(MediaQueryList media) Receive notification of the end of a media rule.void
Receive notification of the end of the stream being parsed.void
endPage
(PageSelectorList pageSelectorList) Receive notification of the end of a page rule.void
endProperty
(boolean discard) End of @property rule.void
endSelector
(SelectorList selectors) Receive notification of the end of a style rule.void
endSupports
(BooleanCondition condition) Receive notification of the end of a supports rule.void
End of @viewport rule.void
error
(CSSParseException exception) Receive notification of an error.void
ignorableAtRule
(String atRule) Receive notification of an unknown @-rule not supported by this parser.void
importStyle
(String uri, MediaQueryList media, String defaultNamespaceURI) Receive notification of a import rule in the style sheet.void
lexicalProperty
(String propertyName, LexicalUnit lunit, boolean important) Receive notification of a property declaration that must be processed as a lexical value.void
namespaceDeclaration
(String prefix, String uri) Receive notification of a namespace declaration.void
parseStart
(ParserControl parserctl) Receive notification of the beginning of the parse process.void
startCounterStyle
(String name) Start a @counter-style rule.void
startFeatureMap
(String mapName) Start a feature map.void
Receive notification of the beginning of a font face rule.void
startFontFeatures
(String[] familyName) Start a font feature values rule.void
startKeyframe
(LexicalUnit keyframeSelector) Start a @keyframe.void
startKeyframes
(String name) Start a @keyframes rule.void
startMargin
(String name) Receive notification of the beginning of a margin-box rule.void
startMedia
(MediaQueryList media) Receive notification of the beginning of a media rule.void
startPage
(PageSelectorList pageSelectorList) Receive notification of the beginning of a page rule.void
startProperty
(String name) Start a @property rule.void
startSelector
(SelectorList selectors) Receive notification of the beginning of a style rule.void
startSupports
(BooleanCondition condition) Receive notification of the beginning of a supports rule.void
Start a @viewport rule.void
warning
(CSSParseException exception) Receive notification of a warning.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.sf.carte.doc.style.css.nsac.CSSHandler
getStyleSheet, property
-
Constructor Details
-
EmptyCSSHandler
protected EmptyCSSHandler()
-
-
Method Details
-
parseStart
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
orparseStyleDeclaration
methods were called.- Specified by:
parseStart
in interfaceCSSHandler
- 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 interfaceCSSHandler
-
comment
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 interfaceCSSHandler
- Parameters:
text
- The comment.precededByLF
-true
if a Line Feed character was found since the previous event.
-
ignorableAtRule
Description copied from interface:CSSHandler
Receive notification of an unknown @-rule not supported by this parser.- Specified by:
ignorableAtRule
in interfaceCSSHandler
- Parameters:
atRule
- The complete @-rule.
-
namespaceDeclaration
Description copied from interface:CSSHandler
Receive notification of a namespace declaration.- Specified by:
namespaceDeclaration
in interfaceCSSHandler
- Parameters:
prefix
-null
if this is the default namespaceuri
- The URI for this namespace.
-
importStyle
Description copied from interface:CSSHandler
Receive notification of a import rule in the style sheet.- Specified by:
importStyle
in 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: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 everystartMedia()
event.- Specified by:
startMedia
in interfaceCSSHandler
- Parameters:
media
- The intended destination media for style information.
-
endMedia
Description copied from interface:CSSHandler
Receive notification of the end of a media rule.- Specified by:
endMedia
in interfaceCSSHandler
- Parameters:
media
- The intended destination media for style information.
-
startPage
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 everystartPage()
event.- Specified by:
startPage
in interfaceCSSHandler
- Parameters:
pageSelectorList
- the page selector list (if any,null
otherwise)
-
endPage
Description copied from interface:CSSHandler
Receive notification of the end of a page rule.- Specified by:
endPage
in interfaceCSSHandler
- Parameters:
pageSelectorList
- the page selector list (if any,null
otherwise)
-
startMargin
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 everystartMargin()
event.- Specified by:
startMargin
in interfaceCSSHandler
- 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 interfaceCSSHandler
-
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 everystartFontFace()
event.- Specified by:
startFontFace
in interfaceCSSHandler
-
endFontFace
public void endFontFace()Description copied from interface:CSSHandler
Receive notification of the end of a font face rule.- Specified by:
endFontFace
in interfaceCSSHandler
-
startCounterStyle
Description copied from interface:CSSHandler
Start a @counter-style rule.- Specified by:
startCounterStyle
in interfaceCSSHandler
- Parameters:
name
- the counter-style name.
-
endCounterStyle
public void endCounterStyle()Description copied from interface:CSSHandler
End of @counter-style rule.- Specified by:
endCounterStyle
in interfaceCSSHandler
-
startKeyframes
Description copied from interface:CSSHandler
Start a @keyframes rule.- Specified by:
startKeyframes
in interfaceCSSHandler
- Parameters:
name
- the keyframes name.
-
endKeyframes
public void endKeyframes()Description copied from interface:CSSHandler
End of @keyframes rule.- Specified by:
endKeyframes
in interfaceCSSHandler
-
startKeyframe
Description copied from interface:CSSHandler
Start a @keyframe.- Specified by:
startKeyframe
in interfaceCSSHandler
- Parameters:
keyframeSelector
- the keyframe selector.
-
endKeyframe
public void endKeyframe()Description copied from interface:CSSHandler
End of @keyframe.- Specified by:
endKeyframe
in interfaceCSSHandler
-
startFontFeatures
Description copied from interface:CSSHandler
Start a font feature values rule.- Specified by:
startFontFeatures
in interfaceCSSHandler
- 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 interfaceCSSHandler
-
startFeatureMap
Description copied from interface:CSSHandler
Start a feature map.- Specified by:
startFeatureMap
in interfaceCSSHandler
- Parameters:
mapName
- the map name.
-
endFeatureMap
public void endFeatureMap()Description copied from interface:CSSHandler
End of feature map.- Specified by:
endFeatureMap
in interfaceCSSHandler
-
startProperty
Description copied from interface:CSSHandler
Start a @property rule.- Specified by:
startProperty
in interfaceCSSHandler
- 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 interfaceCSSHandler
- Parameters:
discard
- iftrue
, the rule should be discarded.
-
startSupports
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 everystartSupports()
event.- Specified by:
startSupports
in interfaceCSSHandler
- Parameters:
condition
- the supports condition.
-
endSupports
Description copied from interface:CSSHandler
Receive notification of the end of a supports rule.- Specified by:
endSupports
in interfaceCSSHandler
- Parameters:
condition
- the supports condition.
-
startSelector
Description copied from interface:CSSHandler
Receive notification of the beginning of a style rule.- Specified by:
startSelector
in interfaceCSSHandler
- Parameters:
selectors
- the intended selectors for next declarations.
-
endSelector
Description copied from interface:CSSHandler
Receive notification of the end of a style rule.- Specified by:
endSelector
in interfaceCSSHandler
- 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 interfaceCSSHandler
-
endViewport
public void endViewport()Description copied from interface:CSSHandler
End of @viewport rule.- Specified by:
endViewport
in interfaceCSSHandler
-
lexicalProperty
Description copied from interface:CSSHandler
Receive notification of a property declaration that must be processed as a lexical value.- Specified by:
lexicalProperty
in interfaceCSSHandler
- Parameters:
propertyName
- the name of the property.lunit
- the value of the property.important
- is this property important ?
-
warning
Description copied from interface:CSSErrorHandler
Receive notification of a warning.- Specified by:
warning
in 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: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 interfaceCSSErrorHandler
- Parameters:
exception
- The error information encapsulated in a CSS parse exception.- Throws:
CSSParseException
- if this handler decides that the parse process cannot continue.
-