Class FreezeHelper
java.lang.Object
org.eclipse.nebula.widgets.nattable.freeze.FreezeHelper
Helper class to deal with freeze and unfreeze of a NatTable.
This class is intended for internal use only. Consider using the appropriate commands instead of using this helper directly.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidfreeze(FreezeLayer freezeLayer, ViewportLayer viewportLayer, PositionCoordinate topLeftPosition, PositionCoordinate bottomRightPosition) Freezes the grid at the specified position.static intgetTopLeftColumnPosition(ViewportLayer viewportLayer) Helper method to retrieve the top left column position on freezing a column.static voidresetViewport(FreezeLayer freezeLayer, ViewportLayer viewportLayer) Helper method to reset the origin coordinates of the viewport.static voidunfreeze(FreezeLayer freezeLayer, ViewportLayer viewportLayer) Unfreezes the grid at the specified position.
-
Method Details
-
freeze
public static void freeze(FreezeLayer freezeLayer, ViewportLayer viewportLayer, PositionCoordinate topLeftPosition, PositionCoordinate bottomRightPosition) Freezes the grid at the specified position. This method is for internal use. Consider using the appropriate commands on the NatTable instead to freeze the grid programmatically.- Parameters:
freezeLayer- The FreezeLayer of the grid to perform the freeze action.viewportLayer- The ViewportLayer of the grid to perform the freeze action.topLeftPosition- The top left position of the freeze areabottomRightPosition- The bottom right position of the freeze area- See Also:
-
unfreeze
Unfreezes the grid at the specified position. This method is for internal use. Consider using the appropriate command on the NatTable instead to unfreeze the grid programmatically.- Parameters:
freezeLayer- The FreezeLayer of the grid to perform the freeze action.viewportLayer- The ViewportLayer of the grid to perform the freeze action.- See Also:
-
resetViewport
Helper method to reset the origin coordinates of the viewport. Is needed to perform an unfreeze or to override a current frozen state.- Parameters:
freezeLayer- The FreezeLayer of the grid to perform the freeze action.viewportLayer- The ViewportLayer of the grid to perform the freeze action.
-
getTopLeftColumnPosition
Helper method to retrieve the top left column position on freezing a column. Will get the column position on the underlying layer of the ViewportLayer based on the origin x coordinate. For the ResizeColumnHideShowLayer a special handling is performed to get the left most column position in case columns to the left are hidden.- Parameters:
viewportLayer- The ViewportLayer needed for calculating the top left column position.- Returns:
- The column position that should be used for the top left coordinate.
- Since:
- 1.6
-