Class RowSpanningCopyDataCommandHandler

    • Constructor Detail

      • RowSpanningCopyDataCommandHandler

        public RowSpanningCopyDataCommandHandler​(SelectionLayer selectionLayer,
                                                 InternalCellClipboard clipboard)
        Creates an instance that only checks the SelectionLayer for data to add to the clipboard.
        Parameters:
        selectionLayer - The SelectionLayer within the NatTable. Can not be null.
        clipboard - The InternalCellClipboard that should be used for copy/paste operations within a NatTable instance.
      • RowSpanningCopyDataCommandHandler

        public RowSpanningCopyDataCommandHandler​(SelectionLayer selectionLayer,
                                                 ILayer columnHeaderLayer,
                                                 InternalCellClipboard clipboard)
        Creates an instance that checks the SelectionLayer and the column header layer if given for data to add to the clipboard.
        Parameters:
        selectionLayer - The SelectionLayer within the NatTable. Can not be null.
        columnHeaderLayer - The column header layer within the NatTable grid. Can be null.
        clipboard - The InternalCellClipboard that should be used for copy/paste operations within a NatTable instance.
    • Method Detail

      • assembleBody

        protected ILayerCell[] assembleBody​(int currentRowPosition)
        Collects and assembles the selected data per row position that should be copied to the clipboard. For cells with row spanning only the origin cell will be tracked.
        Overrides:
        assembleBody in class CopyDataCommandHandler
        Parameters:
        currentRowPosition - The row position of which the selected cells should be collected.
        Returns:
        An array containing the selected cells that should be copied to the clipboard.
      • preInternalCopy

        protected void preInternalCopy()
        Perform actions prior copying values to the internal clipboard. E.g. disabling formula evaluation.
      • postInternalCopy

        protected void postInternalCopy()
        Perform actions after copying values to the internal clipboard. E.g. enabling formula evaluation.