Java org.eclipse.jface.viewers TreeViewer fields, constructors, methods, implement or subclass

Example usage for Java org.eclipse.jface.viewers TreeViewer fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.eclipse.jface.viewers TreeViewer.

The text is from its open source code.

Subclass

org.eclipse.jface.viewers.TreeViewer has subclasses.
Click this link to see all its subclasses.

Constructor

TreeViewer(Composite parent, int style)
Creates a tree viewer on a newly-created tree control under the given parent.
TreeViewer(Composite parent)
Creates a tree viewer on a newly-created tree control under the given parent.
TreeViewer(Tree tree)
Creates a tree viewer on the given tree control.

Method

voidadd(Object parentElementOrTreePath, Object... childElements)
Adds the given child elements to this viewer as children of the given parent element.
voidaddTreeListener(ITreeViewerListener listener)
Adds a listener for expand and collapse events in this viewer.
voidcollapseAll()
Collapses all nodes of the viewer's tree, starting with the root.
voidcollapseToLevel(Object elementOrTreePath, int level)
Collapses the subtree rooted at the given element or tree path to the given level.
voideditElement(Object element, int column)
voidexpandAll()
Expands all nodes of the viewer's tree, starting with the root.
voidexpandToLevel(int level, boolean disableRedraw)
Expands the root of the viewer's tree to the given level.
voidexpandToLevel(int level)
Expands the root of the viewer's tree to the given level.
intgetAutoExpandLevel()
Returns the auto-expand level.
ControlgetControl()
Object[]getExpandedElements()
Returns a list of elements corresponding to expanded nodes in this viewer's tree, including currently hidden ones that are marked as expanded but are under a collapsed ancestor.
booleangetExpandedState(Object elementOrTreePath)
Returns whether the node corresponding to the given element or tree path is expanded or collapsed.
TreePath[]getExpandedTreePaths()
Returns a list of tree paths corresponding to expanded nodes in this viewer's tree, including currently hidden ones that are marked as expanded but are under a collapsed ancestor.
IBaseLabelProvidergetLabelProvider()
The tree viewer implementation of this Viewer framework method ensures that the given label provider is an instance of either ITableLabelProvider or ILabelProvider.
ISelectiongetSelection()
The AbstractTreeViewer implementation of this method returns the result as an ITreeSelection.
ITreeSelectiongetStructuredSelection()
Returns the ITreeSelection of this viewer.
TreegetTree()
Returns this tree viewer's tree control.
Object[]getVisibleExpandedElements()
Gets the expanded elements that are visible to the user.
voidinsert(Object parentElementOrTreePath, Object element, int position)
Inserts the given element as a new child element of the given parent element at the given position.
booleanisExpandable(Object element)
voidremove(final Object... elementsOrTreePaths)
Removes the given elements from this viewer.
voidremove(final Object parentOrTreePath, final int index)
Removes the element at the specified index of the parent.
voidremoveTreeListener(ITreeViewerListener listener)
Removes a listener for expand and collapse events in this viewer.
voidreplace(final Object parentElementOrTreePath, final int index, final Object element)
For a TreeViewer with a tree with the VIRTUAL style bit set, replace the given parent's child at index with the given element.
voidreveal(Object elementOrTreePath)
This implementation of reveal() reveals the given element or tree path.
voidsetAutoExpandLevel(int level)
Sets the auto-expand level to be used when the input of the viewer is set using #setInput(Object) .
voidsetChildCount(final Object elementOrTreePath, final int count)
For a TreeViewer with a tree with the VIRTUAL style bit set, set the number of children of the given element or tree path.
voidsetContentProvider(IContentProvider provider)
Sets the content provider used by this TreeViewer.
voidsetExpandedElements(Object... elements)
Sets which nodes are expanded in this viewer's tree.
voidsetExpandedState(Object elementOrTreePath, boolean expanded)
Sets whether the node corresponding to the given element or tree path is expanded or collapsed.
voidsetExpandedTreePaths(TreePath... treePaths)
Sets which nodes are expanded in this viewer's tree.
voidsetExpandPreCheckFilters(boolean checkFilters)
Instructs #isExpandable(Object) to consult filters to more accurately determine if an item can be expanded.
voidsetHasChildren(final Object elementOrTreePath, final boolean hasChildren)
For a TreeViewer with a tree with the VIRTUAL style bit set, inform the viewer about whether the given element or tree path has children.
voidsetSelection(List items)
voidsetSelection(ISelection selection, boolean reveal)
Sets a new selection for this viewer and optionally makes it visible.