Class FreezeSelectionStrategy
java.lang.Object
org.eclipse.nebula.widgets.nattable.freeze.command.FreezeSelectionStrategy
- All Implemented Interfaces:
IFreezeCoordinatesProvider
-
Constructor Summary
ConstructorsConstructorDescriptionFreezeSelectionStrategy(FreezeLayer freezeLayer, ViewportLayer viewportLayer, SelectionLayer selectionLayer) FreezeSelectionStrategy(FreezeLayer freezeLayer, ViewportLayer viewportLayer, SelectionLayer selectionLayer, boolean include) -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetUnderlyingColumnPosition(int columnPosition) Returns the column position to be used for the FreezeLayer position.protected intgetUnderlyingRowPosition(int rowPosition) Returns the row position to be used for the FreezeLayer position.
-
Constructor Details
-
FreezeSelectionStrategy
public FreezeSelectionStrategy(FreezeLayer freezeLayer, ViewportLayer viewportLayer, SelectionLayer selectionLayer) -
FreezeSelectionStrategy
public FreezeSelectionStrategy(FreezeLayer freezeLayer, ViewportLayer viewportLayer, SelectionLayer selectionLayer, boolean include) - Parameters:
freezeLayer- TheFreezeLayeron which the freeze state should be applied. Needed for coordinate definition.viewportLayer- TheViewportLayerneeded to handle the scrolled state.selectionLayer- TheSelectionLayerto identify the last selected cell position.include- Whether the last selected cell should be included in the freeze region or not. Include means the freeze borders will be to the right and bottom, while exclude means the freeze borders are to the left and top. Default isfalse.- Since:
- 1.6
-
-
Method Details
-
getTopLeftPosition
- Specified by:
getTopLeftPositionin interfaceIFreezeCoordinatesProvider
-
getBottomRightPosition
- Specified by:
getBottomRightPositionin interfaceIFreezeCoordinatesProvider
-
getUnderlyingColumnPosition
protected int getUnderlyingColumnPosition(int columnPosition) Returns the column position to be used for the FreezeLayer position. Typically no conversion is needed when the FreezeLayer is build on top of the SelectionLayer. But if there is a layer in between that adds a transformation (e.g. adding a column like the HierarchicalTreeLayer) the SelectionLayer based position needs to be converted.- Parameters:
columnPosition- The SelectionLayer based column position.- Returns:
- The column position based on the scrollable layer below the ViewportLayer.
- Since:
- 1.6
-
getUnderlyingRowPosition
protected int getUnderlyingRowPosition(int rowPosition) Returns the row position to be used for the FreezeLayer position. Typically no conversion is needed when the FreezeLayer is build on top of the SelectionLayer. But if there is a layer in between that adds a transformation the SelectionLayer based position needs to be converted.- Parameters:
rowPosition- The SelectionLayer based row position.- Returns:
- The row position based on the scrollable layer below the ViewportLayer.
- Since:
- 1.6
-