Methods Summary |
---|
protected com.sun.perseus.j2d.Transform | appendTransform(com.sun.perseus.j2d.Transform tx, com.sun.perseus.j2d.Transform workTx)Appends this node's transform, if it is not null.
if (transform == null && motion == null) {
return tx;
}
tx = recycleTransform(tx, workTx);
if (motion != null) {
tx.mMultiply(motion);
}
if (transform != null) {
tx.mMultiply(transform);
}
return tx;
|
TraitAnim | createTraitAnimImpl(java.lang.String traitName)
if (SVGConstants.SVG_TRANSFORM_ATTRIBUTE == traitName) {
return new TransformTraitAnim(this, traitName);
} else if (SVGConstants.SVG_MOTION_PSEUDO_ATTRIBUTE == traitName) {
return new MotionTraitAnim(this, traitName);
} else {
return super.createTraitAnimImpl(traitName);
}
|
public java.lang.String | getLocalName()
return SVGConstants.SVG_G_TAG;
|
org.w3c.dom.svg.SVGMatrix | getMatrixTraitImpl(java.lang.String name)AbstractShapeNode handles the transform attribute.
Other attributes are handled by the super class.
if (SVGConstants.SVG_TRANSFORM_ATTRIBUTE.equals(name)) {
return toSVGMatrixTrait(transform);
} else if (SVGConstants.SVG_MOTION_PSEUDO_ATTRIBUTE.equals(name)) {
return toSVGMatrixTrait(motion);
} else {
return super.getMatrixTraitImpl(name);
}
|
public com.sun.perseus.j2d.Transform | getMotion()
return motion;
|
public java.lang.String | getTraitImpl(java.lang.String name)AbstractShapeNode handles the transform attribute.
Other attributes are handled by the super class.
if (SVGConstants.SVG_TRANSFORM_ATTRIBUTE == name) {
return toStringTrait(transform);
} else if (SVGConstants.SVG_MOTION_PSEUDO_ATTRIBUTE == name) {
return toStringTrait(motion);
} else {
return super.getTraitImpl(name);
}
|
public com.sun.perseus.j2d.Transform | getTransform()
return transform;
|
public ElementNode | newInstance(DocumentNode doc)Used by DocumentNode to create a new instance from
a prototype Group .
return new Group(doc);
|
void | setFloatArrayTrait(java.lang.String name, float[][] value)Set the trait value as float array.
// We use .equals for the transform attribute as the string may not
// have been interned. We use == for the motion pseudo attribute because
// it is only used internally and from the SVGConstants strings.
if (SVGConstants.SVG_TRANSFORM_ATTRIBUTE.equals(name)) {
if (transform == null) {
modifyingNode();
transform = new Transform(value[0][0],
value[1][0],
value[2][0],
value[3][0],
value[4][0],
value[5][0]);
} else {
if (!transform.equals(value)) {
modifyingNode();
transform.setTransform(value[0][0],
value[1][0],
value[2][0],
value[3][0],
value[4][0],
value[5][0]);
} else {
return;
}
}
recomputeTransformState();
recomputeProxyTransformState();
modifiedNode();
} else if (SVGConstants.SVG_MOTION_PSEUDO_ATTRIBUTE == name) {
if (motion == null) {
modifyingNode();
motion = new Transform(value[0][0],
value[1][0],
value[2][0],
value[3][0],
value[4][0],
value[5][0]);
} else {
if (!motion.equals(value)) {
modifyingNode();
motion.setTransform(value[0][0],
value[1][0],
value[2][0],
value[3][0],
value[4][0],
value[5][0]);
} else {
return;
}
}
recomputeTransformState();
recomputeProxyTransformState();
modifiedNode();
} else {
super.setFloatArrayTrait(name, value);
}
|
void | setMatrixTraitImpl(java.lang.String name, com.sun.perseus.j2d.Transform matrix)AbstractShapeNode handles the transform attribute.
Other attributes are handled by the super class.
if (SVGConstants.SVG_TRANSFORM_ATTRIBUTE.equals(name)) {
setTransform(matrix);
} else if (SVGConstants.SVG_MOTION_PSEUDO_ATTRIBUTE.equals(name)) {
setMotion(matrix);
} else {
super.setMatrixTraitImpl(name, matrix);
}
|
public void | setMotion(com.sun.perseus.j2d.Transform newMotion)
if (equal(newMotion, motion)) {
return;
}
modifyingNode();
this.motion = newMotion;
recomputeTransformState();
recomputeProxyTransformState();
modifiedNode();
|
public void | setTraitImpl(java.lang.String name, java.lang.String value)AbstractShapeNode handles the transform attribute.
Other attributes are handled by the super class.
if (SVGConstants.SVG_TRANSFORM_ATTRIBUTE == name) {
setTransform(parseTransformTrait(name, value));
} else if (SVGConstants.SVG_MOTION_PSEUDO_ATTRIBUTE == name) {
setMotion(parseTransformTrait(name, value));
} else {
super.setTraitImpl(name, value);
}
|
public void | setTransform(com.sun.perseus.j2d.Transform newTransform)
if (equal(newTransform, transform)) {
return;
}
modifyingNode();
this.transform = newTransform;
recomputeTransformState();
recomputeProxyTransformState();
modifiedNode();
|
boolean | supportsTrait(java.lang.String traitName)Supported traits: transform.
if (SVGConstants.SVG_TRANSFORM_ATTRIBUTE == traitName
||
SVGConstants.SVG_MOTION_PSEUDO_ATTRIBUTE == traitName) {
return true;
} else {
return super.supportsTrait(traitName);
}
|
java.lang.String | toStringTrait(java.lang.String name, float[][] value)
if (SVGConstants.SVG_TRANSFORM_ATTRIBUTE == name) {
Transform transform = new Transform(value[0][0],
value[1][0],
value[2][0],
value[3][0],
value[4][0],
value[5][0]);
return toStringTrait(transform);
} else {
return super.toStringTrait(name, value);
}
|
public float[][] | validateFloatArrayTrait(java.lang.String traitName, java.lang.String value, java.lang.String reqNamespaceURI, java.lang.String reqLocalName, java.lang.String reqTraitNamespace, java.lang.String reqTraitName)Validates the input trait value.
if (SVGConstants.SVG_TRANSFORM_ATTRIBUTE == traitName
||
SVGConstants.SVG_MOTION_PSEUDO_ATTRIBUTE == traitName) {
Transform txf = parseTransformTrait(traitName, value);
return new float[][] {{(float) txf.getComponent(0)},
{(float) txf.getComponent(1)},
{(float) txf.getComponent(2)},
{(float) txf.getComponent(3)},
{(float) txf.getComponent(4)},
{(float) txf.getComponent(5)}};
} else {
return super.validateFloatArrayTrait(traitName,
value,
reqNamespaceURI,
reqLocalName,
reqTraitNamespace,
reqTraitName);
}
|