Class GroupMultiRowReorderCommand

    • Constructor Detail

      • GroupMultiRowReorderCommand

        public GroupMultiRowReorderCommand​(ILayer layer,
                                           List<Integer> fromRowPositions,
                                           int toRowPosition)
        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 - true if the reorder operation should be done on the top edge of the toRowPosition, false if it should be reordered to the bottom edge.
        Since:
        2.0
      • GroupMultiRowReorderCommand

        public GroupMultiRowReorderCommand​(ILayer layer,
                                           int[] fromRowPositions,
                                           int toRowPosition)
        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 - true if the reorder operation should be done on the top edge of the toRowPosition, false if it should be reordered to the bottom edge.
        Since:
        2.0
      • GroupMultiRowReorderCommand

        protected GroupMultiRowReorderCommand​(GroupMultiRowReorderCommand command)
        Clone constructor.
        Parameters:
        command - The command to clone.
    • Method Detail

      • convertToTargetLayer

        public boolean convertToTargetLayer​(ILayer targetLayer)
        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 interface ILayerCommand
        Overrides:
        convertToTargetLayer in class MultiRowReorderCommand
        Parameters:
        targetLayer - the target layer
        Returns:
        true if the command is valid after conversion, false if the command is no longer valid.
      • setGroupToTop

        public void setGroupToTop​(GroupModel.Group groupToTop)
        Parameters:
        groupToTop - The GroupModel.Group that 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

        public void setGroupToBottom​(GroupModel.Group groupToBottom)
        Parameters:
        groupToBottom - The GroupModel.Group that 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