Registers the specified listener to receive
preference change events for this preference node. A preference change event is generated when a preference is added to this node, removed from this node, or when the value associated with a preference is changed. (Preference change events are
not generated by the {@link #removeNode()} method, which generates a
node change event.Preference change events
are generated by the
clear method.)
Events are only guaranteed for changes made within the same JVM as the registered listener, though some implementations may generate events for changes made outside this JVM. Events may be generated before the changes have been made persistent. Events are not generated when preferences are modified in descendants of this node; a caller desiring such events must register with each descendant.
@param pcl The preference change listener to add.
@throws NullPointerException if pcl is null.
@throws IllegalStateException if this node (or an ancestor) has beenremoved with the {@link #removeNode()} method.
@see #removePreferenceChangeListener(PreferenceChangeListener)
@see #addNodeChangeListener(NodeChangeListener)