Class SoundTreeExample

java.lang.Object
  extended by SoundTreeExample

public class SoundTreeExample
extends Object

Class to test the sound tree

Author:
Mark Guzdial, Barb Ericson

Constructor Summary
SoundTreeExample()
          Constructor to set up the example
 
Method Summary
 SoundBranch getRoot()
          Method to get the root of the tree
static void main(String[] args)
          Method to test the tree
 void play()
          Method to play the tree
 void playAfter()
          Method to play after the current node
 void playScaled(double factor)
          Method to play the tree but change the scale factor
 void playSwapped()
          Method to play with the next nodes before the child nodes
 void setUp2()
          Method to set up the tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoundTreeExample

public SoundTreeExample()
Constructor to set up the example

Method Detail

getRoot

public SoundBranch getRoot()
Method to get the root of the tree

Returns:
the root of the tree

setUp2

public void setUp2()
Method to set up the tree


play

public void play()
Method to play the tree


playScaled

public void playScaled(double factor)
Method to play the tree but change the scale factor

Parameters:
factor - the new factor to use

playAfter

public void playAfter()
Method to play after the current node


playSwapped

public void playSwapped()
Method to play with the next nodes before the child nodes


main

public static void main(String[] args)
Method to test the tree