Class UpdateDataCommand
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.command.AbstractPositionCommand
-
- org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand
-
- All Implemented Interfaces:
ILayerCommand
public class UpdateDataCommand extends AbstractPositionCommand
Command that will trigger a data model update.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UpdateDataCommand(UpdateDataCommand command)
Create a newUpdateDataCommand
based on the specified instance.UpdateDataCommand(ILayer layer, int columnPosition, int rowPosition, Object newValue)
Create a newUpdateDataCommand
based on the specified information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpdateDataCommand
cloneCommand()
Same semantics asObject.clone()
Used to make a copies of the command if has to passed to different layer stacks.Object
getNewValue()
String
toString()
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractPositionCommand
convertToTargetLayer, getColumnPosition, getLayer, getRowPosition
-
-
-
-
Constructor Detail
-
UpdateDataCommand
public UpdateDataCommand(ILayer layer, int columnPosition, int rowPosition, Object newValue)
Create a newUpdateDataCommand
based on the specified information.- Parameters:
layer
- TheILayer
to which the columnPosition and rowPosition are resolved to. This is needed to support conversion of column and row positions from this layer to NatTable coordinates, which may be different e.g. in case of grid composition.columnPosition
- The column position of the value to update.rowPosition
- The row position of the value to update.newValue
- The value to update the data model value to.
-
UpdateDataCommand
protected UpdateDataCommand(UpdateDataCommand command)
Create a newUpdateDataCommand
based on the specified instance. Mainly needed for cloning purposes.- Parameters:
command
- The command to create a new instance from.
-
-
Method Detail
-
getNewValue
public Object getNewValue()
- Returns:
- The value to update the data model to.
-
cloneCommand
public UpdateDataCommand cloneCommand()
Description copied from interface:ILayerCommand
Same semantics asObject.clone()
Used to make a copies of the command if has to passed to different layer stacks.- Returns:
- a cloned instance of the command
- See Also:
GridLayer.doCommand(ILayerCommand)
-
toString
public String toString()
- Overrides:
toString
in classAbstractPositionCommand
-
-