java.util.prefs
Class NodeChangeEvent
java.lang.Object
java.util.EventObject
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
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. |
NodeChangeEvent
public NodeChangeEvent(Preferences parentNode,
Preferences childNode)
- Creates a new NodeChangeEvent.
- Parameters:
parentNode
- The source preference node from which a subnode was
added or removedchildNode
- The preference node that was added or removed
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("")
.