Class IEclipsePreferences.PreferenceChangeEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent
-
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- IEclipsePreferences
public static final class IEclipsePreferences.PreferenceChangeEvent extends EventObject
An event object describing the details of a change to a preference in the preference store.- Since:
- 3.0
- See Also:
IEclipsePreferences.IPreferenceChangeListener
, Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description PreferenceChangeEvent(Object node, String key, Object oldValue, Object newValue)
Constructor for a new preference change event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getKey()
Return the key of the preference which was changed.Object
getNewValue()
Return the new value for the preference encoded as aString
, ornull
if the preference was removed.Preferences
getNode()
Return the preference node on which the change occurred.Object
getOldValue()
Return the old value for the preference encoded as aString
, ornull
if the preference was removed or if it cannot be determined.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
PreferenceChangeEvent
public PreferenceChangeEvent(Object node, String key, Object oldValue, Object newValue)
Constructor for a new preference change event. The node and the key must not benull
. The old and new preference values must be either aString
ornull
.- Parameters:
node
- the node on which the change occurredkey
- the preference keyoldValue
- the old preference value, as aString
ornull
newValue
- the new preference value, as aString
ornull
-
-
Method Detail
-
getNode
public Preferences getNode()
Return the preference node on which the change occurred. Must not benull
.- Returns:
- the node
-
getKey
public String getKey()
Return the key of the preference which was changed. Must not benull
.- Returns:
- the preference key
-
getNewValue
public Object getNewValue()
Return the new value for the preference encoded as aString
, ornull
if the preference was removed.- Returns:
- the new value or
null
-
getOldValue
public Object getOldValue()
Return the old value for the preference encoded as aString
, ornull
if the preference was removed or if it cannot be determined.- Returns:
- the old value or
null
-
-