|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.gui.Mutator
Class Mutator encapsulates
an abstract class Strategy that defines a mutator strategy
for general Paintable objects and
an abstract class StrategyUsage that decribes how to use a
mutator strategy for a PaintableSequence.
This class also provides:
Strategy objects,Strategy objects.Class Mutator cannot itself be instantiated.
AffineTransform,
TransformFactory| Nested Class Summary | |
static class |
Mutator.Strategy
Class Strategy encapsulates an algorithm that will produce
a mutator AffineTransform given the center of an associated
object. |
static class |
Mutator.StrategyUsage
Class StrategyUsage is used to define constants to be
used to control the usage of Strategy objects. |
| Field Summary | |
static Mutator.StrategyUsage |
MUTATE_AS_GROUP
The constant MUTATE_AS_GROUP signifies that a
Strategy should mutate a collection as a group. |
static Mutator.StrategyUsage |
MUTATE_AS_ITEMS
The constant MUTATE_AS_ITEMS signifies that a
Strategy should mutate a collection by acting
on the individual items of the collection. |
| Constructor Summary | |
private |
Mutator()
Private constructor to prevent instantiation. |
| Method Summary | |
static Mutator.Strategy |
centeredTransform(double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
Returns the Mutator.Strategy encapsulation of centeredTransform in TransformFactory. |
static Mutator.Strategy |
compose(Mutator.Strategy[] strategylist)
Returns the composition of an array of Mutator.Strategy objects into a Mutator.Strategy object. |
static Mutator.Strategy |
glidereflect(double degrees,
double distance)
Returns the Mutator.Strategy encapsulation of glidereflect in TransformFactory. |
static Mutator.Strategy |
randomCenteredTransform(double maxshift)
Returns the Mutator.Strategy encapsulation of randomCenteredTransform in TransformFactory. |
static Mutator.Strategy |
randomRotate(double maxangle)
Returns the Mutator.Strategy encapsulation of randomRotate in TransformFactory. |
static Mutator.Strategy |
randomScale(double degrees,
double maxdelta)
Returns the Mutator.Strategy encapsulation of randomScale in TransformFactory. |
static Mutator.Strategy |
randomTranslate(double maxshift)
Returns the Mutator.Strategy encapsulation of randomTranslate in TransformFactory. |
static Mutator.Strategy |
randomTranslateRotate(double maxshift,
double maxangle)
Returns the Mutator.Strategy encapsulation of randomTranslateRotate in TransformFactory. |
static Mutator.Strategy |
reflect(double degrees)
Returns the Mutator.Strategy encapsulation of reflect in TransformFactory. |
static Mutator.Strategy |
rotate(double degrees)
Returns the Mutator.Strategy encapsulation of rotate in TransformFactory. |
static Mutator.Strategy |
scale(double degrees,
double s,
double t)
Returns the Mutator.Strategy encapsulation of scale in TransformFactory. |
static Mutator.Strategy |
shear(double degrees,
double s)
Returns the Mutator.Strategy encapsulation of shear in TransformFactory. |
static Mutator.Strategy |
transform(AffineTransform T)
Returns the Mutator.Strategy encapsulation of a specific transform that may be used independent of a center. |
static Mutator.Strategy |
translate(double tx,
double ty)
Returns the Mutator.Strategy encapsulation of translate in TransformFactory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final Mutator.StrategyUsage MUTATE_AS_GROUP
MUTATE_AS_GROUP signifies that a
Strategy should mutate a collection as a group.
MUTATE_AS_ITEMSpublic static final Mutator.StrategyUsage MUTATE_AS_ITEMS
MUTATE_AS_ITEMS signifies that a
Strategy should mutate a collection by acting
on the individual items of the collection.
MUTATE_AS_GROUP| Constructor Detail |
private Mutator()
| Method Detail |
public static Mutator.Strategy translate(double tx,
double ty)
tx - the x-coordinate of the translatety - the y-coordinate of the translate
TransformFactory.translate(double, double)public static Mutator.Strategy rotate(double degrees)
degrees - the rotation angle in degrees
TransformFactory.rotate(double, double, double)
public static Mutator.Strategy scale(double degrees,
double s,
double t)
degrees - the angle in degrees of the main scaling axiss - the scale factor along the axis at angle degreest - the scale factor along the axis at angle degrees+90
TransformFactory.scale(double, double, double, double, double)
public static Mutator.Strategy shear(double degrees,
double s)
degrees - the angle in degrees of the fixed axis for shears - determines the amount of shear along lines parallel to
the fixed axis for shear
TransformFactory.shear(double, double, double, double)public static Mutator.Strategy reflect(double degrees)
degrees - the angle in degrees of the line of reflection
TransformFactory.reflect(double, double, double)
public static Mutator.Strategy glidereflect(double degrees,
double distance)
degrees - the angle in degrees of the line of glide reflectiondistance - the translation distance along the line of glide reflection
TransformFactory.glidereflect(double, double, double, double)
public static Mutator.Strategy centeredTransform(double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
m00 - matrix coefficient for row 0 and column 0m10 - matrix coefficient for row 1 and column 0m01 - matrix coefficient for row 0 and column 1m11 - matrix coefficient for row 1 and column 1m02 - matrix coefficient for row 0 and column 2m12 - matrix coefficient for row 1 and column 2
(double, double, double, double, double, double, double, double)public static Mutator.Strategy transform(AffineTransform T)
T - the specific transform to encapsulate
public static Mutator.Strategy randomTranslate(double maxshift)
maxshift - the bound for the translation along each axis
TransformFactory.randomTranslate(double)public static Mutator.Strategy randomRotate(double maxangle)
maxangle - the bound for the rotation angle in degrees
TransformFactory.randomRotate(double, double, double)
public static Mutator.Strategy randomTranslateRotate(double maxshift,
double maxangle)
maxshift - the bound for the translation along each axismaxangle - the bound for the rotation angle in degrees
TransformFactory.randomTranslateRotate(double, double, double, double)
public static Mutator.Strategy randomScale(double degrees,
double maxdelta)
degrees - the angle in degrees of the main scaling axismaxdelta - the bound relative to 1 of the scale factors
TransformFactory.randomScale(double, double, double, double)public static Mutator.Strategy randomCenteredTransform(double maxshift)
maxshift - the bound on the perturbation coefficients
TransformFactory.randomCenteredTransform(double, double, double)public static Mutator.Strategy compose(Mutator.Strategy[] strategylist)
Returns the composition of an array of Mutator.Strategy objects into a Mutator.Strategy object.
Given a center (x, y), the composite strategy computes
an AffineTransform as follows.
For each strategy in the given list compute a transform corresponding to the center (x, y). Then compose these transforms to produce the resulting transform.
strategylist - the strategy objects to compose
TransformFactory.compose(AffineTransform[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||