public class TTreeViewWidget extends TScrollableWidget
hScroller, vScroller
Constructor and Description |
---|
TTreeViewWidget(TWidget parent,
int x,
int y,
int width,
int height)
Public constructor.
|
TTreeViewWidget(TWidget parent,
int x,
int y,
int width,
int height,
TAction action)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
dispatch()
Perform user selection action.
|
TTreeItem |
getSelected()
Get the tree view item that was selected.
|
TTreeItem |
getTreeRoot()
Get the root of the tree.
|
TTreeView |
getTreeView()
Get the underlying TTreeView.
|
void |
onKeypress(TKeypressEvent keypress)
Handle keystrokes.
|
void |
onMouseDown(TMouseEvent mouse)
Handle mouse press events.
|
void |
onMouseMotion(TMouseEvent mouse)
Handle mouse motion events.
|
void |
onMouseUp(TMouseEvent mouse)
Handle mouse release events.
|
void |
onResize(TResizeEvent event)
Handle window/screen resize events.
|
void |
reflowData()
Resize text and scrollbars for a new width/height.
|
void |
setSelected(TTreeItem item,
boolean centerWindow)
Set the new selected tree view item.
|
void |
setTreeRoot(TTreeItem treeRoot)
Set the root of the tree.
|
void |
setTreeRoot(TTreeItem treeRoot,
boolean centerWindow)
Set treeRoot.
|
bigHorizontalDecrement, bigHorizontalIncrement, bigVerticalDecrement, bigVerticalIncrement, getBottomValue, getHorizontalBigChange, getHorizontalScroller, getHorizontalSmallChange, getHorizontalValue, getLeftValue, getRightValue, getTopValue, getVerticalBigChange, getVerticalScroller, getVerticalSmallChange, getVerticalValue, horizontalDecrement, horizontalIncrement, placeScrollbars, setBottomValue, setHorizontalBigChange, setHorizontalSmallChange, setHorizontalValue, setLeftValue, setRightValue, setTopValue, setVerticalBigChange, setVerticalSmallChange, setVerticalValue, toBottom, toEnd, toHome, toLeft, toRight, toTop, verticalDecrement, verticalIncrement
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, close, compareTo, doRepaint, draw, drawBox, drawBox, drawBoxShadow, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getChildren, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getHeight, getLayoutManager, getParent, getScreen, getTheme, getWidth, getWindow, getX, getY, handleEvent, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEnabled, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onMenu, onMouseDoubleClick, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setDimensions, setEnabled, setHeight, setLayoutManager, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY
public TTreeViewWidget(TWidget parent, int x, int y, int width, int height)
parent
- parent widgetx
- column relative to parenty
- row relative to parentwidth
- width of tree viewheight
- height of tree viewpublic TTreeViewWidget(TWidget parent, int x, int y, int width, int height, TAction action)
parent
- parent widgetx
- column relative to parenty
- row relative to parentwidth
- width of tree viewheight
- height of tree viewaction
- action to perform when an item is selectedpublic void onResize(TResizeEvent event)
onResize
in class TScrollableWidget
event
- resize eventpublic void onMouseDown(TMouseEvent mouse)
onMouseDown
in class TWidget
mouse
- mouse button press eventpublic void onMouseUp(TMouseEvent mouse)
public void onMouseMotion(TMouseEvent mouse)
onMouseMotion
in class TWidget
mouse
- mouse motion eventpublic void onKeypress(TKeypressEvent keypress)
onKeypress
in class TWidget
keypress
- keystroke eventpublic void reflowData()
reflowData
in class TScrollableWidget
public TTreeView getTreeView()
public final TTreeItem getTreeRoot()
public final void setTreeRoot(TTreeItem treeRoot)
treeRoot
- the new root of the treepublic void setTreeRoot(TTreeItem treeRoot, boolean centerWindow)
treeRoot
- ultimate root of treecenterWindow
- if true, move the window to put the root in viewpublic final TTreeItem getSelected()
public void setSelected(TTreeItem item, boolean centerWindow)
item
- new item that became selectedcenterWindow
- if true, move the window to put the selected into
viewpublic void dispatch()
Copyright © 2019 Kevin Lamonte. Licensed MIT.