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 PasteDataCommands. Uses the
InternalCellClipboard and transforms formulas to match the new
position.- Since:
- 1.4
-
Field Summary
FieldsFields inherited from class org.eclipse.nebula.widgets.nattable.copy.command.InternalPasteDataCommandHandler
clipboard, selectionLayer -
Constructor Summary
ConstructorsConstructorDescriptionFormulaPasteDataCommandHandler(SelectionLayer selectionLayer, InternalCellClipboard clipboard, FormulaDataProvider dataProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgetPasteValue(ILayerCell cell, int pasteColumn, int pasteRow) Returns the value that should be pasted.protected voidPerform actions after pasting values from the internal clipboard.protected voidPerform actions prior pasting values from the internal clipboard.Methods inherited from class org.eclipse.nebula.widgets.nattable.copy.command.InternalPasteDataCommandHandler
doCommand, getCommandClass, getPasteLayer, isPasteAllowedMethods 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-SelectionLayerthat is needed to determine the position to paste the values to.dataProvider- theFormulaDataProviderthat is needed to perform formula related functions on pasting data.clipboard- TheInternalCellClipboardthat contains the values that should be pasted.
-
-
Method Details
-
getPasteValue
Description copied from class:InternalPasteDataCommandHandlerReturns the value that should be pasted.- Overrides:
getPasteValuein classInternalPasteDataCommandHandler- Parameters:
cell- TheILayerCellfrom 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:InternalPasteDataCommandHandlerPerform actions prior pasting values from the internal clipboard. E.g. disabling formula evaluation.- Overrides:
preInternalPastein classInternalPasteDataCommandHandler
-
postInternalPaste
protected void postInternalPaste()Description copied from class:InternalPasteDataCommandHandlerPerform actions after pasting values from the internal clipboard. E.g. enabling formula evaluation.- Overrides:
postInternalPastein classInternalPasteDataCommandHandler
-