Class GroupMultiRowReorderCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.reorder.command.MultiRowReorderCommand
org.eclipse.nebula.widgets.nattable.group.performance.command.GroupMultiRowReorderCommand
- All Implemented Interfaces:
ILayerCommand
Specialization of the
MultiRowReorderCommand that ensures on
conversion that the toPosition is between two groups.- Since:
- 1.6
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.reorder.command.MultiRowReorderCommand
toRowPositionCoordinate -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClone constructor.GroupMultiRowReorderCommand(ILayer layer, int[] fromRowPositions, int toRowPosition) GroupMultiRowReorderCommand(ILayer layer, int[] fromRowPositions, int toRowPosition, boolean reorderToTopEdge) GroupMultiRowReorderCommand(ILayer layer, List<Integer> fromRowPositions, int toRowPosition) GroupMultiRowReorderCommand(ILayer layer, List<Integer> fromRowPositions, int toRowPosition, boolean reorderToTopEdge) -
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.voidsetGroupToBottom(GroupModel.Group groupToBottom) voidsetGroupToTop(GroupModel.Group groupToTop) Methods inherited from class org.eclipse.nebula.widgets.nattable.reorder.command.MultiRowReorderCommand
getFromRowPositions, getFromRowPositionsArray, getToRowPosition, isReorderByIndex, isReorderToTopEdge, setReorderByIndex, toggleCoordinateByEdge, updateFromRowPositions, updateToRowPosition
-
Constructor Details
-
GroupMultiRowReorderCommand
- Parameters:
layer- The layer to which the row positions match.fromRowPositions- The row positions to reorder.toRowPosition- The target row position to reorder to.- Since:
- 2.0
-
GroupMultiRowReorderCommand
public GroupMultiRowReorderCommand(ILayer layer, List<Integer> fromRowPositions, int toRowPosition, boolean reorderToTopEdge) - Parameters:
layer- The layer to which the row positions match.fromRowPositions- The row positions to reorder.toRowPosition- The target row position to reorder to.reorderToTopEdge-trueif the reorder operation should be done on the top edge of the toRowPosition,falseif it should be reordered to the bottom edge.- Since:
- 2.0
-
GroupMultiRowReorderCommand
- Parameters:
layer- The layer to which the row positions match.fromRowPositions- The row positions to reorder.toRowPosition- The target row position to reorder to.- Since:
- 2.0
-
GroupMultiRowReorderCommand
public GroupMultiRowReorderCommand(ILayer layer, int[] fromRowPositions, int toRowPosition, boolean reorderToTopEdge) - Parameters:
layer- The layer to which the row positions match.fromRowPositions- The row positions to reorder.toRowPosition- The target row position to reorder to.reorderToTopEdge-trueif the reorder operation should be done on the top edge of the toRowPosition,falseif it should be reordered to the bottom edge.- Since:
- 2.0
-
GroupMultiRowReorderCommand
Clone constructor.- Parameters:
command- The command to clone.
-
-
Method Details
-
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 classMultiRowReorderCommand- Parameters:
targetLayer- the target layer- Returns:
- true if the command is valid after conversion, false if the command is no longer valid.
-
setGroupToTop
- Parameters:
groupToTop- TheGroupModel.Groupthat is on top of the toRowPosition. Needed to calculate the correct position to the bottom edge of a group in case of hidden rows.- Since:
- 2.0
-
setGroupToBottom
- Parameters:
groupToBottom- TheGroupModel.Groupthat is at the toRowPosition. Needed to calculate the correct position to the top edge of a group in case of hidden rows.- Since:
- 2.0
-
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- Overrides:
cloneCommandin classMultiRowReorderCommand- Returns:
- a cloned instance of the command
- See Also:
-