/* * @(#)AnimatingTreeHead.java * * Last Modified: 9/15/01 */ import java.util.*; import java.lang.*; import java.awt.*; import java.awt.font.*; import java.awt.geom.*; /** * 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
*
* @author Corey Sanders
* @version 1.2 8/02/01
* @see DrawingTreeHead
* @see TreeHead
* @see Tree
* @see AnimatingTree
*/
public interface AnimatingTreeHead extends DrawingTreeHead {
/**
* 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.
*
* @param a Animation
added to the Animation list.
*/
public void addTreeAnimator(Animation a);
/**
* Gets the first Animation
in the list of Animations for the Head and null if no
* Animations are present.
*
* @return first Animation
in the Animation list.
*/
public Animation getTreeAnimator();
/**
* Returns true if the current AnimatingTreeHead is animating (whether the animating list
* is empty. This determines if the entire tree is animating.
*
* @return true if the current tree is animating and not empty.
*/
public boolean isTreeAnimating();
/**
* Animates the entire AnimatingTree. The animation is drawn to the Graphics2D passed.
* This method is called repeatedly for each Animation within the list.
*
* @param g2 Graphics2D to which the Animation
s are drawn.
*/
public void AnimateTree(Graphics2D g2);
/**
* 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.
*/
public void removeTreeAnimation();
/**
* 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.
*
* @param b sets the jumpStep to the value b.
*/
public void setJumpStep(boolean b);
/**
* Gets the JumpStep of the current tree.
*
* @return true if the tree is jumpSteping.
*/
public boolean isJumpStep();
/**
* 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.
*
* @param b sets the stepPause to the value b.
*/
public void setStepPause(boolean b);
/**
* Gets the StepPause of the current tree.
*
* @return true if the tree is pausing at the completion of each step.
*/
public boolean isStepPause();
/**
* Sets the status of the entire AnimatingTree
to play.
*/
public void play();
/**
* Sets the status of the entire AnimatingTree
to stop.
*/
public void stop();
/**
* Sets the status of the entire AnimatingTree
to rewind.
*/
public void rewind();
/**
* Sets the status of the entire AnimatingTree
to pause.
*/
public void pause();
/**
* Sets the step size of the Animation
s of the tree. The integer value
* is passed to every Animation's setStepSize
method.
*
* @param t integer step size setting.
*/
public void setTreeAnimationsStepSize(int t);
/**
* Gets the step size of the Animation
s of the tree.
*
* @return integer step size of the tree.
*/
public int getTreeAnimationStepSize();
/**
* Gets the Tree's status, using the String status of Animation
.
*
* @return String status of the Tree, representing the Animation
status.
*/
public String getTreeStatus();
/**
* Sets the Tree's status, using the String status of Animation
.
*
* @param status String status of the Tree, representing the Animation
status.
*/
public void setTreeStatus(String status);
/**
* Makes a new tree message. The information presented usually includes :
*