Package com.helger.css.decl.visit
Interface ICSSVisitor
- All Known Implementing Classes:
CSSVisitorForUrl,DefaultCSSVisitor
public interface ICSSVisitor
Interface for visiting different elements of a CSS domain object.
- Author:
- Philip Helger
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()Before visiting starts.
Note: This is only called for complete style sheets, and not when starting e.g. with a declaration list!voidend()After visiting is done.
Note: This is only called for complete style sheets, and not when starting e.g. with a declaration list!voidonBeginFontFaceRule(CSSFontFaceRule aFontFaceRule) Called when a font-face rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)voidonBeginKeyframesBlock(CSSKeyframesBlock aKeyframesBlock) Called when a keyframes block starts.voidonBeginKeyframesRule(CSSKeyframesRule aKeyframesRule) Called when a keyframes rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)voidonBeginMediaRule(CSSMediaRule aMediaRule) Called when a media rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)voidonBeginPageMarginBlock(CSSPageMarginBlock aPageMarginBlock) Called when a page margin block starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)voidonBeginPageRule(CSSPageRule aPageRule) Called when a page rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration), contained page margin blocks are handled withonBeginPageMarginBlock(CSSPageMarginBlock)andonEndPageMarginBlock(CSSPageMarginBlock).voidonBeginStyleRule(CSSStyleRule aStyleRule) Called when a style rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)voidonBeginSupportsRule(CSSSupportsRule aSupportsRule) Called when a supports rule starts.voidonBeginViewportRule(CSSViewportRule aViewportRule) Called when a viewport rule starts.voidonDeclaration(CSSDeclaration aDeclaration) Called for each declarationvoidonEndFontFaceRule(CSSFontFaceRule aFontFaceRule) Called when a font-face rule ends.voidonEndKeyframesBlock(CSSKeyframesBlock aKeyframesBlock) Called when a keyframes block ends.voidonEndKeyframesRule(CSSKeyframesRule aKeyframesRule) Called when a keyframes rule ends.voidonEndMediaRule(CSSMediaRule aMediaRule) Called when a media rule ends.voidonEndPageMarginBlock(CSSPageMarginBlock aPageMarginBlock) Called when a page margin block ends.voidonEndPageRule(CSSPageRule aPageRule) Called when a page rule ends.voidonEndStyleRule(CSSStyleRule aStyleRule) Called when a style rule ends.voidonEndSupportsRule(CSSSupportsRule aSupportsRule) Called when a supports rule ends.voidonEndViewportRule(CSSViewportRule aViewportRule) Called when a viewport rule ends.voidonImport(CSSImportRule aImportRule) Called on CSS import statementvoidonNamespace(CSSNamespaceRule aNamespaceRule) Called on CSS namespace statementvoidonStyleRuleSelector(CSSSelector aSelector) Called for each selector of a style rulevoidonUnknownRule(CSSUnknownRule aUnknownRule) Called when an unknown rule is encountered.
-
Method Details
-
begin
void begin()Before visiting starts.
Note: This is only called for complete style sheets, and not when starting e.g. with a declaration list! -
onImport
Called on CSS import statement- Parameters:
aImportRule- Other imported CSS. Nevernull.
-
onNamespace
Called on CSS namespace statement- Parameters:
aNamespaceRule- The namespace rule. Nevernull.
-
onDeclaration
Called for each declaration- Parameters:
aDeclaration- The declaration. Nevernull.
-
onBeginStyleRule
Called when a style rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)- Parameters:
aStyleRule- The style rule. Nevernull.
-
onStyleRuleSelector
Called for each selector of a style rule- Parameters:
aSelector- The style rule selector. Nevernull.
-
onEndStyleRule
Called when a style rule ends.- Parameters:
aStyleRule- The style rule. Nevernull.
-
onBeginPageRule
Called when a page rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration), contained page margin blocks are handled withonBeginPageMarginBlock(CSSPageMarginBlock)andonEndPageMarginBlock(CSSPageMarginBlock).- Parameters:
aPageRule- The page rule. Nevernull.
-
onBeginPageMarginBlock
Called when a page margin block starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)- Parameters:
aPageMarginBlock- The page margin block. Nevernull.
-
onEndPageMarginBlock
Called when a page margin block ends.- Parameters:
aPageMarginBlock- The page margin block. Nevernull.
-
onEndPageRule
Called when a page rule ends.- Parameters:
aPageRule- The page rule. Nevernull.
-
onBeginFontFaceRule
Called when a font-face rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)- Parameters:
aFontFaceRule- The font-face rule. Nevernull.
-
onEndFontFaceRule
Called when a font-face rule ends.- Parameters:
aFontFaceRule- The font-face rule. Nevernull.
-
onBeginMediaRule
Called when a media rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)- Parameters:
aMediaRule- The media rule. Nevernull.
-
onEndMediaRule
Called when a media rule ends.- Parameters:
aMediaRule- The media rule. Nevernull.
-
onBeginKeyframesRule
Called when a keyframes rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)- Parameters:
aKeyframesRule- The keyframes rule. Nevernull.
-
onBeginKeyframesBlock
Called when a keyframes block starts.- Parameters:
aKeyframesBlock- The keyframes rule block. Nevernull.
-
onEndKeyframesBlock
Called when a keyframes block ends.- Parameters:
aKeyframesBlock- The keyframes rule block. Nevernull.
-
onEndKeyframesRule
Called when a keyframes rule ends.- Parameters:
aKeyframesRule- The keyframes rule. Nevernull.
-
onBeginViewportRule
Called when a viewport rule starts.- Parameters:
aViewportRule- The viewport rule. Nevernull.
-
onEndViewportRule
Called when a viewport rule ends.- Parameters:
aViewportRule- The viewport rule. Nevernull.
-
onBeginSupportsRule
Called when a supports rule starts.- Parameters:
aSupportsRule- The supports rule. Nevernull.
-
onEndSupportsRule
Called when a supports rule ends.- Parameters:
aSupportsRule- The supports rule. Nevernull.
-
onUnknownRule
Called when an unknown rule is encountered.- Parameters:
aUnknownRule- The unknown rule. Nevernull.
-
end
void end()After visiting is done.
Note: This is only called for complete style sheets, and not when starting e.g. with a declaration list!
-