java.lang.Object
io.sf.carte.doc.style.css.om.StyleSheetList
- All Implemented Interfaces:
CSSStyleSheetList<AbstractCSSRule>
,Serializable
,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
Accept a declaration rule visitor.void
Accept a descriptor rule visitor.void
acceptStyleRuleVisitor
(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
(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 interfaceStyleSheetList
-
item
Description copied from interface:CSSStyleSheetList
retrieve aCSSStyleSheet
by ordinal index.- Specified by:
item
in interfaceCSSStyleSheetList<AbstractCSSRule>
- Specified by:
item
in interfaceStyleSheetList
- 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
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()
-