edu.princeton.cs.algs4.growingtree.framework
Interface AnimatingTree<P extends NodeProperties>

All Superinterfaces:
DrawingTree<P>, Tree<P>
All Known Implementing Classes:
GrowingTreeHead, GrowingTreeNode, MovingBSTTree

public interface AnimatingTree<P extends NodeProperties>
extends DrawingTree<P>

The AnimatingTree interface extends DrawingTree because all AnimatingTrees must be drawable.

The interface simply inforces the defining of 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

Version:
1.3 9/15/01
Author:
Corey Sanders

Method Summary
 void addAnimator(Animation a)
          Adds an animation to the current node.
 Animation getAnimator()
          Gets the first Animation of the node.
 boolean isNodeAnimating()
          Returns true if the node is animating.
 
Methods inherited from interface edu.princeton.cs.algs4.growingtree.framework.DrawingTree
drawNode, drawNode, drawNode, drawNodeAndLink, drawNodeAndLink, drawNodeAndLink, getCurrentTransform, getDrawingLevel, getScreenBounds, getSectionHeight, getSettings, setScreenBounds, setSettings
 
Methods inherited from interface edu.princeton.cs.algs4.growingtree.framework.Tree
getChildren, getKey, getLevel, getParentTree, getValue, isEmpty, size
 

Method Detail

isNodeAnimating

boolean isNodeAnimating()
Returns true if the node is animating. It simply determines if the list of animators is empty.

Returns:
true if the node is currently animating.

addAnimator

void addAnimator(Animation a)
Adds an animation to the current node. This method does not add the node to listen for AnimationEvents. That must be performed by the user.

Parameters:
a - the Animation being added to the node.

getAnimator

Animation getAnimator()
Gets the first Animation of the node.

Returns:
Animation which is the first Animation of the node.