Class FormulaPasteDataCommandHandler
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler<PasteDataCommand>
org.eclipse.nebula.widgets.nattable.copy.command.InternalPasteDataCommandHandler
org.eclipse.nebula.widgets.nattable.formula.command.FormulaPasteDataCommandHandler
- All Implemented Interfaces:
ILayerCommandHandler<PasteDataCommand>
ILayerCommandHandler
for handling PasteDataCommand
s. Uses the
InternalCellClipboard
and transforms formulas to match the new
position.- Since:
- 1.4
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.copy.command.InternalPasteDataCommandHandler
clipboard, selectionLayer
-
Constructor Summary
ConstructorDescriptionFormulaPasteDataCommandHandler
(SelectionLayer selectionLayer, InternalCellClipboard clipboard, FormulaDataProvider dataProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
getPasteValue
(ILayerCell cell, int pasteColumn, int pasteRow) Returns the value that should be pasted.protected void
Perform actions after pasting values from the internal clipboard.protected void
Perform actions prior pasting values from the internal clipboard.Methods inherited from class org.eclipse.nebula.widgets.nattable.copy.command.InternalPasteDataCommandHandler
doCommand, getCommandClass, getPasteLayer, isPasteAllowed
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler
doCommand
-
Field Details
-
dataProvider
-
-
Constructor Details
-
FormulaPasteDataCommandHandler
public FormulaPasteDataCommandHandler(SelectionLayer selectionLayer, InternalCellClipboard clipboard, FormulaDataProvider dataProvider) - Parameters:
selectionLayer
-SelectionLayer
that is needed to determine the position to paste the values to.dataProvider
- theFormulaDataProvider
that is needed to perform formula related functions on pasting data.clipboard
- TheInternalCellClipboard
that contains the values that should be pasted.
-
-
Method Details
-
getPasteValue
Description copied from class:InternalPasteDataCommandHandler
Returns the value that should be pasted.- Overrides:
getPasteValue
in classInternalPasteDataCommandHandler
- Parameters:
cell
- TheILayerCell
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.
-
preInternalPaste
protected void preInternalPaste()Description copied from class:InternalPasteDataCommandHandler
Perform actions prior pasting values from the internal clipboard. E.g. disabling formula evaluation.- Overrides:
preInternalPaste
in classInternalPasteDataCommandHandler
-
postInternalPaste
protected void postInternalPaste()Description copied from class:InternalPasteDataCommandHandler
Perform actions after pasting values from the internal clipboard. E.g. enabling formula evaluation.- Overrides:
postInternalPaste
in classInternalPasteDataCommandHandler
-