public class PreferenceChangeEvent extends EventObject
getNewValue will return null.
Preference change events are only generated for entries in one particular
preference node. Notification of subnode addition/removal is given by a
NodeChangeEvent.
Note that although this class is marked as serializable, attempts to serialize it will fail with NotSerializableException.
source| Constructor and Description |
|---|
PreferenceChangeEvent(Preferences node,
String key,
String value)
Creates a new PreferenceChangeEvent.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getKey()
Returns the key of the entry that was added, changed or removed.
|
String |
getNewValue()
Returns the new value of the entry that was added or changed, or
returns null when the entry was removed.
|
Preferences |
getNode()
Returns the source Preference node from which an entry was added,
changed or removed.
|
getSource, toStringpublic PreferenceChangeEvent(Preferences node, String key, String value)
node - The source preference node for which an entry was added,
changed or removedkey - The key of the entry that was added, changed or removedvalue - The new value of the entry that was added or changed, or
null when the entry was removedpublic Preferences getNode()
public String getNewValue()