Interface CellKeyHandler<K>
- Type Parameters:
K
- The type of the key.
- All Known Implementing Classes:
IdIndexKeyHandler
,PointKeyHandler
public interface CellKeyHandler<K>
Implementations of this interface are intended to generate a key for a cell
identified via column and row index. It can also calculate the column and row
index from the key again.
- Since:
- 1.6
-
Method Summary
Modifier and TypeMethodDescriptionint
getColumnIndex
(K key) getKey
(int columnIndex, int rowIndex) Creates the cell key based on the given column index and row index.getKeyWithColumnUpdate
(K oldKey, int columnIndex) Creates a new cell key based on the given key with an updated column index.getKeyWithRowUpdate
(K oldKey, int rowIndex) Creates a new cell key based on the given key with an updated row index.int
getRowIndex
(K key) boolean
boolean
-
Method Details
-
getKey
Creates the cell key based on the given column index and row index.- Parameters:
columnIndex
- The column index of the cell whose key should be generated.rowIndex
- The row index of the cell whose key should be generated.- Returns:
- The key of the cell with the given indexes.
-
getKeyWithColumnUpdate
Creates a new cell key based on the given key with an updated column index.- Parameters:
oldKey
- The key that should be copied.columnIndex
- The column index that should be updated in the existing key.- Returns:
- The key of the cell with the previous row identifier and the updated column identifier.
-
getKeyWithRowUpdate
Creates a new cell key based on the given key with an updated row index.- Parameters:
oldKey
- The key that should be copied.rowIndex
- The row index that should be updated in the existing key.- Returns:
- The key of the cell with the previous column identifier and the updated row identifier.
-
getColumnIndex
- Parameters:
key
- The key from which the column index should be retrieved.- Returns:
- The column index for the cell key.
-
getRowIndex
- Parameters:
key
- The key from which the row index should be retrieved.- Returns:
- The row index for the cell key.
-
updateOnHorizontalStructuralChange
boolean updateOnHorizontalStructuralChange()- Returns:
true
if the keys created by this handler need to be updated on horizontal structural changes,false
if the keys update automatically.
-
updateOnVerticalStructuralChange
boolean updateOnVerticalStructuralChange()- Returns:
true
if the keys created by this handler need to be updated on vertical structural changes,false
if the keys update automatically.
-