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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptDeclarationRuleVisitor
(io.sf.carte.util.Visitor<CSSDeclarationRule> visitor) Accept a declaration rule visitor.void
acceptDescriptorRuleVisitor
(io.sf.carte.util.Visitor<CSSDeclarationRule> visitor) Accept a descriptor rule visitor.void
acceptStyleRuleVisitor
(io.sf.carte.util.Visitor<CSSStyleRule> visitor) Accept a style rule visitor.void
add
(AbstractCSSStyleSheet sheet) Add thesheet
style sheet to this list.protected void
clear()
int
Gets the preferred style sheet set as obtained from the sheets in the list.protected abstract boolean
item
(int index) retrieve aCSSStyleSheet
by ordinal index.protected Iterator<AbstractCSSStyleSheet>
iterator()
protected boolean
void
Remove the sheet with the giventitle
from this list.boolean
remove
(org.w3c.dom.stylesheets.StyleSheet sheet) Remove the given sheet from this list.protected void
setNeedsUpdate
(boolean needsUpdate) protected void
update()
-
Constructor Details
-
StyleSheetList
protected StyleSheetList(int initialCapacity)
-
-
Method Details
-
getLength
public int getLength()- Specified by:
getLength
in interfaceorg.w3c.dom.stylesheets.StyleSheetList
-
item
Description copied from interface:CSSStyleSheetList
retrieve aCSSStyleSheet
by ordinal index.- Specified by:
item
in interfaceCSSStyleSheetList<AbstractCSSRule>
- Specified by:
item
in interfaceorg.w3c.dom.stylesheets.StyleSheetList
- Parameters:
index
- the index in this list.- Returns:
- the sheet at
index
, ornull
ifindex
is less than zero, or greater or equal to the list length.
-
getStyleSheetSets
-
acceptStyleRuleVisitor
Description copied from interface:CSSStyleSheetList
Accept a style rule visitor.This method scans all the sheets in this list for style rules and visits them.
- Specified by:
acceptStyleRuleVisitor
in interfaceCSSStyleSheetList<AbstractCSSRule>
- Parameters:
visitor
- the visitor.
-
acceptDeclarationRuleVisitor
Description copied from interface:CSSStyleSheetList
Accept a declaration rule visitor.This method scans all the sheets in this list for declaration rules and visits them.
- Specified by:
acceptDeclarationRuleVisitor
in interfaceCSSStyleSheetList<AbstractCSSRule>
- Parameters:
visitor
- the visitor.
-
acceptDescriptorRuleVisitor
Description copied from interface:CSSStyleSheetList
Accept a descriptor rule visitor.This method scans all the sheets in this list for declaration rules that declare descriptors, and visits them.
- Specified by:
acceptDescriptorRuleVisitor
in interfaceCSSStyleSheetList<AbstractCSSRule>
- Parameters:
visitor
- the visitor.
-
add
Add thesheet
style 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 giventitle
from 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:
true
if 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()
-