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 an Synthesizer. Used for debugging and testing purposes.
  • Field Details

    • queueEmptyLabel

      protected JLabel queueEmptyLabel
      Label containing "queue empty"
    • queueNotEmptyLabel

      protected JLabel queueNotEmptyLabel
      Label containing "queue not empty"
    • queueSizeLabel

      protected JLabel queueSizeLabel
      Label containing "queue size"
  • Constructor Details

    • SynthesizerMonitor

      public SynthesizerMonitor(Synthesizer synth)
      Class constructor.
      Parameters:
      synth - the Synthesizer 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 class EngineMonitor
      Returns:
      the engine listener
    • getStatePanel

      public 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:
      getStatePanel in class EngineMonitor
      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 class EngineMonitor
    • engineStateString

      protected String engineStateString(long state)
      Description copied from class: EngineMonitor
      Returns a String representing the state.
      Overrides:
      engineStateString in class EngineMonitor
      Parameters:
      state - the state to turn into a String
      Returns:
      a String representing the state
    • handleEvent

      protected void handleEvent(EngineEvent e)
      Description copied from class: EngineMonitor
      Handles an event from the engine.
      Overrides:
      handleEvent in class EngineMonitor
      Parameters:
      e - the event from the engine