Constructor and Description |
---|
TTreeView(TWidget parent,
int x,
int y,
int width,
int height)
Public constructor.
|
TTreeView(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.
|
int |
getLeftColumn()
Get the left column value.
|
int |
getMaximumColumn()
Get the length of the widest item to display.
|
TTreeItem |
getSelected()
Get the tree view item that was selected.
|
int |
getTopLine()
Get the top line (row) value.
|
int |
getTotalLineCount()
Get the total line (rows) count, based on the items that are visible
and expanded.
|
TTreeItem |
getTreeRoot()
Get the root of the tree.
|
void |
onKeypress(TKeypressEvent keypress)
Handle keystrokes.
|
void |
setLeftColumn(int leftColumn)
Set the left column value.
|
void |
setSelected(TTreeItem item,
boolean centerWindow)
Set the new selected tree view item.
|
void |
setTopLine(int topLine)
Set the top line value.
|
void |
setTreeRoot(TTreeItem treeRoot)
Set the root of the tree.
|
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, onMouseDown, onMouseMotion, onMouseUp, onResize, 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 TTreeView(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 TTreeView(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 onKeypress(TKeypressEvent keypress)
onKeypress
in class TWidget
keypress
- keystroke eventpublic final TTreeItem getTreeRoot()
public final void setTreeRoot(TTreeItem treeRoot)
treeRoot
- the new root of the treepublic 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()
public int getLeftColumn()
public void setLeftColumn(int leftColumn)
leftColumn
- the new left columnpublic int getTopLine()
public void setTopLine(int topLine)
topLine
- the new top linepublic int getTotalLineCount()
public int getMaximumColumn()
Copyright © 2019 Kevin Lamonte. Licensed MIT.