Class FillHandlePasteCommandHandler

    • Constructor Detail

      • FillHandlePasteCommandHandler

        public FillHandlePasteCommandHandler​(SelectionLayer selectionLayer,
                                             InternalCellClipboard clipboard)
        Parameters:
        selectionLayer - The SelectionLayer needed to determine the fill handle region and perform the update command.
        clipboard - The internal clipboard that carries the cells for the copy & paste operation triggered by using the fill handle.
    • Method Detail

      • getPasteValue

        protected Object getPasteValue​(ILayerCell cell,
                                       FillHandlePasteCommand command,
                                       int toColumn,
                                       int toRow)
        Returns the value from the given cell that should be pasted to the given position.
        Parameters:
        cell - The cell that is copied.
        command - The command that contains the necessary information for the paste operation.
        toColumn - The column position of the cell to which the value should be pasted.
        toRow - The row position of the cell to which the value should be pasted.
        Returns:
        The value that should be set to the given position.
      • getRowDiff

        protected int getRowDiff​(ILayerCell currentCell,
                                 int toRow)
        Calculate the row difference between the cell row index and the row index of the cell to copy to.
        Parameters:
        currentCell - The current cell to manage.
        toRow - The row index of the cell to copy to.
        Returns:
        The difference as integer.
      • getColumnDiff

        protected int getColumnDiff​(ILayerCell currentCell,
                                    int toColumn)
        Calculate the column difference between the cell column index and the column index of the cell to copy to.
        Parameters:
        currentCell - The current cell to manage.
        toColumn - The column index of the cell to copy to.
        Returns:
        The difference as integer.
      • getCastValue

        protected Number getCastValue​(int diff,
                                      Class<?> type)