Package com.steadystate.css.dom
Class MediaListImpl
- java.lang.Object
-
- com.steadystate.css.dom.MediaListImpl
-
- All Implemented Interfaces:
java.io.Serializable
,MediaList
public class MediaListImpl extends java.lang.Object implements MediaList, java.io.Serializable
- Version:
- $Release$
- Author:
- David Schweinsberg
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MediaListImpl(SACMediaList mediaList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendMedium(java.lang.String newMedium)
Adds the mediumnewMedium
to the end of the list.void
deleteMedium(java.lang.String oldMedium)
Deletes the medium indicated byoldMedium
from the list.int
getLength()
The number of media in the list.java.lang.String
getMediaText()
The parsable textual representation of the media list.java.lang.String
item(int index)
Returns theindex
th in the list.void
setMediaText(java.lang.String mediaText)
java.lang.String
toString()
-
-
-
Constructor Detail
-
MediaListImpl
public MediaListImpl(SACMediaList mediaList)
-
-
Method Detail
-
getMediaText
public java.lang.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 interfaceMediaList
-
setMediaText
public void setMediaText(java.lang.String mediaText) throws org.w3c.dom.DOMException
- Specified by:
setMediaText
in interfaceMediaList
- Throws:
org.w3c.dom.DOMException
-
getLength
public int getLength()
Description copied from interface:MediaList
The number of media in the list. The range of valid media is0
tolength-1
inclusive.
-
item
public java.lang.String item(int index)
Description copied from interface:MediaList
Returns theindex
th in the list. Ifindex
is greater than or equal to the number of media in the list, this returnsnull
.
-
deleteMedium
public void deleteMedium(java.lang.String oldMedium) throws org.w3c.dom.DOMException
Description copied from interface:MediaList
Deletes the medium indicated byoldMedium
from the list.- Specified by:
deleteMedium
in interfaceMediaList
- Throws:
org.w3c.dom.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
NOT_FOUND_ERR: Raised ifoldMedium
is not in the list.
-
appendMedium
public void appendMedium(java.lang.String newMedium) throws org.w3c.dom.DOMException
Description copied from interface:MediaList
Adds the mediumnewMedium
to the end of the list. If thenewMedium
is already used, it is first removed.- Specified by:
appendMedium
in interfaceMediaList
- Throws:
org.w3c.dom.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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-