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
An
SVGTransform
in the list.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Whether the rotation transform value specifies only an angle.protected String
String representation of the item.protected AbstractSVGList
List the item belongs to.protected boolean
Whether 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
Fields inherited from interface org.w3c.dom.svg.SVGTransform
SVG_TRANSFORM_MATRIX, SVG_TRANSFORM_ROTATE, SVG_TRANSFORM_SCALE, SVG_TRANSFORM_SKEWX, SVG_TRANSFORM_SKEWY, SVG_TRANSFORM_TRANSLATE, SVG_TRANSFORM_UNKNOWN
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new, uninitialized SVGTransformItem.SVGTransformItem
(org.w3c.dom.svg.SVGTransform transform) Creates a new SVGTransformItem from the givenSVGTransform
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
assign
(org.w3c.dom.svg.SVGTransform transform) Copies the values from the givenSVGTransform
into thisAbstractSVGTransformList.SVGTransformItem
.protected org.w3c.dom.svg.SVGMatrix
Creates theSVGMatrix
used to store the transform.Returns the parent list of this item.protected String
Returns the string representation of this transform.Returns the cached representation of the item if valid, otherwise recomputes the String representation of the item.protected void
matrix
(float a, float b, float c, float d, float e, float f) Sets the transform to be a matrix transform.protected void
Notifies the parent list that this item has changed.protected void
rotate
(float angle) Sets the transform to be rotation.protected void
scale
(float x) Sets the transform to be an x scale.void
setMatrix
(org.w3c.dom.svg.SVGMatrix matrix) DOM: ImplementsSVGTransform.setMatrix(SVGMatrix)
.void
setParent
(AbstractSVGList list) Assigns a parent list to this item.void
setRotate
(float angle, float cx, float cy) DOM: ImplementsSVGTransform.setRotate(float,float,float)
.void
setScale
(float sx, float sy) DOM: ImplementsSVGTransform.setScale(float,float)
.void
setSkewX
(float angle) DOM: ImplementsSVGTransform.setSkewX(float)
.void
setSkewY
(float angle) DOM: ImplementsSVGTransform.setSkewY(float)
.void
setTranslate
(float tx, float ty) DOM: ImplementsSVGTransform.setTranslate(float,float)
.protected void
translate
(float x) Sets the transform to be an x translation.
-
Field Details
-
xOnly
protected boolean xOnlyWhether the transform value specifies only an x value, no y value. -
angleOnly
protected boolean angleOnlyWhether the rotation transform value specifies only an angle. -
parent
List the item belongs to. -
itemStringValue
String representation of the item. This is a cached representation of the item while it is not changed.
-
-
Constructor Details
-
SVGTransformItem
public SVGTransformItem()Creates a new, uninitialized SVGTransformItem. -
SVGTransformItem
public SVGTransformItem(org.w3c.dom.svg.SVGTransform transform) Creates a new SVGTransformItem from the givenSVGTransform
.
-
-
Method Details
-
resetAttribute
protected void resetAttribute()Notifies the parent list that this item has changed. This also discards the cached representation of the item. -
setParent
Assigns a parent list to this item. -
getParent
Returns the parent list of this item. -
getValueAsString
Returns the cached representation of the item if valid, otherwise recomputes the String representation of the item.- Specified by:
getValueAsString
in 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 givenSVGTransform
into 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:
setMatrix
in interfaceorg.w3c.dom.svg.SVGTransform
- Overrides:
setMatrix
in classAbstractSVGTransform
-
setTranslate
public void setTranslate(float tx, float ty) DOM: ImplementsSVGTransform.setTranslate(float,float)
.- Specified by:
setTranslate
in interfaceorg.w3c.dom.svg.SVGTransform
- Overrides:
setTranslate
in classAbstractSVGTransform
-
setScale
public void setScale(float sx, float sy) DOM: ImplementsSVGTransform.setScale(float,float)
.- Specified by:
setScale
in interfaceorg.w3c.dom.svg.SVGTransform
- Overrides:
setScale
in classAbstractSVGTransform
-
setRotate
public void setRotate(float angle, float cx, float cy) DOM: ImplementsSVGTransform.setRotate(float,float,float)
.- Specified by:
setRotate
in interfaceorg.w3c.dom.svg.SVGTransform
- Overrides:
setRotate
in classAbstractSVGTransform
-
setSkewX
public void setSkewX(float angle) DOM: ImplementsSVGTransform.setSkewX(float)
.- Specified by:
setSkewX
in interfaceorg.w3c.dom.svg.SVGTransform
- Overrides:
setSkewX
in classAbstractSVGTransform
-
setSkewY
public void setSkewY(float angle) DOM: ImplementsSVGTransform.setSkewY(float)
.- Specified by:
setSkewY
in interfaceorg.w3c.dom.svg.SVGTransform
- Overrides:
setSkewY
in classAbstractSVGTransform
-
createMatrix
protected org.w3c.dom.svg.SVGMatrix createMatrix()Creates theSVGMatrix
used to store the transform.- Specified by:
createMatrix
in classAbstractSVGTransform
- Returns:
- SVGMatrix representing the transformation
-
getStringValue
Returns the string representation of this transform.
-