Package org.eclipse.birt.core.preference

# Class PreferenceChangeEvent

java.lang.Object
java.util.EventObject
org.eclipse.birt.core.preference.PreferenceChangeEvent

All Implemented Interfaces:
  `Serializable`

public class PreferenceChangeEvent extends EventObject

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`SPECIALTODEFAULT`

### Fields inherited from class java.util.EventObject

`source`

## Constructor Summary

Constructors
Constructor
Description
`PreferenceChangeEvent(IPreferences node, String key, Object oldValue, Object newValue)`
Constructs a new `PreferenceChangeEvent` instance.

## Method Summary

Modifier and Type
Method
Description
`String`
`getKey()`
Returns the key of the preference that was changed.
`Object`
`getNewValue()`
Returns the new value for the preference.
`Preferences`
`getNode()`
Returns the preference node that emitted the event.
`Object`
`getOldValue()`

### 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`

## Field Details

### SPECIALTODEFAULT

public static final String SPECIALTODEFAULT

See Also:
  - Constant Field Values

## Constructor Details

### PreferenceChangeEvent

public PreferenceChangeEvent(IPreferences node, String key, Object oldValue, Object 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.

## Method Details

### getNode

public Preferences getNode()
Returns the preference node that emitted the event.

Returns:
  The preference node that emitted the event.

### getKey

public String getKey()
Returns the key of the preference that was changed.

Returns:
  The key of the preference that was changed.

### getNewValue

public Object getNewValue()
Returns the new value for the preference.

Returns:
  The new value for the preference, or `null` if the preference was removed.

### getOldValue

public Object getOldValue()