- All Superinterfaces:
CSSRule
- All Known Subinterfaces:
CSSConditionRule
,CSSCounterStyleRule
,CSSDeclarationRule
,CSSFontFeatureValuesRule
,CSSGroupingRule
,CSSKeyframeRule
,CSSKeyframesRule
,CSSMarginRule
,CSSNamespaceRule
,CSSSupportsRule
,ExtendedCSSFontFaceRule
,ExtendedCSSMediaRule
,ExtendedCSSPageRule
,ExtendedCSSStyleRule
- All Known Implementing Classes:
AbstractCSSRule
,BaseCSSDeclarationRule
,CounterStyleRule
,CSSStyleDeclarationRule
,FontFaceRule
,FontFeatureValuesRule
,GroupingRule
,ImportRule
,KeyframeRule
,KeyframesRule
,MarginRule
,MediaRule
,NamespaceRule
,PageRule
,StyleRule
,SupportsRule
,UnknownRule
,ViewportRule
An extended CSS rule.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
Fields inherited from interface org.w3c.dom.css.CSSRule
CHARSET_RULE, FONT_FACE_RULE, IMPORT_RULE, MEDIA_RULE, PAGE_RULE, STYLE_RULE, UNKNOWN_RULE
-
Method Summary
Modifier and TypeMethodDescriptionclone
(AbstractCSSStyleSheet parentSheet) Obtain a clone of this rule whose parent sheet isparentSheet
.A minified parsable textual representation of the rule.If this rule is contained inside another rule, return that rule.ExtendedCSSStyleSheet<? extends ExtendedCSSRule>
Get the style sheet that contains this rule.void
writeCssText
(SimpleWriter wri, StyleFormattingContext context) Write a serialization of this rule to the given simple writer, according to the given context.Methods inherited from interface org.w3c.dom.css.CSSRule
getCssText, getType, setCssText
-
Field Details
-
KEYFRAMES_RULE
static final short KEYFRAMES_RULE- See Also:
-
KEYFRAME_RULE
static final short KEYFRAME_RULE- See Also:
-
MARGIN_RULE
static final short MARGIN_RULE- See Also:
-
NAMESPACE_RULE
static final short NAMESPACE_RULE- See Also:
-
COUNTER_STYLE_RULE
static final short COUNTER_STYLE_RULE- See Also:
-
SUPPORTS_RULE
static final short SUPPORTS_RULE- See Also:
-
DOCUMENT_RULE
static final short DOCUMENT_RULE- See Also:
-
FONT_FEATURE_VALUES_RULE
static final short FONT_FEATURE_VALUES_RULE- See Also:
-
VIEWPORT_RULE
static final short VIEWPORT_RULE- See Also:
-
REGION_STYLE_RULE
static final short REGION_STYLE_RULE- See Also:
-
CUSTOM_MEDIA_RULE
static final short CUSTOM_MEDIA_RULE- See Also:
-
-
Method Details
-
clone
Obtain a clone of this rule whose parent sheet isparentSheet
.- Parameters:
parentSheet
- the parent sheet for the new rule.- Returns:
- a clone of this rule with the given parent sheet.
-
getMinifiedCssText
String getMinifiedCssText()A minified parsable textual representation of the rule. This reflects the current state of the rule and not its initial value.- Returns:
- the minified textual representation of the rule.
-
getParentRule
ExtendedCSSRule getParentRule()If this rule is contained inside another rule, return that rule. If it is not nested inside any other rules, returnnull
.- Specified by:
getParentRule
in interfaceCSSRule
- Returns:
- the containing rule, if any, otherwise
null
.
-
getParentStyleSheet
ExtendedCSSStyleSheet<? extends ExtendedCSSRule> getParentStyleSheet()Get the style sheet that contains this rule.- Specified by:
getParentStyleSheet
in interfaceCSSRule
- Returns:
- the style sheet, or null if no sheet contains this rule.
-
writeCssText
Write a serialization of this rule to the given simple writer, according to the given context.- Parameters:
wri
- the simple writer object.context
- the formatting context.- Throws:
IOException
- if an error happened while writing.
-