APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.javafx.scene.control

public abstract Class SelectedCellsMap<T extends TablePositionBase<TC extends TableColumnBase<S, T>>>

extends Object
Class Inheritance
Imports
javafx.collections.FXCollections, .ListChangeListener, .ObservableList, javafx.collections.transformation.SortedList, javafx.scene.control.TablePositionBase, java.util.*

Implementation code used by the TableSelectionModel implementations. In short this code exists to speed up some common use cases which were incredibly slow in the old approach. The old approach essentially required a lot of iterating through the selectedCells list. The new approach is to keep this list for what it is good for (representing selection order primarily), and introduce a Map to speed up the slow parts - namely looking up whether a given row/column intersection is selected or not. Note that a map that contains an empty bitset is used to represent that the row is selected. Refer to JDK-8123472 for more information on this issue.

Field Summary

Modifier and TypeField and Description
private final Map<Integer, BitSet>
private final ObservableList<T>
private final ObservableList<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(T tp)

public void
addAll(Collection<T> cells)

public void
public T
get(int i)

public ObservableList<T>
public int
indexOf(T tp)

public abstract boolean
public boolean
public boolean
isSelected(int row, int columnIndex)

public void
remove(T tp)

public void
setAll(Collection<T> cells)

public int
size()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

selectedCellBitSetMapback to summary
private final Map<Integer, BitSet> selectedCellBitSetMap
selectedCellsback to summary
private final ObservableList<T> selectedCells
sortedSelectedCellsback to summary
private final ObservableList<T> sortedSelectedCells

Constructor Detail

SelectedCellsMapback to summary
public SelectedCellsMap(final ListChangeListener<T> listener)

Method Detail

addback to summary
public void add(T tp)
addAllback to summary
public void addAll(Collection<T> cells)
clearback to summary
public void clear()
getback to summary
public T get(int i)
getSelectedCellsback to summary
public ObservableList<T> getSelectedCells()
indexOfback to summary
public int indexOf(T tp)
isCellSelectionEnabledback to summary
public abstract boolean isCellSelectionEnabled()
isEmptyback to summary
public boolean isEmpty()
isSelectedback to summary
public boolean isSelected(int row, int columnIndex)
removeback to summary
public void remove(T tp)
setAllback to summary
public void setAll(Collection<T> cells)
sizeback to summary
public int size()