Package org.apache.batik.dom.svg
Class AbstractSVGTransformList.SVGTransformItem
- java.lang.Object
-
- org.apache.batik.dom.svg.AbstractSVGTransform
-
- org.apache.batik.dom.svg.AbstractSVGTransformList.SVGTransformItem
-
- All Implemented Interfaces:
SVGItem,org.w3c.dom.svg.SVGTransform
- Enclosing class:
- AbstractSVGTransformList
public static class AbstractSVGTransformList.SVGTransformItem extends AbstractSVGTransform implements SVGItem
AnSVGTransformin the list.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanangleOnlyWhether the rotation transform value specifies only an angle.protected java.lang.StringitemStringValueString representation of the item.protected AbstractSVGListparentList the item belongs to.protected booleanxOnlyWhether the transform value specifies only an x value, no y value.-
Fields inherited from class org.apache.batik.dom.svg.AbstractSVGTransform
affineTransform, angle, type, x, y
-
-
Constructor Summary
Constructors Constructor Description SVGTransformItem()Creates a new, uninitialized SVGTransformItem.SVGTransformItem(org.w3c.dom.svg.SVGTransform transform)Creates a new SVGTransformItem from the givenSVGTransform.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(org.w3c.dom.svg.SVGTransform transform)Copies the values from the givenSVGTransforminto thisAbstractSVGTransformList.SVGTransformItem.protected org.w3c.dom.svg.SVGMatrixcreateMatrix()Creates theSVGMatrixused to store the transform.AbstractSVGListgetParent()Returns the parent list of this item.protected java.lang.StringgetStringValue()Returns the string representation of this transform.java.lang.StringgetValueAsString()Returns the cached representation of the item if valid, otherwise recomputes the String representation of the item.protected voidmatrix(float a, float b, float c, float d, float e, float f)Sets the transform to be a matrix transform.protected voidresetAttribute()Notifies the parent list that this item has changed.protected voidrotate(float angle)Sets the transform to be rotation.protected voidscale(float x)Sets the transform to be an x scale.voidsetMatrix(org.w3c.dom.svg.SVGMatrix matrix)DOM: ImplementsSVGTransform.setMatrix(SVGMatrix).voidsetParent(AbstractSVGList list)Assigns a parent list to this item.voidsetRotate(float angle, float cx, float cy)DOM: ImplementsSVGTransform.setRotate(float,float,float).voidsetScale(float sx, float sy)DOM: ImplementsSVGTransform.setScale(float,float).voidsetSkewX(float angle)DOM: ImplementsSVGTransform.setSkewX(float).voidsetSkewY(float angle)DOM: ImplementsSVGTransform.setSkewY(float).voidsetTranslate(float tx, float ty)DOM: ImplementsSVGTransform.setTranslate(float,float).protected voidtranslate(float x)Sets the transform to be an x translation.
-
-
-
Field Detail
-
xOnly
protected boolean xOnly
Whether the transform value specifies only an x value, no y value.
-
angleOnly
protected boolean angleOnly
Whether the rotation transform value specifies only an angle.
-
parent
protected AbstractSVGList parent
List the item belongs to.
-
itemStringValue
protected java.lang.String itemStringValue
String representation of the item. This is a cached representation of the item while it is not changed.
-
-
Method Detail
-
resetAttribute
protected void resetAttribute()
Notifies the parent list that this item has changed. This also discards the cached representation of the item.
-
setParent
public void setParent(AbstractSVGList list)
Assigns a parent list to this item.
-
getParent
public AbstractSVGList getParent()
Returns the parent list of this item.
-
getValueAsString
public java.lang.String getValueAsString()
Returns the cached representation of the item if valid, otherwise recomputes the String representation of the item.- Specified by:
getValueAsStringin interfaceSVGItem- Returns:
- textual representation of the item to be inserted in the attribute value representing the list.
-
assign
public void assign(org.w3c.dom.svg.SVGTransform transform)
Copies the values from the givenSVGTransforminto thisAbstractSVGTransformList.SVGTransformItem.
-
translate
protected void translate(float x)
Sets the transform to be an x translation.
-
rotate
protected void rotate(float angle)
Sets the transform to be rotation.
-
scale
protected void scale(float x)
Sets the transform to be an x scale.
-
matrix
protected void matrix(float a, float b, float c, float d, float e, float f)Sets the transform to be a matrix transform.
-
setMatrix
public void setMatrix(org.w3c.dom.svg.SVGMatrix matrix)
DOM: ImplementsSVGTransform.setMatrix(SVGMatrix).- Specified by:
setMatrixin interfaceorg.w3c.dom.svg.SVGTransform- Overrides:
setMatrixin classAbstractSVGTransform
-
setTranslate
public void setTranslate(float tx, float ty)DOM: ImplementsSVGTransform.setTranslate(float,float).- Specified by:
setTranslatein interfaceorg.w3c.dom.svg.SVGTransform- Overrides:
setTranslatein classAbstractSVGTransform
-
setScale
public void setScale(float sx, float sy)DOM: ImplementsSVGTransform.setScale(float,float).- Specified by:
setScalein interfaceorg.w3c.dom.svg.SVGTransform- Overrides:
setScalein classAbstractSVGTransform
-
setRotate
public void setRotate(float angle, float cx, float cy)DOM: ImplementsSVGTransform.setRotate(float,float,float).- Specified by:
setRotatein interfaceorg.w3c.dom.svg.SVGTransform- Overrides:
setRotatein classAbstractSVGTransform
-
setSkewX
public void setSkewX(float angle)
DOM: ImplementsSVGTransform.setSkewX(float).- Specified by:
setSkewXin interfaceorg.w3c.dom.svg.SVGTransform- Overrides:
setSkewXin classAbstractSVGTransform
-
setSkewY
public void setSkewY(float angle)
DOM: ImplementsSVGTransform.setSkewY(float).- Specified by:
setSkewYin interfaceorg.w3c.dom.svg.SVGTransform- Overrides:
setSkewYin classAbstractSVGTransform
-
createMatrix
protected org.w3c.dom.svg.SVGMatrix createMatrix()
Creates theSVGMatrixused to store the transform.- Specified by:
createMatrixin classAbstractSVGTransform- Returns:
- SVGMatrix representing the transformation
-
getStringValue
protected java.lang.String getStringValue()
Returns the string representation of this transform.
-
-