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