public class PropertyStateEvent
extends java.util.EventObject
Property's state for
a particular source object.Property,
PropertyStateListener,
Serialized Form| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.Object |
UNREADABLE |
Used to indicate that a particular value is unreadable.
|
| Constructor | Description |
|---|---|
PropertyStateEvent(Property sourceProperty,
java.lang.Object sourceObject,
boolean valueChanged,
java.lang.Object oldValue,
java.lang.Object newValue,
boolean writeableChanged,
boolean isWriteable) |
Creates an instance of
PropertyStateEvent characterizing a
change in a Property's state for a particular source object. |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object |
getNewValue() |
Returns the new value of the
Property for the source object,
or UNREADABLE if the Property is not currently readable for the
source object. |
java.lang.Object |
getOldValue() |
Returns the old value of the
Property for the source object,
or UNREADABLE if the Property was not previously readable for the
source object. |
boolean |
getReadableChanged() |
Returns whether or not the
Property's readability has changed for
the source object. |
java.lang.Object |
getSource() |
Returns the
Property whose state has changed. |
java.lang.Object |
getSourceObject() |
Returns the source object for which the
Property's state has changed. |
Property |
getSourceProperty() |
Returns the
Property whose state has changed. |
boolean |
getValueChanged() |
Returns whether or not the
Property's value has changed for the source object. |
boolean |
getWriteableChanged() |
Returns whether or not the
Property's writeability has changed for
the source object. |
boolean |
isReadable() |
Returns whether or not the
Property is currently readable for
the source object. |
boolean |
isWriteable() |
Returns whether or not the
Property is currently writeable for
the source object. |
java.lang.String |
toString() |
Returns a string representation of the
PropertyStateEvent. |
public static final java.lang.Object UNREADABLE
public PropertyStateEvent(Property sourceProperty, java.lang.Object sourceObject, boolean valueChanged, java.lang.Object oldValue, java.lang.Object newValue, boolean writeableChanged, boolean isWriteable)
PropertyStateEvent characterizing a
change in a Property's state for a particular source object.
Note: To indicate a change in readability, specify valueChanged
as true and reflect the readability status in the oldValue
and newValue arguments.
sourceProperty - the Property whose state has changedsourceObject - the source object for which the Property's state has changedvalueChanged - whether or not the Property's value has changed for the source objectoldValue - the old value of the Property for the source object,
or UNREADABLE if the Property was not previously readable for the source objectnewValue - the new value of the Property for the source object,
or UNREADABLE if the Property is not currently readable for the source objectwriteableChanged - whether or not the Property's writeability has changed for the source objectisWriteable - whether or not the Property is now writeable for the source objectjava.lang.IllegalArgumentException - if neither the value or the writeability has changedjava.lang.IllegalArgumentException - if valueChanged is true and both
oldValue and newValue are UNREADABLEpublic final java.lang.Object getSource()
Property whose state has changed.
The preferred way to access this value is via the
getSourceProperty() method.getSource in class java.util.EventObjectProperty whose state has changed.public final Property getSourceProperty()
Property whose state has changed.Property whose state has changed.public final java.lang.Object getSourceObject()
Property's state has changed.Property's state has changedpublic final boolean getValueChanged()
Property's value has changed for the source object.Property's value has changed for the source object.public final java.lang.Object getOldValue()
Property for the source object,
or UNREADABLE if the Property was not previously readable for the
source object.
Note: This method must only be called if getValueChanged returns
true.
Property for the source object
or UNREADABLEjava.lang.UnsupportedOperationException - if the value hasn't changedpublic final java.lang.Object getNewValue()
Property for the source object,
or UNREADABLE if the Property is not currently readable for the
source object.
Note: This method must only be called if getValueChanged returns
true.
Property for the source object
or UNREADABLEjava.lang.UnsupportedOperationException - if the value hasn't changedpublic final boolean getReadableChanged()
Property's readability has changed for
the source object. In particuler, this returns true if the value
has changed and either the old value or new value is UNREADABLE,
and false otherwise.Property's readability has changed for
the source object.public final boolean isReadable()
Property is currently readable for
the source object. In particular, this returns true if and only
if the new value is not UNREADABLE.
Note: This method must only be called if getReadableChanged returns
true.
Property is currently readable for
the source object.java.lang.UnsupportedOperationException - if the readability hasn't changedpublic final boolean getWriteableChanged()
Property's writeability has changed for
the source object.Property's writeability has changed for
the source object.public final boolean isWriteable()
Property is currently writeable for
the source object.
Note: This method must only be called if getWriteableChanged returns
true.
Property is currently writeable for
the source object.java.lang.UnsupportedOperationException - if the writeability hasn't changedpublic java.lang.String toString()
PropertyStateEvent. This
method is intended to be used for debugging purposes only, and
the content and format of the returned string may vary between
implementations. The returned string may be empty but may not
be null.toString in class java.util.EventObjectPropertyStateEvent