PreferenceChangeEvent


PreferenceChangeEvent java.util.prefs

Java 1.4 serializable event

A PreferenceChangeEvent object is passed to the preferenceChange( ) method of any PreferenceChangeListener objects registered on a Preferences object whenever a preferences value is added to, removed from, or modified in that Preferences node. getNode( ) returns the affected Preferences object. getKey( ) returns name of the modified preference. If the preference value was added or modified, getNewValue( ) returns that value. If a preference was deleted, getNewValue( ) returns null .

Although this class inherits the Serializable interface, it is not actually serializable.

Figure 16-129. java.util.prefs.PreferenceChangeEvent

 public class  PreferenceChangeEvent  extends java.util.EventObject {  // Public Constructors  public  PreferenceChangeEvent  (Preferences  node  , String  key  , String  newValue  );  // Public Instance Methods  public String  getKey  ( );        public String  getNewValue  ( );        public Preferences  getNode  ( );   } 

Passed To

PreferenceChangeListener.preferenceChange( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net