Class StyleSheetList

java.lang.Object
io.sf.carte.doc.style.css.om.StyleSheetList
All Implemented Interfaces:
CSSStyleSheetList<AbstractCSSRule>, StyleSheetList

public abstract class StyleSheetList extends Object implements CSSStyleSheetList<AbstractCSSRule>
Abstract base implementation class for style sheet lists.
  • Constructor Details

    • StyleSheetList

      protected StyleSheetList(int initialCapacity)
  • Method Details

    • getLength

      public int getLength()
      Specified by:
      getLength in interface StyleSheetList
    • item

      public AbstractCSSStyleSheet item(int index)
      Description copied from interface: CSSStyleSheetList
      retrieve an ExtendedCSSStyleSheet by ordinal index.
      Specified by:
      item in interface CSSStyleSheetList<AbstractCSSRule>
      Specified by:
      item in interface StyleSheetList
      Parameters:
      index - the index in this list.
      Returns:
      the sheet at index, or null if index is less than zero, or greater or equal to the list length.
    • getStyleSheetSets

      public DOMStringList getStyleSheetSets()
    • add

      public void add(AbstractCSSStyleSheet sheet)
      Add the sheet style sheet to this list.
      Parameters:
      sheet - the style sheet.
    • getPreferredStyleSheetSet

      public String 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

      public void remove(String title)
      Remove the sheet with the given title from this list.
      Parameters:
      title - the title of the sheet to remove.
    • remove

      public boolean remove(StyleSheet sheet)
      Remove the given sheet from this list.
      Parameters:
      sheet - the sheet to be removed.
      Returns:
      true if this list contained sheet.
    • iterator

      protected Iterator<AbstractCSSStyleSheet> iterator()
    • clear

      protected void clear()
    • needsUpdate

      protected boolean needsUpdate()
    • setNeedsUpdate

      protected void setNeedsUpdate(boolean needsUpdate)
    • update

      protected void update()
    • hasErrorsOrWarnings

      protected abstract boolean hasErrorsOrWarnings()