- All Superinterfaces:
CSSStyleSheet
,ExtendedCSSStyleSheet<AbstractCSSRule>
,StyleSheet
- All Known Implementing Classes:
BaseDocumentCSSStyleSheet
,DOMDocumentCSSStyleSheet
A style sheet that is able to take the responsibility to compute the styles associated
to document elements.
Accordingly, it has a target medium (which can be null
) and has abilities
that 'normal' style sheets do not have, like dealing with rules that have different
origins (author, user, etc).
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone this style sheet.Clone this style sheet, but only preserving rules targeting the given medium.getComputedStyle
(CSSElement elm, String pseudoElt) Gets the computed style for the given Element and pseudo-element in the DOM Document associated to this style sheet.Gets the target medium for this sheet.Methods inherited from interface org.w3c.dom.css.CSSStyleSheet
deleteRule, getOwnerRule, insertRule
Methods inherited from interface io.sf.carte.doc.style.css.ExtendedCSSStyleSheet
addRule, addStyleSheet, createCounterStyleRule, createFontFaceRule, createFontFeatureValuesRule, createImportRule, createKeyframesRule, createMarginRule, createMediaRule, createNamespaceRule, createPageRule, createStyleDeclaration, createStyleRule, createSupportsRule, createUnknownRule, createViewportRule, getCssRules, getErrorHandler, getMedia, getRulesForProperty, getSelectorsForProperty, getStyleSheetFactory, hasRuleErrorsOrWarnings, parseStyleSheet, parseStyleSheet
Methods inherited from interface org.w3c.dom.stylesheets.StyleSheet
getDisabled, getHref, getOwnerNode, getParentStyleSheet, getTitle, getType, setDisabled
-
Method Details
-
getTargetMedium
String getTargetMedium()Gets the target medium for this sheet.- Returns:
- the target medium, or null if has not been set.
-
getComputedStyle
Gets the computed style for the given Element and pseudo-element in the DOM Document associated to this style sheet.- Parameters:
elm
- the element.pseudoElt
- the pseudo-element.- Returns:
- the computed style declaration.
-
clone
DocumentCSSStyleSheet clone()Clone this style sheet.- Specified by:
clone
in interfaceExtendedCSSStyleSheet<AbstractCSSRule>
- Returns:
- the cloned style sheet.
-
clone
Clone this style sheet, but only preserving rules targeting the given medium.- Parameters:
targetMedium
- the medium.- Returns:
- a medium-specific pseudo-clone of this sheet.
-