fi.hut.tml.xsmiles.mlfc.xforms.dialog
Class DialogGUIDebug
java.lang.Object
fi.hut.tml.xsmiles.mlfc.xforms.dialog.DialogGUIDebug
- All Implemented Interfaces:
- java.awt.event.ActionListener, DialogUI, java.util.EventListener, XRecognizerListener
- Direct Known Subclasses:
- DialogGUITest
- public class DialogGUIDebug
- extends java.lang.Object
- implements DialogUI, java.awt.event.ActionListener, XRecognizerListener
This creates an additional Dialog UI layer on top of an XForms document.
It is possible to operate thee Dialog UI with a voice recognizer and voice output for instance
- Author:
- honkkis
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
frame
protected javax.swing.JFrame frame
mainPanel
protected java.awt.Container mainPanel
bottomPanel
protected java.awt.Container bottomPanel
topPanel
protected java.awt.Container topPanel
buttonPanel
protected java.awt.Container buttonPanel
cfactory
protected static ComponentFactory cfactory
questionArea
protected XTextArea questionArea
answerInput
protected XInput answerInput
statusLabel
protected XCaption statusLabel
speechSelect
protected XSelectBoolean speechSelect
speechCompound
protected XLabelCompound speechCompound
recSelect
protected XSelectBoolean recSelect
recCompound
protected XLabelCompound recCompound
speakButton
protected XButton speakButton
stopButton
protected XButton stopButton
installButton
protected XButton installButton
listeners
protected java.util.Vector listeners
synth
protected Synth synth
recognizer
protected Recognizer recognizer
DialogGUIDebug
public DialogGUIDebug()
getInstance
public static DialogGUIDebug getInstance(ComponentFactory f)
start
public void start()
showDialog
public void showDialog()
getComponentFactory
protected ComponentFactory getComponentFactory()
setComponentFactory
public void setComponentFactory(ComponentFactory f)
speakButtonPressed
protected void speakButtonPressed()
stopButtonPressed
protected void stopButtonPressed()
speakButtonPressedSync
protected void speakButtonPressedSync()
enableSpeech
protected void enableSpeech(boolean enable)
enableRecognizer
protected void enableRecognizer(boolean enable)
speak
protected void speak(java.lang.String s)
showQuestion
public void showQuestion(java.lang.String question,
java.io.Reader grammar)
- Specified by:
showQuestion in interface DialogUI
fireEvent
protected void fireEvent(java.awt.event.ActionEvent e)
addActionListener
public void addActionListener(java.awt.event.ActionListener l)
- Specified by:
addActionListener in interface DialogUI
removeActionListener
public void removeActionListener(java.awt.event.ActionListener l)
- Specified by:
removeActionListener in interface DialogUI
destroy
public void destroy()
- Specified by:
destroy in interface DialogUI
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent arg0)
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
append
public void append(java.lang.String text)
- Specified by:
append in interface DialogUI
setGrammar
public void setGrammar(java.io.Reader r)
- Specified by:
setGrammar in interface DialogUI
createListeners
protected void createListeners()
registerKeyboardAction
protected void registerKeyboardAction(javax.swing.KeyStroke stroke,
java.awt.event.ActionListener listener)
resultEvent
public void resultEvent(XResultEvent e)
- Specified by:
resultEvent in interface XRecognizerListener
statusChange
public void statusChange(short statusCode,
java.lang.String statusMessage)
- Specified by:
statusChange in interface XRecognizerListener
stopSpeech
public void stopSpeech()
- Specified by:
stopSpeech in interface DialogUI
stopRecognizer
public void stopRecognizer()
- Specified by:
stopRecognizer in interface DialogUI
stopAll
public void stopAll()
- Description copied from interface:
DialogUI
- stops both the speech synth and recognizer
- Specified by:
stopAll in interface DialogUI
X-Smiles 1.2