Class ColumnResizeCommand

java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractColumnCommand
org.eclipse.nebula.widgets.nattable.resize.command.ColumnResizeCommand
All Implemented Interfaces:
ILayerCommand

public class ColumnResizeCommand extends AbstractColumnCommand
Command to trigger column resizing.
  • Constructor Details

    • ColumnResizeCommand

      public ColumnResizeCommand(ILayer layer, int columnPosition, int newWidth)
      Create a ColumnResizeCommand to resize the column at the given position to the given width. The given column width will be taken as is without scaling.
      Parameters:
      layer - The ILayer to which the column position correlates.
      columnPosition - The position of the column that should be resized.
      newWidth - The new width that should be applied to the given column.
    • ColumnResizeCommand

      public ColumnResizeCommand(ILayer layer, int columnPosition, int newWidth, boolean downScale)
      Create a ColumnResizeCommand to resize the column at the given position to the given width.
      Parameters:
      layer - The ILayer to which the column position correlates.
      columnPosition - The position of the column that should be resized.
      newWidth - The new width that should be applied to the given column.
      downScale - true if the newWidth value should be down scaled according to the scaling level, false if the value should be taken as is.
      Since:
      1.6
    • ColumnResizeCommand

      protected ColumnResizeCommand(ColumnResizeCommand command)
      Constructor used to clone the given command.
      Parameters:
      command - The command to clone.
  • Method Details

    • getNewColumnWidth

      public int getNewColumnWidth()
      Returns:
      The new width value that should be applied.
    • downScaleValue

      public boolean downScaleValue()
      Returns:
      true if the newWidth value should be down scaled according to the scaling level, false if the value should be taken as is.
      Since:
      1.6
    • cloneCommand

      public ColumnResizeCommand cloneCommand()
      Description copied from interface: ILayerCommand
      Same semantics as Object.clone() Used to make a copies of the command if has to passed to different layer stacks.
      Returns:
      a cloned instance of the command
      See Also: