org.apache.batik.dom.svg
Class AbstractSVGLengthList

java.lang.Object
  extended byorg.apache.batik.dom.svg.AbstractSVGList
      extended byorg.apache.batik.dom.svg.AbstractSVGLengthList
All Implemented Interfaces:
SVGLengthList
Direct Known Subclasses:
SVGOMAnimatedLengthList.SVGOMLengthList

public abstract class AbstractSVGLengthList
extends AbstractSVGList
implements SVGLengthList

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
          Representation of the item SVGLength.
 
Nested classes 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)
           
protected  void checkItemType(Object newItem)
          Check if the item is an SVGLength.
protected abstract  SVGException createSVGException(short type, String key, Object[] args)
          Create an SVGException when the checkItemType fails.
protected  SVGItem createSVGItem(Object newItem)
          Return the item to be placed in the list.
protected  void doParse(String value, ListHandler handler)
          Parse the attribute associated with this SVGLengthList.
protected abstract  Element getElement()
          return the element owning this SVGLengthList.
 SVGLength getItem(int index)
           
protected  String getItemSeparator()
          Return the separator between values in the list.
 SVGLength initialize(SVGLength newItem)
           
 SVGLength insertItemBefore(SVGLength newItem, int index)
           
 SVGLength removeItem(int index)
           
 SVGLength replaceItem(SVGLength newItem, int index)
           
 
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
 
Methods inherited from interface org.w3c.dom.svg.SVGLengthList
clear, getNumberOfItems
 

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
Returns:
separator of items in the list

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()
return the element owning this SVGLengthList.


initialize

public SVGLength initialize(SVGLength newItem)
                     throws DOMException,
                            SVGException
Specified by:
initialize in interface SVGLengthList
Throws:
DOMException
SVGException

getItem

public SVGLength getItem(int index)
                  throws DOMException
Specified by:
getItem in interface SVGLengthList
Throws:
DOMException

insertItemBefore

public SVGLength insertItemBefore(SVGLength newItem,
                                  int index)
                           throws DOMException,
                                  SVGException
Specified by:
insertItemBefore in interface SVGLengthList
Throws:
DOMException
SVGException

replaceItem

public SVGLength replaceItem(SVGLength newItem,
                             int index)
                      throws DOMException,
                             SVGException
Specified by:
replaceItem in interface SVGLengthList
Throws:
DOMException
SVGException

removeItem

public SVGLength removeItem(int index)
                     throws DOMException
Specified by:
removeItem in interface SVGLengthList
Throws:
DOMException

appendItem

public SVGLength appendItem(SVGLength newItem)
                     throws DOMException,
                            SVGException
Specified by:
appendItem in interface SVGLengthList
Throws:
DOMException
SVGException

createSVGItem

protected SVGItem createSVGItem(Object newItem)
Description copied from class: AbstractSVGList
Return the item to be placed in the list. According to the parameter of the real SVGList represented here by an Object the implementation provide an item to be placed in the list.

Specified by:
createSVGItem in class AbstractSVGList
Parameters:
newItem - paramter of the modification method of the list
Returns:
an item to be placed in the list.

doParse

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

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

checkItemType

protected void checkItemType(Object newItem)
                      throws SVGException
Check if the item is an SVGLength.

Specified by:
checkItemType in class AbstractSVGList
Parameters:
newItem - object to test
Throws:
SVGException


Copyright ? 2005 Apache Software Foundation. All Rights Reserved.