Class BaseEngineProperties

java.lang.Object
com.sun.speech.engine.BaseEngineProperties
All Implemented Interfaces:
SpeechEventDispatcher
Direct Known Subclasses:
BaseSynthesizerProperties

public abstract class BaseEngineProperties extends Object implements SpeechEventDispatcher
Supports the JSAPI 1.0 EngineProperties interface.
  • Field Details

    • propertyChangeListeners

      protected Collection propertyChangeListeners
      List of PropertyChangeListeners registered for PropertyChangeEvents on this object.
  • Constructor Details

    • BaseEngineProperties

      protected BaseEngineProperties()
      Class constructor.
  • Method Details

    • getControlComponent

      public Component getControlComponent()
      Obtains the AWT Component that provides the default user interface for setting the properties of the Engine associated with this object.
      Returns:
      an AWT Component to manipulate this object
    • reset

      public abstract void reset()
      Returns all properties to reasonable defaults for the Engine. A PropertyChangeEvent is issued for each property that changes as the reset takes effect.
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Adds a PropertyChangeListener to the listener list.
      Parameters:
      listener - the PropertyChangeListener to add
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Removes a PropertyChangeListener from the listener list.
      Parameters:
      listener - the PropertyChangeListener to remove
    • postPropertyChangeEvent

      protected void postPropertyChangeEvent(String propName, Object oldValue, Object newValue)
      Generates a PropertyChangeEvent for an Object value and posts it to the event queue. Eventually firePropertyChangeEvent will be called by dispatchSpeechEvent as a result of this action.
      Parameters:
      propName - the name of the property
      oldValue - the old value
      newValue - the new value
      See Also:
    • postPropertyChangeEvent

      protected void postPropertyChangeEvent(String propName, float oldValue, float newValue)
      Generates a PropertyChangeEvent for a float value and posts it to the event queue. Eventually firePropertyChangeEvent will be called by dispatchSpeechEvent as a result of this action.
      Parameters:
      propName - the name of the property
      oldValue - the old value
      newValue - the new value
      See Also:
    • postPropertyChangeEvent

      protected void postPropertyChangeEvent(String propName, int oldValue, int newValue)
      Generates a PropertyChangeEvent for a int value and posts it to the event queue. Eventually firePropertyChangeEvent will be called by dispatchSpeechEvent as a result of this action.
      Parameters:
      propName - the name of the property
      oldValue - the old value
      newValue - the new value
      See Also:
    • postPropertyChangeEvent

      protected void postPropertyChangeEvent(String propName, boolean oldValue, boolean newValue)
      Generates a PropertyChangeEvent for a boolean value and posts it to the event queue. Eventually firePropertyChangeEvent will be called by dispatchSpeechEvent as a result of this action.
      Parameters:
      propName - the name of the property
      oldValue - the old value
      newValue - the new value
      See Also:
    • firePropertyChangeEvent

      public void firePropertyChangeEvent(PropertyChangeEvent event)
      Sends a PropertyChangeEvent to all PropertyChangeListeners registered with this object. Called by dispatchSpeechEvent.
      Parameters:
      event - the PropertyChangeEvent to send
      See Also:
    • dispatchSpeechEvent

      public void dispatchSpeechEvent(SpeechEvent event)
      Dispatches a PropertyChangeEvent. The dispatcher should notify all PropertyChangeListeners from this method. The SpeechEvent was added via the various post methods of this class.
      Specified by:
      dispatchSpeechEvent in interface SpeechEventDispatcher
      Parameters:
      event - the SpeechEvent containing a PropertyChangeEvent
      See Also: