org.apache.batik.dom.svg

Class AbstractSVGLengthList

public abstract class AbstractSVGLengthList extends AbstractSVGList implements SVGLengthList

This class is the implementation of SVGLengthList.
Nested Class Summary
protected classAbstractSVGLengthList.LengthListBuilder
Helper class to interface the {@link LengthListParser} and the {@link ListHandler}.
protected classAbstractSVGLengthList.SVGLengthItem
An {@link SVGLength} in the list.
Field Summary
protected shortdirection
This length list's direction.
static StringSVG_LENGTH_LIST_SEPARATOR
Separator for a length list.
Constructor Summary
protected AbstractSVGLengthList(short direction)
Creates a new SVGLengthList.
Method Summary
SVGLengthappendItem(SVGLength newItem)
DOM: Implements {@link SVGLengthList#appendItem(SVGLength)}.
protected voidcheckItemType(Object newItem)
Asserts that the given item is an {@link SVGLengthList}.
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 SVGLength}.
protected voiddoParse(String value, ListHandler handler)
Parses the attribute associated with this SVGLengthList.
protected abstract ElementgetElement()
Returns the element owning this SVGLengthList.
SVGLengthgetItem(int index)
DOM: Implements {@link SVGLengthList#getItem(int)}.
protected StringgetItemSeparator()
Return the separator between values in the list.
SVGLengthinitialize(SVGLength newItem)
DOM: Implements {@link SVGLengthList#initialize(SVGLength)}.
SVGLengthinsertItemBefore(SVGLength newItem, int index)
DOM: Implements {@link SVGLengthList#insertItemBefore(SVGLength,int)}.
SVGLengthremoveItem(int index)
DOM: Implements {@link SVGLengthList#removeItem(int)}.
SVGLengthreplaceItem(SVGLength newItem, int index)
DOM: Implements {@link SVGLengthList#replaceItem(SVGLength,int)}.

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.

Constructor Detail

AbstractSVGLengthList

protected AbstractSVGLengthList(short direction)
Creates a new SVGLengthList.

Method Detail

appendItem

public SVGLength appendItem(SVGLength newItem)
DOM: Implements {@link SVGLengthList#appendItem(SVGLength)}.

checkItemType

protected void checkItemType(Object newItem)
Asserts that the given item is an {@link SVGLengthList}.

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 SVGLength}.

doParse

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

Parameters: value attribute value handler length list handler

getElement

protected abstract Element getElement()
Returns the element owning this SVGLengthList.

getItem

public SVGLength getItem(int index)
DOM: Implements {@link SVGLengthList#getItem(int)}.

getItemSeparator

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

initialize

public SVGLength initialize(SVGLength newItem)
DOM: Implements {@link SVGLengthList#initialize(SVGLength)}.

insertItemBefore

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

removeItem

public SVGLength removeItem(int index)
DOM: Implements {@link SVGLengthList#removeItem(int)}.

replaceItem

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