org.ocd.prefs.util
Class PreferenceChangeEvent
java.lang.Object
|
+--java.util.EventObject
|
+--org.ocd.prefs.util.PreferenceChangeEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class PreferenceChangeEvent
- extends java.util.EventObject
An event emitted by a Preferences node to indicate that
a preference has been added, removed or has had its value changed.
- Since:
- 1.4
- Version:
- 1.1, 12/03/00
- Author:
- Josh Bloch
- See Also:
Preferences
,
PreferenceChangeListener
,
NodeChangeEvent
, Serialized Form
Fields inherited from class java.util.EventObject |
source |
Method Summary |
java.lang.String |
getKey()
Returns the key of the preference that was changed. |
java.lang.String |
getNewValue()
Returns the new value for the preference. |
Preferences |
getNode()
Returns the preference node that emitted the event. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PreferenceChangeEvent
public PreferenceChangeEvent(Preferences node,
java.lang.String key,
java.lang.String newValue)
- Constructs a new
PreferenceChangeEvent
instance.
- Parameters:
node
- The Preferences node that emitted the event.key
- The key of the preference that was changed.newValue
- The new value of the preference, or null
if the preference is being removed.
getNode
public Preferences getNode()
- Returns the preference node that emitted the event.
- Returns:
- The preference node that emitted the event.
getKey
public java.lang.String getKey()
- Returns the key of the preference that was changed.
- Returns:
- The key of the preference that was changed.
getNewValue
public java.lang.String getNewValue()
- Returns the new value for the preference.
- Returns:
- The new value for the preference, or null if the
preference was removed.