Top Fields Constructors Methods
com.sun.javafx.scene.control.behavior

public abstract Class TableViewBehaviorBase<C extends Control, T, TC extends TableColumnBase<T, ?>>

extends BehaviorBase<C extends Control>
Class Inheritance
Known Direct Subclasses
com.sun.javafx.scene.control.behavior.TreeTableViewBehavior, com.sun.javafx.scene.control.behavior.TableViewBehavior
Static Imports
javafx.scene.input.KeyCode.*

Field Summary

Modifier and TypeField and Description
protected boolean
protected boolean
private final EventHandler<KeyEvent>
private Runnable
private Runnable
private Runnable
private Runnable
private Consumer<Boolean>
private Runnable
private Runnable
private Callback<Boolean, Integer>
private Callback<Boolean, Integer>
private Runnable
private Runnable
private Runnable
private Runnable
private Consumer<Boolean>
protected final ListChangeListener<TablePositionBase<TC extends TableColumnBase<S, T>>>
protected boolean
private final SizeLimitedList<TablePositionBase<TC extends TableColumnBase<S, T>>>
private boolean
private final InputMap<C>
tableViewInputMap

* Internal fields * *

protected final WeakListChangeListener<TablePositionBase<TC extends TableColumnBase<S, T>>>

Constructor Summary

AccessConstructor and Description
public
TableViewBehaviorBase(C control)

* Constructors * *

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
clearSelectionOutsideRange(int start, int end, TableColumnBase<T, ?> column)

protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
discontinuousSelectPreviousRow()

Discontinuous Selection *

public void
protected abstract void
editCell(int row, TableColumnBase<S, T> tc)

Begins the edit process in the underlying control for the given row/column position.

protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
private EventHandler<KeyEvent>
private EventHandler<KeyEvent>
protected TablePositionBase<TC extends TableColumnBase<S, T>>
getAnchor()

Will return the current anchor position.

protected TableColumnBase<S, T>
getColumn(int index)

protected TableColumnBase<S, T>
getColumn(TableColumnBase<S, T> tc, int delta)

protected abstract TablePositionBase<TC extends TableColumnBase<S, T>>
getFocusedCell()

Returns the focused cell from the focus model of the underlying control.

protected abstract TableFocusModel<T, TC extends TableColumnBase<T, ?>>
getFocusModel()

Returns the focus model for the underlying UI control (which must extend from TableFocusModel).

public InputMap<C>
protected abstract int
getItemCount()

Returns the number of items in the underlying data model.

protected abstract ObservableList<? extends TablePositionBase<TC extends TableColumnBase<S, T>>>
getSelectedCells()

Returns an observable list of all cells that are currently selected in the selection model of the underlying control.

protected abstract TableSelectionModel<T>
getSelectionModel()

Returns the selection model for the underlying UI control (which must extend from TableSelectionModel).

protected abstract TablePositionBase<TC>
getTablePosition(int row, TableColumnBase<T, ?> tc)

Creates a TablePositionBase instance using the underlying controls concrete implementation for the given row/column intersection.

protected abstract TableColumnBase<S, T>
getVisibleLeafColumn(int index)

Returns the column at the given index in the visible leaf columns list of the underlying control.

protected abstract ObservableList<? extends TableColumnBase<S, T>>
getVisibleLeafColumns()

Returns an observable list of all visible leaf columns in the underlying control.

protected abstract int
getVisibleLeafIndex(TableColumnBase<S, T> tc)

Returns the position of the given table column in the visible leaf columns list of the underlying control.

protected boolean
hasAnchor()

Returns true if there is an anchor set, and false if not anchor is set.

private void
horizontalUnitScroll(boolean right)

protected abstract boolean
isControlEditable()

Returns true if the control (i.e. TableView / TreeTableView) is editable

protected boolean
public void
private void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
selectAllToFocus(boolean setAnchorToFocusIndex)

protected void
protected void
selectCell(int rowDiff, int columnDiff)

protected void
protected void
protected void
protected void
protected void
protected void
protected void
setAnchor(TablePositionBase<TC extends TableColumnBase<S, T>> tp)

Call to record the current anchor position

protected void
setAnchor(int row, TableColumnBase<S, T> col)

* Public API * *

public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
public void
private void
setSelectionPathDeviated(boolean selectionPathDeviated)

* Private implementation * *

protected void
protected void
updateCellHorizontalSelection(int delta, Runnable defaultAction)

protected void
updateCellVerticalSelection(int delta, Runnable defaultAction)

protected void
updateRowSelection(int delta)

private void
verticalUnitScroll(boolean down)

Inherited from com.sun.javafx.scene.control.behavior.BehaviorBase:
addDefaultChildMapaddDefaultMappingaddDefaultMappingaddDefaultMappingcreateInputMapgetNodeisRTLremoveMappingrtlrtl

Field Detail

isShiftDownback to summary
protected boolean isShiftDown
isShortcutDownback to summary
protected boolean isShortcutDown
keyEventListenerback to summary
private final EventHandler<KeyEvent> keyEventListener
onFocusLeftCellback to summary
private Runnable onFocusLeftCell
onFocusNextRowback to summary
private Runnable onFocusNextRow
onFocusPreviousRowback to summary
private Runnable onFocusPreviousRow
onFocusRightCellback to summary
private Runnable onFocusRightCell
onHorizontalUnitScrollback to summary
private Consumer<Boolean> onHorizontalUnitScroll
onMoveToFirstCellback to summary
private Runnable onMoveToFirstCell
onMoveToLastCellback to summary
private Runnable onMoveToLastCell
onScrollPageDownback to summary
private Callback<Boolean, Integer> onScrollPageDown
onScrollPageUpback to summary
private Callback<Boolean, Integer> onScrollPageUp
onSelectLeftCellback to summary
private Runnable onSelectLeftCell
onSelectNextRowback to summary
private Runnable onSelectNextRow
onSelectPreviousRowback to summary
private Runnable onSelectPreviousRow
onSelectRightCellback to summary
private Runnable onSelectRightCell
onVerticalUnitScrollback to summary
private Consumer<Boolean> onVerticalUnitScroll
selectedCellsListenerback to summary
protected final ListChangeListener<TablePositionBase<TC extends TableColumnBase<S, T>>> selectedCellsListener
selectionChangingback to summary
protected boolean selectionChanging
selectionHistoryback to summary
private final SizeLimitedList<TablePositionBase<TC extends TableColumnBase<S, T>>> selectionHistory
selectionPathDeviatedback to summary
private boolean selectionPathDeviated
tableViewInputMapback to summary
private final InputMap<C> tableViewInputMap

* Internal fields * *

weakSelectedCellsListenerback to summary
protected final WeakListChangeListener<TablePositionBase<TC extends TableColumnBase<S, T>>> weakSelectedCellsListener

Constructor Detail

TableViewBehaviorBaseback to summary
public TableViewBehaviorBase(C control)

* Constructors * *

Method Detail

activateback to summary
protected void activate(KeyEvent e)
alsoSelectLeftCellback to summary
protected void alsoSelectLeftCell()
alsoSelectNextback to summary
protected void alsoSelectNext()
alsoSelectPreviousback to summary
protected void alsoSelectPrevious()
alsoSelectRightCellback to summary
protected void alsoSelectRightCell()
cancelEditback to summary
protected void cancelEdit(KeyEvent e)
clearSelectionback to summary
protected void clearSelection()
clearSelectionOutsideRangeback to summary
protected void clearSelectionOutsideRange(int start, int end, TableColumnBase<T, ?> column)
discontinuousSelectAllToFirstRowback to summary
protected void discontinuousSelectAllToFirstRow()
discontinuousSelectAllToLastRowback to summary
protected void discontinuousSelectAllToLastRow()
discontinuousSelectNextColumnback to summary
protected void discontinuousSelectNextColumn()
discontinuousSelectNextRowback to summary
protected void discontinuousSelectNextRow()
discontinuousSelectPageDownback to summary
protected void discontinuousSelectPageDown()
discontinuousSelectPageUpback to summary
protected void discontinuousSelectPageUp()
discontinuousSelectPreviousColumnback to summary
protected void discontinuousSelectPreviousColumn()
discontinuousSelectPreviousRowback to summary
protected void discontinuousSelectPreviousRow()

Discontinuous Selection *

disposeback to summary
public void dispose()

Overrides com.sun.javafx.scene.control.behavior.BehaviorBase.dispose.

Annotations
@Override
editCellback to summary
protected abstract void editCell(int row, TableColumnBase<S, T> tc)

Begins the edit process in the underlying control for the given row/column position.

focusFirstRowback to summary
protected void focusFirstRow()
focusLastRowback to summary
protected void focusLastRow()
focusLeftCellback to summary
protected void focusLeftCell()
focusNextRowback to summary
protected void focusNextRow()
focusPageDownback to summary
protected void focusPageDown()
focusPageUpback to summary
protected void focusPageUp()
focusPreviousRowback to summary
protected void focusPreviousRow()
focusRightCellback to summary
protected void focusRightCell()
focusTraverseLeftback to summary
private EventHandler<KeyEvent> focusTraverseLeft()
focusTraverseRightback to summary
private EventHandler<KeyEvent> focusTraverseRight()
getAnchorback to summary
protected TablePositionBase<TC extends TableColumnBase<S, T>> getAnchor()

Will return the current anchor position.

getColumnback to summary
protected TableColumnBase<S, T> getColumn(int index)
getColumnback to summary
protected TableColumnBase<S, T> getColumn(TableColumnBase<S, T> tc, int delta)
getFocusedCellback to summary
protected abstract TablePositionBase<TC extends TableColumnBase<S, T>> getFocusedCell()

Returns the focused cell from the focus model of the underlying control.

getFocusModelback to summary
protected abstract TableFocusModel<T, TC extends TableColumnBase<T, ?>> getFocusModel()

Returns the focus model for the underlying UI control (which must extend from TableFocusModel).

getInputMapback to summary
public InputMap<C> getInputMap()

Implements abstract com.sun.javafx.scene.control.behavior.BehaviorBase.getInputMap.

Annotations
@Override
getItemCountback to summary
protected abstract int getItemCount()

Returns the number of items in the underlying data model.

getSelectedCellsback to summary
protected abstract ObservableList<? extends TablePositionBase<TC extends TableColumnBase<S, T>>> getSelectedCells()

Returns an observable list of all cells that are currently selected in the selection model of the underlying control.

getSelectionModelback to summary
protected abstract TableSelectionModel<T> getSelectionModel()

Returns the selection model for the underlying UI control (which must extend from TableSelectionModel).

getTablePositionback to summary
protected abstract TablePositionBase<TC> getTablePosition(int row, TableColumnBase<T, ?> tc)

Creates a TablePositionBase instance using the underlying controls concrete implementation for the given row/column intersection.

getVisibleLeafColumnback to summary
protected abstract TableColumnBase<S, T> getVisibleLeafColumn(int index)

Returns the column at the given index in the visible leaf columns list of the underlying control.

getVisibleLeafColumnsback to summary
protected abstract ObservableList<? extends TableColumnBase<S, T>> getVisibleLeafColumns()

Returns an observable list of all visible leaf columns in the underlying control.

getVisibleLeafIndexback to summary
protected abstract int getVisibleLeafIndex(TableColumnBase<S, T> tc)

Returns the position of the given table column in the visible leaf columns list of the underlying control.

hasAnchorback to summary
protected boolean hasAnchor()

Returns true if there is an anchor set, and false if not anchor is set.

horizontalUnitScrollback to summary
private void horizontalUnitScroll(boolean right)
isControlEditableback to summary
protected abstract boolean isControlEditable()

Returns true if the control (i.e. TableView / TreeTableView) is editable

isRTLback to summary
protected boolean isRTL()
mousePressedback to summary
public void mousePressed(MouseEvent e)
resetSelectionHistoryback to summary
private void resetSelectionHistory()
scrollDownback to summary
protected void scrollDown()
scrollUpback to summary
protected void scrollUp()
selectAllback to summary
protected void selectAll()
selectAllPageDownback to summary
protected void selectAllPageDown()
selectAllPageUpback to summary
protected void selectAllPageUp()
selectAllToFirstRowback to summary
protected void selectAllToFirstRow()
selectAllToFocusback to summary
protected void selectAllToFocus(boolean setAnchorToFocusIndex)
selectAllToLastRowback to summary
protected void selectAllToLastRow()
selectCellback to summary
protected void selectCell(int rowDiff, int columnDiff)
selectFirstRowback to summary
protected void selectFirstRow()
selectLastRowback to summary
protected void selectLastRow()
selectLeftCellback to summary
protected void selectLeftCell()
selectNextRowback to summary
protected void selectNextRow()
selectPreviousRowback to summary
protected void selectPreviousRow()
selectRightCellback to summary
protected void selectRightCell()
setAnchorback to summary
protected void setAnchor(TablePositionBase<TC extends TableColumnBase<S, T>> tp)

Call to record the current anchor position

setAnchorback to summary
protected void setAnchor(int row, TableColumnBase<S, T> col)

* Public API * *

setOnFocusLeftCellback to summary
public void setOnFocusLeftCell(Runnable r)
setOnFocusNextRowback to summary
public void setOnFocusNextRow(Runnable r)
setOnFocusPreviousRowback to summary
public void setOnFocusPreviousRow(Runnable r)
setOnFocusRightCellback to summary
public void setOnFocusRightCell(Runnable r)
setOnHorizontalUnitScrollback to summary
public void setOnHorizontalUnitScroll(Consumer<Boolean> f)
setOnMoveToFirstCellback to summary
public void setOnMoveToFirstCell(Runnable r)
setOnMoveToLastCellback to summary
public void setOnMoveToLastCell(Runnable r)
setOnScrollPageDownback to summary
public void setOnScrollPageDown(Callback<Boolean, Integer> c)
setOnScrollPageUpback to summary
public void setOnScrollPageUp(Callback<Boolean, Integer> c)
setOnSelectLeftCellback to summary
public void setOnSelectLeftCell(Runnable r)
setOnSelectNextRowback to summary
public void setOnSelectNextRow(Runnable r)
setOnSelectPreviousRowback to summary
public void setOnSelectPreviousRow(Runnable r)
setOnSelectRightCellback to summary
public void setOnSelectRightCell(Runnable r)
setOnVerticalUnitScrollback to summary
public void setOnVerticalUnitScroll(Consumer<Boolean> f)
setSelectionPathDeviatedback to summary
private void setSelectionPathDeviated(boolean selectionPathDeviated)

* Private implementation * *

toggleFocusOwnerSelectionback to summary
protected void toggleFocusOwnerSelection()
updateCellHorizontalSelectionback to summary
protected void updateCellHorizontalSelection(int delta, Runnable defaultAction)
updateCellVerticalSelectionback to summary
protected void updateCellVerticalSelection(int delta, Runnable defaultAction)
updateRowSelectionback to summary
protected void updateRowSelection(int delta)
verticalUnitScrollback to summary
private void verticalUnitScroll(boolean down)