java.util.prefs
Class NodeChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.util.prefs.NodeChangeEvent
All Implemented Interfaces:
Serializable

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
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
NodeChangeEvent(Preferences parentNode, Preferences childNode)
          Creates a new NodeChangeEvent.
 
Method Summary
 Preferences getChild()
          Returns the child preference subnode that was added or removed.
 Preferences getParent()
          Returns the source parent preference node from which a subnode was added or removed.
 
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
 

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

getParent

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


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("").