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 Details

    • 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 Details

    • cloneCommand

      public ColumnGroupExpandCollapseCommand cloneCommand()
      Description copied from interface: ILayerCommand
      Same semantics as Object.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:
    • 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