Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 867
نمايش فراداده

NodeChangeEventjava.util.prefs

Java 1.4serializable event

A NodeChangeEvent object is passed to the methods of any NodeChangeListener objects registered on a Preferences object when a child Preferences node is added or removed. getChild( ) returns the Preferences object that was added or removed. getParent( ) returns the parent Preferences node from which the child was added or removed. This parent Preferences object is the one on which the NodeChangeListener was registered.

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

Figure 16-127. java.util.prefs.NodeChangeEvent

public class

NodeChangeEvent extends java.util.EventObject { // Public Constructors public

NodeChangeEvent (Preferences

parent , Preferences

child ); // Public Instance Methods public Preferences

getChild ( ); public Preferences

getParent ( ); }

Passed To

NodeChangeListener.{childAdded( ), childRemoved( )}