com.leafdigital.ui.api
Interface TreeBox

All Superinterfaces:
Widget

public interface TreeBox
extends Widget

Like listbox but contains a tree of items


Nested Class Summary
static interface TreeBox.DragSingleSelectionHandler
          Interface to implement if you need to know about selection and dragging
static interface TreeBox.Handler
          Interface implemented by users to handle the tree
static interface TreeBox.Item
          Interface implemented by users to pass on information about the tree of options.
static interface TreeBox.MultiSelectionHandler
          Interface to implement if you need to know about selection & allow multiple
static interface TreeBox.SingleSelectionHandler
          Interface to implement if you need to know about selection
 
Method Summary
 void select(TreeBox.Item i)
          Selects the given item.
 void select(TreeBox.Item[] items)
          Selects the given items.
 void setHandler(TreeBox.Handler h)
          Sets the handler used to build the tree of items.
 void setHeight(int height)
          Sets height of box (if not called, will use preferred size).
 void setWidth(int width)
          Sets width of box (if not called, will use preferred size).
 void update()
          Call if the Handler's list of items might have changed
 
Methods inherited from interface com.leafdigital.ui.api.Widget
getID, getOwner, informClosed, isVisible, setOwner, setVisible
 

Method Detail

setHandler

void setHandler(TreeBox.Handler h)
Sets the handler used to build the tree of items.

Parameters:
h - Handler

update

void update()
Call if the Handler's list of items might have changed


select

void select(TreeBox.Item i)
Selects the given item. Handler.selected() will not be called.

Parameters:
i - Item to select (null for none)

select

void select(TreeBox.Item[] items)
Selects the given items. Handler.selected() will not be called.

Parameters:
items - Items to select (empty list for none)

setWidth

void setWidth(int width)
Sets width of box (if not called, will use preferred size).

Parameters:
width - Desired width

setHeight

void setHeight(int height)
Sets height of box (if not called, will use preferred size).

Parameters:
height - Desired height


Copyright © 2011 Samuel Marshall. All rights reserved.