use of net.sourceforge.nattable.freeze.event.FreezeEvent in project translationstudio8 by heartsome.
the class FreezeCommandHandler method handleFreezeCommand.
protected void handleFreezeCommand(IFreezeCoordinatesProvider coordinatesProvider) {
// if not already frozen
if (freezeLayer.getColumnCount() == 0 && freezeLayer.getRowCount() == 0) {
final PositionCoordinate topLeftPosition = coordinatesProvider.getTopLeftPosition();
final PositionCoordinate bottomRightPosition = coordinatesProvider.getBottomRightPosition();
freezeLayer.setTopLeftPosition(topLeftPosition.columnPosition, topLeftPosition.rowPosition);
freezeLayer.setBottomRightPosition(bottomRightPosition.columnPosition, bottomRightPosition.rowPosition);
viewportLayer.setMinimumOriginPosition(bottomRightPosition.columnPosition + 1, bottomRightPosition.rowPosition + 1);
viewportLayer.fireLayerEvent(new FreezeEvent(viewportLayer));
}
}
Aggregations