|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface describes Eclipse extensions to the preference story. It provides means for both preference and node change listeners.
Clients may implement this interface.
Preferences
Nested Class Summary | |
static interface |
IEclipsePreferences.INodeChangeListener
A listener to be used to receive preference node change events. |
static interface |
IEclipsePreferences.IPreferenceChangeListener
A listener used to receive changes to preference values in the preference store. |
static class |
IEclipsePreferences.NodeChangeEvent
An event object which describes the details of a change in the preference node hierarchy. |
static class |
IEclipsePreferences.PreferenceChangeEvent
An event object describing the details of a change to a preference in the preference store. |
Method Summary | |
void |
accept(IPreferenceNodeVisitor visitor)
Accepts the given visitor. |
void |
addNodeChangeListener(IEclipsePreferences.INodeChangeListener listener)
Register the given listener for changes to this node. |
void |
addPreferenceChangeListener(IEclipsePreferences.IPreferenceChangeListener listener)
Register the given listener for notification of preference changes to this node. |
Preferences |
node(String path)
Return the preferences node with the given path. |
void |
removeNode()
Remove this node from the preference hierarchy. |
void |
removeNodeChangeListener(IEclipsePreferences.INodeChangeListener listener)
De-register the given listener from receiving event change notifications for this node. |
void |
removePreferenceChangeListener(IEclipsePreferences.IPreferenceChangeListener listener)
De-register the given listner from receiving notification of preference changes to this node. |
Methods inherited from interface org.osgi.service.prefs.Preferences |
absolutePath, childrenNames, clear, flush, get, getBoolean, getByteArray, getDouble, getFloat, getInt, getLong, keys, name, nodeExists, parent, put, putBoolean, putByteArray, putDouble, putFloat, putInt, putLong, remove, sync |
Method Detail |
public void addNodeChangeListener(IEclipsePreferences.INodeChangeListener listener)
null
.
listener
- the node change listener to add
IllegalStateException
- if this node or an ancestor has been removedremoveNodeChangeListener(IEclipsePreferences.INodeChangeListener)
,
IEclipsePreferences.INodeChangeListener
public void removeNodeChangeListener(IEclipsePreferences.INodeChangeListener listener)
null
.
listener
- the node change listener to remove
IllegalStateException
- if this node or an ancestor has been removedaddNodeChangeListener(IEclipsePreferences.INodeChangeListener)
,
IEclipsePreferences.INodeChangeListener
public void addPreferenceChangeListener(IEclipsePreferences.IPreferenceChangeListener listener)
null
.
listener
- the preference change listener to register
IllegalStateException
- if this node or an ancestor has been removedremovePreferenceChangeListener(IEclipsePreferences.IPreferenceChangeListener)
,
IEclipsePreferences.IPreferenceChangeListener
public void removePreferenceChangeListener(IEclipsePreferences.IPreferenceChangeListener listener)
null
.
listener
- the preference change listener to remove
IllegalStateException
- if this node or an ancestor has been removedaddPreferenceChangeListener(IEclipsePreferences.IPreferenceChangeListener)
,
IEclipsePreferences.IPreferenceChangeListener
public void removeNode() throws BackingStoreException
Functionally equivalent to calling Preferences.removeNode()
.
See the spec of Preferences.removeNode()
for more details.
Implementors must send the appropriate IEclipsePreferences.NodeChangeEvent
to listeners who are registered on this node's parent.
removeNode
in interface Preferences
BackingStoreException
- if there was a problem removing this nodePreferences.removeNode()
,
IEclipsePreferences.NodeChangeEvent
public Preferences node(String path)
null
.
See the spec of Preferences.node(String)
for more details.
Note that if the node does not yet exist and is created, then the appropriate
IEclipsePreferences.NodeChangeEvent
must be sent to listeners who are
registered at this node.
node
in interface Preferences
path
- the path of the node
Preferences.node(String)
,
IEclipsePreferences.NodeChangeEvent
public void accept(IPreferenceNodeVisitor visitor) throws BackingStoreException
visit
method
is called with this node. If the visitor returns true
,
this method visits this node's children.
visitor
- the visitor
BackingStoreException
IPreferenceNodeVisitor.visit(IEclipsePreferences)
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.