|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
MutatablePaintable describes a Paintable
that may be mutated using an invertible AffineTransform.
The MutatablePaintable object must maintain its current
mutator so that additional mutations may be performed.
By convention, the information supplied by the methods in the
interface Paintable apply to the object after mutation.
To obtain the corresponding information for the object before
mutation, use the methods with the keyword Original.
| Method Summary | |
void |
addPostMutation(AffineTransform M)
Composes the existing mutator on the left with the given transform provided that the given transform is invertible. |
void |
addPostMutation(Mutator.Strategy strategy)
Applies a Mutator.Strategy object to the paintable by
composition on the left. |
void |
addPreMutation(AffineTransform M)
Composes the existing mutator on the right with the given transform provided that the given transform is invertible. |
void |
addPreMutation(Mutator.Strategy strategy)
Applies a Mutator.Strategy object to the paintable by
composition on the right. |
AffineTransform |
getMutator()
Returns a copy of the existing mutator transform. |
AffineTransform |
getMutatorInverse()
Returns a copy of the existing mutator inverse transform. |
Rectangle2D |
getOriginalBounds2D()
Returns a copy of the 2-dimensional bounds of the paint region before mutation. |
Point2D |
getOriginalCenter()
Returns a copy of the center of the paint region before mutation. |
void |
move(double x,
double y)
Moves the mutatable by a translation using the data in the point specified by coordinates. |
void |
move(Point2D p)
Moves the mutatable by a translation using the data in the point. |
void |
setMutator(AffineTransform M)
Sets the mutator transform to the given transform provided that the given transform is invertible. |
| Methods inherited from interface edu.neu.ccs.gui.Paintable |
contains, contains, getBounds2D, getCenter, getOpacity, getPreparedGraphics2D, isVisible, paint, setOpacity, setVisible |
| Method Detail |
public Rectangle2D getOriginalBounds2D()
public Point2D getOriginalCenter()
public void setMutator(AffineTransform M)
M - the invertible affine transform to set as the mutatorpublic void addPreMutation(AffineTransform M)
Composes the existing mutator on the right with the given transform provided that the given transform is invertible.
The action of the new mutator will be to apply the given transform and then to apply the old mutator.
This method should be equivalent to:
setMutator(TransformFactory.compose(getMutator(), M))
M - the invertible affine transform to compose on the right with
the existing mutatorpublic void addPreMutation(Mutator.Strategy strategy)
Applies a Mutator.Strategy object to the paintable by
composition on the right. The specific manner is which this is done
will depend on the particular object.
strategy - the mutator strategy to applypublic void addPostMutation(AffineTransform M)
Composes the existing mutator on the left with the given transform provided that the given transform is invertible.
The action of the new mutator will be to apply the old mutator and then to apply the given transform.
This method should be equivalent to:
setMutator(TransformFactory.compose(M, getMutator()))
M - the invertible affine transform to compose on the left with
the existing mutatorpublic void addPostMutation(Mutator.Strategy strategy)
Applies a Mutator.Strategy object to the paintable by
composition on the left. The specific manner is which this is done
will depend on the particular object.
strategy - the mutator strategy to applypublic AffineTransform getMutator()
public AffineTransform getMutatorInverse()
public void move(double x,
double y)
Moves the mutatable by a translation using the data in the point specified by coordinates.
This method should act as a convenience method that performs an
addPostMutation operation using a translation defined
by the given point.
x - the x-coordinate of the pointy - the y-coordinate of the pointpublic void move(Point2D p)
Moves the mutatable by a translation using the data in the point.
This method should act as a convenience method that performs an
addPostMutation operation using a translation defined
by the given point.
If the point is null, this method should do nothing.
p - a specified Point2D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||