Class MultiRowResizeCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractMultiRowCommand
org.eclipse.nebula.widgets.nattable.resize.command.MultiRowResizeCommand
- All Implemented Interfaces:
ILayerCommand
Command to trigger resizing of multiple rows.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionMultiRowResizeCommand(ILayer layer, int[] rowPositions, int commonRowHeight) Create aMultiRowResizeCommandto resize multiple rows, where each row is resized to the same height, e.g.MultiRowResizeCommand(ILayer layer, int[] rowPositions, int[] rowHeights) Create aMultiRowResizeCommandto resize multiple rows, where each row can be resized to a different size, e.g.MultiRowResizeCommand(ILayer layer, int[] rowPositions, int[] rowHeights, boolean downScale) Create aMultiRowResizeCommandto resize multiple rows, where each row can be resized to a different size, e.g.MultiRowResizeCommand(ILayer layer, int[] rowPositions, int commonRowHeight, boolean downScale) Create aMultiRowResizeCommandto resize multiple rows, where each row is resized to the same height, e.g.protectedConstructor used to clone the given command. -
Method Summary
Modifier and TypeMethodDescriptionSame semantics asObject.clone()Used to make a copies of the command if has to passed to different layer stacks.booleanconvertToTargetLayer(ILayer targetLayer) Convert the row/column coordinates the command might be carrying from the source layer to the destination (target) layer.booleanintintgetRowHeight(int rowPosition) Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractMultiRowCommand
getRowPositions, getRowPositionsArray, setRowPositions
-
Field Details
-
rowPositionToHeight
-
-
Constructor Details
-
MultiRowResizeCommand
Create aMultiRowResizeCommandto resize multiple rows, where each row is resized to the same height, e.g. during a drag resize. The given row height will be taken as is without scaling.- Parameters:
layer- TheILayerto which the row positions correlate.rowPositions- The positions of the rows that should be resized.commonRowHeight- The row height that should be applied to all given rows.
-
MultiRowResizeCommand
public MultiRowResizeCommand(ILayer layer, int[] rowPositions, int commonRowHeight, boolean downScale) Create aMultiRowResizeCommandto resize multiple rows, where each row is resized to the same height, e.g. during a drag resize.- Parameters:
layer- TheILayerto which the row positions correlate.rowPositions- The positions of the rows that should be resized.commonRowHeight- The row height that should be applied to all given rows.downScale-trueif the commonRowHeight value should be down scaled according to the scaling level,falseif the value should be taken as is.- Since:
- 1.6
-
MultiRowResizeCommand
Create aMultiRowResizeCommandto resize multiple rows, where each row can be resized to a different size, e.g. during auto resize. The given row heights will be taken as is without scaling.- Parameters:
layer- TheILayerto which the row positions correlate.rowPositions- The positions of the rows that should be resized.rowHeights- The new heights that should be applied to the given rows. The indexes in the arrays need to correlate.
-
MultiRowResizeCommand
Create aMultiRowResizeCommandto resize multiple rows, where each row can be resized to a different size, e.g. during auto resize.- Parameters:
layer- TheILayerto which the row positions correlate.rowPositions- The positions of the rows that should be resized.rowHeights- The new heights that should be applied to the given rows. The indexes in the arrays need to correlate.downScale-trueif the rowHeights values should be down scaled according to the scaling level,falseif the value should be taken as is.- Since:
- 1.6
-
MultiRowResizeCommand
Constructor used to clone the given command.- Parameters:
command- The command to clone.
-
-
Method Details
-
getCommonRowHeight
public int getCommonRowHeight()- Returns:
- The common row height if all rows should be resized to the same height, or -1 if the rows should be resized to different values.
-
getRowHeight
public int getRowHeight(int rowPosition) - Parameters:
rowPosition- The row position for which the new height is requested.- Returns:
- The new row height for the requested position.
-
downScaleValue
public boolean downScaleValue()- Returns:
trueif the row height value should be down scaled according to the scaling level,falseif the value should be taken as is.- Since:
- 1.6
-
convertToTargetLayer
Description copied from interface:ILayerCommandConvert the row/column coordinates the command might be carrying from the source layer to the destination (target) layer. If it is not possible to convert the command to the target layer, then this method will return false and the state of this command object will remain unchanged. Note: Commands should not be processed if they fail conversion.- Specified by:
convertToTargetLayerin interfaceILayerCommand- Overrides:
convertToTargetLayerin classAbstractMultiRowCommand- Parameters:
targetLayer- the target layer- Returns:
- true if the command is valid after conversion, false if the command is no longer valid.
-
cloneCommand
Description copied from interface:ILayerCommandSame 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:
-