use of org.kie.workbench.common.dmn.client.commands.factory.canvas.SetComponentWidthCommand in project kie-wb-common by kiegroup.
the class BaseGrid method registerColumnResizeCompleted.
/**
* The width of a column is updated dynamically during a resize operation. This registers a {@link Command} on
* the {@link SessionCommandManager} at the point the column resize operation completed to support "undo'ing"
* column resize operations.
* @param uiColumn The column being resized.
* @param uiColumnInitialWidth The column's initial width when the resize operation started.
*/
public void registerColumnResizeCompleted(final DMNGridColumn uiColumn, final double uiColumnInitialWidth) {
getCanvasHandler().ifPresent(canvasHandler -> {
final AbstractCanvasHandler abstractCanvasHandler = (AbstractCanvasHandler) canvasHandler;
final CanvasCommand<AbstractCanvasHandler> command = new SetComponentWidthCommand(uiColumn, uiColumnInitialWidth, uiColumn.getWidth());
sessionCommandManager.execute(abstractCanvasHandler, command);
});
}
Aggregations