org.apache.batik.dom.svg
Class AbstractSVGLengthList

java.lang.Object
  extended by org.apache.batik.dom.svg.AbstractSVGList
      extended by org.apache.batik.dom.svg.AbstractSVGLengthList
Direct Known Subclasses:
SVGOMAnimatedLengthList.AnimSVGLengthList, SVGOMAnimatedLengthList.BaseSVGLengthList

public abstract class AbstractSVGLengthList
extends AbstractSVGList

This class is the implementation of SVGLengthList.


Nested Class Summary
protected  class AbstractSVGLengthList.LengthListBuilder
          Helper class to interface the LengthListParser and the ListHandler.
protected  class AbstractSVGLengthList.SVGLengthItem
          An SVGLength in the list.
 
Nested classes/interfaces inherited from class org.apache.batik.dom.svg.AbstractSVGList
AbstractSVGList.ListBuilder
 
Field Summary
protected  short direction
          This length list's direction.
static String SVG_LENGTH_LIST_SEPARATOR
          Separator for a length list.
 
Fields inherited from class org.apache.batik.dom.svg.AbstractSVGList
itemList, valid
 
Constructor Summary
protected AbstractSVGLengthList(short direction)
          Creates a new SVGLengthList.
 
Method Summary
 SVGLength appendItem(SVGLength newItem)
          DOM: Implements SVGLengthList#appendItem(SVGLength).
protected  void checkItemType(Object newItem)
          Asserts that the given item is an SVGLengthList.
protected abstract  SVGException createSVGException(short type, String key, Object[] args)
          Create an SVGException when the checkItemType fails.
protected  SVGItem createSVGItem(Object newItem)
          Creates a new SVGItem object from the given SVGLength.
protected  void doParse(String value, ListHandler handler)
          Parses the attribute associated with this SVGLengthList.
protected abstract  Element getElement()
          Returns the element owning this SVGLengthList.
 SVGLength getItem(int index)
          DOM: Implements SVGLengthList#getItem(int).
protected  String getItemSeparator()
          Return the separator between values in the list.
 SVGLength initialize(SVGLength newItem)
          DOM: Implements SVGLengthList#initialize(SVGLength).
 SVGLength insertItemBefore(SVGLength newItem, int index)
          DOM: Implements SVGLengthList#insertItemBefore(SVGLength,int).
 SVGLength removeItem(int index)
          DOM: Implements SVGLengthList#removeItem(int).
 SVGLength replaceItem(SVGLength newItem, int index)
          DOM: Implements SVGLengthList#replaceItem(SVGLength,int).
 
Methods inherited from class org.apache.batik.dom.svg.AbstractSVGList
appendItemImpl, clear, clear, createDOMException, getItemImpl, getNumberOfItems, getValueAsString, initializeImpl, insertItemBeforeImpl, invalidate, itemChanged, removeIfNeeded, removeItem, removeItemImpl, replaceItemImpl, resetAttribute, resetAttribute, revalidate, setAttributeValue, setValueAsString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

direction

protected short direction
This length list's direction.


SVG_LENGTH_LIST_SEPARATOR

public static final String SVG_LENGTH_LIST_SEPARATOR
Separator for a length list.

See Also:
Constant Field Values
Constructor Detail

AbstractSVGLengthList

protected AbstractSVGLengthList(short direction)
Creates a new SVGLengthList.

Method Detail

getItemSeparator

protected String getItemSeparator()
Return the separator between values in the list.

Specified by:
getItemSeparator in class AbstractSVGList

createSVGException

protected abstract SVGException createSVGException(short type,
                                                   String key,
                                                   Object[] args)
Create an SVGException when the checkItemType fails.

Returns:
SVGException

getElement

protected abstract Element getElement()
Returns the element owning this SVGLengthList.


initialize

public SVGLength initialize(SVGLength newItem)
                     throws DOMException,
                            SVGException
DOM: Implements SVGLengthList#initialize(SVGLength).

Throws:
DOMException
SVGException

getItem

public SVGLength getItem(int index)
                  throws DOMException
DOM: Implements SVGLengthList#getItem(int).

Throws:
DOMException

insertItemBefore

public SVGLength insertItemBefore(SVGLength newItem,
                                  int index)
                           throws DOMException,
                                  SVGException
DOM: Implements SVGLengthList#insertItemBefore(SVGLength,int).

Throws:
DOMException
SVGException

replaceItem

public SVGLength replaceItem(SVGLength newItem,
                             int index)
                      throws DOMException,
                             SVGException
DOM: Implements SVGLengthList#replaceItem(SVGLength,int).

Throws:
DOMException
SVGException

removeItem

public SVGLength removeItem(int index)
                     throws DOMException
DOM: Implements SVGLengthList#removeItem(int).

Throws:
DOMException

appendItem

public SVGLength appendItem(SVGLength newItem)
                     throws DOMException,
                            SVGException
DOM: Implements SVGLengthList#appendItem(SVGLength).

Throws:
DOMException
SVGException

createSVGItem

protected SVGItem createSVGItem(Object newItem)
Creates a new SVGItem object from the given SVGLength.

Specified by:
createSVGItem in class AbstractSVGList
Parameters:
newItem - the SVG object
Returns:
the newly created SVGItem object

doParse

protected void doParse(String value,
                       ListHandler handler)
                throws ParseException
Parses the attribute associated with this SVGLengthList.

Specified by:
doParse in class AbstractSVGList
Parameters:
value - attribute value
handler - length list handler
Throws:
ParseException

checkItemType

protected void checkItemType(Object newItem)
                      throws SVGException
Asserts that the given item is an SVGLengthList.

Specified by:
checkItemType in class AbstractSVGList
Throws:
SVGException


Copyright ? 2008 Apache Software Foundation. All Rights Reserved.