org.apache.batik.dom.svg

Class AbstractSVGPointList

public abstract class AbstractSVGPointList extends AbstractSVGList implements SVGPointList

Abstract implementation of SVGPointList.
Nested Class Summary
protected classAbstractSVGPointList.PointsListBuilder
Helper class to interface the PointsParser and the PointsHandler.
protected classAbstractSVGPointList.SVGPointItem
An SVGPoint in the list.
Field Summary
static StringSVG_POINT_LIST_SEPARATOR
Separator for a point list.
Method Summary
SVGPointappendItem(SVGPoint newItem)
DOM: Implements SVGPointList#appendItem(SVGPoint).
protected voidcheckItemType(Object newItem)
Asserts that the given item is an SVGPoint.
protected abstract SVGExceptioncreateSVGException(short type, String key, Object[] args)
Create an SVGException when the checkItemType fails.
protected SVGItemcreateSVGItem(Object newItem)
Creates a new SVGItem object from the given SVGPoint.
protected voiddoParse(String value, ListHandler handler)
Parses the 'points' attribute.
SVGPointgetItem(int index)
DOM: Implements SVGPointList#getItem(int).
protected StringgetItemSeparator()
Return the separator between points in the list.
SVGPointinitialize(SVGPoint newItem)
DOM: Implements SVGPointList#initialize(SVGPoint).
SVGPointinsertItemBefore(SVGPoint newItem, int index)
DOM: Implements SVGPointList#insertItemBefore(SVGPoint,int).
SVGPointremoveItem(int index)
DOM: Implements SVGPointList#removeItem(int).
SVGPointreplaceItem(SVGPoint newItem, int index)
DOM: Implements SVGPointList#replaceItem(SVGPoint,int).

Field Detail

SVG_POINT_LIST_SEPARATOR

public static final String SVG_POINT_LIST_SEPARATOR
Separator for a point list.

Method Detail

appendItem

public SVGPoint appendItem(SVGPoint newItem)
DOM: Implements SVGPointList#appendItem(SVGPoint).

checkItemType

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

createSVGException

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

Returns: SVGException

createSVGItem

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

doParse

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

Parameters: value 'points' attribute value handler point list handler

getItem

public SVGPoint getItem(int index)
DOM: Implements SVGPointList#getItem(int).

getItemSeparator

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

initialize

public SVGPoint initialize(SVGPoint newItem)
DOM: Implements SVGPointList#initialize(SVGPoint).

insertItemBefore

public SVGPoint insertItemBefore(SVGPoint newItem, int index)
DOM: Implements SVGPointList#insertItemBefore(SVGPoint,int).

removeItem

public SVGPoint removeItem(int index)
DOM: Implements SVGPointList#removeItem(int).

replaceItem

public SVGPoint replaceItem(SVGPoint newItem, int index)
DOM: Implements SVGPointList#replaceItem(SVGPoint,int).
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.