java.lang.Object
com.sun.javafx.scene.control.behavior.BehaviorBase<C>
com.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<T>,T,TableColumn<T,?>>
com.sun.javafx.scene.control.behavior.TableViewBehavior<ObservableList<SpreadsheetCell>>
impl.org.controlsfx.spreadsheet.GridViewBehavior
public class GridViewBehavior
extends com.sun.javafx.scene.control.behavior.TableViewBehavior<ObservableList<SpreadsheetCell>>
This overrides
TableViewBehavior in order to modify the selection
behavior. The selection will basically work like Excel:
Selection will always be rectangles. So selection by SHIFT will produce a
rectangle extending your selection.
Pressing SHORTCUT with an arrow will on a cell will do:
- If the cell is empty, we go to the next (in the direction) non empty cell.
- If the cell is not empty, then we either go to the last non empty cell if
the next is not empty, or the first non empty cell if the next is empty.
This is meant to increase navigation on non empty cell in a Spreadsheet more
easily.
Pressing SHORTCUT and SHIFT together will behave as the ShortCut previously
explained but the selection will be extended instead of just selecting the
new cell.-
Field Summary
Fields inherited from class com.sun.javafx.scene.control.behavior.TableViewBehaviorBase
isShiftDown, isShortcutDown, selectedCellsListener, selectionChanging, weakSelectedCellsListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidvoidselectCell(int rowDiff, int columnDiff) protected voidupdateCellHorizontalSelection(int delta, Runnable defaultAction) protected voidupdateCellVerticalSelection(int delta, Runnable defaultAction) Methods inherited from class com.sun.javafx.scene.control.behavior.TableViewBehavior
dispose, editCell, getFocusedCell, getFocusModel, getItemCount, getSelectedCells, getSelectionModel, getTablePosition, getVisibleLeafColumn, getVisibleLeafColumns, getVisibleLeafIndex, isControlEditable, selectAllToFocusMethods inherited from class com.sun.javafx.scene.control.behavior.TableViewBehaviorBase
activate, alsoSelectLeftCell, alsoSelectNext, alsoSelectPrevious, alsoSelectRightCell, cancelEdit, clearSelection, clearSelectionOutsideRange, discontinuousSelectAllToFirstRow, discontinuousSelectAllToLastRow, discontinuousSelectPageDown, discontinuousSelectPageUp, focusFirstRow, focusLastRow, focusPageDown, focusPageUp, getAnchor, getColumn, getColumn, getInputMap, hasAnchor, isRTL, mousePressed, scrollDown, scrollUp, selectAll, selectAllPageDown, selectAllPageUp, selectAllToFirstRow, selectAllToLastRow, selectFirstRow, selectLastRow, selectLeftCell, selectNextRow, selectPreviousRow, selectRightCell, setAnchor, setAnchor, setOnFocusLeftCell, setOnFocusNextRow, setOnFocusPreviousRow, setOnFocusRightCell, setOnMoveToFirstCell, setOnMoveToLastCell, setOnScrollPageDown, setOnScrollPageUp, setOnSelectLeftCell, setOnSelectNextRow, setOnSelectPreviousRow, setOnSelectRightCell, toggleFocusOwnerSelection, updateRowSelectionMethods inherited from class com.sun.javafx.scene.control.behavior.BehaviorBase
addDefaultChildMap, addDefaultMapping, addDefaultMapping, addDefaultMapping, createInputMap, getNode, removeMapping
-
Constructor Details
-
GridViewBehavior
-
-
Method Details
-
updateCellVerticalSelection
- Overrides:
updateCellVerticalSelectionin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-
updateCellHorizontalSelection
- Overrides:
updateCellHorizontalSelectionin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-
focusPreviousRow
protected void focusPreviousRow()- Overrides:
focusPreviousRowin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-
focusNextRow
protected void focusNextRow()- Overrides:
focusNextRowin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-
focusLeftCell
protected void focusLeftCell()- Overrides:
focusLeftCellin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-
focusRightCell
protected void focusRightCell()- Overrides:
focusRightCellin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-
discontinuousSelectPreviousRow
protected void discontinuousSelectPreviousRow()- Overrides:
discontinuousSelectPreviousRowin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-
discontinuousSelectNextRow
protected void discontinuousSelectNextRow()- Overrides:
discontinuousSelectNextRowin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-
discontinuousSelectPreviousColumn
protected void discontinuousSelectPreviousColumn()- Overrides:
discontinuousSelectPreviousColumnin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-
discontinuousSelectNextColumn
protected void discontinuousSelectNextColumn()- Overrides:
discontinuousSelectNextColumnin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-
selectCell
public void selectCell(int rowDiff, int columnDiff) - Overrides:
selectCellin classcom.sun.javafx.scene.control.behavior.TableViewBehaviorBase<TableView<ObservableList<SpreadsheetCell>>,ObservableList<SpreadsheetCell>, TableColumn<ObservableList<SpreadsheetCell>, ?>>
-