jp.digitalmuseum.mr.gui.workflow
クラス PStrokeColorActivity

java.lang.Object
  上位を拡張 PInterpolatingActivity
      上位を拡張 jp.digitalmuseum.mr.gui.workflow.PStrokeColorActivity

public class PStrokeColorActivity
extends PInterpolatingActivity

PStrokeColorActivity interpolates between two stroke colors for its target over the duration of the animation. The source color is retrieved from the target just before the activity is scheduled to start.


入れ子のクラスの概要
static interface PStrokeColorActivity.Target
          Target Objects that want their color to be set by the color activity must implement this interface.
 
コンストラクタの概要
PStrokeColorActivity(long duration, long stepRate, int loopCount, int mode, PStrokeColorActivity.Target aTarget, java.awt.Color aDestination)
          Create a new PColorActivity.
PStrokeColorActivity(long duration, long stepRate, PStrokeColorActivity.Target aTarget)
          Constructs a color activity for the given target that will animate for the duration provided at an interval of stepRate.
PStrokeColorActivity(long duration, long stepRate, PStrokeColorActivity.Target aTarget, java.awt.Color aDestination)
          Constructs a color activity for the given target that will animate for the duration provided at an interval of stepRate from the target's starting color to the destination color.
 
メソッドの概要
protected  void activityStarted()
          Overrides it's parent to ensure that the source color is the color of the node being animated.
 java.awt.Color getDestinationColor()
          Return the final color that will be set on the color activities target when the activity stops stepping.
protected  boolean isAnimation()
          Returns true since all PColorActivities animate the scene.
 void setDestinationColor(java.awt.Color newDestination)
          Set the final color that will be set on the color activities target when the activity stops stepping.
 void setRelativeTargetValue(float zeroToOne)
          Interpolates the target node's color by mixing the source color and the destination color.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

PStrokeColorActivity

public PStrokeColorActivity(long duration,
                            long stepRate,
                            PStrokeColorActivity.Target aTarget)
Constructs a color activity for the given target that will animate for the duration provided at an interval of stepRate. Destination color must be assigned later.

パラメータ:
duration - duration in milliseconds that the animation should last
stepRate - the time between interpolations
aTarget - the target onto which the animation is being performed

PStrokeColorActivity

public PStrokeColorActivity(long duration,
                            long stepRate,
                            PStrokeColorActivity.Target aTarget,
                            java.awt.Color aDestination)
Constructs a color activity for the given target that will animate for the duration provided at an interval of stepRate from the target's starting color to the destination color.

パラメータ:
duration - duration in milliseconds that the animation should last
stepRate - the time between interpolations
aTarget - the target onto which the animation is being performed
aDestination - the color to which the animation is aiming at

PStrokeColorActivity

public PStrokeColorActivity(long duration,
                            long stepRate,
                            int loopCount,
                            int mode,
                            PStrokeColorActivity.Target aTarget,
                            java.awt.Color aDestination)
Create a new PColorActivity.

パラメータ:
duration - the length of one loop of the activity
stepRate - the amount of time between steps of the activity
loopCount - number of times the activity should reschedule itself
mode - defines how the activity interpolates between states
aTarget - the object that the activity will be applied to and where the source state will be taken from.
aDestination - the destination color state
メソッドの詳細

isAnimation

protected boolean isAnimation()
Returns true since all PColorActivities animate the scene.

戻り値:
always returns true

getDestinationColor

public java.awt.Color getDestinationColor()
Return the final color that will be set on the color activities target when the activity stops stepping.

戻り値:
the final color for this color activity

setDestinationColor

public void setDestinationColor(java.awt.Color newDestination)
Set the final color that will be set on the color activities target when the activity stops stepping.

パラメータ:
newDestination - to animate towards

activityStarted

protected void activityStarted()
Overrides it's parent to ensure that the source color is the color of the node being animated.


setRelativeTargetValue

public void setRelativeTargetValue(float zeroToOne)
Interpolates the target node's color by mixing the source color and the destination color.

パラメータ:
zeroToOne - 0 = all source color, 1 = all destination color


Copyright by Jun KATO (arc@dmz) at http://mr.digitalmuseum.jp/