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:
DefaultCSSVisitor for an empty default implementation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
begin()
Before visiting starts.
Note: This is only called for complete style sheets, and not when starting e.g. with a declaration list!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!void
onBeginFontFaceRule(CSSFontFaceRule aFontFaceRule)
Called when a font-face rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)
void
onBeginKeyframesBlock(CSSKeyframesBlock aKeyframesBlock)
Called when a keyframes block starts.void
onBeginKeyframesRule(CSSKeyframesRule aKeyframesRule)
Called when a keyframes rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)
void
onBeginMediaRule(CSSMediaRule aMediaRule)
Called when a media rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)
void
onBeginPageMarginBlock(CSSPageMarginBlock aPageMarginBlock)
Called when a page margin block starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)
void
onBeginPageRule(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)
.void
onBeginStyleRule(CSSStyleRule aStyleRule)
Called when a style rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)
void
onBeginSupportsRule(CSSSupportsRule aSupportsRule)
Called when a supports rule starts.void
onBeginViewportRule(CSSViewportRule aViewportRule)
Called when a viewport rule starts.void
onDeclaration(CSSDeclaration aDeclaration)
Called for each declarationvoid
onEndFontFaceRule(CSSFontFaceRule aFontFaceRule)
Called when a font-face rule ends.void
onEndKeyframesBlock(CSSKeyframesBlock aKeyframesBlock)
Called when a keyframes block ends.void
onEndKeyframesRule(CSSKeyframesRule aKeyframesRule)
Called when a keyframes rule ends.void
onEndMediaRule(CSSMediaRule aMediaRule)
Called when a media rule ends.void
onEndPageMarginBlock(CSSPageMarginBlock aPageMarginBlock)
Called when a page margin block ends.void
onEndPageRule(CSSPageRule aPageRule)
Called when a page rule ends.void
onEndStyleRule(CSSStyleRule aStyleRule)
Called when a style rule ends.void
onEndSupportsRule(CSSSupportsRule aSupportsRule)
Called when a supports rule ends.void
onEndViewportRule(CSSViewportRule aViewportRule)
Called when a viewport rule ends.void
onImport(CSSImportRule aImportRule)
Called on CSS import statementvoid
onNamespace(CSSNamespaceRule aNamespaceRule)
Called on CSS namespace statementvoid
onStyleRuleSelector(CSSSelector aSelector)
Called for each selector of a style rulevoid
onUnknownRule(CSSUnknownRule aUnknownRule)
Called when an unknown rule is encountered.
-
-
-
Method Detail
-
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
void onImport(@Nonnull CSSImportRule aImportRule)
Called on CSS import statement- Parameters:
aImportRule
- Other imported CSS. Nevernull
.
-
onNamespace
void onNamespace(@Nonnull CSSNamespaceRule aNamespaceRule)
Called on CSS namespace statement- Parameters:
aNamespaceRule
- The namespace rule. Nevernull
.
-
onDeclaration
void onDeclaration(@Nonnull CSSDeclaration aDeclaration)
Called for each declaration- Parameters:
aDeclaration
- The declaration. Nevernull
.
-
onBeginStyleRule
void onBeginStyleRule(@Nonnull CSSStyleRule aStyleRule)
Called when a style rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)
- Parameters:
aStyleRule
- The style rule. Nevernull
.
-
onStyleRuleSelector
void onStyleRuleSelector(@Nonnull CSSSelector aSelector)
Called for each selector of a style rule- Parameters:
aSelector
- The style rule selector. Nevernull
.
-
onEndStyleRule
void onEndStyleRule(@Nonnull CSSStyleRule aStyleRule)
Called when a style rule ends.- Parameters:
aStyleRule
- The style rule. Nevernull
.
-
onBeginPageRule
void onBeginPageRule(@Nonnull 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)
.- Parameters:
aPageRule
- The page rule. Nevernull
.
-
onBeginPageMarginBlock
void onBeginPageMarginBlock(@Nonnull CSSPageMarginBlock aPageMarginBlock)
Called when a page margin block starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)
- Parameters:
aPageMarginBlock
- The page margin block. Nevernull
.
-
onEndPageMarginBlock
void onEndPageMarginBlock(@Nonnull CSSPageMarginBlock aPageMarginBlock)
Called when a page margin block ends.- Parameters:
aPageMarginBlock
- The page margin block. Nevernull
.
-
onEndPageRule
void onEndPageRule(@Nonnull CSSPageRule aPageRule)
Called when a page rule ends.- Parameters:
aPageRule
- The page rule. Nevernull
.
-
onBeginFontFaceRule
void onBeginFontFaceRule(@Nonnull CSSFontFaceRule aFontFaceRule)
Called when a font-face rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)
- Parameters:
aFontFaceRule
- The font-face rule. Nevernull
.
-
onEndFontFaceRule
void onEndFontFaceRule(@Nonnull CSSFontFaceRule aFontFaceRule)
Called when a font-face rule ends.- Parameters:
aFontFaceRule
- The font-face rule. Nevernull
.
-
onBeginMediaRule
void onBeginMediaRule(@Nonnull CSSMediaRule aMediaRule)
Called when a media rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)
- Parameters:
aMediaRule
- The media rule. Nevernull
.
-
onEndMediaRule
void onEndMediaRule(@Nonnull CSSMediaRule aMediaRule)
Called when a media rule ends.- Parameters:
aMediaRule
- The media rule. Nevernull
.
-
onBeginKeyframesRule
void onBeginKeyframesRule(@Nonnull CSSKeyframesRule aKeyframesRule)
Called when a keyframes rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)
- Parameters:
aKeyframesRule
- The keyframes rule. Nevernull
.
-
onBeginKeyframesBlock
void onBeginKeyframesBlock(@Nonnull CSSKeyframesBlock aKeyframesBlock)
Called when a keyframes block starts.- Parameters:
aKeyframesBlock
- The keyframes rule block. Nevernull
.
-
onEndKeyframesBlock
void onEndKeyframesBlock(@Nonnull CSSKeyframesBlock aKeyframesBlock)
Called when a keyframes block ends.- Parameters:
aKeyframesBlock
- The keyframes rule block. Nevernull
.
-
onEndKeyframesRule
void onEndKeyframesRule(@Nonnull CSSKeyframesRule aKeyframesRule)
Called when a keyframes rule ends.- Parameters:
aKeyframesRule
- The keyframes rule. Nevernull
.
-
onBeginViewportRule
void onBeginViewportRule(@Nonnull CSSViewportRule aViewportRule)
Called when a viewport rule starts.- Parameters:
aViewportRule
- The viewport rule. Nevernull
.
-
onEndViewportRule
void onEndViewportRule(@Nonnull CSSViewportRule aViewportRule)
Called when a viewport rule ends.- Parameters:
aViewportRule
- The viewport rule. Nevernull
.
-
onBeginSupportsRule
void onBeginSupportsRule(@Nonnull CSSSupportsRule aSupportsRule)
Called when a supports rule starts.- Parameters:
aSupportsRule
- The supports rule. Nevernull
.
-
onEndSupportsRule
void onEndSupportsRule(@Nonnull CSSSupportsRule aSupportsRule)
Called when a supports rule ends.- Parameters:
aSupportsRule
- The supports rule. Nevernull
.
-
onUnknownRule
void onUnknownRule(@Nonnull CSSUnknownRule aUnknownRule)
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!
-
-