org.apache.batik.dom.svg
Class AbstractSVGTransformList

java.lang.Object
  extended byorg.apache.batik.dom.svg.AbstractSVGList
      extended byorg.apache.batik.dom.svg.AbstractSVGTransformList
All Implemented Interfaces:
SVGTransformList
Direct Known Subclasses:
SVGOMAnimatedTransformList.AnimSVGTransformList, SVGOMAnimatedTransformList.BaseSVGTransformList

public abstract class AbstractSVGTransformList
extends AbstractSVGList
implements SVGTransformList

This class is the implementation of SVGTransformList.


Nested Class Summary
protected  class AbstractSVGTransformList.SVGTransformItem
          An SVGTransform in the list.
protected  class AbstractSVGTransformList.TransformListBuilder
          Helper class to interface the TransformListParser and the ListHandler.
 
Nested classes inherited from class org.apache.batik.dom.svg.AbstractSVGList
AbstractSVGList.ListBuilder
 
Field Summary
static String SVG_TRANSFORMATION_LIST_SEPARATOR
          Separator for a point list.
 
Fields inherited from class org.apache.batik.dom.svg.AbstractSVGList
itemList, valid
 
Constructor Summary
AbstractSVGTransformList()
           
 
Method Summary
 SVGTransform appendItem(SVGTransform newItem)
          DOM: Implements SVGTransformList.appendItem(SVGTransform).
protected  void checkItemType(Object newItem)
          Asserts that the given item is an SVGTransformList.
 SVGTransform consolidate()
          DOM: Implements SVGTransformList.consolidate().
protected abstract  SVGException createSVGException(short type, String key, Object[] args)
          Create an SVGException when the checkItemType fails.
protected  SVGItem createSVGItem(Object newItem)
          Creates a new SVGItem object from the given SVGTransform.
 SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix)
          DOM: Implements SVGTransformList.createSVGTransformFromMatrix(SVGMatrix).
protected  void doParse(String value, ListHandler handler)
          Parse the attribute associated with this SVGTransformList.
 AffineTransform getAffineTransform()
          Returns an AffineTransform that represents the same transform as that specified by this transform list.
 SVGTransform getItem(int index)
          DOM: Implements SVGTransformList.getItem(int).
protected  String getItemSeparator()
          Return the separator between transform in the list.
 SVGTransform initialize(SVGTransform newItem)
          DOM: Implements SVGTransformList.initialize(SVGTransform).
 SVGTransform insertItemBefore(SVGTransform newItem, int index)
          DOM: Implements SVGTransformList.insertItemBefore(SVGTransform,int).
 SVGTransform removeItem(int index)
          DOM: Implements SVGTransformList.removeItem(int).
 SVGTransform replaceItem(SVGTransform newItem, int index)
          DOM: Implements SVGTransformList.replaceItem(SVGTransform,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
 
Methods inherited from interface org.w3c.dom.svg.SVGTransformList
clear, getNumberOfItems
 

Field Detail

SVG_TRANSFORMATION_LIST_SEPARATOR

public static final String SVG_TRANSFORMATION_LIST_SEPARATOR
Separator for a point list.

See Also:
Constant Field Values
Constructor Detail

AbstractSVGTransformList

public AbstractSVGTransformList()
Method Detail

getItemSeparator

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

Specified by:
getItemSeparator in class AbstractSVGList

createSVGException

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

Returns:
SVGException

initialize

public SVGTransform initialize(SVGTransform newItem)
                                        throws DOMException,
                                               SVGException
DOM: Implements SVGTransformList.initialize(SVGTransform).

Specified by:
initialize in interface SVGTransformList
Throws:
DOMException
SVGException

getItem

public SVGTransform getItem(int index)
                                     throws DOMException
DOM: Implements SVGTransformList.getItem(int).

Specified by:
getItem in interface SVGTransformList
Throws:
DOMException

insertItemBefore

public SVGTransform insertItemBefore(SVGTransform newItem,
                                     int index)
                                              throws DOMException,
                                                     SVGException
DOM: Implements SVGTransformList.insertItemBefore(SVGTransform,int).

Specified by:
insertItemBefore in interface SVGTransformList
Throws:
DOMException
SVGException

replaceItem

public SVGTransform replaceItem(SVGTransform newItem,
                                int index)
                                         throws DOMException,
                                                SVGException
DOM: Implements SVGTransformList.replaceItem(SVGTransform,int).

Specified by:
replaceItem in interface SVGTransformList
Throws:
DOMException
SVGException

removeItem

public SVGTransform removeItem(int index)
                                        throws DOMException
DOM: Implements SVGTransformList.removeItem(int).

Specified by:
removeItem in interface SVGTransformList
Throws:
DOMException

appendItem

public SVGTransform appendItem(SVGTransform newItem)
                                        throws DOMException,
                                               SVGException
DOM: Implements SVGTransformList.appendItem(SVGTransform).

Specified by:
appendItem in interface SVGTransformList
Throws:
DOMException
SVGException

createSVGTransformFromMatrix

public SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix)
DOM: Implements SVGTransformList.createSVGTransformFromMatrix(SVGMatrix).

Specified by:
createSVGTransformFromMatrix in interface SVGTransformList

consolidate

public SVGTransform consolidate()
DOM: Implements SVGTransformList.consolidate().

Specified by:
consolidate in interface SVGTransformList

getAffineTransform

public AffineTransform getAffineTransform()
Returns an AffineTransform that represents the same transform as that specified by this transform list.


createSVGItem

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

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

doParse

protected void doParse(String value,
                       ListHandler handler)
                throws ParseException
Parse the attribute associated with this SVGTransformList.

Specified by:
doParse in class AbstractSVGList
Parameters:
value - the transform list attribute value
handler - transform list handler
Throws:
ParseException

checkItemType

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

Specified by:
checkItemType in class AbstractSVGList


Copyright © 2009 Apache Software Foundation. All Rights Reserved.