public class MutableAffineTransformer extends AffineTransformer implements MutableTransformer, ShapeTransformer, ChangeEventSupport
| Modifier and Type | Field and Description |
|---|---|
protected ChangeEventSupport |
changeSupport |
inverse, transform| Constructor and Description |
|---|
MutableAffineTransformer()
create an instance that does not transform points
|
MutableAffineTransformer(AffineTransform transform)
Create an instance with the supplied transform
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ChangeListener l)
Adds a
ChangeListener. |
void |
concatenate(AffineTransform xform) |
void |
fireStateChanged()
Notifies all listeners that have registered interest for
notification on this event type.
|
ChangeListener[] |
getChangeListeners()
Returns an array of all the
ChangeListeners added
with addChangeListener(). |
void |
preConcatenate(AffineTransform xform) |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener.
|
void |
rotate(double radians,
double x,
double y)
rotates the current transform at the supplied points
|
void |
rotate(double theta,
Point2D from)
preconcatenates the rotation at the supplied point with the current transform
|
void |
scale(double scalex,
double scaley,
Point2D from)
setter for the scale
fires a PropertyChangeEvent with the AffineTransforms representing
the previous and new values for scale and offset
|
void |
setScale(double scalex,
double scaley,
Point2D from)
setter for the scale
fires a PropertyChangeEvent with the AffineTransforms representing
the previous and new values for scale and offset
|
void |
setToIdentity() |
void |
setTranslate(double tx,
double ty)
Replace the Transform's translate x and y values
with the passed values, leaving the scale values
unchanged.
|
void |
shear(double shx,
double shy,
Point2D from)
shears the transform by passed parameters
|
String |
toString() |
void |
translate(double offsetx,
double offsety)
Apply the passed values to the current Transform
|
getInverse, getRotation, getScale, getScaleX, getScaleY, getShearX, getShearY, getTransform, getTranslateX, getTranslateY, inverseTransform, inverseTransform, setTransform, transform, transformclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRotation, getScale, getScaleX, getScaleY, getShearX, getShearY, getTransform, getTranslateX, getTranslateYinverseTransform, transforminverseTransform, transformprotected ChangeEventSupport changeSupport
public MutableAffineTransformer()
public MutableAffineTransformer(AffineTransform transform)
transform - the transform to usepublic String toString()
toString in class AffineTransformerpublic void scale(double scalex,
double scaley,
Point2D from)
scale in interface MutableTransformerscalex - the amount to scale in the x directionscaley - the amount to scale in the y directionfrom - the point to transformpublic void setScale(double scalex,
double scaley,
Point2D from)
setScale in interface MutableTransformerscalex - the amount to scale in the x directionscaley - the amount to scale in the y directionfrom - the point to transformpublic void shear(double shx,
double shy,
Point2D from)
shear in interface MutableTransformershx - x value to shearshy - y value to shearfrom - the point to transformpublic void setTranslate(double tx,
double ty)
setTranslate in interface MutableTransformertx - the x value of the translationty - the y value of the translationpublic void translate(double offsetx,
double offsety)
translate in interface MutableTransformeroffsetx - the x-valueoffsety - the y-valuepublic void rotate(double theta,
Point2D from)
rotate in interface MutableTransformertheta - the angle by which to rotate the pointfrom - the point to transformpublic void rotate(double radians,
double x,
double y)
rotate in interface MutableTransformerradians - angle by which to rotate the supplied coordinatesx - the x coordinate of the point to transformy - the y coordinate of the point to transformpublic void concatenate(AffineTransform xform)
concatenate in interface MutableTransformerpublic void preConcatenate(AffineTransform xform)
preConcatenate in interface MutableTransformerpublic void addChangeListener(ChangeListener l)
ChangeListener.addChangeListener in interface ChangeEventSupportl - the listener to be addedpublic void removeChangeListener(ChangeListener l)
removeChangeListener in interface ChangeEventSupportl - the listener to be removedpublic ChangeListener[] getChangeListeners()
ChangeListeners added
with addChangeListener().getChangeListeners in interface ChangeEventSupportChangeListeners added or an empty
array if no listeners have been addedpublic void fireStateChanged()
fireStateChanged in interface ChangeEventSupportEventListenerListpublic void setToIdentity()
setToIdentity in interface MutableTransformerCopyright © 2016. All rights reserved.