net.pacbell.jfai.toh.ui
Class DiskMoveAnimator

java.lang.Object
  extended by net.pacbell.jfai.toh.ui.DiskMoveAnimator

public class DiskMoveAnimator
extends Object

An instance of this class animates the move of a disk.


Field Summary
static int MS_PER_S
          Number of milliseconds in a second.
 
Constructor Summary
DiskMoveAnimator()
          Create a new instance.
 
Method Summary
 void animate(Point3f start, Point3f end, PinView endPinView, TransformGroup targetGroup)
          Performs the animation.
 Alpha getAlpha()
          Gets the alpha.
 BranchGroup getBehaviorBranch()
          Gets the branch group.
static long getDuration()
          Gets the move duration.
static void setDuration(long aDuration)
          Sets the move duration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MS_PER_S

public static final int MS_PER_S
Number of milliseconds in a second.

See Also:
Constant Field Values
Constructor Detail

DiskMoveAnimator

public DiskMoveAnimator()
Create a new instance. DiskView is the target object that is moving.

Method Detail

getDuration

public static long getDuration()
Gets the move duration.

Returns:
the duration of a move in ms

setDuration

public static void setDuration(long aDuration)
Sets the move duration.

Parameters:
aDuration - the duration of a move in ms

animate

public void animate(Point3f start,
                    Point3f end,
                    PinView endPinView,
                    TransformGroup targetGroup)
Performs the animation. The two points specify the start and end position of the move.

Parameters:
start - the start position
end - the end position
endPinView - the PinView of the pin where the move ends
targetGroup - TransformGroup of the scene objects to animate

getAlpha

public Alpha getAlpha()
Gets the alpha.

Returns:
the animation function

getBehaviorBranch

public BranchGroup getBehaviorBranch()
Gets the branch group.

Returns:
a BranchGroup