Class RowResizeCommand
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.command.AbstractRowCommand
-
- org.eclipse.nebula.widgets.nattable.resize.command.RowResizeCommand
-
- All Implemented Interfaces:
ILayerCommand
public class RowResizeCommand extends AbstractRowCommand
Command to trigger row resizing.
-
-
Constructor Summary
Constructors Modifier Constructor Description RowResizeCommand(ILayer layer, int rowPosition, int newHeight)
Create aRowResizeCommand
to resize the row at the given position to the given height.RowResizeCommand(ILayer layer, int rowPosition, int newHeight, boolean downScale)
Create aRowResizeCommand
to resize the row at the given position to the given height.protected
RowResizeCommand(RowResizeCommand command)
Constructor used to clone the given command.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RowResizeCommand
cloneCommand()
Same semantics asObject.clone()
Used to make a copies of the command if has to passed to different layer stacks.boolean
downScaleValue()
int
getNewHeight()
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractRowCommand
convertToTargetLayer, getLayer, getRowPosition, toString
-
-
-
-
Constructor Detail
-
RowResizeCommand
public RowResizeCommand(ILayer layer, int rowPosition, int newHeight)
Create aRowResizeCommand
to resize the row at the given position to the given height. The given row height will be taken as is without scaling.- Parameters:
layer
- TheILayer
to which the row position correlates.rowPosition
- The position of the row that should be resized.newHeight
- The new height that should be applied to the given row.
-
RowResizeCommand
public RowResizeCommand(ILayer layer, int rowPosition, int newHeight, boolean downScale)
Create aRowResizeCommand
to resize the row at the given position to the given height.- Parameters:
layer
- TheILayer
to which the row position correlates.rowPosition
- The position of the row that should be resized.newHeight
- The new height that should be applied to the given row.downScale
-true
if the newHeight value should be down scaled according to the scaling level,false
if the value should be taken as is.- Since:
- 1.6
-
RowResizeCommand
protected RowResizeCommand(RowResizeCommand command)
Constructor used to clone the given command.- Parameters:
command
- The command to clone.
-
-
Method Detail
-
getNewHeight
public int getNewHeight()
- Returns:
- The new height value that should be applied.
-
downScaleValue
public boolean downScaleValue()
- Returns:
true
if the newHeight value should be down scaled according to the scaling level,false
if the value should be taken as is.- Since:
- 1.6
-
cloneCommand
public RowResizeCommand 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)
-
-