Package org.jboss.hal.ballroom.tree
Class Tree<T>
- java.lang.Object
-
- org.jboss.hal.ballroom.tree.Tree<T>
-
- All Implemented Interfaces:
org.jboss.elemento.IsElement,Attachable
public class Tree<T> extends Object implements org.jboss.elemento.IsElement, Attachable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattach()Initialized theApiinstance using theOptionsgiven at constructor argument.voidclearSearch()voiddestroy()elemental2.dom.HTMLElementelement()Node<T>getNode(String id)Node<T>getSelected()voidonReady(SimpleEventHandler handler)voidonSelectionChange(EventHandler<SelectionContext<T>> handler)voidopenAllNodes()voidopenNode(String id, JsCallback callback)voidrefreshNode(String id)voidsearch(String query)voidselectNode(String id)voidselectNode(String id, boolean closeSelected)-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.hal.ballroom.Attachable
detach
-
-
-
-
Constructor Detail
-
Tree
public Tree(String id, Node<T> root, DataFunction<T> data)
Creates a tree with the specified root node. All other nodes are loaded on demand using the provided callback.
-
-
Method Detail
-
element
public elemental2.dom.HTMLElement element()
- Specified by:
elementin interfaceorg.jboss.elemento.IsElement<T>
-
attach
public void attach()
Initialized theApiinstance using theOptionsgiven at constructor argument. Make sure to call this method before using any of the API methods. It's safe to call the methods multiple times (the initialization will happen only once).- Specified by:
attachin interfaceAttachable
-
destroy
public void destroy()
-
openNode
public void openNode(String id, JsCallback callback)
-
refreshNode
public void refreshNode(String id)
-
selectNode
public void selectNode(String id)
-
selectNode
public void selectNode(String id, boolean closeSelected)
-
search
public void search(String query)
-
clearSearch
public void clearSearch()
-
openAllNodes
public void openAllNodes()
-
onReady
public void onReady(SimpleEventHandler handler)
-
onSelectionChange
public void onSelectionChange(EventHandler<SelectionContext<T>> handler)
-
-