org.alchar.jdtk.jsapi
Class DTKSpeakableEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.speech.SpeechEvent
          extended by javax.speech.synthesis.SpeakableEvent
              extended by org.alchar.jdtk.jsapi.DTKSpeakableEvent
All Implemented Interfaces:
Serializable

public class DTKSpeakableEvent
extends SpeakableEvent

This class extends the JSAPI SpeakableEvent class. It provides a more verbose textual event representation than the default one.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.speech.synthesis.SpeakableEvent
ELEMENT_CLOSE, ELEMENT_EMPTY, ELEMENT_OPEN, MARKER_REACHED, markerType, SPEAKABLE_CANCELLED, SPEAKABLE_ENDED, SPEAKABLE_PAUSED, SPEAKABLE_RESUMED, SPEAKABLE_STARTED, text, TOP_OF_QUEUE, WORD_STARTED, wordEnd, wordStart
 
Fields inherited from class javax.speech.SpeechEvent
id
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DTKSpeakableEvent(Object source, int id)
          Create a new speakable event for the given source and with the given id.
DTKSpeakableEvent(Object source, int id, String text, int markerType)
          Create a new speakable event for the given source, id, text, and marker type.
DTKSpeakableEvent(Object source, int id, String text, int wordStart, int wordEnd)
          Create a new speakable event for the given source and with the given id.
 
Method Summary
 void paramString(StringBuilder sb)
          Add a textual representation to the given string builder.
 
Methods inherited from class javax.speech.synthesis.SpeakableEvent
getMarkerType, getText, getWordEnd, getWordStart, paramString
 
Methods inherited from class javax.speech.SpeechEvent
getId, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DTKSpeakableEvent

public DTKSpeakableEvent(Object source,
                         int id)
Create a new speakable event for the given source and with the given id.

Parameters:
source - Event source
id - Event id

DTKSpeakableEvent

public DTKSpeakableEvent(Object source,
                         int id,
                         String text,
                         int markerType)
Create a new speakable event for the given source, id, text, and marker type. This constructor is used for MARKER_REACHED events.

Parameters:
source - Event source
id - Event id
text - Text the event relates to
markerType - Marker type

DTKSpeakableEvent

public DTKSpeakableEvent(Object source,
                         int id,
                         String text,
                         int wordStart,
                         int wordEnd)
Create a new speakable event for the given source and with the given id. Create a new speakable event for the given source, id, text, and word start and end positions. This constructor is used for WORD_STARTED events.

Parameters:
source - Event source
id - Event id
text - Text the event relates to
wordStart - Word start position
wordEnd - Word end position
Method Detail

paramString

public void paramString(StringBuilder sb)
Add a textual representation to the given string builder.

Overrides:
paramString in class SpeechEvent
Parameters:
sb - String builder


Copyright © 2007-2009 Kris Van Hees. All Rights Reserved.