speech
Class SentenceScheduler

java.lang.Object
  extended by speech.SentenceScheduler
All Implemented Interfaces:
java.io.Serializable

public class SentenceScheduler
extends java.lang.Object
implements java.io.Serializable

This class is used to schedule the rendering of sentences

Author:
Frank Bruns
See Also:
Serialized Form

Constructor Summary
SentenceScheduler()
           
 
Method Summary
 void add(Sentence s)
          Adds a sentence object to the sentence scheduler
 void clear()
          Removes every sentence from the queue
 java.util.LinkedList<Sentence> getSentences()
          Returns the sentences in the sentece scheduler
 void render(java.awt.Graphics2D g)
          Calls the render method of the first sentence in the queue
 void update(long elapsedTime)
          Updates the sentence scheduler.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SentenceScheduler

public SentenceScheduler()
Method Detail

add

public void add(Sentence s)
Adds a sentence object to the sentence scheduler

Parameters:
s - the sentece to add to the scheduler

clear

public void clear()
Removes every sentence from the queue


getSentences

public java.util.LinkedList<Sentence> getSentences()
Returns the sentences in the sentece scheduler

Returns:
list of sentences in the schedeler

update

public void update(long elapsedTime)
Updates the sentence scheduler. This calls the update method of the first sentence in the queue and removes that sentence from the queue, if it has been spoken

Parameters:
elapsedTime - time between two frames

render

public void render(java.awt.Graphics2D g)
Calls the render method of the first sentence in the queue

Parameters:
g -