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:
CSSStyleSheet<AbstractCSSRule>
,DocumentCSSStyleSheet
,SheetContext
,Serializable
,Cloneable
,CSSStyleSheet
,StyleSheet
CSS Style Sheet for DOM.
- See Also:
-
Field Summary
Fields inherited from interface io.sf.carte.doc.style.css.CSSStyleSheet
COMMENTS_AUTO, COMMENTS_IGNORE, COMMENTS_PRECEDING
-
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 DOMDocumentCSSStyleSheet
createDocumentStyleSheet
(String medium, byte origin) getComputedStyle
(CSSElement elm, Condition 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
addLocalRule, computeRevertedStyle, computeStyle, copyToTarget, createComputedCSSStyle, getHref, getTargetMedium, registerProperty, setHref
Methods inherited from class io.sf.carte.doc.style.css.om.BaseCSSStyleSheet
acceptDeclarationRuleVisitor, acceptDescriptorRuleVisitor, acceptStyleRuleVisitor, addRule, addStyleSheet, copyAllTo, copyFieldsTo, copyRulesTo, createCounterStyleRule, createFontFaceRule, createFontFeatureValuesRule, createImportRule, createKeyframesRule, createMarginRule, createMediaRule, createNamespaceRule, createPageRule, createPropertyRule, createStyleDeclaration, createStyleDeclaration, createStyleRule, createSupportsRule, createSupportsRule, createSupportsRule, createUnknownRule, createViewportRule, deleteRule, getCssRules, getDisabled, getDocumentErrorHandler, getErrorHandler, getFirstStyleRule, getMedia, getNamespacePrefix, getOrigin, getOwnerRule, getParentStyleSheet, getRulesForProperty, getSelectorsForProperty, getSelectorsForPropertyValue, getStyleRules, 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
hasFactoryFlag, 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 io.sf.carte.doc.style.css.CSSStyleSheet
addRule, addStyleSheet, createCounterStyleRule, createFontFaceRule, createFontFeatureValuesRule, createImportRule, createKeyframesRule, createMarginRule, createMediaRule, createNamespaceRule, createPageRule, createPropertyRule, createStyleDeclaration, createStyleRule, createSupportsRule, createSupportsRule, createSupportsRule, createUnknownRule, createViewportRule, getCssRules, getErrorHandler, getMedia, getRulesForProperty, getSelectorsForProperty, hasRuleErrorsOrWarnings, parseStyleSheet, parseStyleSheet
Methods inherited from interface org.w3c.dom.css.CSSStyleSheet
deleteRule, getOwnerRule, insertRule
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.
-
createDocumentStyleSheet
-
getStyleSheetFactory
Description copied from class:BaseCSSStyleSheet
Get the stylesheet factory used to produce this sheet.- Specified by:
getStyleSheetFactory
in interfaceCSSStyleSheet<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 interfaceCSSStyleSheet<AbstractCSSRule>
- Specified by:
clone
in interfaceDocumentCSSStyleSheet
- 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.
-