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.0EngineProperties
interface.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Collection
propertyChangeListeners
List ofPropertyChangeListeners
registered forPropertyChangeEvents
on this object.
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseEngineProperties()
Class constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds aPropertyChangeListener
to the listener list.void
dispatchSpeechEvent(SpeechEvent event)
Dispatches aPropertyChangeEvent
.void
firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
Sends aPropertyChangeEvent
to allPropertyChangeListeners
registered with this object.java.awt.Component
getControlComponent()
Obtains the AWTComponent
that provides the default user interface for setting the properties of theEngine
associated with this object.protected void
postPropertyChangeEvent(java.lang.String propName, boolean oldValue, boolean newValue)
Generates aPropertyChangeEvent
for aboolean
value and posts it to the event queue.protected void
postPropertyChangeEvent(java.lang.String propName, float oldValue, float newValue)
Generates aPropertyChangeEvent
for afloat
value and posts it to the event queue.protected void
postPropertyChangeEvent(java.lang.String propName, int oldValue, int newValue)
Generates aPropertyChangeEvent
for aint
value and posts it to the event queue.protected void
postPropertyChangeEvent(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)
Generates aPropertyChangeEvent
for anObject
value and posts it to the event queue.void
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes aPropertyChangeListener
from the listener list.abstract void
reset()
Returns all properties to reasonable defaults for theEngine
.
-
-
-
Method Detail
-
getControlComponent
public java.awt.Component 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
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds aPropertyChangeListener
to the listener list.- Parameters:
listener
- thePropertyChangeListener
to add
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes aPropertyChangeListener
from the listener list.- Parameters:
listener
- thePropertyChangeListener
to remove
-
postPropertyChangeEvent
protected void postPropertyChangeEvent(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)
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:
firePropertyChangeEvent(java.beans.PropertyChangeEvent)
,dispatchSpeechEvent(SpeechEvent)
-
postPropertyChangeEvent
protected void postPropertyChangeEvent(java.lang.String propName, float oldValue, float newValue)
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:
firePropertyChangeEvent(java.beans.PropertyChangeEvent)
,dispatchSpeechEvent(SpeechEvent)
-
postPropertyChangeEvent
protected void postPropertyChangeEvent(java.lang.String propName, int oldValue, int newValue)
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:
firePropertyChangeEvent(java.beans.PropertyChangeEvent)
,dispatchSpeechEvent(SpeechEvent)
-
postPropertyChangeEvent
protected void postPropertyChangeEvent(java.lang.String propName, boolean oldValue, boolean newValue)
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(java.beans.PropertyChangeEvent)
,dispatchSpeechEvent(SpeechEvent)
-
firePropertyChangeEvent
public void firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
Sends aPropertyChangeEvent
to allPropertyChangeListeners
registered with this object. Called bydispatchSpeechEvent
.- Parameters:
event
- thePropertyChangeEvent
to send- See Also:
firePropertyChangeEvent(java.beans.PropertyChangeEvent)
,dispatchSpeechEvent(SpeechEvent)
-
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:
postPropertyChangeEvent(java.lang.String, java.lang.Object, java.lang.Object)
-
-