public class PreferenceNode extends Object implements IPreferenceNode
| Constructor and Description |
|---|
PreferenceNode(String id)
Creates a new preference node with the given id.
|
PreferenceNode(String id,
IPreferencePage preferencePage)
Creates a preference node with the given id and preference page.
|
PreferenceNode(String id,
String label,
ImageDescriptor image,
String className)
Creates a preference node with the given id, label, and image, and
lazily-loaded preference page.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(IPreferenceNode node)
Adds the given preference node as a subnode of this
preference node.
|
void |
createPage()
Creates the preference page for this node.
|
void |
disposeResources()
(non-Javadoc) Method declared on IPreferenceNode.
|
IPreferenceNode |
findSubNode(String id)
Returns the subnode of this contribution node with the given node id.
|
String |
getId()
Returns the id of this contribution node.
|
protected ImageDescriptor |
getImageDescriptor()
Returns the image descriptor for this node.
|
Image |
getLabelImage()
Returns the image used to present this node in a preference dialog.
|
String |
getLabelText()
Returns the text label used to present this node in a preference dialog.
|
IPreferencePage |
getPage()
Returns the preference page for this node.
|
IPreferenceNode[] |
getSubNodes()
Returns an iterator over the subnodes (immediate children)
of this contribution node.
|
boolean |
remove(IPreferenceNode node)
Removes the given preference node from the list of subnodes
(immediate children) of this node.
|
IPreferenceNode |
remove(String id)
Removes the subnode of this preference node with the given node id.
|
void |
setPage(IPreferencePage newPage)
Set the current page to be newPage.
|
public PreferenceNode(String id)
id - the node idpublic PreferenceNode(String id, String label, ImageDescriptor image, String className)
id - the node idlabel - the label used to display the node in the preference dialog's
treeimage - the image displayed left of the label in the preference
dialog's tree, or null if noneclassName - the class name of the preference page; this class must
implement IPreferencePagepublic PreferenceNode(String id, IPreferencePage preferencePage)
id - the node idpreferencePage - the preference pagepublic void add(IPreferenceNode node)
IPreferenceNodeadd in interface IPreferenceNodenode - the node to addpublic void createPage()
IPreferenceNodecreatePage in interface IPreferenceNodepublic void disposeResources()
disposeResources in interface IPreferenceNodepublic IPreferenceNode findSubNode(String id)
IPreferenceNodefindSubNode in interface IPreferenceNodeid - the preference node idnull if nonepublic String getId()
IPreferenceNodegetId in interface IPreferenceNodeprotected ImageDescriptor getImageDescriptor()
public Image getLabelImage()
IPreferenceNodegetLabelImage in interface IPreferenceNodenull
if there is no image for this nodepublic String getLabelText()
IPreferenceNodegetLabelText in interface IPreferenceNodenull
if there is no label for this nodepublic IPreferencePage getPage()
IPreferenceNodegetPage in interface IPreferenceNodepublic IPreferenceNode[] getSubNodes()
IPreferenceNodegetSubNodes in interface IPreferenceNodepublic IPreferenceNode remove(String id)
IPreferenceNoderemove in interface IPreferenceNodeid - the subnode idnull if nonepublic boolean remove(IPreferenceNode node)
IPreferenceNoderemove in interface IPreferenceNodenode - the node to removetrue if the node was removed,
and false otherwisepublic void setPage(IPreferencePage newPage)
newPage - Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.