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>
public class FormulaPasteDataCommandHandler extends InternalPasteDataCommandHandler
ILayerCommandHandler
for handlingPasteDataCommand
s. Uses theInternalCellClipboard
and transforms formulas to match the new position.- Since:
- 1.4
-
-
Field Summary
Fields Modifier and Type Field Description protected FormulaDataProvider
dataProvider
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.copy.command.InternalPasteDataCommandHandler
clipboard, selectionLayer
-
-
Constructor Summary
Constructors Constructor Description FormulaPasteDataCommandHandler(SelectionLayer selectionLayer, InternalCellClipboard clipboard, FormulaDataProvider dataProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
getPasteValue(ILayerCell cell, int pasteColumn, int pasteRow)
Returns the value that should be pasted.protected void
postInternalPaste()
Perform actions after pasting values from the internal clipboard.protected void
preInternalPaste()
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 Detail
-
dataProvider
protected FormulaDataProvider dataProvider
-
-
Constructor Detail
-
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 Detail
-
getPasteValue
protected Object getPasteValue(ILayerCell cell, int pasteColumn, int pasteRow)
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
-
-