java.util.prefs

Class NodeChangeEvent

public class NodeChangeEvent extends EventObject

ObjectEvent fired when a Preference node is added/removed. This event is only generated when a new subnode is added or a subnode is removed from a preference node. Changes in the entries of a preference node are indicated with a PreferenceChangeEvent.

Note that although this class is marked as serializable, attempts to serialize it will fail with NotSerializableException.

Since: 1.4

Constructor Summary
NodeChangeEvent(Preferences parentNode, Preferences childNode)
Creates a new NodeChangeEvent.
Method Summary
PreferencesgetChild()
Returns the child preference subnode that was added or removed.
PreferencesgetParent()
Returns the source parent preference node from which a subnode was added or removed.

Constructor Detail

NodeChangeEvent

public NodeChangeEvent(Preferences parentNode, Preferences childNode)
Creates a new NodeChangeEvent.

Parameters: parentNode The source preference node from which a subnode was added or removed childNode The preference node that was added or removed

Method Detail

getChild

public Preferences getChild()
Returns the child preference subnode that was added or removed. To see wether it is still a valid preference node one has to call event.getChild().nodeExists("").

getParent

public Preferences getParent()
Returns the source parent preference node from which a subnode was added or removed.