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 voidappendMedium(java.lang.String newMedium)Adds the mediumnewMediumto the end of the list.voiddeleteMedium(java.lang.String oldMedium)Deletes the medium indicated byoldMediumfrom the list.intgetLength()The number of media in the list.java.lang.StringgetMediaText()The parsable textual representation of the media list.java.lang.Stringitem(int index)Returns theindexth in the list.voidsetMediaText(java.lang.String mediaText)java.lang.StringtoString()
-
-
-
Constructor Detail
-
MediaListImpl
public MediaListImpl(SACMediaList mediaList)
-
-
Method Detail
-
getMediaText
public java.lang.String getMediaText()
Description copied from interface:MediaListThe parsable textual representation of the media list. This is a comma-separated list of media.- Specified by:
getMediaTextin interfaceMediaList
-
setMediaText
public void setMediaText(java.lang.String mediaText) throws org.w3c.dom.DOMException- Specified by:
setMediaTextin interfaceMediaList- Throws:
org.w3c.dom.DOMException
-
getLength
public int getLength()
Description copied from interface:MediaListThe number of media in the list. The range of valid media is0tolength-1inclusive.
-
item
public java.lang.String item(int index)
Description copied from interface:MediaListReturns theindexth in the list. Ifindexis 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.DOMExceptionDescription copied from interface:MediaListDeletes the medium indicated byoldMediumfrom the list.- Specified by:
deleteMediumin interfaceMediaList- Throws:
org.w3c.dom.DOMException- NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
NOT_FOUND_ERR: Raised ifoldMediumis not in the list.
-
appendMedium
public void appendMedium(java.lang.String newMedium) throws org.w3c.dom.DOMExceptionDescription copied from interface:MediaListAdds the mediumnewMediumto the end of the list. If thenewMediumis already used, it is first removed.- Specified by:
appendMediumin 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:
toStringin classjava.lang.Object
-
-