|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.preference.PreferenceManager
public class PreferenceManager
A preference manager maintains a hierarchy of preference nodes and associated preference pages.
Field Summary | |
---|---|
static int |
POST_ORDER
Post-order means visit the children, and then the root. |
static int |
PRE_ORDER
Pre-order traversal means visit the root first, then the children. |
Constructor Summary | |
---|---|
PreferenceManager()
|
Method Summary | |
---|---|
boolean |
addTo(java.lang.String path,
IPreferenceNode node)
Adds the given preference node as a subnode of the node at the given path. |
void |
addToRoot(IPreferenceNode node)
Adds the given preference node as a subnode of the root. |
protected void |
buildSequence(IPreferenceNode node,
java.util.List sequence,
int order)
Recursively enumerates all nodes at or below the given node and adds them to the given list in the given order. |
IPreferenceNode |
find(java.lang.String path)
Finds and returns the contribution node at the given path. |
protected IPreferenceNode |
find(java.lang.String path,
IPreferenceNode top)
Finds and returns the preference node directly below the top at the given path. |
java.util.List |
getElements(int order)
Returns all preference nodes managed by this manager. |
protected IPreferenceNode |
getRoot()
Returns the root node. |
java.util.List |
getRootElements()
Returns root preference nodes managed by this manager. |
boolean |
remove(IPreferenceNode node)
Removes the given prefreence node if it is managed by this contribution manager. |
void |
removeAll()
Removes all contribution nodes known to this manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PRE_ORDER
public static final int POST_ORDER
Constructor Detail |
---|
public PreferenceManager()
Method Detail |
---|
protected IPreferenceNode getRoot()
public void addToRoot(IPreferenceNode node)
node
- the node to add, which must implement
IPreferenceNode
public boolean addTo(java.lang.String path, IPreferenceNode node)
path
- the pathnode
- the node to add
true
if the add was successful,
and false
if there is no contribution at
the given pathpublic boolean remove(IPreferenceNode node)
node
- the node to remove
true
if the node was removed,
and false
otherwisepublic void removeAll()
protected void buildSequence(IPreferenceNode node, java.util.List sequence, int order)
node
- the starting nodesequence
- a read-write list of preference nodes
(element type: IPreferenceNode
)
in the given orderorder
- the traversal order, one of
PRE_ORDER
and POST_ORDER
public java.util.List getElements(int order)
order
- the traversal order, one of
PRE_ORDER
and POST_ORDER
IPreferenceNode
)
in the given orderpublic java.util.List getRootElements()
IPreferenceNode
)public IPreferenceNode find(java.lang.String path)
path
- the path
null
if noneprotected IPreferenceNode find(java.lang.String path, IPreferenceNode top)
path
- the path
null
if none
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |