1. Domino UI
  2. Components
  3. Tree
Top Basic Nested Featured Docs

Tree

Tree

Tree item

Examples

Basic tree Simple tree with simple tree items.

Nested trees Tree items nesting other tree items.

API Docs: Tree

Constructors

public void Tree()
Creates a new empty tree.
public void Tree(String treeTitle)
Creates a new tree with the given title.

treeTitle

The title of the tree.

public void Tree(String treeTitle, V value)
Creates a new tree with the given title and associated data value.

treeTitle

The title of the tree.

value

The data value associated with the tree.

Static methods

public static Tree<V> create(String title, V value)
Creates a new instance of Tree with the specified title and associated data value.

title

The title of the tree.

value

The data value associated with the tree.

V

The type of data associated with each tree item.



Returns:

A new Tree instance.

public static Tree<V> create(String title)
Creates a new instance of Tree with the specified title.

title

The title of the tree.

V

The type of data associated with each tree item.



Returns:

A new Tree instance.

public static Tree<V> create()
Creates a new empty instance of Tree.

V

The type of data associated with each tree item.



Returns:

A new Tree instance.

Public methods

public TreeItem<V> getSelection()
Gets the currently selected tree item in the tree.

Returns:

The currently selected tree item, or null if none is selected.

API Docs: TreeItem

Constructors

public void TreeItem(Icon<?> icon, String title)
Constructs a new TreeItem instance with an icon and title.

icon

The icon to be displayed for the tree item.

title

The title of the tree item.

public void TreeItem(String title)
Constructs a new TreeItem instance with a title.

title

The title of the tree item.

public void TreeItem(Icon<?> icon)
Constructs a new TreeItem instance with an icon.

icon

The icon to be displayed for the tree item.

public void TreeItem(String title, V value)
Constructs a new TreeItem instance with a title and a value.

title

The title of the tree item.

value

The value associated with the tree item.

public void TreeItem(Icon<?> icon, String title, V value)
Constructs a new TreeItem instance with an icon, title, and a value.

icon

The icon to be displayed for the tree item.

title

The title of the tree item.

value

The value associated with the tree item.

public void TreeItem(Icon<?> icon, V value)
Constructs a new TreeItem instance with an icon and a value.

icon

The icon to be displayed for the tree item.

value

The value associated with the tree item.

Static methods

public static TreeItem<String> create(String title)
Creates a new TreeItem instance with the given title.

title

The title of the tree item.



Returns:

A new TreeItem instance with the specified title.

public static TreeItem<String> create(Icon<?> icon, String title)
Creates a new TreeItem instance with the given icon and title.

icon

The icon to be displayed for the tree item.

title

The title of the tree item.



Returns:

A new TreeItem instance with the specified icon and title.

public static TreeItem<String> create(Icon<?> icon)
Creates a new TreeItem instance with the given icon.

icon

The icon to be displayed for the tree item.



Returns:

A new TreeItem instance with the specified icon.

public static TreeItem<T> create(String title, T value)
Creates a new TreeItem instance with the given title and value.

title

The title of the tree item.

value

The value associated with the tree item.

T

The type of the value.



Returns:

A new TreeItem instance with the specified title and value.

public static TreeItem<T> create(Icon<?> icon, String title, T value)
Creates a new TreeItem instance with the given icon, title, and value.

icon

The icon to be displayed for the tree item.

title

The title of the tree item.

value

The value associated with the tree item.

T

The type of the value.



Returns:

A new TreeItem instance with the specified icon, title, and value.

public static TreeItem<T> create(Icon<?> icon, T value)
Creates a new TreeItem instance with the given icon and value.

icon

The icon to be displayed for the tree item.

value

The value associated with the tree item.

T

The type of the value.



Returns:

A new TreeItem instance with the specified icon and value.

Public methods

public TreeItem<V> getSelection()
Retrieves the selected tree item. In the context of a single tree item, this method returns the current tree item itself.

Returns:

The selected tree item.

public void setActiveNode(TreeItem<V> activeItem, boolean silent)
Sets the currently active (selected) tree item within the tree structure. The 'silent' parameter allows you to control whether triggering selection and deselection listeners should be done silently without notifications. This method returns void.

activeItem

The TreeItem to set as the active item.

silent

True to suppress listener notifications; false to trigger listeners.

We are a group of passionate people who love what we do

Donate & Support Us