public abstract class BaseEngineProperties extends java.lang.Object implements SpeechEventDispatcher
EngineProperties
interface.Modifier and Type | Field and Description |
---|---|
protected java.util.Collection |
propertyChangeListeners
List of
PropertyChangeListeners registered for
PropertyChangeEvents on this object. |
Modifier | Constructor and Description |
---|---|
protected |
BaseEngineProperties()
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a
PropertyChangeListener to the listener list. |
void |
dispatchSpeechEvent(SpeechEvent event)
Dispatches a
PropertyChangeEvent . |
void |
firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
Sends a
PropertyChangeEvent
to all PropertyChangeListeners registered with
this object. |
java.awt.Component |
getControlComponent()
Obtains the AWT
Component that provides the
default user interface
for setting the properties of the Engine
associated with this object. |
protected void |
postPropertyChangeEvent(java.lang.String propName,
boolean oldValue,
boolean newValue)
Generates a
PropertyChangeEvent for a boolean value
and posts it to the event queue. |
protected void |
postPropertyChangeEvent(java.lang.String propName,
float oldValue,
float newValue)
Generates a
PropertyChangeEvent for a float value
and posts it to the event queue. |
protected void |
postPropertyChangeEvent(java.lang.String propName,
int oldValue,
int newValue)
Generates a
PropertyChangeEvent for a int value
and posts it to the event queue. |
protected void |
postPropertyChangeEvent(java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue)
Generates a
PropertyChangeEvent for an Object value
and posts it to the event queue. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a
PropertyChangeListener from the listener
list. |
abstract void |
reset()
Returns all properties to reasonable defaults
for the
Engine . |
protected java.util.Collection propertyChangeListeners
PropertyChangeListeners
registered for
PropertyChangeEvents
on this object.public java.awt.Component getControlComponent()
Component
that provides the
default user interface
for setting the properties of the Engine
associated with this object.Component
to manipulate this objectpublic abstract void reset()
Engine
. A
PropertyChangeEvent
is issued
for each property that changes as the reset takes effect.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
to the listener list.listener
- the PropertyChangeListener
to addpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
from the listener
list.listener
- the PropertyChangeListener
to removeprotected void postPropertyChangeEvent(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)
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.propName
- the name of the propertyoldValue
- the old valuenewValue
- the new valuefirePropertyChangeEvent(java.beans.PropertyChangeEvent)
,
dispatchSpeechEvent(SpeechEvent)
protected void postPropertyChangeEvent(java.lang.String propName, float oldValue, float newValue)
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.propName
- the name of the propertyoldValue
- the old valuenewValue
- the new valuefirePropertyChangeEvent(java.beans.PropertyChangeEvent)
,
dispatchSpeechEvent(SpeechEvent)
protected void postPropertyChangeEvent(java.lang.String propName, int oldValue, int newValue)
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.propName
- the name of the propertyoldValue
- the old valuenewValue
- the new valuefirePropertyChangeEvent(java.beans.PropertyChangeEvent)
,
dispatchSpeechEvent(SpeechEvent)
protected void postPropertyChangeEvent(java.lang.String propName, boolean oldValue, boolean newValue)
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.propName
- the name of the propertyoldValue
- the old valuenewValue
- the new valuefirePropertyChangeEvent(java.beans.PropertyChangeEvent)
,
dispatchSpeechEvent(SpeechEvent)
public void firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
PropertyChangeEvent
to all PropertyChangeListeners
registered with
this object. Called by dispatchSpeechEvent
.event
- the PropertyChangeEvent
to sendfirePropertyChangeEvent(java.beans.PropertyChangeEvent)
,
dispatchSpeechEvent(SpeechEvent)
public void dispatchSpeechEvent(SpeechEvent event)
PropertyChangeEvent
.
The dispatcher should notify all PropertyChangeListeners
from this method. The SpeechEvent
was added
via the various post methods of this class.dispatchSpeechEvent
in interface SpeechEventDispatcher
event
- the SpeechEvent
containing a
PropertyChangeEvent
postPropertyChangeEvent(java.lang.String, java.lang.Object, java.lang.Object)