public class TreeTableViewBehavior<T> extends TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
Modifier and Type | Field and Description |
---|---|
private ChangeListener<TreeTableView.TreeTableViewSelectionModel<T>> |
selectionModelListener
*
Listeners *
*
|
protected static java.util.List<KeyBinding> |
TREE_TABLE_VIEW_BINDINGS
*
Setup key bindings *
*
|
private WeakChangeListener<TreeTableView.TreeTableViewSelectionModel<T>> |
weakSelectionModelListener |
isShiftDown, isShortcutDown, selectedCellsListener, selectionChanging, TABLE_VIEW_BINDINGS, weakSelectedCellsListener
IS_TOUCH_SUPPORTED, TRAVERSAL_BINDINGS, TRAVERSE_DOWN, TRAVERSE_LEFT, TRAVERSE_NEXT, TRAVERSE_PREVIOUS, TRAVERSE_RIGHT, TRAVERSE_UP
Constructor and Description |
---|
TreeTableViewBehavior(TreeTableView<T> control)
*
Constructors *
*
|
Modifier and Type | Method and Description |
---|---|
protected void |
callAction(java.lang.String name)
Called to invoke the action associated with the given name.
|
private void |
collapseRow() |
protected void |
editCell(int row,
TableColumnBase tc)
Begins the edit process in the underlying control for the given row/column
position.
|
private void |
expandAll() |
private void |
expandRow() |
protected TablePositionBase |
getFocusedCell()
Returns the focused cell from the focus model of the underlying control.
|
protected TableFocusModel |
getFocusModel()
Returns the focus model for the underlying UI control (which must extend
from TableFocusModel).
|
protected int |
getItemCount()
Returns the number of items in the underlying data model.
|
protected ObservableList<TreeTablePosition<T,?>> |
getSelectedCells()
Returns an observable list of all cells that are currently selected in
the selection model of the underlying control.
|
protected TableSelectionModel<TreeItem<T>> |
getSelectionModel()
Returns the selection model for the underlying UI control (which must extend
from TableSelectionModel).
|
protected TablePositionBase<TreeTableColumn<T,?>> |
getTablePosition(int row,
TableColumnBase<TreeItem<T>,?> tc)
Creates a TablePositionBase instance using the underlying controls
concrete implementation for the given row/column intersection.
|
protected TreeTableColumn |
getVisibleLeafColumn(int index)
Returns the column at the given index in the visible leaf columns list of
the underlying control.
|
protected ObservableList<TreeTableColumn<T,?>> |
getVisibleLeafColumns()
Returns an observable list of all visible leaf columns in the underlying
control.
|
protected int |
getVisibleLeafIndex(TableColumnBase tc)
Returns the position of the given table column in the visible leaf columns
list of the underlying control.
|
private void |
leftArrowPressed() |
protected java.lang.String |
matchActionForEvent(KeyEvent e)
Given a key event, this method will find the matching action name, or null if there
is not one.
|
private void |
rightArrowPressed()
The next methods handle the left/right arrow input differently depending
on whether we are in row or cell selection.
|
protected void |
selectAllToFocus(boolean setAnchorToFocusIndex) |
activate, alsoSelectLeftCell, alsoSelectNext, alsoSelectPrevious, alsoSelectRightCell, callActionForEvent, cancelEdit, clearSelection, clearSelectionOutsideRange, discontinuousSelectAllToFirstRow, discontinuousSelectAllToLastRow, discontinuousSelectNextColumn, discontinuousSelectNextRow, discontinuousSelectPageDown, discontinuousSelectPageUp, discontinuousSelectPreviousColumn, discontinuousSelectPreviousRow, focusFirstRow, focusLastRow, focusLeftCell, focusNextRow, focusPageDown, focusPageUp, focusPreviousRow, focusRightCell, getAnchor, getColumn, getColumn, hasAnchor, isRTL, mousePressed, scrollDown, scrollUp, selectAll, selectAllPageDown, selectAllPageUp, selectAllToFirstRow, selectAllToLastRow, selectCell, selectFirstRow, selectLastRow, selectLeftCell, selectNextRow, selectPreviousRow, selectRightCell, setAnchor, setAnchor, setOnFocusNextRow, setOnFocusPreviousRow, setOnMoveToFirstCell, setOnMoveToLastCell, setOnScrollPageDown, setOnScrollPageUp, setOnSelectLeftCell, setOnSelectNextRow, setOnSelectPreviousRow, setOnSelectRightCell, toggleFocusOwnerSelection, updateCellHorizontalSelection, updateCellVerticalSelection, updateRowSelection
contextMenuRequested, dispose, focusChanged, getControl, mouseDragged, mouseEntered, mouseExited, mouseReleased, traverse, traverseDown, traverseLeft, traverseNext, traversePrevious, traverseRight, traverseUp
protected static final java.util.List<KeyBinding> TREE_TABLE_VIEW_BINDINGS
private final ChangeListener<TreeTableView.TreeTableViewSelectionModel<T>> selectionModelListener
private final WeakChangeListener<TreeTableView.TreeTableViewSelectionModel<T>> weakSelectionModelListener
public TreeTableViewBehavior(TreeTableView<T> control)
protected java.lang.String matchActionForEvent(KeyEvent e)
BehaviorBase
matchActionForEvent
in class BehaviorBase<TreeTableView<T>>
e
- The key event. Must not be null.protected void callAction(java.lang.String name)
BehaviorBase
When a KeyEvent is handled, it is first passed through callActionForEvent which resolves which "action" should be executed based on the key event. This action is indicated by name. This name is then passed to this function which is responsible for invoking the right function based on the name.
callAction
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected int getItemCount()
getItemCount
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected TableFocusModel getFocusModel()
getFocusModel
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected TableSelectionModel<TreeItem<T>> getSelectionModel()
getSelectionModel
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected ObservableList<TreeTablePosition<T,?>> getSelectedCells()
getSelectedCells
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected TablePositionBase getFocusedCell()
getFocusedCell
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected int getVisibleLeafIndex(TableColumnBase tc)
getVisibleLeafIndex
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected TreeTableColumn getVisibleLeafColumn(int index)
getVisibleLeafColumn
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected void editCell(int row, TableColumnBase tc)
editCell
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected ObservableList<TreeTableColumn<T,?>> getVisibleLeafColumns()
getVisibleLeafColumns
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected TablePositionBase<TreeTableColumn<T,?>> getTablePosition(int row, TableColumnBase<TreeItem<T>,?> tc)
getTablePosition
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
protected void selectAllToFocus(boolean setAnchorToFocusIndex)
selectAllToFocus
in class TableViewBehaviorBase<TreeTableView<T>,TreeItem<T>,TreeTableColumn<T,?>>
private void rightArrowPressed()
private void leftArrowPressed()
private void expandRow()
private void expandAll()
private void collapseRow()