Class FormulaFillHandlePasteCommandHandler
java.lang.Object
org.eclipse.nebula.widgets.nattable.fillhandle.command.FillHandlePasteCommandHandler
org.eclipse.nebula.widgets.nattable.formula.command.FormulaFillHandlePasteCommandHandler
- All Implemented Interfaces:
ILayerCommandHandler<FillHandlePasteCommand>
Specialized command handler for
FillHandlePasteCommands that is able
to deal with formulas.- Since:
- 1.4
-
Field Summary
FieldsFields inherited from class org.eclipse.nebula.widgets.nattable.fillhandle.command.FillHandlePasteCommandHandler
clipboard, selectionLayer -
Constructor Summary
ConstructorsConstructorDescriptionFormulaFillHandlePasteCommandHandler(SelectionLayer selectionLayer, InternalCellClipboard clipboard, FormulaDataProvider dataProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected BigDecimalbooleandoCommand(ILayer targetLayer, FillHandlePasteCommand command) protected ObjectgetPasteValue(ILayerCell cell, FillHandlePasteCommand command, int toColumn, int toRow) Returns the value from the given cell that should be pasted to the given position.Methods inherited from class org.eclipse.nebula.widgets.nattable.fillhandle.command.FillHandlePasteCommandHandler
calculateBigIntegerDiff, calculateByteDiff, calculateDateDiff, calculateDoubleDiff, calculateFloatDiff, calculateHorizontalDiff, calculateIntDiff, calculateLongDiff, calculateShortDiff, calculateVerticalDiff, getCastValue, getColumnDiff, getCommandClass, getIncrementDateField, getRowDiff
-
Field Details
-
dataProvider
-
-
Constructor Details
-
FormulaFillHandlePasteCommandHandler
public FormulaFillHandlePasteCommandHandler(SelectionLayer selectionLayer, InternalCellClipboard clipboard, FormulaDataProvider dataProvider) - Parameters:
selectionLayer- TheSelectionLayerneeded to determine the fill handle region and perform the update command.clipboard- The internal clipboard that carries the cells for the copy & paste operation triggered by using the fill handle.dataProvider- TheFormulaDataProviderthat is needed to copy & paste formulas.
-
-
Method Details
-
doCommand
- Specified by:
doCommandin interfaceILayerCommandHandler<FillHandlePasteCommand>- Overrides:
doCommandin classFillHandlePasteCommandHandler- Parameters:
targetLayer- the target layercommand- the command- Returns:
- true if the command has been handled, false otherwise
-
getPasteValue
protected Object getPasteValue(ILayerCell cell, FillHandlePasteCommand command, int toColumn, int toRow) Description copied from class:FillHandlePasteCommandHandlerReturns the value from the given cell that should be pasted to the given position.- Overrides:
getPasteValuein classFillHandlePasteCommandHandler- Parameters:
cell- The cell that is copied.command- The command that contains the necessary information for the paste operation.toColumn- The column position of the cell to which the value should be pasted.toRow- The row position of the cell to which the value should be pasted.- Returns:
- The value that should be set to the given position.
-
calculateBigDecimalDiff
- Overrides:
calculateBigDecimalDiffin classFillHandlePasteCommandHandler
-