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()
Release the page managed by this node, and any SWT resources
held onto by this node (Images, Fonts, etc).
|
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 IPreferencePage
public PreferenceNode(String id, IPreferencePage preferencePage)
id
- the node idpreferencePage
- the preference pagepublic void add(IPreferenceNode node)
IPreferenceNode
add
in interface IPreferenceNode
node
- the node to addpublic void createPage()
IPreferenceNode
createPage
in interface IPreferenceNode
public void disposeResources()
IPreferenceNode
disposeResources
in interface IPreferenceNode
public IPreferenceNode findSubNode(String id)
IPreferenceNode
findSubNode
in interface IPreferenceNode
id
- the preference node idnull
if nonepublic String getId()
IPreferenceNode
getId
in interface IPreferenceNode
protected ImageDescriptor getImageDescriptor()
public Image getLabelImage()
IPreferenceNode
getLabelImage
in interface IPreferenceNode
null
if there is no image for this nodepublic String getLabelText()
IPreferenceNode
getLabelText
in interface IPreferenceNode
null
if there is no label for this nodepublic IPreferencePage getPage()
IPreferenceNode
getPage
in interface IPreferenceNode
public IPreferenceNode[] getSubNodes()
IPreferenceNode
getSubNodes
in interface IPreferenceNode
public IPreferenceNode remove(String id)
IPreferenceNode
remove
in interface IPreferenceNode
id
- the subnode idnull
if nonepublic boolean remove(IPreferenceNode node)
IPreferenceNode
remove
in interface IPreferenceNode
node
- the node to removetrue
if the node was removed,
and false
otherwisepublic void setPage(IPreferencePage newPage)
newPage
-
Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.