Package io.sf.carte.doc.style.css.om
Class StyleSheetList
java.lang.Object
io.sf.carte.doc.style.css.om.StyleSheetList
- All Implemented Interfaces:
CSSStyleSheetList<AbstractCSSRule>,Serializable,org.w3c.dom.stylesheets.StyleSheetList
public abstract class StyleSheetList
extends Object
implements CSSStyleSheetList<AbstractCSSRule>, Serializable
Abstract base implementation class for style sheet lists.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptDeclarationRuleVisitor(io.sf.carte.util.Visitor<CSSDeclarationRule> visitor) Accept a declaration rule visitor.voidacceptDescriptorRuleVisitor(io.sf.carte.util.Visitor<CSSDeclarationRule> visitor) Accept a descriptor rule visitor.voidacceptStyleRuleVisitor(io.sf.carte.util.Visitor<CSSStyleRule> visitor) Accept a style rule visitor.voidadd(AbstractCSSStyleSheet sheet) Add thesheetstyle sheet to this list.protected voidclear()intGets the preferred style sheet set as obtained from the sheets in the list.protected abstract booleanitem(int index) retrieve aCSSStyleSheetby ordinal index.protected Iterator<AbstractCSSStyleSheet>iterator()protected booleanvoidRemove the sheet with the giventitlefrom this list.booleanremove(org.w3c.dom.stylesheets.StyleSheet sheet) Remove the given sheet from this list.protected voidsetNeedsUpdate(boolean needsUpdate) protected voidupdate()
-
Constructor Details
-
StyleSheetList
protected StyleSheetList(int initialCapacity)
-
-
Method Details
-
getLength
public int getLength()- Specified by:
getLengthin interfaceorg.w3c.dom.stylesheets.StyleSheetList
-
item
Description copied from interface:CSSStyleSheetListretrieve aCSSStyleSheetby ordinal index.- Specified by:
itemin interfaceCSSStyleSheetList<AbstractCSSRule>- Specified by:
itemin interfaceorg.w3c.dom.stylesheets.StyleSheetList- Parameters:
index- the index in this list.- Returns:
- the sheet at
index, ornullifindexis less than zero, or greater or equal to the list length.
-
getStyleSheetSets
-
acceptStyleRuleVisitor
Description copied from interface:CSSStyleSheetListAccept a style rule visitor.This method scans all the sheets in this list for style rules and visits them.
- Specified by:
acceptStyleRuleVisitorin interfaceCSSStyleSheetList<AbstractCSSRule>- Parameters:
visitor- the visitor.
-
acceptDeclarationRuleVisitor
Description copied from interface:CSSStyleSheetListAccept a declaration rule visitor.This method scans all the sheets in this list for declaration rules and visits them.
- Specified by:
acceptDeclarationRuleVisitorin interfaceCSSStyleSheetList<AbstractCSSRule>- Parameters:
visitor- the visitor.
-
acceptDescriptorRuleVisitor
Description copied from interface:CSSStyleSheetListAccept a descriptor rule visitor.This method scans all the sheets in this list for declaration rules that declare descriptors, and visits them.
- Specified by:
acceptDescriptorRuleVisitorin interfaceCSSStyleSheetList<AbstractCSSRule>- Parameters:
visitor- the visitor.
-
add
Add thesheetstyle sheet to this list.- Parameters:
sheet- the style sheet.
-
getPreferredStyleSheetSet
Gets the preferred style sheet set as obtained from the sheets in the list.- Returns:
- the preferred style sheet set, or the empty string if none is preferred.
-
remove
Remove the sheet with the giventitlefrom this list.- Parameters:
title- the title of the sheet to remove.
-
remove
public boolean remove(org.w3c.dom.stylesheets.StyleSheet sheet) Remove the given sheet from this list.- Parameters:
sheet- the sheet to be removed.- Returns:
trueif this list containedsheet.
-
iterator
-
clear
protected void clear() -
needsUpdate
protected boolean needsUpdate() -
setNeedsUpdate
protected void setNeedsUpdate(boolean needsUpdate) -
update
protected void update() -
hasErrorsOrWarnings
protected abstract boolean hasErrorsOrWarnings()
-