Class HoverStylingCommand
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.command.AbstractPositionCommand
-
- org.eclipse.nebula.widgets.nattable.hover.command.HoverStylingCommand
-
- All Implemented Interfaces:
ILayerCommand
public class HoverStylingCommand extends AbstractPositionCommand
Command that is used to apply hover styling in a NatTable.This command needs to know about the HoverLayer on which it is executed because there might be several HoverLayer involved in a grid composition and therefore the command might be consumed by the wrong HoverLayer if we wouldn't know about the layer to handle it.
- Author:
- Dirk Fauth
- See Also:
HoverLayer
,HoverStylingCommandHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HoverStylingCommand(HoverStylingCommand command)
Constructor used for cloning purposes.HoverStylingCommand(ILayer layer, int columnPosition, int rowPosition, HoverLayer hoverLayer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ILayerCommand
cloneCommand()
Same semantics asObject.clone()
Used to make a copies of the command if has to passed to different layer stacks.HoverLayer
getHoverLayer()
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractPositionCommand
convertToTargetLayer, getColumnPosition, getLayer, getRowPosition, toString
-
-
-
-
Constructor Detail
-
HoverStylingCommand
public HoverStylingCommand(ILayer layer, int columnPosition, int rowPosition, HoverLayer hoverLayer)
- Parameters:
layer
- The layer to which the given cell position coordinates are related to.columnPosition
- The column position of the cell to apply the hover styling.rowPosition
- The row position of the cell to apply the hover styling.hoverLayer
- The HoverLayer that should handle the command. Necessary to avoid that other HoverLayer instances in a grid composition handle and consume the command.
-
HoverStylingCommand
protected HoverStylingCommand(HoverStylingCommand command)
Constructor used for cloning purposes.- Parameters:
command
- The command that should be used to create a new instance.
-
-
Method Detail
-
cloneCommand
public ILayerCommand 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)
-
getHoverLayer
public HoverLayer getHoverLayer()
- Returns:
- The HoverLayer that should handle the command.
-
-