JSAPI 2.0

javax.speech
Class EnginePropertyEvent

Object
  extended by EnginePropertyEvent

public class EnginePropertyEvent
extends Object

Event issued when a value change request takes effect for an EngineProperties property.

Speech Engines have may knobs that may be adjusted through EngineProperties. Changes to properties take place as follows:

EnginePropertyEvents are issued to EnginePropertyListeners, which are added with the addEnginePropertyListener method.

Old and new values are represented by Objects. If the value is a primitive type, the corresponding Object type is used (e.g., Integer for int).

See Also:
Engine, EngineProperties, EnginePropertyListener

Constructor Summary
EnginePropertyEvent(EngineProperties source, String propertyName, Object oldValue, Object newValue)
          Constructs a new EnginePropertyEvent.
 
Method Summary
 Object getNewValue()
          Gets the new value for the property, expressed as an Object.
 Object getOldValue()
          Gets the old value for the property, expressed as an Object.
 String getPropertyName()
          Gets the name of the property that was changed.
 Object getSource()
          Returns the Object on which the event initially occurred.
 String toString()
          Returns a printable String.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnginePropertyEvent

public EnginePropertyEvent(EngineProperties source,
                           String propertyName,
                           Object oldValue,
                           Object newValue)
Constructs a new EnginePropertyEvent.

Parameters:
source - the EngineProperties Object for the property
propertyName - the name of the property that was changed
oldValue - the old value of the property.
newValue - the new value of the property.
Throws:
IllegalArgumentException - if source is null
Method Detail

getPropertyName

public String getPropertyName()
Gets the name of the property that was changed.

Returns:
the name of the property that was changed.

getOldValue

public Object getOldValue()
Gets the old value for the property, expressed as an Object.

Returns:
The old value for the property, expressed as an Object.

getNewValue

public Object getNewValue()
Gets the new value for the property, expressed as an Object. The new value may reflect a limit or rejection of the requested value.

Returns:
the new value for the property, expressed as an Object.

getSource

public Object getSource()
Returns the Object on which the event initially occurred.

Returns:
the Object on which the event initially occurred.

toString

public String toString()
Returns a printable String. Useful for event-logging and debugging.

Overrides:
toString in class Object
Returns:
A printable string.

JSAPI 2.0

JavaTM Speech API 2.0, Final Release v2.0.6.
© 2008, Conversay and Sun Microsystems.

Free Web Hosting