Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.core.runtime
Class Preferences.PropertyChangeEvent  view Preferences.PropertyChangeEvent download Preferences.PropertyChangeEvent.java

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.eclipse.core.runtime.Preferences.PropertyChangeEvent
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Preferences

public static class Preferences.PropertyChangeEvent
extends java.util.EventObject

An event object describing a change to a named property.

The preferences object reports property change events for internal state changes that may be of interest to external parties. A special listener interface (Preferences.IPropertyChangeListener) is defined for this purpose. Listeners are registered via the Preferences.addPropertyChangeListener method.

Clients cannot instantiate or subclass this class.


Field Summary
private  java.lang.Object newValue
          The new value of the changed property, or null if not known or not relevant.
private  java.lang.Object oldValue
          The old value of the changed property, or null if not known or not relevant.
private  java.lang.String propertyName
          The name of the changed property.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
protected Preferences.PropertyChangeEvent(java.lang.Object source, java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
          Creates a new property change event.
 
Method Summary
 java.lang.Object getNewValue()
          Returns the new value of the property.
 java.lang.Object getOldValue()
          Returns the old value of the property.
 java.lang.String getProperty()
          Returns the name of the property that changed.
 
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 Detail

propertyName

private java.lang.String propertyName
The name of the changed property.


oldValue

private java.lang.Object oldValue
The old value of the changed property, or null if not known or not relevant.


newValue

private java.lang.Object newValue
The new value of the changed property, or null if not known or not relevant.

Constructor Detail

Preferences.PropertyChangeEvent

protected Preferences.PropertyChangeEvent(java.lang.Object source,
                                          java.lang.String property,
                                          java.lang.Object oldValue,
                                          java.lang.Object newValue)
Creates a new property change event.

Method Detail

getProperty

public java.lang.String getProperty()
Returns the name of the property that changed.

Warning: there is no guarantee that the property name returned is a constant string. Callers must compare property names using equals, not ==.


getNewValue

public java.lang.Object getNewValue()
Returns the new value of the property.


getOldValue

public java.lang.Object getOldValue()
Returns the old value of the property.