public class TreeWidget<T> extends Panel implements IScrollable
Widget.NotifyEvent| Modifier and Type | Field and Description |
|---|---|
protected com.bonzaiengine.ui.widget.TreeWidgetItem<T> |
lastSelected |
protected com.bonzaiengine.ui.widget.TreeWidgetItem<T> |
root |
COMMAND_KEY_ENTER, COMMAND_MOUSE_CLICK, COMMAND_UNKNOWN, culled, fontChangeId, fontName, fontSize, lastFont, lastFontSize, RENDER_BACKGROUND, RENDER_FOREGROUND| Constructor and Description |
|---|
TreeWidget() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTreeListener(TreeListener<T> l) |
void |
expandTo(Tree<T> node) |
void |
expandToSelection() |
Tree<T> |
findNode(T object) |
protected com.bonzaiengine.ui.widget.TreeWidgetItem<T> |
findNode(com.bonzaiengine.ui.widget.TreeWidgetItem<T> widget,
Tree<T> node) |
Array<Tree<T>> |
findNodes(Array<T> objects) |
protected boolean |
fireOnNodeAction(Tree<T> node,
Widget w) |
protected boolean |
fireOnNodeMouseEvent(MouseEvent e,
Tree<T> node,
Widget w) |
protected void |
fireSelectionChanged() |
int |
getNumSelected() |
Array<Tree<T>> |
getSelection() |
java.lang.Iterable<T> |
getSelectionElements() |
int |
getStepForHorizontalScrolling() |
int |
getStepForVerticalScrolling() |
boolean |
isExpanded(Tree<T> node) |
protected boolean |
onKeyPressed(UI ui,
KeyEvent e) |
protected boolean |
onNodeAction(Tree<T> node,
Widget w) |
protected boolean |
onNodeMouseEvent(MouseEvent e,
Tree<T> node,
Widget w) |
protected void |
onSelectionChanged() |
protected void |
onShowPopup(int x,
int y) |
boolean |
removeTreeListener(TreeListener<T> listener) |
void |
select(java.lang.Iterable<Tree<T>> nodes,
boolean unselectOthers) |
void |
select(Tree<T> node,
boolean unselectOthers) |
protected boolean |
selectInterval(com.bonzaiengine.ui.widget.TreeWidgetItem<T> start,
com.bonzaiengine.ui.widget.TreeWidgetItem<T> end) |
void |
set(Tree<T> tree)
Replace the entire tree structure and unselect all nodes
|
void |
setExpanded(int level,
boolean expanded) |
boolean |
setExpanded(Tree<T> node,
boolean expanded) |
void |
setRootVisible(boolean rootVisible) |
protected boolean |
setSelected(com.bonzaiengine.ui.widget.TreeWidgetItem<T> node,
boolean select,
boolean ignoreExpand,
boolean multipleSelection) |
void |
unselectAll()
Unselect of nodes
|
protected boolean |
unselectAll(com.bonzaiengine.ui.widget.TreeWidgetItem<T> item) |
void |
update()
Refresh all the structure
|
boolean |
update(Tree<T> node)
Refresh a tree node
|
add, addNoNotify, dispatchKeyEvent, dispatchMouseExited, dispatchMouseMoved, dispatchMousePressed, dispatchMouseReleased, dispatchMouseWheelMoved, doMoveOpti, find, focusableTraversal, focusableTraversalDown, getNumWidgets, getWidget, getWidget, hasMenuPopupVisible, indexOf, insert, isOver, isOverlappingRendering, notifyEvent, onChildChanged, remove, remove, removeAll, removeAll, renderGL, renderGLAfterBackground, resolveLayout, setLayout, traverse, update, updateChilds, updateMinViewportaddActionListener, addAnimator, addChangeListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bindTo, contains, delayNotifyEvent, dispatchNotifyEvent, dispatchShowPopup, find, fireAction, fireAnimator, fireChange, fireKeyEvent, fireMouseEvent, focusableTraversalUp, focusTraversal, forceSize, getCurrentBackground, getCurrentBackgroundColor, getFocusable, getFontSizeForRender, getHeightOnScreen, getInsets, getInsetsHeight, getInsetsWidth, getLocation, getLocationOnScreen, getLocationXOnScreen, getLocationYOnScreen, getMenuPopup, getMinHeightLayout, getMinHeightWidget, getMinWidthLayout, getMinWidthWidget, getPopup, getPreferredHeight, getPreferredWidth, getRefBackground, getRoot, getTooltip, getViewportBorderBottom, getViewportBorderHeight, getViewportBorderLeft, getViewportBorderWidth, getWidthOnScreen, hasFocus, hasKeyEventFocus, isBackgroundOpaque, isDownOrMouseDown, isFocusable, isFree, isMouseOverOrDown, isRenderingAndEnabled, onActionPerformed, onDiscardState, onFocusChanged, onFontChanged, onKeyReleased, onMouseClicked, onMouseDownDragUp, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelMoved, onMove, onParentChanged, onStateChanged, onStyleChanged, refreshFocus, removeActionListener, removeAllActionListener, removeAnimator, removeChangeListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, render, requestFocus, resolveBlockEvents, resolveLocationRef, setAutoPack, setAutoPackHeight, setAutoPackWidth, setBackgroundColor, setDown, setEnabled, setFocusable, setInsets, setInsets, setIsBackground, setLocation, setLocation, setLocationAnchor, setLocationRef, setLocationRef2, setLocationRefAnchor, setMaxSize, setMaxSize, setMenuPopup, setMinSize, setMinSize, setMinSizeLayout, setParent, setPopup, setSize, setSize, setSizeOnScreen, setStyle, setTooltip, setVisible, toString, triggerChildsUpdate, uiFireAction, updateListenersForPositionprotected com.bonzaiengine.ui.widget.TreeWidgetItem<T> root
protected com.bonzaiengine.ui.widget.TreeWidgetItem<T> lastSelected
protected boolean onKeyPressed(UI ui, KeyEvent e)
onKeyPressed in class Widgetpublic final void set(Tree<T> tree)
tree - the tree data structure to set to this widgetupdate()public final void update()
public final boolean update(Tree<T> node)
node - notify the specified node may have structurally changepublic final int getStepForHorizontalScrolling()
getStepForHorizontalScrolling in interface IScrollablepublic final int getStepForVerticalScrolling()
getStepForVerticalScrolling in interface IScrollableprotected final com.bonzaiengine.ui.widget.TreeWidgetItem<T> findNode(com.bonzaiengine.ui.widget.TreeWidgetItem<T> widget, Tree<T> node)
public final void setExpanded(int level,
boolean expanded)
public final boolean setExpanded(Tree<T> node, boolean expanded)
node - expanded - public final void expandToSelection()
public final void select(Tree<T> node, boolean unselectOthers)
node - node to selectedunselectOthers - true to unselect other nodes (ignored if #isSingleSelection() is truepublic final void select(java.lang.Iterable<Tree<T>> nodes, boolean unselectOthers)
nodes - unselectOthers - true to unselect other nodes (ignored if #isSingleSelection() is trueprotected final boolean selectInterval(com.bonzaiengine.ui.widget.TreeWidgetItem<T> start, com.bonzaiengine.ui.widget.TreeWidgetItem<T> end)
protected final boolean setSelected(com.bonzaiengine.ui.widget.TreeWidgetItem<T> node, boolean select, boolean ignoreExpand, boolean multipleSelection)
public final void unselectAll()
protected final boolean unselectAll(com.bonzaiengine.ui.widget.TreeWidgetItem<T> item)
protected final void fireSelectionChanged()
protected void onSelectionChanged()
protected final boolean fireOnNodeMouseEvent(MouseEvent e, Tree<T> node, Widget w)
protected boolean onNodeMouseEvent(MouseEvent e, Tree<T> node, Widget w)
protected void onShowPopup(int x,
int y)
public Array<Tree<T>> getSelection()
getSelectionElements()public java.lang.Iterable<T> getSelectionElements()
getSelection()public final int getNumSelected()
public final void addTreeListener(TreeListener<T> l)
l - listener to register to this widgetpublic final boolean removeTreeListener(TreeListener<T> listener)
public final void setRootVisible(boolean rootVisible)
Bonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com