Class SortColumnCommand

java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractColumnCommand
org.eclipse.nebula.widgets.nattable.sort.command.SortColumnCommand
All Implemented Interfaces:
ILayerCommand

public class SortColumnCommand extends AbstractColumnCommand
Command to trigger sorting.
See Also:
  • Constructor Details

    • SortColumnCommand

      public SortColumnCommand(ILayer layer, int columnPosition)
      Create a SortColumnCommand that triggers sorting for replacing an existing sort state (no accumulate) without specifying a sort direction.
      Parameters:
      layer - The layer to which the column position belongs.
      columnPosition - The position of the column for which the sorting should be applied.
    • SortColumnCommand

      public SortColumnCommand(ILayer layer, int columnPosition, boolean accumulate)
      Create a SortColumnCommand that triggers sorting without specifying a sort direction.
      Parameters:
      layer - The layer to which the column position belongs.
      columnPosition - The position of the column for which the sorting should be applied.
      accumulate - true if the sorting should be accumulated to an already applied sorting, false if the sorting should replace an existing sorting.
    • SortColumnCommand

      public SortColumnCommand(ILayer layer, int columnPosition, SortDirectionEnum sortDirection)
      Create a SortColumnCommand that triggers sorting for replacing an existing sort state (no accumulate).
      Parameters:
      layer - The layer to which the column position belongs.
      columnPosition - The position of the column for which the sorting should be applied.
    • SortColumnCommand

      public SortColumnCommand(ILayer layer, int columnPosition, boolean accumulate, SortDirectionEnum sortDirection)
      Parameters:
      layer - The layer to which the column position belongs.
      columnPosition - The position of the column for which the sorting should be applied.
      accumulate - true if the sorting should be accumulated to an already applied sorting, false if the sorting should replace an existing sorting.
      sortDirection - The sort direction that should be used for sorting. Can be null which means that the sort direction will be used that is calculated by the ISortModel for the given column.
    • SortColumnCommand

      protected SortColumnCommand(SortColumnCommand command)
      Constructor that is used to clone a command.
      Parameters:
      command - The command instance that should be cloned.
  • Method Details

    • isAccumulate

      public boolean isAccumulate()
      Returns:
      true if the sorting should be accumulated to an already applied sorting, false if the sorting should replace an existing sorting.
    • getSortDirection

      public SortDirectionEnum getSortDirection()
      Returns:
      The sort direction that should be used for sorting. Can be null which means that the sort direction will be used that is calculated by the ISortModel for the given column.
    • cloneCommand

      public SortColumnCommand 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: