Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.jface.preference
Class PreferenceManager  view PreferenceManager download PreferenceManager.java

java.lang.Object
  extended byorg.eclipse.jface.preference.PreferenceManager

public class PreferenceManager
extends java.lang.Object

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.
(package private)  PreferenceNode root
          The root node.
(package private)  java.lang.String separator
          The path separator character.
 
Constructor Summary
PreferenceManager()
          Creates a new preference manager.
PreferenceManager(char separatorChar)
          Creates a new preference manager with the given the path separator.
 
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.
 java.util.List getElements(int order)
          Returns all preference nodes managed by this manager.
protected  IPreferenceNode getRoot()
          Returns the root node.
 boolean remove(IPreferenceNode node)
          Removes the given prefreence node if it is managed by this contribution manager.
 IPreferenceNode remove(java.lang.String path)
          Removes the prefernece node at the given path.
 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

PRE_ORDER

public static final int PRE_ORDER
Pre-order traversal means visit the root first, then the children.

See Also:
Constant Field Values

POST_ORDER

public static final int POST_ORDER
Post-order means visit the children, and then the root.

See Also:
Constant Field Values

root

PreferenceNode root
The root node. Note that the root node is a special internal node that is used to collect together all the nodes that have no parent; it is not given out to clients.


separator

java.lang.String separator
The path separator character.

Constructor Detail

PreferenceManager

public PreferenceManager()
Creates a new preference manager.


PreferenceManager

public PreferenceManager(char separatorChar)
Creates a new preference manager with the given the path separator.

Method Detail

addTo

public boolean addTo(java.lang.String path,
                     IPreferenceNode node)
Adds the given preference node as a subnode of the node at the given path.


addToRoot

public void addToRoot(IPreferenceNode node)
Adds the given preference node as a subnode of the root.


buildSequence

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.


find

public IPreferenceNode find(java.lang.String path)
Finds and returns the contribution node at the given path.


getElements

public java.util.List getElements(int order)
Returns all preference nodes managed by this manager.


getRoot

protected IPreferenceNode getRoot()
Returns the root node. Note that the root node is a special internal node that is used to collect together all the nodes that have no parent; it is not given out to clients.


remove

public IPreferenceNode remove(java.lang.String path)
Removes the prefernece node at the given path.


remove

public boolean remove(IPreferenceNode node)
Removes the given prefreence node if it is managed by this contribution manager.


removeAll

public void removeAll()
Removes all contribution nodes known to this manager.