Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void discontinuousSelectNextColumn()  
      protected void discontinuousSelectNextRow()  
      protected void discontinuousSelectPreviousColumn()  
      protected void discontinuousSelectPreviousRow()  
      protected void focusLeftCell()  
      protected void focusNextRow()  
      protected void focusPreviousRow()  
      protected void focusRightCell()  
      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