public class PreferenceChangeEvent extends EventObject implements Serializable
Please note that although the class is marked as Serializable by
inheritance from EventObject, this type is not intended to be serialized
so the serialization methods do nothing but throw a NotSerializableException.
Preferences,
PreferenceChangeListener,
Serialized Formsource| Constructor and Description |
|---|
PreferenceChangeEvent(Preferences p,
String k,
String v)
Construct a new
PreferenceChangeEvent instance. |
| Modifier and Type | Method and Description |
|---|---|
String |
getKey()
Gets the key of the changed preference.
|
String |
getNewValue()
Gets the new value of the changed preference or
null if the
preference has been removed. |
Preferences |
getNode()
Gets the
Preferences instance that fired this event. |
getSource, toStringpublic PreferenceChangeEvent(Preferences p, String k, String v)
PreferenceChangeEvent instance.p - the Preferences instance that fired this event; this object is
considered as the event's source.k - the changed preference key.v - the new value of the changed preference, this value can be
null, which means the preference has been removed.public String getKey()
public String getNewValue()
null if the
preference has been removed.null if the
preference has been removed.public Preferences getNode()
Preferences instance that fired this event.Preferences instance that fired this event.