Module org.controlsfx.controls
Package impl.org.controlsfx.spreadsheet
Class TableViewSpanSelectionModel
java.lang.Object
javafx.scene.control.SelectionModel<T>
javafx.scene.control.MultipleSelectionModel<T>
javafx.scene.control.TableSelectionModel<S>
javafx.scene.control.TableView.TableViewSelectionModel<ObservableList<SpreadsheetCell>>
impl.org.controlsfx.spreadsheet.TableViewSpanSelectionModel
public class TableViewSpanSelectionModel
extends TableView.TableViewSelectionModel<ObservableList<SpreadsheetCell>>
The Selection Model adapted for the SpreadsheetView regarding span.
-
Property Summary
Properties inherited from class javafx.scene.control.TableSelectionModel
cellSelectionEnabledProperties inherited from class javafx.scene.control.MultipleSelectionModel
selectionModeProperties inherited from class javafx.scene.control.SelectionModel
selectedIndex, selectedItem -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTableViewSpanSelectionModel(SpreadsheetView spreadsheetView, SpreadsheetGridView cellsView) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidclearAndSelect(int arg0) voidclearAndSelect(int row, TableColumn<ObservableList<SpreadsheetCell>, ?> column) voidvoidclearSelection(int arg0) voidclearSelection(int row, TableColumn<ObservableList<SpreadsheetCell>, ?> column) FIXME I don't understand why TablePosition is not parameterized in the API..booleanisEmpty()booleanisSelected(int arg0) booleanisSelected(int row, TableColumn<ObservableList<SpreadsheetCell>, ?> column) isSelectedRange(int row, TableColumn<ObservableList<SpreadsheetCell>, ?> column, int col) Return the tablePosition of a selected cell inside a spanned cell if any.voidselect(int arg0) voidselect(int row, TableColumn<ObservableList<SpreadsheetCell>, ?> column) voidselect(ObservableList<SpreadsheetCell> arg0) voidvoidvoidvoidvoidselectIndices(int arg0, int... arg1) voidvoidvoidvoidvoidselectRange(int minRow, TableColumnBase<ObservableList<SpreadsheetCell>, ?> minColumn, int maxRow, TableColumnBase<ObservableList<SpreadsheetCell>, ?> maxColumn) voidvoidverifySelectedCells(List<Pair<Integer, Integer>> selectedCells) When we set a new grid, we need to update the selected Cells because otherwise we will end up with TablePosition which have "-1" as their column number.Methods inherited from class javafx.scene.control.TableView.TableViewSelectionModel
clearAndSelect, clearSelection, focus, getFocusedIndex, getItemCount, getModelItem, getTableModel, getTableView, isSelected, selectMethods inherited from class javafx.scene.control.TableSelectionModel
cellSelectionEnabledProperty, isCellSelectionEnabled, setCellSelectionEnabledMethods inherited from class javafx.scene.control.MultipleSelectionModel
getSelectionMode, selectionModeProperty, selectRange, setSelectionModeMethods inherited from class javafx.scene.control.SelectionModel
getSelectedIndex, getSelectedItem, selectedIndexProperty, selectedItemProperty, setSelectedIndex, setSelectedItem
-
Field Details
-
direction
-
-
Constructor Details
-
TableViewSpanSelectionModel
Constructor- Parameters:
spreadsheetView-cellsView-
-
-
Method Details
-
select
- Specified by:
selectin classTableView.TableViewSelectionModel<ObservableList<SpreadsheetCell>>
-
clearSelection
- Specified by:
clearSelectionin classTableView.TableViewSelectionModel<ObservableList<SpreadsheetCell>>
-
verifySelectedCells
When we set a new grid, we need to update the selected Cells because otherwise we will end up with TablePosition which have "-1" as their column number. So we need to verify that the old selected cells are still selectable and select them.- Parameters:
selectedCells-
-
selectRange
public void selectRange(int minRow, TableColumnBase<ObservableList<SpreadsheetCell>, ?> minColumn, int maxRow, TableColumnBase<ObservableList<SpreadsheetCell>, ?> maxColumn) - Overrides:
selectRangein classTableView.TableViewSelectionModel<ObservableList<SpreadsheetCell>>
-
selectAll
public void selectAll() -
isSelected
- Specified by:
isSelectedin classTableView.TableViewSelectionModel<ObservableList<SpreadsheetCell>>
-
isSelectedRange
public List<TablePosition<ObservableList<SpreadsheetCell>,?>> isSelectedRange(int row, TableColumn<ObservableList<SpreadsheetCell>, ?> column, int col) Return the tablePosition of a selected cell inside a spanned cell if any.- Parameters:
row-column-col-- Returns:
-
clearAndSelect
- Specified by:
clearAndSelectin classTableView.TableViewSelectionModel<ObservableList<SpreadsheetCell>>
-
getSelectedCells
FIXME I don't understand why TablePosition is not parameterized in the API..- Specified by:
getSelectedCellsin classTableView.TableViewSelectionModel<ObservableList<SpreadsheetCell>>- Returns:
-
selectAboveCell
public void selectAboveCell()- Specified by:
selectAboveCellin classTableSelectionModel<ObservableList<SpreadsheetCell>>
-
selectBelowCell
public void selectBelowCell()- Specified by:
selectBelowCellin classTableSelectionModel<ObservableList<SpreadsheetCell>>
-
selectLeftCell
public void selectLeftCell()- Specified by:
selectLeftCellin classTableSelectionModel<ObservableList<SpreadsheetCell>>
-
selectRightCell
public void selectRightCell()- Specified by:
selectRightCellin classTableSelectionModel<ObservableList<SpreadsheetCell>>
-
clearSelection
public void clearSelection() -
getSelectedIndices
- Specified by:
getSelectedIndicesin classMultipleSelectionModel<T extends Object>
-
getSelectedItems
- Specified by:
getSelectedItemsin classMultipleSelectionModel<T extends Object>
-
clearAndSelect
public void clearAndSelect(int arg0) - Specified by:
clearAndSelectin classSelectionModel<T extends Object>
-
select
public void select(int arg0) - Specified by:
selectin classSelectionModel<T extends Object>
-
select
- Specified by:
selectin classSelectionModel<T extends Object>
-
selectIndices
public void selectIndices(int arg0, int... arg1) - Specified by:
selectIndicesin classMultipleSelectionModel<T extends Object>
-
selectFirst
public void selectFirst()- Specified by:
selectFirstin classMultipleSelectionModel<T extends Object>
-
selectLast
public void selectLast()- Specified by:
selectLastin classMultipleSelectionModel<T extends Object>
-
clearSelection
public void clearSelection(int arg0) - Specified by:
clearSelectionin classSelectionModel<T extends Object>
-
isSelected
public boolean isSelected(int arg0) - Specified by:
isSelectedin classSelectionModel<T extends Object>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin classSelectionModel<T extends Object>
-
selectPrevious
public void selectPrevious()- Specified by:
selectPreviousin classSelectionModel<T extends Object>
-
selectNext
public void selectNext()- Specified by:
selectNextin classSelectionModel<T extends Object>
-