Class RowGroupReorderCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.group.performance.command.RowGroupReorderCommand
- All Implemented Interfaces:
ILayerCommand
Command to trigger reordering of a row group.
The command does not inherit the RowReorderCommand as then it would be consumed first by the RowReorderLayer in the body layer stack and would not come to the row header layer stack.
- Since:
- 1.6
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClone constructor.RowGroupReorderCommand(ILayer layer, int level, int fromRowPosition, int toRowPosition) RowGroupReorderCommand(ILayer layer, int level, int fromRowPosition, int toRowPosition, boolean performConversion) -
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.intintgetLevel()intboolean
-
Constructor Details
-
RowGroupReorderCommand
- Parameters:
layer- The layer to which the positions match.level- The group level on which the group reorder should be performed.fromRowPosition- The row position of the group that should be reordered.toRowPosition- The row position to which the reorder should be performed.
-
RowGroupReorderCommand
public RowGroupReorderCommand(ILayer layer, int level, int fromRowPosition, int toRowPosition, boolean performConversion) - Parameters:
layer- The layer to which the positions match.level- The group level on which the group reorder should be performed.fromRowPosition- The row position of the group that should be reordered.toRowPosition- The row position to which the reorder should be performed.performConversion- Configure whether a position conversion should be performed or not. If this value is set tofalseconvertToTargetLayer(ILayer)does not perform any logic and will always returntrue. In that case layer has to be the positionLayer of the ColumnGroupHeaderLayer, typically the SelectionLayer. Otherwise this command will not work correctly.
-
RowGroupReorderCommand
Clone constructor.- Parameters:
command- The command to clone.
-
-
Method Details
-
getLevel
public int getLevel()- Returns:
- The group level on which the group reorder should be performed.
-
getFromRowPosition
public int getFromRowPosition()- Returns:
- The row position of the group that should be reordered.
-
getToRowPosition
public int getToRowPosition()- Returns:
- The row position to which the reorder should be performed.
-
isReorderToTopEdge
public boolean isReorderToTopEdge()- Returns:
trueif the reorder should be performed to the top edge of the to position,falseif the reorder should happen to the bottom edge, e.g. on reordering to the end of the table.
-
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- 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.- Specified by:
cloneCommandin interfaceILayerCommand- Returns:
- a cloned instance of the command
- See Also:
-