Skip to content

TreeItem

mlabuda edited this page Feb 18, 2014 · 3 revisions

API / Abstract

  • TreeItem / AbstractTreeItem

Implementation(s)

  • BasicTreeItem
  • DefaultTreeItem

Usage

DefaultTreeItem

Look up a tree item with index 2

TreeItem defaultTreeItem = new DefaultTreeItem(2);

Look up a tree item with tree index 5 and path Parent -> Children

TreeItem defaultTreeItem2 = new DefaultTreeItem(5, "Parent", "Children");

Select tree item

defaultTreeItem.select();

Find out if tree item is selected

defaultTreeItem.isSelected();

Get text of the tree item

String treeItemText = defaultTreeItem.getText();

Get path to the tree item

String[] path = defaultTreeItem2.getPath();

Expand tree item if it is not expanded yet

defaultTreeItem.expand();

Find out if tree item is expanded

defaultTreeItem.isExpanded();

Collapse tree item if it is expanded

defaultTreeItem.collapse();

Get direct descent of the given item with text "Children"

defaultTreeItem.getItem("Children");

Double click on the tree item

defaultTreeItem.doubleClick();
Clone this wiki locally