Package org.apache.batik.dom.svg
Class AbstractSVGPointList
- java.lang.Object
-
- org.apache.batik.dom.svg.AbstractSVGList
-
- org.apache.batik.dom.svg.AbstractSVGPointList
-
- All Implemented Interfaces:
org.w3c.dom.svg.SVGPointList
- Direct Known Subclasses:
SVGOMAnimatedPoints.AnimSVGPointList
,SVGOMAnimatedPoints.BaseSVGPointList
public abstract class AbstractSVGPointList extends AbstractSVGList implements org.w3c.dom.svg.SVGPointList
Abstract implementation ofSVGPointList
.- Version:
- $Id: AbstractSVGPointList.java 1831635 2018-05-15 13:33:47Z ssteiner $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractSVGPointList.PointsListBuilder
Helper class to interface thePointsParser
and thePointsHandler
.
-
Field Summary
Fields Modifier and Type Field Description 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
Constructors Constructor Description AbstractSVGPointList()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.svg.SVGPoint
appendItem(org.w3c.dom.svg.SVGPoint newItem)
DOM: ImplementsSVGPointList.appendItem(SVGPoint)
.protected void
checkItemType(java.lang.Object newItem)
Asserts that the given item is anSVGPoint
.protected abstract org.w3c.dom.svg.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 newSVGItem
object from the givenSVGPoint
.protected void
doParse(java.lang.String value, ListHandler handler)
Parses the 'points' attribute.org.w3c.dom.svg.SVGPoint
getItem(int index)
DOM: ImplementsSVGPointList.getItem(int)
.protected java.lang.String
getItemSeparator()
Return the separator between points in the list.org.w3c.dom.svg.SVGPoint
initialize(org.w3c.dom.svg.SVGPoint newItem)
DOM: ImplementsSVGPointList.initialize(SVGPoint)
.org.w3c.dom.svg.SVGPoint
insertItemBefore(org.w3c.dom.svg.SVGPoint newItem, int index)
DOM: ImplementsSVGPointList.insertItemBefore(SVGPoint,int)
.org.w3c.dom.svg.SVGPoint
removeItem(int index)
DOM: ImplementsSVGPointList.removeItem(int)
.org.w3c.dom.svg.SVGPoint
replaceItem(org.w3c.dom.svg.SVGPoint newItem, int index)
DOM: ImplementsSVGPointList.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
-
-
-
-
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
-
-
Method Detail
-
getItemSeparator
protected java.lang.String getItemSeparator()
Return the separator between points in the list.- Specified by:
getItemSeparator
in classAbstractSVGList
-
createSVGException
protected abstract org.w3c.dom.svg.SVGException createSVGException(short type, java.lang.String key, java.lang.Object[] args)
Create an SVGException when the checkItemType fails.- Returns:
- SVGException
-
initialize
public org.w3c.dom.svg.SVGPoint initialize(org.w3c.dom.svg.SVGPoint newItem) throws org.w3c.dom.DOMException, org.w3c.dom.svg.SVGException
DOM: ImplementsSVGPointList.initialize(SVGPoint)
.- Specified by:
initialize
in interfaceorg.w3c.dom.svg.SVGPointList
- Throws:
org.w3c.dom.DOMException
org.w3c.dom.svg.SVGException
-
getItem
public org.w3c.dom.svg.SVGPoint getItem(int index) throws org.w3c.dom.DOMException
DOM: ImplementsSVGPointList.getItem(int)
.- Specified by:
getItem
in interfaceorg.w3c.dom.svg.SVGPointList
- Throws:
org.w3c.dom.DOMException
-
insertItemBefore
public org.w3c.dom.svg.SVGPoint insertItemBefore(org.w3c.dom.svg.SVGPoint newItem, int index) throws org.w3c.dom.DOMException, org.w3c.dom.svg.SVGException
DOM: ImplementsSVGPointList.insertItemBefore(SVGPoint,int)
.- Specified by:
insertItemBefore
in interfaceorg.w3c.dom.svg.SVGPointList
- Throws:
org.w3c.dom.DOMException
org.w3c.dom.svg.SVGException
-
replaceItem
public org.w3c.dom.svg.SVGPoint replaceItem(org.w3c.dom.svg.SVGPoint newItem, int index) throws org.w3c.dom.DOMException, org.w3c.dom.svg.SVGException
DOM: ImplementsSVGPointList.replaceItem(SVGPoint,int)
.- Specified by:
replaceItem
in interfaceorg.w3c.dom.svg.SVGPointList
- Throws:
org.w3c.dom.DOMException
org.w3c.dom.svg.SVGException
-
removeItem
public org.w3c.dom.svg.SVGPoint removeItem(int index) throws org.w3c.dom.DOMException
DOM: ImplementsSVGPointList.removeItem(int)
.- Specified by:
removeItem
in interfaceorg.w3c.dom.svg.SVGPointList
- Throws:
org.w3c.dom.DOMException
-
appendItem
public org.w3c.dom.svg.SVGPoint appendItem(org.w3c.dom.svg.SVGPoint newItem) throws org.w3c.dom.DOMException, org.w3c.dom.svg.SVGException
DOM: ImplementsSVGPointList.appendItem(SVGPoint)
.- Specified by:
appendItem
in interfaceorg.w3c.dom.svg.SVGPointList
- Throws:
org.w3c.dom.DOMException
org.w3c.dom.svg.SVGException
-
createSVGItem
protected SVGItem createSVGItem(java.lang.Object newItem)
Creates a newSVGItem
object from the givenSVGPoint
.- Specified by:
createSVGItem
in classAbstractSVGList
- 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 classAbstractSVGList
- Parameters:
value
- 'points' attribute valuehandler
- point list handler- Throws:
ParseException
-
checkItemType
protected void checkItemType(java.lang.Object newItem) throws org.w3c.dom.svg.SVGException
Asserts that the given item is anSVGPoint
.- Specified by:
checkItemType
in classAbstractSVGList
- Throws:
org.w3c.dom.svg.SVGException
-
-