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 Summary
Constructors Modifier Constructor Description ColumnResizeCommand(ILayer layer, int columnPosition, int newWidth)
Create aColumnResizeCommand
to resize the column at the given position to the given width.ColumnResizeCommand(ILayer layer, int columnPosition, int newWidth, boolean downScale)
Create aColumnResizeCommand
to resize the column at the given position to the given width.protected
ColumnResizeCommand(ColumnResizeCommand command)
Constructor used to clone the given command.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnResizeCommand
cloneCommand()
Same semantics asObject.clone()
Used to make a copies of the command if has to passed to different layer stacks.boolean
downScaleValue()
int
getNewColumnWidth()
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractColumnCommand
convertToTargetLayer, getColumnPosition, getLayer, toString
-
-
-
-
Constructor Detail
-
ColumnResizeCommand
public ColumnResizeCommand(ILayer layer, int columnPosition, int newWidth)
Create aColumnResizeCommand
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
- TheILayer
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 aColumnResizeCommand
to resize the column at the given position to the given width.- Parameters:
layer
- TheILayer
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 Detail
-
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 asObject.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:
GridLayer.doCommand(ILayerCommand)
-
-