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
ConstructorsModifierConstructorDescriptionprotectedDOMDocumentCSSStyleSheet(byte origin) protectedDOMDocumentCSSStyleSheet(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 ComputedCSSStylecreateComputedCSSStyle(BaseDocumentCSSStyleSheet parentSheet) protected abstract DOMDocumentCSSStyleSheetcreateDocumentStyleSheet(String medium, byte origin) getComputedStyle(CSSElement elm, String pseudoElt) Gets the computed style for the given DOM Element and pseudo-element.abstract BaseCSSStyleSheetFactoryGet the stylesheet factory used to produce this sheet.voidsetOwnerDocument(CSSDocument ownerNode) Methods inherited from class io.sf.carte.doc.style.css.om.BaseDocumentCSSStyleSheet
computeStyle, copyToTarget, getHref, getTargetMedium, setHrefMethods 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, unregisterNamespaceMethods inherited from class io.sf.carte.doc.style.css.om.AbstractCSSStyleSheet
openConnection, parseRelAttributeMethods inherited from class io.sf.carte.doc.style.css.om.AbstractStyleSheet
getTitle, setTitleMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.w3c.dom.css.CSSStyleSheet
deleteRule, getOwnerRule, insertRuleMethods 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, parseStyleSheetMethods 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:
getOwnerNodein interfaceStyleSheet- Specified by:
getOwnerNodein classBaseDocumentCSSStyleSheet
-
setOwnerDocument
- Specified by:
setOwnerDocumentin classBaseDocumentCSSStyleSheet
-
getComputedStyle
Gets the computed style for the given DOM Element and pseudo-element.- Specified by:
getComputedStylein interfaceDocumentCSSStyleSheet- Specified by:
getComputedStylein classBaseDocumentCSSStyleSheet- Parameters:
elm- the element.pseudoElt- the pseudo-element.- Returns:
- the computed style declaration.
-
createComputedCSSStyle
-
createDocumentStyleSheet
-
getStyleSheetFactory
Description copied from class:BaseCSSStyleSheetGet the stylesheet factory used to produce this sheet.- Specified by:
getStyleSheetFactoryin interfaceExtendedCSSStyleSheet<AbstractCSSRule>- Specified by:
getStyleSheetFactoryin 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:
clonein interfaceDocumentCSSStyleSheet- Specified by:
clonein interfaceExtendedCSSStyleSheet<AbstractCSSRule>- Specified by:
clonein classBaseDocumentCSSStyleSheet- Returns:
- a clone of this instance.
-
clone
Description copied from class:BaseDocumentCSSStyleSheetClone this style sheet, but only preserving rules targeting the given medium.- Specified by:
clonein interfaceDocumentCSSStyleSheet- Specified by:
clonein classBaseDocumentCSSStyleSheet- Parameters:
targetMedium- the medium.- Returns:
- a medium-specific pseudo-clone of this sheet.
-