org.apache.batik.dom.svg
Class AbstractSVGNumberList

java.lang.Object
  extended byorg.apache.batik.dom.svg.AbstractSVGList
      extended byorg.apache.batik.dom.svg.AbstractSVGNumberList
All Implemented Interfaces:
SVGNumberList
Direct Known Subclasses:
SVGOMAnimatedNumberList.AnimSVGNumberList, SVGOMAnimatedNumberList.BaseSVGNumberList

public abstract class AbstractSVGNumberList
extends AbstractSVGList
implements SVGNumberList

This class is the implementation of SVGNumberList.


Nested Class Summary
protected  class AbstractSVGNumberList.NumberListBuilder
          Helper class to interface the NumberListParser and the NumberListHandler.
protected  class AbstractSVGNumberList.SVGNumberItem
          Representation of the item SVGNumber.
 
Nested classes inherited from class org.apache.batik.dom.svg.AbstractSVGList
AbstractSVGList.ListBuilder
 
Field Summary
static String SVG_NUMBER_LIST_SEPARATOR
          Separator for a length list.
 
Fields inherited from class org.apache.batik.dom.svg.AbstractSVGList
itemList, valid
 
Constructor Summary
protected AbstractSVGNumberList()
          Creates a new SVGNumberList.
 
Method Summary
 SVGNumber appendItem(SVGNumber newItem)
          DOM: Implements SVGNumberList.appendItem(SVGNumber).
protected  void checkItemType(Object newItem)
          Asserts that the given item object is an SVGNumber.
protected abstract  SVGException createSVGException(short type, String key, Object[] args)
          Create an SVGException when the checkItemType(Object) fails.
protected  SVGItem createSVGItem(Object newItem)
          Creates a new AbstractSVGNumberList.SVGNumberItem from the given SVGNumber.
protected  void doParse(String value, ListHandler handler)
          Parse the attribute associated with this SVGNumberList.
protected abstract  Element getElement()
          Returns the element associated with this SVGNumberList.
 SVGNumber getItem(int index)
          DOM: Implements SVGNumberList.getItem(int).
protected  String getItemSeparator()
          Return the separator between values in the list.
 SVGNumber initialize(SVGNumber newItem)
          DOM: Implements SVGNumberList.initialize(SVGNumber).
 SVGNumber insertItemBefore(SVGNumber newItem, int index)
          DOM: Implements SVGNumberList.insertItemBefore(SVGNumber,int).
 SVGNumber removeItem(int index)
          DOM: Implements SVGNumberList.removeItem(int).
 SVGNumber replaceItem(SVGNumber newItem, int index)
          DOM: Implements SVGNumberList.replaceItem(SVGNumber,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
 
Methods inherited from interface org.w3c.dom.svg.SVGNumberList
clear, getNumberOfItems
 

Field Detail

SVG_NUMBER_LIST_SEPARATOR

public static final String SVG_NUMBER_LIST_SEPARATOR
Separator for a length list.

See Also:
Constant Field Values
Constructor Detail

AbstractSVGNumberList

protected AbstractSVGNumberList()
Creates a new SVGNumberList.

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(Object) fails.


getElement

protected abstract Element getElement()
Returns the element associated with this SVGNumberList.


initialize

public SVGNumber initialize(SVGNumber newItem)
                                     throws DOMException,
                                            SVGException
DOM: Implements SVGNumberList.initialize(SVGNumber).

Specified by:
initialize in interface SVGNumberList
Throws:
DOMException
SVGException

getItem

public SVGNumber getItem(int index)
                                  throws DOMException
DOM: Implements SVGNumberList.getItem(int).

Specified by:
getItem in interface SVGNumberList
Throws:
DOMException

insertItemBefore

public SVGNumber insertItemBefore(SVGNumber newItem,
                                  int index)
                                           throws DOMException,
                                                  SVGException
DOM: Implements SVGNumberList.insertItemBefore(SVGNumber,int).

Specified by:
insertItemBefore in interface SVGNumberList
Throws:
DOMException
SVGException

replaceItem

public SVGNumber replaceItem(SVGNumber newItem,
                             int index)
                                      throws DOMException,
                                             SVGException
DOM: Implements SVGNumberList.replaceItem(SVGNumber,int).

Specified by:
replaceItem in interface SVGNumberList
Throws:
DOMException
SVGException

removeItem

public SVGNumber removeItem(int index)
                                     throws DOMException
DOM: Implements SVGNumberList.removeItem(int).

Specified by:
removeItem in interface SVGNumberList
Throws:
DOMException

appendItem

public SVGNumber appendItem(SVGNumber newItem)
                                     throws DOMException,
                                            SVGException
DOM: Implements SVGNumberList.appendItem(SVGNumber).

Specified by:
appendItem in interface SVGNumberList
Throws:
DOMException
SVGException

createSVGItem

protected SVGItem createSVGItem(Object newItem)
Creates a new AbstractSVGNumberList.SVGNumberItem from the given SVGNumber.

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
Parse the attribute associated with this SVGNumberList.

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

checkItemType

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

Specified by:
checkItemType in class AbstractSVGList
Throws:
SVGException


Copyright © 2009 Apache Software Foundation. All Rights Reserved.