Interface AnimatingTreeHead

All Superinterfaces:
DrawingTreeHead, Tree, TreeHead
All Known Implementing Classes:
BSTTreeHead

public interface AnimatingTreeHead
extends DrawingTreeHead

The AnimatingTreeHead interface extends DrawingTreeHead.

The interface simply defines numerous methods which allow for the animating of the Tree onto a given Graphics2D. The interface also defines many mutator and accesor methods for information concerning the animating of the AnimatingTree

See Also:
DrawingTreeHead, TreeHead, Tree, AnimatingTree

Field Summary
 
Fields inherited from interface TreeHead
BALANCE_NODE, CHANGE_DISPLAY, INORDER_TRAVERSAL, INSERT_NODE, LEVELORDER_TRAVERSAL, PARTITION_NODE, POSTORDER_TRAVERSAL, PREORDER_TRAVERSAL, REMOVE_NODE, ROTATE_TO_TOP_NODE, ROTATE_UP, ROTATE_UP_DOUBLE, SEARCH, SELECT, SPLAY_NODE, TRAVERSE
 
Method Summary
 void addTreeAnimator(Animation a)
          Adds the Animation to the list of Animations for the Head.
 void AnimateTree(java.awt.Graphics2D g2)
          Animates the entire AnimatingTree.
 int getTreeAnimationStepSize()
          Gets the step size of the Animations of the tree.
 Animation getTreeAnimator()
          Gets the first Animation in the list of Animations for the Head and null if no Animations are present.
 java.lang.String getTreeStatus()
          Gets the Tree's status, using the String status of Animation.
 java.lang.String getTreeStatusMessage()
          Makes a new tree message.
 boolean isJumpStep()
          Gets the JumpStep of the current tree.
 boolean isStepPause()
          Gets the StepPause of the current tree.
 boolean isTreeAnimating()
          Returns true if the current AnimatingTreeHead is animating (whether the animating list is empty.
 void pause()
          Sets the status of the entire AnimatingTree to pause.
 void play()
          Sets the status of the entire AnimatingTree to play.
 void removeTreeAnimation()
          Quickly removes all Animations within the Tree.
 void rewind()
          Sets the status of the entire AnimatingTree to rewind.
 void setJumpStep(boolean b)
          Sets the JumpStep of the current tree to the boolean value.
 void setStepPause(boolean b)
          Sets the StepPause of the current tree to the boolean value.
 void setTreeAnimationsStepSize(int t)
          Sets the step size of the Animations of the tree.
 void setTreeStatus(java.lang.String status)
          Sets the Tree's status, using the String status of Animation.
 void stop()
          Sets the status of the entire AnimatingTree to stop.
 
Methods inherited from interface DrawingTreeHead
DrawTree, findNode, getDrawingKeySettings, getDrawingNodeSettings, getNodeHeight, getNodeWidth, getScreenBounds, MakeTree, setScreenBounds, setTreeSettings
 
Methods inherited from interface TreeHead
addTreeMessageListener, balance, balanceTree, clear, fixLevel, getChild, getTreeLevel, insert, isTreeEmpty, partition, remove, remove, removeTreeMessageListener, resetTreeLevel, search, select, setChild, size, waitingAction
 
Methods inherited from interface Tree
getChildren, getKey, getLevel, getParentTree, getValue, isEmpty
 

Method Detail

addTreeAnimator

public void addTreeAnimator(Animation a)
Adds the Animation to the list of Animations for the Head. The method does not add the tree as a listener to the Animation. That must be accomplished by the client.

Parameters:
a - Animation added to the Animation list.

getTreeAnimator

public Animation getTreeAnimator()
Gets the first Animation in the list of Animations for the Head and null if no Animations are present.

Returns:
first Animation in the Animation list.

isTreeAnimating

public boolean isTreeAnimating()
Returns true if the current AnimatingTreeHead is animating (whether the animating list is empty. This determines if the entire tree is animating.

Returns:
true if the current tree is animating and not empty.

AnimateTree

public void AnimateTree(java.awt.Graphics2D g2)
Animates the entire AnimatingTree. The animation is drawn to the Graphics2D passed. This method is called repeatedly for each Animation within the list.

Parameters:
g2 - Graphics2D to which the Animations are drawn.

removeTreeAnimation

public void removeTreeAnimation()
Quickly removes all Animations within the Tree. The method sets the Status of all the Animations to Animation.FINISH so that al listeners of the Animations will receive the AnimationEvent.


setJumpStep

public void setJumpStep(boolean b)
Sets the JumpStep of the current tree to the boolean value. The jumpStep determines whether the Animation skips through an entire step at each AnimateTree call.

Parameters:
b - sets the jumpStep to the value b.

isJumpStep

public boolean isJumpStep()
Gets the JumpStep of the current tree.

Returns:
true if the tree is jumpSteping.

setStepPause

public void setStepPause(boolean b)
Sets the StepPause of the current tree to the boolean value. The stepPause determines whether the Animation pauses after each step of the Animation completes.

Parameters:
b - sets the stepPause to the value b.

isStepPause

public boolean isStepPause()
Gets the StepPause of the current tree.

Returns:
true if the tree is pausing at the completion of each step.

play

public void play()
Sets the status of the entire AnimatingTree to play.


stop

public void stop()
Sets the status of the entire AnimatingTree to stop.


rewind

public void rewind()
Sets the status of the entire AnimatingTree to rewind.


pause

public void pause()
Sets the status of the entire AnimatingTree to pause.


setTreeAnimationsStepSize

public void setTreeAnimationsStepSize(int t)
Sets the step size of the Animations of the tree. The integer value is passed to every Animation's setStepSize method.

Parameters:
t - integer step size setting.

getTreeAnimationStepSize

public int getTreeAnimationStepSize()
Gets the step size of the Animations of the tree.

Returns:
integer step size of the tree.

getTreeStatus

public java.lang.String getTreeStatus()
Gets the Tree's status, using the String status of Animation.

Returns:
String status of the Tree, representing the Animation status.

setTreeStatus

public void setTreeStatus(java.lang.String status)
Sets the Tree's status, using the String status of Animation.

Parameters:
status - String status of the Tree, representing the Animation status.

getTreeStatusMessage

public java.lang.String getTreeStatusMessage()
Makes a new tree message. The information presented usually includes :