|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cs.piccolo.activities.PActivity
edu.umd.cs.piccolo.activities.PInterpolatingActivity
edu.umd.cs.piccolo.activities.PTransformActivity
public class PTransformActivity
PTransformActivity interpolates between two transforms setting its target's transform as it goes. See PNode. animate*() for an example of this activity in used. The source transform is retrieved from the target just before the animation is scheduled to start.
| Nested Class Summary | |
|---|---|
static interface |
PTransformActivity.Target
Target Objects that want to get transformed by the transform activity must implement this interface. |
| Nested classes/interfaces inherited from class edu.umd.cs.piccolo.activities.PActivity |
|---|
PActivity.PActivityDelegate |
| Field Summary |
|---|
| Fields inherited from class edu.umd.cs.piccolo.activities.PInterpolatingActivity |
|---|
DESTINATION_TO_SOURCE, SOURCE_TO_DESTINATION, SOURCE_TO_DESTINATION_TO_SOURCE |
| Fields inherited from class edu.umd.cs.piccolo.activities.PActivity |
|---|
TERMINATE_AND_FINISH, TERMINATE_AND_FINISH_IF_STEPPING, TERMINATE_WITHOUT_FINISHING |
| Constructor Summary | |
|---|---|
PTransformActivity(long duration,
long stepRate,
int loopCount,
int mode,
PTransformActivity.Target aTarget,
java.awt.geom.AffineTransform aDestination)
Create a new PTransformActivity. |
|
PTransformActivity(long duration,
long stepRate,
PTransformActivity.Target aTarget)
|
|
PTransformActivity(long duration,
long stepRate,
PTransformActivity.Target aTarget,
java.awt.geom.AffineTransform aDestination)
|
|
| Method Summary | |
|---|---|
protected void |
activityStarted()
This method is called right before an activity is scheduled to start running. |
double[] |
getDestinationTransform()
Return the final transform that will be set on the transform activities target when the transform activity stops stepping. |
protected boolean |
isAnimation()
Return true if this activity is performing an animation. |
protected java.lang.String |
paramString()
Returns a string representing the state of this activity. |
void |
setDestinationTransform(double[] newDestination)
Set the final transform that will be set on the transform activities target when the transform activity stops stepping. |
void |
setRelativeTargetValue(float zeroToOne)
Subclasses should override this method and set the value on their target (the object that they are modifying) accordingly. |
| Methods inherited from class edu.umd.cs.piccolo.activities.PInterpolatingActivity |
|---|
activityFinished, activityStep, computeSlowInSlowOut, getFirstLoop, getLoopCount, getMode, getSlowInSlowOut, setDuration, setFirstLoop, setLoopCount, setMode, setRelativeTargetValueAdjustingForMode, setSlowInSlowOut, terminate |
| Methods inherited from class edu.umd.cs.piccolo.activities.PActivity |
|---|
getActivityScheduler, getDelegate, getDuration, getNextStepTime, getStartTime, getStepRate, getStopTime, isStepping, processStep, setActivityScheduler, setDelegate, setStartTime, setStepRate, startAfter, terminate, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PTransformActivity(long duration,
long stepRate,
PTransformActivity.Target aTarget)
public PTransformActivity(long duration,
long stepRate,
PTransformActivity.Target aTarget,
java.awt.geom.AffineTransform aDestination)
public PTransformActivity(long duration,
long stepRate,
int loopCount,
int mode,
PTransformActivity.Target aTarget,
java.awt.geom.AffineTransform aDestination)
duration - the length of one loop of the activitystepRate - the amount of time between steps of the activityloopCount - number of times the activity should reschedule itselfmode - defines how the activity interpolates between statesaTarget - the object that the activity will be applied to and where
the source state will be taken from.aDestination - the destination color state| Method Detail |
|---|
protected boolean isAnimation()
PActivity
isAnimation in class PActivitypublic double[] getDestinationTransform()
public void setDestinationTransform(double[] newDestination)
protected void activityStarted()
PActivity
activityStarted in class PInterpolatingActivitypublic void setRelativeTargetValue(float zeroToOne)
PInterpolatingActivity
setRelativeTargetValue in class PInterpolatingActivityprotected java.lang.String paramString()
null.
paramString in class PInterpolatingActivity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||