APIdia Launch Partner
Top Description Fields Constructors Methods
java.util.prefs

public Class NodeChangeEvent

extends EventObject
Class Inheritance
Known Direct Subclasses
java.util.prefs.AbstractPreferences.NodeAddedEvent, java.util.prefs.AbstractPreferences.NodeRemovedEvent
Imports
java.io.NotSerializableException

An event emitted by a Preferences node to indicate that a child of that node has been added or removed.

Note, that although NodeChangeEvent inherits Serializable interface from java.util.EventObject, it is not intended to be Serializable. Appropriate serialization methods are implemented to throw NotSerializableException.

Author
Josh Bloch
Since
1.4
See Also
Preferences, NodeChangeListener, PreferenceChangeEvent

Field Summary

Modifier and TypeField and Description
private transient Preferences
child

The node that was added or removed.

private static final long
Inherited from java.util.EventObject:
source

Constructor Summary

AccessConstructor and Description
public
NodeChangeEvent(Preferences
The parent of the node that was added or removed.
parent
,
Preferences
The node that was added or removed.
child
)

Constructs a new NodeChangeEvent instance.

Method Summary

Modifier and TypeMethod and Description
public Preferences

Returns:

The node that was added or removed.
getChild
()

Returns the node that was added or removed.

public Preferences

Returns:

The parent Preferences node whose child was added or removed
getParent
()

Returns the parent of the node that was added or removed.

private void
readObject(ObjectInputStream in)

Throws NotSerializableException, since NodeChangeEvent objects are not intended to be serializable.

private void
writeObject(ObjectOutputStream out)

Throws NotSerializableException, since NodeChangeEvent objects are not intended to be serializable.

Inherited from java.util.EventObject:
getSourcetoString

Field Detail

childback to summary
private transient Preferences child

The node that was added or removed.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.EventObject.serialVersionUID.

Constructor Detail

NodeChangeEventback to summary
public NodeChangeEvent(Preferences parent, Preferences child)

Constructs a new NodeChangeEvent instance.

Parameters
parent:Preferences

The parent of the node that was added or removed.

child:Preferences

The node that was added or removed.

Method Detail

getChildback to summary
public Preferences getChild()

Returns the node that was added or removed.

Returns:Preferences

The node that was added or removed.

getParentback to summary
public Preferences getParent()

Returns the parent of the node that was added or removed.

Returns:Preferences

The parent Preferences node whose child was added or removed

readObjectback to summary
private void readObject(ObjectInputStream in) throws NotSerializableException

Throws NotSerializableException, since NodeChangeEvent objects are not intended to be serializable.

writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws NotSerializableException

Throws NotSerializableException, since NodeChangeEvent objects are not intended to be serializable.