public class TTreeViewWindow extends TScrollableWindow
hScroller, vScroller
ABSOLUTEXY, CENTERED, HIDEONCLOSE, inKeyboardResize, inWindowMove, inWindowResize, MODAL, mouse, NOCLOSEBOX, NOZOOMBOX, OVERRIDEMENU, RESIZABLE, statusBar
Constructor and Description |
---|
TTreeViewWindow(TApplication parent,
java.lang.String title,
int x,
int y,
int width,
int height,
int flags)
Public constructor.
|
TTreeViewWindow(TApplication parent,
java.lang.String title,
int x,
int y,
int width,
int height,
int flags,
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 resize)
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, maximize, mouseOnHorizontalScroller, mouseOnVerticalScroller, placeScrollbars, restore, setBottomValue, setHorizontalBigChange, setHorizontalSmallChange, setHorizontalValue, setLeftValue, setRightValue, setTopValue, setVerticalBigChange, setVerticalSmallChange, setVerticalValue, toBottom, toEnd, toHome, toLeft, toRight, toTop, verticalDecrement, verticalIncrement
activate, addShortcutKeypress, center, clearShortcutKeypresses, close, draw, getApplication, getBackground, getBorder, getBorderControls, getScreen, getStatusBar, getTitle, getZ, hasCloseBox, hasHiddenMouse, hasOverriddenMenu, hasZoomBox, hide, inMovements, isHidden, isModal, isShortcutKeypress, isShown, mouseOnClose, mouseOnMaximize, mouseOnResize, newStatusBar, onClose, onCommand, onFocus, onHide, onMenu, onPreClose, onShow, onUnfocus, removeShortcutKeypress, setHiddenMouse, setMaximumWindowHeight, setMaximumWindowWidth, setMinimumWindowHeight, setMinimumWindowWidth, setTitle, setZ, show, stopMovements, toString
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, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getAttrXY, getChildren, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getHeight, getLayoutManager, getParent, getTheme, getWidth, getWindow, getX, getY, handleEvent, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEnabled, isVisible, messageBox, messageBox, mouseWouldHit, onIdle, 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, vLineXY
public TTreeViewWindow(TApplication parent, java.lang.String title, int x, int y, int width, int height, int flags)
parent
- the main applicationtitle
- the window titlex
- column relative to parenty
- row relative to parentwidth
- width of tree viewflags
- bitmask of RESIZABLE, CENTERED, or MODALheight
- height of tree viewpublic TTreeViewWindow(TApplication parent, java.lang.String title, int x, int y, int width, int height, int flags, TAction action)
parent
- the main applicationtitle
- the window titlex
- column relative to parenty
- row relative to parentwidth
- width of tree viewheight
- height of tree viewflags
- bitmask of RESIZABLE, CENTERED, or MODALaction
- action to perform when an item is selectedpublic void onMouseDown(TMouseEvent mouse)
onMouseDown
in class TWindow
mouse
- mouse button press eventpublic void onMouseUp(TMouseEvent mouse)
public void onMouseMotion(TMouseEvent mouse)
onMouseMotion
in class TWindow
mouse
- mouse motion eventpublic void onKeypress(TKeypressEvent keypress)
onKeypress
in class TWindow
keypress
- keystroke eventpublic void onResize(TResizeEvent resize)
onResize
in class TScrollableWindow
resize
- resize eventpublic void reflowData()
reflowData
in class TScrollableWindow
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.