Package com.sun.speech.engine
Class BaseEngineProperties
java.lang.Object
com.sun.speech.engine.BaseEngineProperties
- All Implemented Interfaces:
SpeechEventDispatcher
- Direct Known Subclasses:
BaseSynthesizerProperties
Supports the JSAPI 1.0
EngineProperties
interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CollectionList ofPropertyChangeListenersregistered forPropertyChangeEventson this object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds aPropertyChangeListenerto the listener list.voiddispatchSpeechEvent(SpeechEvent event) Dispatches aPropertyChangeEvent.voidSends aPropertyChangeEventto allPropertyChangeListenersregistered with this object.Obtains the AWTComponentthat provides the default user interface for setting the properties of theEngineassociated with this object.protected voidpostPropertyChangeEvent(String propName, boolean oldValue, boolean newValue) Generates aPropertyChangeEventfor abooleanvalue and posts it to the event queue.protected voidpostPropertyChangeEvent(String propName, float oldValue, float newValue) Generates aPropertyChangeEventfor afloatvalue and posts it to the event queue.protected voidpostPropertyChangeEvent(String propName, int oldValue, int newValue) Generates aPropertyChangeEventfor aintvalue and posts it to the event queue.protected voidpostPropertyChangeEvent(String propName, Object oldValue, Object newValue) Generates aPropertyChangeEventfor anObjectvalue and posts it to the event queue.voidRemoves aPropertyChangeListenerfrom the listener list.abstract voidreset()Returns all properties to reasonable defaults for theEngine.
-
Field Details
-
propertyChangeListeners
List ofPropertyChangeListenersregistered forPropertyChangeEventson this object.
-
-
Constructor Details
-
BaseEngineProperties
protected BaseEngineProperties()Class constructor.
-
-
Method Details
-
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
Adds aPropertyChangeListenerto the listener list.- Parameters:
listener- thePropertyChangeListenerto add
-
removePropertyChangeListener
Removes aPropertyChangeListenerfrom the listener list.- Parameters:
listener- thePropertyChangeListenerto remove
-
postPropertyChangeEvent
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:
-
postPropertyChangeEvent
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:
-
postPropertyChangeEvent
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:
-
postPropertyChangeEvent
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
Sends aPropertyChangeEventto allPropertyChangeListenersregistered with this object. Called bydispatchSpeechEvent.- Parameters:
event- thePropertyChangeEventto send- See Also:
-
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:
-