Class InternalPasteDataCommandHandler

    • Method Detail

      • isPasteAllowed

        protected boolean isPasteAllowed​(ILayerCell sourceCell,
                                         ILayerCell targetCell,
                                         IConfigRegistry configRegistry)
        Checks if the cell at the target coordinates supports the paste operation or not.

        Note: The coordinates need to be related to the SelectionLayer, otherwise the wrong cell will be used for the check.

        Parameters:
        sourceCell - The ILayerCell that is copied and should be pasted to the target cell.
        targetCell - The ILayerCell to which the content of the source cell should be pasted to.
        configRegistry - The IConfigRegistry needed to access the configuration values.
        Returns:
        true if the cell supports the paste operation, false if not
        Since:
        1.6
      • getPasteValue

        protected Object getPasteValue​(ILayerCell cell,
                                       int pasteColumn,
                                       int pasteRow)
        Returns the value that should be pasted.
        Parameters:
        cell - The ILayerCell from which to retrieve the value to paste from.
        pasteColumn - The column position of the cell to paste to.
        pasteRow - The row position of the cell to paste to.
        Returns:
        The value that should be pasted.
      • getPasteLayer

        public IUniqueIndexLayer getPasteLayer​(ILayerCell[][] copiedCells)
        Identifies the IUniqueIndexLayer from which the cells are copied.
        Parameters:
        copiedCells - The copied cells from the internal clipboard.
        Returns:
        The IUniqueIndexLayer if the copied cells are collected from a different layer, or the locally configured SelectionLayer in case there are no copied cells in the internal cell clipboard.
        Since:
        1.6
      • preInternalPaste

        protected void preInternalPaste()
        Perform actions prior pasting values from the internal clipboard. E.g. disabling formula evaluation.
      • postInternalPaste

        protected void postInternalPaste()
        Perform actions after pasting values from the internal clipboard. E.g. enabling formula evaluation.