Package com.steadystate.css.dom
Class MediaListImpl
java.lang.Object
com.steadystate.css.dom.MediaListImpl
- All Implemented Interfaces:
Serializable
,MediaList
- Version:
- $Release$
- Author:
- David Schweinsberg
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendMedium
(String newMedium) Adds the mediumnewMedium
to the end of the list.void
deleteMedium
(String oldMedium) Deletes the medium indicated byoldMedium
from the list.int
The number of media in the list.The parsable textual representation of the media list.item
(int index) Returns theindex
th in the list.void
setMediaText
(String mediaText) toString()
-
Constructor Details
-
MediaListImpl
-
-
Method Details
-
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
- Specified by:
setMediaText
in interfaceMediaList
- Throws:
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
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
Description copied from interface:MediaList
Deletes the medium indicated byoldMedium
from the list.- Specified by:
deleteMedium
in interfaceMediaList
- Throws:
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
NOT_FOUND_ERR: Raised ifoldMedium
is not in the list.
-
appendMedium
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:
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
-