Example usage for Java org.eclipse.jface.viewers TreeViewer fields, constructors, methods, implement or subclass
The text is from its open source code.
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. |
void | add(Object parentElementOrTreePath, Object... childElements) Adds the given child elements to this viewer as children of the given parent element. |
void | addTreeListener(ITreeViewerListener listener) Adds a listener for expand and collapse events in this viewer. |
void | collapseAll() Collapses all nodes of the viewer's tree, starting with the root. |
void | collapseToLevel(Object elementOrTreePath, int level) Collapses the subtree rooted at the given element or tree path to the given level. |
void | editElement(Object element, int column) |
void | expandAll() Expands all nodes of the viewer's tree, starting with the root. |
void | expandToLevel(int level, boolean disableRedraw) Expands the root of the viewer's tree to the given level. |
void | expandToLevel(int level) Expands the root of the viewer's tree to the given level. |
int | getAutoExpandLevel() Returns the auto-expand level. |
Control | getControl() |
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. |
boolean | getExpandedState(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. |
IBaseLabelProvider | getLabelProvider() The tree viewer implementation of this Viewer framework method ensures that the given label provider is an instance of either ITableLabelProvider or ILabelProvider . |
ISelection | getSelection() The AbstractTreeViewer implementation of this method returns the result as an ITreeSelection . |
ITreeSelection | getStructuredSelection() Returns the ITreeSelection of this viewer. |
Tree | getTree() Returns this tree viewer's tree control. |
Object[] | getVisibleExpandedElements() Gets the expanded elements that are visible to the user. |
void | insert(Object parentElementOrTreePath, Object element, int position) Inserts the given element as a new child element of the given parent element at the given position. |
boolean | isExpandable(Object element) |
void | remove(final Object... elementsOrTreePaths) Removes the given elements from this viewer. |
void | remove(final Object parentOrTreePath, final int index) Removes the element at the specified index of the parent. |
void | removeTreeListener(ITreeViewerListener listener) Removes a listener for expand and collapse events in this viewer. |
void | replace(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. |
void | reveal(Object elementOrTreePath) This implementation of reveal() reveals the given element or tree path. |
void | setAutoExpandLevel(int level) Sets the auto-expand level to be used when the input of the viewer is set using #setInput(Object) . |
void | setChildCount(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. |
void | setContentProvider(IContentProvider provider) Sets the content provider used by this TreeViewer . |
void | setExpandedElements(Object... elements) Sets which nodes are expanded in this viewer's tree. |
void | setExpandedState(Object elementOrTreePath, boolean expanded) Sets whether the node corresponding to the given element or tree path is expanded or collapsed. |
void | setExpandedTreePaths(TreePath... treePaths) Sets which nodes are expanded in this viewer's tree. |
void | setExpandPreCheckFilters(boolean checkFilters) Instructs #isExpandable(Object) to consult filters to more accurately determine if an item can be expanded. |
void | setHasChildren(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. |
void | setSelection(List |
void | setSelection(ISelection selection, boolean reveal) Sets a new selection for this viewer and optionally makes it visible. |