Class GroupMultiColumnReorderCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.reorder.command.MultiColumnReorderCommand
org.eclipse.nebula.widgets.nattable.group.performance.command.GroupMultiColumnReorderCommand
- All Implemented Interfaces:
ILayerCommand
Specialization of the
MultiColumnReorderCommand
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.MultiColumnReorderCommand
toColumnPositionCoordinate
-
Constructor Summary
ModifierConstructorDescriptionprotected
Clone constructor.GroupMultiColumnReorderCommand
(ILayer layer, int[] fromColumnPositions, int toColumnPosition) GroupMultiColumnReorderCommand
(ILayer layer, int[] fromColumnPositions, int toColumnPosition, boolean reorderToLeftEdge) GroupMultiColumnReorderCommand
(ILayer layer, List<Integer> fromColumnPositions, int toColumnPosition) GroupMultiColumnReorderCommand
(ILayer layer, List<Integer> fromColumnPositions, int toColumnPosition, boolean reorderToLeftEdge) -
Method Summary
Modifier and TypeMethodDescriptionSame semantics asObject.clone()
Used to make a copies of the command if has to passed to different layer stacks.boolean
convertToTargetLayer
(ILayer targetLayer) Convert the row/column coordinates the command might be carrying from the source layer to the destination (target) layer.void
setGroupToLeft
(GroupModel.Group groupToLeft) void
setGroupToRight
(GroupModel.Group groupToRight) Methods inherited from class org.eclipse.nebula.widgets.nattable.reorder.command.MultiColumnReorderCommand
getFromColumnPositions, getFromColumnPositionsArray, getToColumnPosition, isReorderByIndex, isReorderToLeftEdge, setReorderByIndex, toggleCoordinateByEdge, updateFromColumnPositions, updateToColumnPosition
-
Constructor Details
-
GroupMultiColumnReorderCommand
public GroupMultiColumnReorderCommand(ILayer layer, List<Integer> fromColumnPositions, int toColumnPosition) - Parameters:
layer
- The layer to which the column positions match.fromColumnPositions
- The column positions to reorder.toColumnPosition
- The target column position to reorder to.- Since:
- 2.0
-
GroupMultiColumnReorderCommand
public GroupMultiColumnReorderCommand(ILayer layer, List<Integer> fromColumnPositions, int toColumnPosition, boolean reorderToLeftEdge) - Parameters:
layer
- The layer to which the column positions match.fromColumnPositions
- The column positions to reorder.toColumnPosition
- The target column position to reorder to.reorderToLeftEdge
-true
if the reorder operation should be done on the left edge of the toColumnPosition,false
if it should be reordered to the right edge.- Since:
- 2.0
-
GroupMultiColumnReorderCommand
public GroupMultiColumnReorderCommand(ILayer layer, int[] fromColumnPositions, int toColumnPosition) - Parameters:
layer
- The layer to which the column positions match.fromColumnPositions
- The column positions to reorder.toColumnPosition
- The target column position to reorder to.- Since:
- 2.0
-
GroupMultiColumnReorderCommand
public GroupMultiColumnReorderCommand(ILayer layer, int[] fromColumnPositions, int toColumnPosition, boolean reorderToLeftEdge) - Parameters:
layer
- The layer to which the column positions match.fromColumnPositions
- The column positions to reorder.toColumnPosition
- The target column position to reorder to.reorderToLeftEdge
-true
if the reorder operation should be done on the left edge of the toColumnPosition,false
if it should be reordered to the right edge.- Since:
- 2.0
-
GroupMultiColumnReorderCommand
Clone constructor.- Parameters:
command
- The command to clone.
-
-
Method Details
-
convertToTargetLayer
Description copied from interface:ILayerCommand
Convert 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:
convertToTargetLayer
in interfaceILayerCommand
- Overrides:
convertToTargetLayer
in classMultiColumnReorderCommand
- Parameters:
targetLayer
- the target layer- Returns:
- true if the command is valid after conversion, false if the command is no longer valid.
-
setGroupToLeft
- Parameters:
groupToLeft
- TheGroupModel.Group
that is left of the toColumnPosition. Needed to calculate the correct position to the right edge of a group in case of hidden columns.- Since:
- 2.0
-
setGroupToRight
- Parameters:
groupToRight
- TheGroupModel.Group
that is at the toColumnPosition. Needed to calculate the correct position to the left edge of a group in case of hidden columns.- Since:
- 2.0
-
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.- Specified by:
cloneCommand
in interfaceILayerCommand
- Overrides:
cloneCommand
in classMultiColumnReorderCommand
- Returns:
- a cloned instance of the command
- See Also:
-