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>
public class FormulaFillHandlePasteCommandHandler extends FillHandlePasteCommandHandler
Specialized command handler forFillHandlePasteCommand
s that is able to deal with formulas.- Since:
- 1.4
-
-
Field Summary
Fields Modifier and Type Field Description protected FormulaDataProvider
dataProvider
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.fillhandle.command.FillHandlePasteCommandHandler
clipboard, selectionLayer
-
-
Constructor Summary
Constructors Constructor Description FormulaFillHandlePasteCommandHandler(SelectionLayer selectionLayer, InternalCellClipboard clipboard, FormulaDataProvider dataProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BigDecimal
calculateBigDecimalDiff(ILayerCell c1, ILayerCell c2)
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 Detail
-
dataProvider
protected FormulaDataProvider dataProvider
-
-
Constructor Detail
-
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 Detail
-
doCommand
public boolean doCommand(ILayer targetLayer, FillHandlePasteCommand command)
- 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
protected BigDecimal calculateBigDecimalDiff(ILayerCell c1, ILayerCell c2)
- Overrides:
calculateBigDecimalDiff
in classFillHandlePasteCommandHandler
-
-