java.lang.Object
io.sf.carte.doc.style.css.om.AbstractStyleSheet
io.sf.carte.doc.style.css.om.AbstractCSSStyleSheet
io.sf.carte.doc.style.css.om.BaseCSSStyleSheet
io.sf.carte.doc.style.css.om.BaseDocumentCSSStyleSheet
io.sf.carte.doc.style.css.om.DOMDocumentCSSStyleSheet
- All Implemented Interfaces:
DocumentCSSStyleSheet
,ExtendedCSSStyleSheet<AbstractCSSRule>
,Cloneable
,CSSStyleSheet
,StyleSheet
CSS Style Sheet for DOM.
-
Constructor Summary
ModifierConstructorDescriptionprotected
DOMDocumentCSSStyleSheet
(byte origin) protected
DOMDocumentCSSStyleSheet
(String medium, byte origin) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates and returns a copy of this style sheet.Clone this style sheet, but only preserving rules targeting the given medium.protected abstract ComputedCSSStyle
createComputedCSSStyle
(BaseDocumentCSSStyleSheet parentSheet) protected abstract DOMDocumentCSSStyleSheet
createDocumentStyleSheet
(String medium, byte origin) getComputedStyle
(CSSElement elm, String pseudoElt) Gets the computed style for the given DOM Element and pseudo-element.abstract BaseCSSStyleSheetFactory
Get the stylesheet factory used to produce this sheet.void
setOwnerDocument
(CSSDocument ownerNode) Methods inherited from class io.sf.carte.doc.style.css.om.BaseDocumentCSSStyleSheet
computeStyle, copyToTarget, getHref, getTargetMedium, setHref
Methods inherited from class io.sf.carte.doc.style.css.om.BaseCSSStyleSheet
addLocalRule, addRule, addStyleSheet, copyAllTo, copyFieldsTo, copyRulesTo, createCounterStyleRule, createFontFaceRule, createFontFeatureValuesRule, createImportRule, createKeyframesRule, createMarginRule, createMediaRule, createNamespaceRule, createPageRule, createStyleDeclaration, createStyleDeclaration, createStyleRule, createSupportsRule, createUnknownRule, createViewportRule, deleteRule, getCssRules, getDisabled, getDocumentErrorHandler, getErrorHandler, getMedia, getNamespacePrefix, getOrigin, getOwnerRule, getParentStyleSheet, getRulesForProperty, getSelectorsForProperty, getSelectorsForPropertyValue, getType, hasDefaultNamespace, hasRuleErrorsOrWarnings, insertRule, loadStyleSheet, parseStyleSheet, parseStyleSheet, registerNamespace, setDisabled, setMedia, setParentStyleSheet, toMinifiedString, toString, toStyleString, unregisterNamespace
Methods inherited from class io.sf.carte.doc.style.css.om.AbstractCSSStyleSheet
openConnection, parseRelAttribute
Methods inherited from class io.sf.carte.doc.style.css.om.AbstractStyleSheet
getTitle, setTitle
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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, hasRuleErrorsOrWarnings, parseStyleSheet, parseStyleSheet
Methods inherited from interface org.w3c.dom.stylesheets.StyleSheet
getDisabled, getParentStyleSheet, getTitle, getType, setDisabled
-
Constructor Details
-
DOMDocumentCSSStyleSheet
protected DOMDocumentCSSStyleSheet(byte origin) -
DOMDocumentCSSStyleSheet
-
-
Method Details
-
getOwnerNode
- Specified by:
getOwnerNode
in interfaceStyleSheet
- Specified by:
getOwnerNode
in classBaseDocumentCSSStyleSheet
-
setOwnerDocument
- Specified by:
setOwnerDocument
in classBaseDocumentCSSStyleSheet
-
getComputedStyle
Gets the computed style for the given DOM Element and pseudo-element.- Specified by:
getComputedStyle
in interfaceDocumentCSSStyleSheet
- Specified by:
getComputedStyle
in classBaseDocumentCSSStyleSheet
- Parameters:
elm
- the element.pseudoElt
- the pseudo-element.- Returns:
- the computed style declaration.
-
createComputedCSSStyle
-
createDocumentStyleSheet
-
getStyleSheetFactory
Description copied from class:BaseCSSStyleSheet
Get the stylesheet factory used to produce this sheet.- Specified by:
getStyleSheetFactory
in interfaceExtendedCSSStyleSheet<AbstractCSSRule>
- Specified by:
getStyleSheetFactory
in classBaseCSSStyleSheet
- Returns:
- the stylesheet factory.
-
clone
Creates and returns a copy of this style sheet.The copy is a shallow copy (the rule list is new, but the referenced rules are the same as in the cloned object.
- Specified by:
clone
in interfaceDocumentCSSStyleSheet
- Specified by:
clone
in interfaceExtendedCSSStyleSheet<AbstractCSSRule>
- Specified by:
clone
in classBaseDocumentCSSStyleSheet
- Returns:
- a clone of this instance.
-
clone
Description copied from class:BaseDocumentCSSStyleSheet
Clone this style sheet, but only preserving rules targeting the given medium.- Specified by:
clone
in interfaceDocumentCSSStyleSheet
- Specified by:
clone
in classBaseDocumentCSSStyleSheet
- Parameters:
targetMedium
- the medium.- Returns:
- a medium-specific pseudo-clone of this sheet.
-