java.util.prefs.PreferenceChangeEvent
This is the event class to indicate some preferences has been added,
deleted or updated.
Please note that this class cannot be serialized actually, so relevant
serialization methods only throw NotSerializableException
.
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
Construct a new
PreferenceChangeEvent
instance.
Parameters
p
| the Preferences instance that this event happened,
this object is considered as event's source. |
k
| the changed preference's key |
v
| the new value of the changed preference, this value can be null,
which means the preference is removed.
|
Public Methods
public
String
getKey()
Get the changed preference's key.
Returns
- the changed preference's key
public
String
getNewValue()
Get the new value of the changed preference, or null if this preference
is removed.
Returns
- the new value of the changed preference, or null if this preference
is removed.
Get the
Preferences
instance that this event happened.
Returns
- the
Preferences
instance that this event happened.