Package com.sun.speech.engine
Class BaseEngineProperties
- java.lang.Object
-
- com.sun.speech.engine.BaseEngineProperties
-
- All Implemented Interfaces:
SpeechEventDispatcher
- Direct Known Subclasses:
BaseSynthesizerProperties
public abstract class BaseEngineProperties extends java.lang.Object implements SpeechEventDispatcher
Supports the JSAPI 1.0EnginePropertiesinterface.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.CollectionpropertyChangeListenersList ofPropertyChangeListenersregistered forPropertyChangeEventson this object.
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseEngineProperties()Class constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)Adds aPropertyChangeListenerto the listener list.voiddispatchSpeechEvent(SpeechEvent event)Dispatches aPropertyChangeEvent.voidfirePropertyChangeEvent(java.beans.PropertyChangeEvent event)Sends aPropertyChangeEventto allPropertyChangeListenersregistered with this object.java.awt.ComponentgetControlComponent()Obtains the AWTComponentthat provides the default user interface for setting the properties of theEngineassociated with this object.protected voidpostPropertyChangeEvent(java.lang.String propName, boolean oldValue, boolean newValue)Generates aPropertyChangeEventfor abooleanvalue and posts it to the event queue.protected voidpostPropertyChangeEvent(java.lang.String propName, float oldValue, float newValue)Generates aPropertyChangeEventfor afloatvalue and posts it to the event queue.protected voidpostPropertyChangeEvent(java.lang.String propName, int oldValue, int newValue)Generates aPropertyChangeEventfor aintvalue and posts it to the event queue.protected voidpostPropertyChangeEvent(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)Generates aPropertyChangeEventfor anObjectvalue and posts it to the event queue.voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)Removes aPropertyChangeListenerfrom the listener list.abstract voidreset()Returns all properties to reasonable defaults for theEngine.
-
-
-
Method Detail
-
getControlComponent
public java.awt.Component getControlComponent()
Obtains the AWTComponentthat provides the default user interface for setting the properties of theEngineassociated with this object.- Returns:
- an AWT
Componentto manipulate this object
-
reset
public abstract void reset()
Returns all properties to reasonable defaults for theEngine. APropertyChangeEventis issued for each property that changes as the reset takes effect.
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds aPropertyChangeListenerto the listener list.- Parameters:
listener- thePropertyChangeListenerto add
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes aPropertyChangeListenerfrom the listener list.- Parameters:
listener- thePropertyChangeListenerto remove
-
postPropertyChangeEvent
protected void postPropertyChangeEvent(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)Generates aPropertyChangeEventfor anObjectvalue and posts it to the event queue. EventuallyfirePropertyChangeEventwill be called bydispatchSpeechEventas a result of this action.- Parameters:
propName- the name of the propertyoldValue- the old valuenewValue- the new value- See Also:
firePropertyChangeEvent(java.beans.PropertyChangeEvent),dispatchSpeechEvent(SpeechEvent)
-
postPropertyChangeEvent
protected void postPropertyChangeEvent(java.lang.String propName, float oldValue, float newValue)Generates aPropertyChangeEventfor afloatvalue and posts it to the event queue. EventuallyfirePropertyChangeEventwill be called bydispatchSpeechEventas a result of this action.- Parameters:
propName- the name of the propertyoldValue- the old valuenewValue- the new value- See Also:
firePropertyChangeEvent(java.beans.PropertyChangeEvent),dispatchSpeechEvent(SpeechEvent)
-
postPropertyChangeEvent
protected void postPropertyChangeEvent(java.lang.String propName, int oldValue, int newValue)Generates aPropertyChangeEventfor aintvalue and posts it to the event queue. EventuallyfirePropertyChangeEventwill be called bydispatchSpeechEventas a result of this action.- Parameters:
propName- the name of the propertyoldValue- the old valuenewValue- the new value- See Also:
firePropertyChangeEvent(java.beans.PropertyChangeEvent),dispatchSpeechEvent(SpeechEvent)
-
postPropertyChangeEvent
protected void postPropertyChangeEvent(java.lang.String propName, boolean oldValue, boolean newValue)Generates aPropertyChangeEventfor abooleanvalue and posts it to the event queue. EventuallyfirePropertyChangeEventwill be called bydispatchSpeechEventas a result of this action.- Parameters:
propName- the name of the propertyoldValue- the old valuenewValue- the new value- See Also:
firePropertyChangeEvent(java.beans.PropertyChangeEvent),dispatchSpeechEvent(SpeechEvent)
-
firePropertyChangeEvent
public void firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
Sends aPropertyChangeEventto allPropertyChangeListenersregistered with this object. Called bydispatchSpeechEvent.- Parameters:
event- thePropertyChangeEventto send- See Also:
firePropertyChangeEvent(java.beans.PropertyChangeEvent),dispatchSpeechEvent(SpeechEvent)
-
dispatchSpeechEvent
public void dispatchSpeechEvent(SpeechEvent event)
Dispatches aPropertyChangeEvent. The dispatcher should notify allPropertyChangeListenersfrom this method. TheSpeechEventwas added via the various post methods of this class.- Specified by:
dispatchSpeechEventin interfaceSpeechEventDispatcher- Parameters:
event- theSpeechEventcontaining aPropertyChangeEvent- See Also:
postPropertyChangeEvent(java.lang.String, java.lang.Object, java.lang.Object)
-
-