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 Collection
List ofPropertyChangeListeners
registered forPropertyChangeEvents
on this object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds aPropertyChangeListener
to the listener list.void
dispatchSpeechEvent
(SpeechEvent event) Dispatches aPropertyChangeEvent
.void
Sends aPropertyChangeEvent
to allPropertyChangeListeners
registered with this object.Obtains the AWTComponent
that provides the default user interface for setting the properties of theEngine
associated with this object.protected void
postPropertyChangeEvent
(String propName, boolean oldValue, boolean newValue) Generates aPropertyChangeEvent
for aboolean
value and posts it to the event queue.protected void
postPropertyChangeEvent
(String propName, float oldValue, float newValue) Generates aPropertyChangeEvent
for afloat
value and posts it to the event queue.protected void
postPropertyChangeEvent
(String propName, int oldValue, int newValue) Generates aPropertyChangeEvent
for aint
value and posts it to the event queue.protected void
postPropertyChangeEvent
(String propName, Object oldValue, Object newValue) Generates aPropertyChangeEvent
for anObject
value and posts it to the event queue.void
Removes aPropertyChangeListener
from the listener list.abstract void
reset()
Returns all properties to reasonable defaults for theEngine
.
-
Field Details
-
propertyChangeListeners
List ofPropertyChangeListeners
registered forPropertyChangeEvents
on this object.
-
-
Constructor Details
-
BaseEngineProperties
protected BaseEngineProperties()Class constructor.
-
-
Method Details
-
getControlComponent
Obtains the AWTComponent
that provides the default user interface for setting the properties of theEngine
associated with this object.- Returns:
- an AWT
Component
to manipulate this object
-
reset
public abstract void reset()Returns all properties to reasonable defaults for theEngine
. APropertyChangeEvent
is issued for each property that changes as the reset takes effect. -
addPropertyChangeListener
Adds aPropertyChangeListener
to the listener list.- Parameters:
listener
- thePropertyChangeListener
to add
-
removePropertyChangeListener
Removes aPropertyChangeListener
from the listener list.- Parameters:
listener
- thePropertyChangeListener
to remove
-
postPropertyChangeEvent
Generates aPropertyChangeEvent
for anObject
value and posts it to the event queue. EventuallyfirePropertyChangeEvent
will be called bydispatchSpeechEvent
as a result of this action.- Parameters:
propName
- the name of the propertyoldValue
- the old valuenewValue
- the new value- See Also:
-
postPropertyChangeEvent
Generates aPropertyChangeEvent
for afloat
value and posts it to the event queue. EventuallyfirePropertyChangeEvent
will be called bydispatchSpeechEvent
as a result of this action.- Parameters:
propName
- the name of the propertyoldValue
- the old valuenewValue
- the new value- See Also:
-
postPropertyChangeEvent
Generates aPropertyChangeEvent
for aint
value and posts it to the event queue. EventuallyfirePropertyChangeEvent
will be called bydispatchSpeechEvent
as a result of this action.- Parameters:
propName
- the name of the propertyoldValue
- the old valuenewValue
- the new value- See Also:
-
postPropertyChangeEvent
Generates aPropertyChangeEvent
for aboolean
value and posts it to the event queue. EventuallyfirePropertyChangeEvent
will be called bydispatchSpeechEvent
as a result of this action.- Parameters:
propName
- the name of the propertyoldValue
- the old valuenewValue
- the new value- See Also:
-
firePropertyChangeEvent
Sends aPropertyChangeEvent
to allPropertyChangeListeners
registered with this object. Called bydispatchSpeechEvent
.- Parameters:
event
- thePropertyChangeEvent
to send- See Also:
-
dispatchSpeechEvent
public void dispatchSpeechEvent(SpeechEvent event) Dispatches aPropertyChangeEvent
. The dispatcher should notify allPropertyChangeListeners
from this method. TheSpeechEvent
was added via the various post methods of this class.- Specified by:
dispatchSpeechEvent
in interfaceSpeechEventDispatcher
- Parameters:
event
- theSpeechEvent
containing aPropertyChangeEvent
- See Also:
-