Class MediaListImpl

java.lang.Object
com.steadystate.css.dom.MediaListImpl
All Implemented Interfaces:
Serializable, MediaList

public class MediaListImpl extends Object implements MediaList, Serializable
Version:
$Release$
Author:
David Schweinsberg
See Also:
  • Constructor Details

    • MediaListImpl

      public MediaListImpl(SACMediaList mediaList)
  • Method Details

    • getMediaText

      public String getMediaText()
      Description copied from interface: MediaList
      The parsable textual representation of the media list. This is a comma-separated list of media.
      Specified by:
      getMediaText in interface MediaList
    • setMediaText

      public void setMediaText(String mediaText) throws DOMException
      Specified by:
      setMediaText in interface MediaList
      Throws:
      DOMException
    • getLength

      public int getLength()
      Description copied from interface: MediaList
      The number of media in the list. The range of valid media is 0 to length-1 inclusive.
      Specified by:
      getLength in interface MediaList
    • item

      public String item(int index)
      Description copied from interface: MediaList
      Returns the indexth in the list. If index is greater than or equal to the number of media in the list, this returns null.
      Specified by:
      item in interface MediaList
      Parameters:
      index - Index into the collection.
      Returns:
      The medium at the indexth position in the MediaList, or null if that is not a valid index.
    • deleteMedium

      public void deleteMedium(String oldMedium) throws DOMException
      Description copied from interface: MediaList
      Deletes the medium indicated by oldMedium from the list.
      Specified by:
      deleteMedium in interface MediaList
      Throws:
      DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
      NOT_FOUND_ERR: Raised if oldMedium is not in the list.
    • appendMedium

      public void appendMedium(String newMedium) throws DOMException
      Description copied from interface: MediaList
      Adds the medium newMedium to the end of the list. If the newMedium is already used, it is first removed.
      Specified by:
      appendMedium in interface MediaList
      Throws:
      DOMException - INVALID_CHARACTER_ERR: If the medium contains characters that are invalid in the underlying style language.
      NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
    • toString

      public String toString()
      Overrides:
      toString in class Object