Class SortColumnCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractColumnCommand
org.eclipse.nebula.widgets.nattable.sort.command.SortColumnCommand
- All Implemented Interfaces:
ILayerCommand
Command to trigger sorting.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionSortColumnCommand(ILayer layer, int columnPosition) Create aSortColumnCommandthat triggers sorting for replacing an existing sort state (no accumulate) without specifying a sort direction.SortColumnCommand(ILayer layer, int columnPosition, boolean accumulate) Create aSortColumnCommandthat triggers sorting without specifying a sort direction.SortColumnCommand(ILayer layer, int columnPosition, boolean accumulate, SortDirectionEnum sortDirection) SortColumnCommand(ILayer layer, int columnPosition, SortDirectionEnum sortDirection) Create aSortColumnCommandthat triggers sorting for replacing an existing sort state (no accumulate).protectedSortColumnCommand(SortColumnCommand command) Constructor that is used to clone a command. -
Method Summary
Modifier and TypeMethodDescriptionSame semantics asObject.clone()Used to make a copies of the command if has to passed to different layer stacks.booleanMethods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractColumnCommand
convertToTargetLayer, getColumnPosition, getLayer, toString
-
Constructor Details
-
SortColumnCommand
Create aSortColumnCommandthat 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
Create aSortColumnCommandthat 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-trueif the sorting should be accumulated to an already applied sorting,falseif the sorting should replace an existing sorting.
-
SortColumnCommand
Create aSortColumnCommandthat 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-trueif the sorting should be accumulated to an already applied sorting,falseif the sorting should replace an existing sorting.sortDirection- The sort direction that should be used for sorting. Can benullwhich means that the sort direction will be used that is calculated by the ISortModel for the given column.
-
SortColumnCommand
Constructor that is used to clone a command.- Parameters:
command- The command instance that should be cloned.
-
-
Method Details
-
isAccumulate
public boolean isAccumulate()- Returns:
trueif the sorting should be accumulated to an already applied sorting,falseif the sorting should replace an existing sorting.
-
getSortDirection
- Returns:
- The sort direction that should be used for sorting. Can be
nullwhich means that the sort direction will be used that is calculated by the ISortModel for the given column.
-
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:
-