Class ChooseColumnsFromCategoriesCommandHandler
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler<ChooseColumnsFromCategoriesCommand>
org.eclipse.nebula.widgets.nattable.columnCategories.ChooseColumnsFromCategoriesCommandHandler
- All Implemented Interfaces:
IColumnCategoriesDialogListener,ILayerCommandHandler<ChooseColumnsFromCategoriesCommand>
public class ChooseColumnsFromCategoriesCommandHandler
extends AbstractLayerCommandHandler<ChooseColumnsFromCategoriesCommand>
implements IColumnCategoriesDialogListener
-
Constructor Summary
ConstructorsConstructorDescriptionChooseColumnsFromCategoriesCommandHandler(ColumnHideShowLayer columnHideShowLayer, ColumnHeaderLayer columnHeaderLayer, DataLayer columnHeaderDataLayer, ColumnCategoriesModel model) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleangetDestinationPositions(SelectionLayer.MoveDirectionEnum direction, List<List<Integer>> selectedPositions) Calculates the destination positions taking into account the move direction and single/contiguous selection.voiditemsMoved(SelectionLayer.MoveDirectionEnum direction, List<Integer> selectedPositions) Moves the columns up or down by firing commands on the dialog.voiditemsRemoved(List<Integer> removedColumnPositions) voiditemsSelected(List<Integer> addedColumnIndexes) Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler
doCommand
-
Constructor Details
-
ChooseColumnsFromCategoriesCommandHandler
public ChooseColumnsFromCategoriesCommandHandler(ColumnHideShowLayer columnHideShowLayer, ColumnHeaderLayer columnHeaderLayer, DataLayer columnHeaderDataLayer, ColumnCategoriesModel model)
-
-
Method Details
-
doCommand
- Specified by:
doCommandin classAbstractLayerCommandHandler<ChooseColumnsFromCategoriesCommand>
-
getCommandClass
- Specified by:
getCommandClassin interfaceILayerCommandHandler<ChooseColumnsFromCategoriesCommand>
-
itemsRemoved
- Specified by:
itemsRemovedin interfaceIColumnCategoriesDialogListener
-
itemsSelected
- Specified by:
itemsSelectedin interfaceIColumnCategoriesDialogListener
-
itemsMoved
Moves the columns up or down by firing commands on the dialog. Individual columns are moved using theColumnReorderCommandContiguously selected columns are moved using theMultiColumnReorderCommand- Specified by:
itemsMovedin interfaceIColumnCategoriesDialogListener- Parameters:
direction- the direction to moveselectedPositions- the column positions to move
-
getDestinationPositions
protected List<Integer> getDestinationPositions(SelectionLayer.MoveDirectionEnum direction, List<List<Integer>> selectedPositions) Calculates the destination positions taking into account the move direction and single/contiguous selection.- Parameters:
direction- the direction to moveselectedPositions- grouped together if they are contiguous.Example: if 2,3,4, 9, 12 are selected, they are grouped as [[2, 3, 4], 9, 12]
- While moving up the destination position for [2, 3, 4] is 1
- While moving up the destination position for [2, 3, 4] is 6
- Returns:
- a List of destination positions
-