Package com.sun.speech.engine.synthesis
Class SynthesizerMonitor
- java.lang.Object
-
- com.sun.speech.engine.EngineMonitor
-
- com.sun.speech.engine.synthesis.SynthesizerMonitor
-
public class SynthesizerMonitor extends EngineMonitor
Simple GUI that monitors events and state changes of anSynthesizer. Used for debugging and testing purposes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sun.speech.engine.EngineMonitor
EngineMonitor.EngineMonitorEngineListener
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JLabelqueueEmptyLabelLabel containing "queue empty"protected javax.swing.JLabelqueueNotEmptyLabelLabel containing "queue not empty"protected javax.swing.JLabelqueueSizeLabelLabel 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 Constructor Description SynthesizerMonitor(Synthesizer synth)Class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringengineStateString(long state)Returns aStringrepresenting thestate.protected EngineListenergetEngineListener()Creates the engine listener if necessary, and then returns it.java.awt.ComponentgetStatePanel()Gets the panel containing the labels for representing the current engine state.protected voidhandleEvent(EngineEvent e)Handles an event from the engine.protected voidupdateGUIComponents()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
-
-
-
-
Method Detail
-
getEngineListener
protected EngineListener getEngineListener()
Description copied from class:EngineMonitorCreates the engine listener if necessary, and then returns it. There should be only one.- Overrides:
getEngineListenerin classEngineMonitor- Returns:
- the engine listener
-
getStatePanel
public java.awt.Component 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:
getStatePanelin classEngineMonitor- Returns:
- the panel containing the labels for representing the current engine state.
-
updateGUIComponents
protected void updateGUIComponents()
Description copied from class:EngineMonitorChecks the current state of the engine and makes sure the GUI components reflect this state accurately.- Overrides:
updateGUIComponentsin classEngineMonitor
-
engineStateString
protected java.lang.String engineStateString(long state)
Description copied from class:EngineMonitorReturns aStringrepresenting thestate.- Overrides:
engineStateStringin classEngineMonitor- Parameters:
state- the state to turn into aString- Returns:
- a
Stringrepresenting thestate
-
handleEvent
protected void handleEvent(EngineEvent e)
Description copied from class:EngineMonitorHandles an event from the engine.- Overrides:
handleEventin classEngineMonitor- Parameters:
e- the event from the engine
-
-