com.steadystate.css.dom
public class MediaListImpl extends java.lang.Object implements MediaList, java.io.Serializable
Constructor and Description |
---|
MediaListImpl(SACMediaList mediaList) |
Modifier and Type | Method and Description |
---|---|
void |
appendMedium(java.lang.String newMedium)
Adds the medium
newMedium to the end of the list. |
void |
deleteMedium(java.lang.String oldMedium)
Deletes the medium indicated by
oldMedium 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 the
index th in the list. |
void |
setMediaText(java.lang.String mediaText) |
java.lang.String |
toString() |
public MediaListImpl(SACMediaList mediaList)
public java.lang.String getMediaText()
MediaList
getMediaText
in interface MediaList
public void setMediaText(java.lang.String mediaText) throws org.w3c.dom.DOMException
setMediaText
in interface MediaList
org.w3c.dom.DOMException
public int getLength()
MediaList
0
to length-1
inclusive.public java.lang.String item(int index)
MediaList
index
th in the list. If index
is
greater than or equal to the number of media in the list, this
returns null
.public void deleteMedium(java.lang.String oldMedium) throws org.w3c.dom.DOMException
MediaList
oldMedium
from the list.deleteMedium
in interface MediaList
org.w3c.dom.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
oldMedium
is not in the
list.public void appendMedium(java.lang.String newMedium) throws org.w3c.dom.DOMException
MediaList
newMedium
to the end of the list. If the
newMedium
is already used, it is first removed.appendMedium
in interface MediaList
org.w3c.dom.DOMException
- INVALID_CHARACTER_ERR: If the medium contains characters that are
invalid in the underlying style language.
public java.lang.String toString()
toString
in class java.lang.Object