org.apache.batik.dom.svg
Class AbstractSVGPointList

java.lang.Object
  extended by org.apache.batik.dom.svg.AbstractSVGList
      extended by org.apache.batik.dom.svg.AbstractSVGPointList
Direct Known Subclasses:
SVGOMAnimatedPoints.AnimSVGPointList, SVGOMAnimatedPoints.BaseSVGPointList

public abstract class AbstractSVGPointList
extends AbstractSVGList

Abstract implementation of SVGPointList.


Nested Class Summary
protected  class AbstractSVGPointList.PointsListBuilder
          Helper class to interface the PointsParser and the PointsHandler.
protected  class AbstractSVGPointList.SVGPointItem
          An SVGPoint in the list.
 
Nested classes/interfaces inherited from class org.apache.batik.dom.svg.AbstractSVGList
AbstractSVGList.ListBuilder
 
Field Summary
static java.lang.String SVG_POINT_LIST_SEPARATOR
          Separator for a point list.
 
Fields inherited from class org.apache.batik.dom.svg.AbstractSVGList
itemList, valid
 
Constructor Summary
AbstractSVGPointList()
           
 
Method Summary
 SVGPoint appendItem(SVGPoint newItem)
          DOM: Implements SVGPointList#appendItem(SVGPoint).
protected  void checkItemType(java.lang.Object newItem)
          Asserts that the given item is an SVGPoint.
protected abstract  SVGException createSVGException(short type, java.lang.String key, java.lang.Object[] args)
          Create an SVGException when the checkItemType fails.
protected  SVGItem createSVGItem(java.lang.Object newItem)
          Creates a new SVGItem object from the given SVGPoint.
protected  void doParse(java.lang.String value, ListHandler handler)
          Parses the 'points' attribute.
 SVGPoint getItem(int index)
          DOM: Implements SVGPointList#getItem(int).
protected  java.lang.String getItemSeparator()
          Return the separator between points in the list.
 SVGPoint initialize(SVGPoint newItem)
          DOM: Implements SVGPointList#initialize(SVGPoint).
 SVGPoint insertItemBefore(SVGPoint newItem, int index)
          DOM: Implements SVGPointList#insertItemBefore(SVGPoint,int).
 SVGPoint removeItem(int index)
          DOM: Implements SVGPointList#removeItem(int).
 SVGPoint replaceItem(SVGPoint newItem, int index)
          DOM: Implements SVGPointList#replaceItem(SVGPoint,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

SVG_POINT_LIST_SEPARATOR

public static final java.lang.String SVG_POINT_LIST_SEPARATOR
Separator for a point list.

See Also:
Constant Field Values
Constructor Detail

AbstractSVGPointList

public AbstractSVGPointList()
Method Detail

getItemSeparator

protected java.lang.String getItemSeparator()
Return the separator between points in the list.

Specified by:
getItemSeparator in class AbstractSVGList

createSVGException

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

Returns:
SVGException

initialize

public SVGPoint initialize(SVGPoint newItem)
                    throws org.w3c.dom.DOMException,
                           SVGException
DOM: Implements SVGPointList#initialize(SVGPoint).

Throws:
org.w3c.dom.DOMException
SVGException

getItem

public SVGPoint getItem(int index)
                 throws org.w3c.dom.DOMException
DOM: Implements SVGPointList#getItem(int).

Throws:
org.w3c.dom.DOMException

insertItemBefore

public SVGPoint insertItemBefore(SVGPoint newItem,
                                 int index)
                          throws org.w3c.dom.DOMException,
                                 SVGException
DOM: Implements SVGPointList#insertItemBefore(SVGPoint,int).

Throws:
org.w3c.dom.DOMException
SVGException

replaceItem

public SVGPoint replaceItem(SVGPoint newItem,
                            int index)
                     throws org.w3c.dom.DOMException,
                            SVGException
DOM: Implements SVGPointList#replaceItem(SVGPoint,int).

Throws:
org.w3c.dom.DOMException
SVGException

removeItem

public SVGPoint removeItem(int index)
                    throws org.w3c.dom.DOMException
DOM: Implements SVGPointList#removeItem(int).

Throws:
org.w3c.dom.DOMException

appendItem

public SVGPoint appendItem(SVGPoint newItem)
                    throws org.w3c.dom.DOMException,
                           SVGException
DOM: Implements SVGPointList#appendItem(SVGPoint).

Throws:
org.w3c.dom.DOMException
SVGException

createSVGItem

protected SVGItem createSVGItem(java.lang.Object newItem)
Creates a new SVGItem object from the given SVGPoint.

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

doParse

protected void doParse(java.lang.String value,
                       ListHandler handler)
                throws ParseException
Parses the 'points' attribute.

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

checkItemType

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

Specified by:
checkItemType in class AbstractSVGList
Throws:
SVGException


Copyright ? 2008 Apache Software Foundation. All Rights Reserved.