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
FillHandlePasteCommand
s that is able
to deal with formulas.- Since:
- 1.4
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.fillhandle.command.FillHandlePasteCommandHandler
clipboard, selectionLayer
-
Constructor Summary
ConstructorDescriptionFormulaFillHandlePasteCommandHandler
(SelectionLayer selectionLayer, InternalCellClipboard clipboard, FormulaDataProvider dataProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected BigDecimal
boolean
doCommand
(ILayer targetLayer, FillHandlePasteCommand command) protected Object
getPasteValue
(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
- TheSelectionLayer
needed 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
- TheFormulaDataProvider
that is needed to copy & paste formulas.
-
-
Method Details
-
doCommand
- Specified by:
doCommand
in interfaceILayerCommandHandler<FillHandlePasteCommand>
- Overrides:
doCommand
in 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:FillHandlePasteCommandHandler
Returns the value from the given cell that should be pasted to the given position.- Overrides:
getPasteValue
in 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:
calculateBigDecimalDiff
in classFillHandlePasteCommandHandler
-