Class ColumnGroupExpandCollapseCommand
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.command.AbstractColumnCommand
-
- org.eclipse.nebula.widgets.nattable.group.command.ColumnGroupExpandCollapseCommand
-
- All Implemented Interfaces:
ILayerCommand
public class ColumnGroupExpandCollapseCommand extends AbstractColumnCommand
Command to trigger expand/collapse on a column group at the specified coordinates, based on the current expand/collapse state.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedColumnGroupExpandCollapseCommand(ColumnGroupExpandCollapseCommand command)Clone constructor.ColumnGroupExpandCollapseCommand(ILayer layer, int columnPosition)Create the command for a given column position and row position 0;ColumnGroupExpandCollapseCommand(ILayer layer, int columnPosition, int rowPosition)Create the command for the given column and row positions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnGroupExpandCollapseCommandcloneCommand()Same semantics asObject.clone()Used to make a copies of the command if has to passed to different layer stacks.intgetLocalRowPosition(ILayer targetLayer)Converts the locally transported row position from its origin layer to the given target layer.intgetRowPosition()ILayergetRowPositionLayer()-
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractColumnCommand
convertToTargetLayer, getColumnPosition, getLayer, toString
-
-
-
-
Constructor Detail
-
ColumnGroupExpandCollapseCommand
public ColumnGroupExpandCollapseCommand(ILayer layer, int columnPosition)
Create the command for a given column position and row position 0;- Parameters:
layer- The layer to which the positions match.columnPosition- The column position to identify the column group.
-
ColumnGroupExpandCollapseCommand
public ColumnGroupExpandCollapseCommand(ILayer layer, int columnPosition, int rowPosition)
Create the command for the given column and row positions.- Parameters:
layer- The layer to which the positions match.columnPosition- The column position to identify the column group.rowPosition- The row position to identify the column group in a multi-level configuration.
-
ColumnGroupExpandCollapseCommand
protected ColumnGroupExpandCollapseCommand(ColumnGroupExpandCollapseCommand command)
Clone constructor.- Parameters:
command- The command to clone.
-
-
Method Detail
-
cloneCommand
public ColumnGroupExpandCollapseCommand cloneCommand()
Description copied from interface:ILayerCommandSame 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)
-
getRowPositionLayer
public ILayer getRowPositionLayer()
- Returns:
- The layer to which the row position matches.
- Since:
- 1.6
-
getRowPosition
public int getRowPosition()
- Returns:
- the rowPosition
-
getLocalRowPosition
public int getLocalRowPosition(ILayer targetLayer)
Converts the locally transported row position from its origin layer to the given target layer.- Parameters:
targetLayer- The target layer to convert the command to.- Returns:
- The row position converted to the given target layer or -1 in case the transformation failed.
- Since:
- 1.6
-
-