Class GridViewBehavior

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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    void
    selectCell(int rowDiff, int columnDiff)
     
    protected void
    updateCellHorizontalSelection(int delta, Runnable defaultAction)
     
    protected void
    updateCellVerticalSelection(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, selectAllToFocus

    Methods 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, updateRowSelection

    Methods inherited from class com.sun.javafx.scene.control.behavior.BehaviorBase

    addDefaultChildMap, addDefaultMapping, addDefaultMapping, addDefaultMapping, createInputMap, getNode, removeMapping

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait