Top Description Fields Constructors Methods
impl.org.controlsfx.spreadsheet

public Class GridViewBehavior

extends TableViewBehavior<ObservableList<SpreadsheetCell>>
Class Inheritance
Imports
com.sun.javafx.scene.control.behavior.TableViewBehavior, javafx.collections.ObservableList, javafx.scene.control.SelectionMode, .TableColumnBase, .TableFocusModel, .TablePositionBase, .TableSelectionModel, .TableView, javafx.util.Pair, org.controlsfx.control.spreadsheet.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

Modifier and TypeField and Description
private GridViewSkin

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
protected void
protected void
protected void
protected void
private void
discontinuousSelectVertical(boolean previous)

private int
findNextColumn(TablePositionBase<TC extends TableColumnBase<S, T>> focusedCell, SpreadsheetCell cell)

private int
findNextRow(TablePositionBase<TC extends TableColumnBase<S, T>> focusedCell, SpreadsheetCell cell)

private int
private int
private void
focusHorizontal(boolean previous)

protected void
protected void
protected void
protected void
private void
focusVertical(boolean previous)

private boolean
isEmpty(SpreadsheetCell cell)

Cell is empty if there's nothing in it or if we have a NaN instead of a proper Double.

public void
pack-priv void
protected void
protected void
Inherited from com.sun.javafx.scene.control.behavior.TableViewBehavior:
disposeeditCellgetFocusedCellgetFocusModelgetItemCountgetSelectedCellsgetSelectionModelgetTablePositiongetVisibleLeafColumngetVisibleLeafColumnsgetVisibleLeafIndexisControlEditableselectAllToFocus

Field Detail

skinback to summary
private GridViewSkin skin

Constructor Detail

GridViewBehaviorback to summary
public GridViewBehavior(TableView<ObservableList<SpreadsheetCell>> control)

Method Detail

discontinuousSelectHorizontalback to summary
private void discontinuousSelectHorizontal(boolean previous)
discontinuousSelectNextColumnback to summary
protected void discontinuousSelectNextColumn()

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.discontinuousSelectNextColumn.

Annotations
@Override
discontinuousSelectNextRowback to summary
protected void discontinuousSelectNextRow()

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.discontinuousSelectNextRow.

Annotations
@Override
discontinuousSelectPreviousColumnback to summary
protected void discontinuousSelectPreviousColumn()

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.discontinuousSelectPreviousColumn.

Annotations
@Override
discontinuousSelectPreviousRowback to summary
protected void discontinuousSelectPreviousRow()

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.discontinuousSelectPreviousRow.

Doc from com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.discontinuousSelectPreviousRow.

Discontinuous Selection *

Annotations
@Override
discontinuousSelectVerticalback to summary
private void discontinuousSelectVertical(boolean previous)
findNextColumnback to summary
private int findNextColumn(TablePositionBase<TC extends TableColumnBase<S, T>> focusedCell, SpreadsheetCell cell)
findNextRowback to summary
private int findNextRow(TablePositionBase<TC extends TableColumnBase<S, T>> focusedCell, SpreadsheetCell cell)
findPreviousColumnback to summary
private int findPreviousColumn(TablePositionBase<TC extends TableColumnBase<S, T>> focusedCell, SpreadsheetCell cell)
findPreviousRowback to summary
private int findPreviousRow(TablePositionBase<TC extends TableColumnBase<S, T>> focusedCell, SpreadsheetCell cell)
focusHorizontalback to summary
private void focusHorizontal(boolean previous)
focusLeftCellback to summary
protected void focusLeftCell()

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.focusLeftCell.

Annotations
@Override
focusNextRowback to summary
protected void focusNextRow()

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.focusNextRow.

Annotations
@Override
focusPreviousRowback to summary
protected void focusPreviousRow()

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.focusPreviousRow.

Annotations
@Override
focusRightCellback to summary
protected void focusRightCell()

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.focusRightCell.

Annotations
@Override
focusVerticalback to summary
private void focusVertical(boolean previous)
isEmptyback to summary
private boolean isEmpty(SpreadsheetCell cell)

Cell is empty if there's nothing in it or if we have a NaN instead of a proper Double.

selectCellback to summary
public void selectCell(int rowDiff, int columnDiff)

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.selectCell.

Annotations
@Override
setGridViewSkinback to summary
pack-priv void setGridViewSkin(GridViewSkin skin)
updateCellHorizontalSelectionback to summary
protected void updateCellHorizontalSelection(int delta, Runnable defaultAction)

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.updateCellHorizontalSelection.

Annotations
@Override
updateCellVerticalSelectionback to summary
protected void updateCellVerticalSelection(int delta, Runnable defaultAction)

Overrides com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.updateCellVerticalSelection.

Annotations
@Override