Package com.sun.speech.engine.synthesis
Class SynthesizerMonitor
java.lang.Object
com.sun.speech.engine.EngineMonitor
com.sun.speech.engine.synthesis.SynthesizerMonitor
Simple GUI that monitors events and state changes of an
Synthesizer
. Used for debugging and testing purposes.-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.speech.engine.EngineMonitor
EngineMonitor.EngineMonitorEngineListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JLabel
Label containing "queue empty"protected JLabel
Label containing "queue not empty"protected JLabel
Label containing "queue size"Fields inherited from class com.sun.speech.engine.EngineMonitor
allocatedLabel, allocatingResourcesLabel, deallocatedLabel, deallocatingResourcesLabel, engine, engineListener, eventPanel, pausedLabel, resumedLabel, statePanel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
engineStateString
(long state) Returns aString
representing thestate
.protected EngineListener
Creates the engine listener if necessary, and then returns it.Gets the panel containing the labels for representing the current engine state.protected void
handleEvent
(EngineEvent e) Handles an event from the engine.protected void
Checks the current state of the engine and makes sure the GUI components reflect this state accurately.Methods inherited from class com.sun.speech.engine.EngineMonitor
appendBuffer, getEventPanel, updateEngineStateComponents
-
Field Details
-
queueEmptyLabel
Label containing "queue empty" -
queueNotEmptyLabel
Label containing "queue not empty" -
queueSizeLabel
Label containing "queue size"
-
-
Constructor Details
-
SynthesizerMonitor
public SynthesizerMonitor(Synthesizer synth) Class constructor.- Parameters:
synth
- theSynthesizer
to monitor
-
-
Method Details
-
getEngineListener
protected EngineListener getEngineListener()Description copied from class:EngineMonitor
Creates the engine listener if necessary, and then returns it. There should be only one.- Overrides:
getEngineListener
in classEngineMonitor
- Returns:
- the engine listener
-
getStatePanel
Gets the panel containing the labels for representing the current engine state. This augments the super class's panel by adding synthesizer queue state.- Overrides:
getStatePanel
in classEngineMonitor
- Returns:
- the panel containing the labels for representing the current engine state.
-
updateGUIComponents
protected void updateGUIComponents()Description copied from class:EngineMonitor
Checks the current state of the engine and makes sure the GUI components reflect this state accurately.- Overrides:
updateGUIComponents
in classEngineMonitor
-
engineStateString
Description copied from class:EngineMonitor
Returns aString
representing thestate
.- Overrides:
engineStateString
in classEngineMonitor
- Parameters:
state
- the state to turn into aString
- Returns:
- a
String
representing thestate
-
handleEvent
protected void handleEvent(EngineEvent e) Description copied from class:EngineMonitor
Handles an event from the engine.- Overrides:
handleEvent
in classEngineMonitor
- Parameters:
e
- the event from the engine
-