org.apache.batik.dom.svg

Class AbstractSVGPointList

public abstract class AbstractSVGPointList extends AbstractSVGList implements SVGPointList

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

checkItemType

protected void checkItemType(Object newItem)
Asserts that the given item is an {@link 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 {@link SVGItem} object from the given {@link 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 {@link SVGPointList#getItem(int)}.

getItemSeparator

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

initialize

public SVGPoint initialize(SVGPoint newItem)
DOM: Implements {@link SVGPointList#initialize(SVGPoint)}.

insertItemBefore

public SVGPoint insertItemBefore(SVGPoint newItem, int index)
DOM: Implements {@link SVGPointList#insertItemBefore(SVGPoint,int)}.

removeItem

public SVGPoint removeItem(int index)
DOM: Implements {@link SVGPointList#removeItem(int)}.

replaceItem

public SVGPoint replaceItem(SVGPoint newItem, int index)
DOM: Implements {@link SVGPointList#replaceItem(SVGPoint,int)}.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.