public class ChooseColumnsFromCategoriesCommandHandler extends AbstractLayerCommandHandler<ChooseColumnsFromCategoriesCommand> implements IColumnCategoriesDialogListener
Constructor and Description |
---|
ChooseColumnsFromCategoriesCommandHandler(ColumnHideShowLayer columnHideShowLayer,
ColumnHeaderLayer columnHeaderLayer,
DataLayer columnHeaderDataLayer,
ColumnCategoriesModel model) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doCommand(ChooseColumnsFromCategoriesCommand command) |
Class<ChooseColumnsFromCategoriesCommand> |
getCommandClass() |
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.
|
void |
itemsMoved(SelectionLayer.MoveDirectionEnum direction,
List<Integer> selectedPositions)
Moves the columns up or down by firing commands on the dialog.
|
void |
itemsRemoved(List<Integer> removedColumnPositions) |
void |
itemsSelected(List<Integer> addedColumnIndexes) |
doCommand
public ChooseColumnsFromCategoriesCommandHandler(ColumnHideShowLayer columnHideShowLayer, ColumnHeaderLayer columnHeaderLayer, DataLayer columnHeaderDataLayer, ColumnCategoriesModel model)
protected boolean doCommand(ChooseColumnsFromCategoriesCommand command)
doCommand
in class AbstractLayerCommandHandler<ChooseColumnsFromCategoriesCommand>
public Class<ChooseColumnsFromCategoriesCommand> getCommandClass()
getCommandClass
in interface ILayerCommandHandler<ChooseColumnsFromCategoriesCommand>
public void itemsRemoved(List<Integer> removedColumnPositions)
itemsRemoved
in interface IColumnCategoriesDialogListener
public void itemsSelected(List<Integer> addedColumnIndexes)
itemsSelected
in interface IColumnCategoriesDialogListener
public void itemsMoved(SelectionLayer.MoveDirectionEnum direction, List<Integer> selectedPositions)
ColumnReorderCommand
Contiguously selected columns are moved using the MultiColumnReorderCommand
itemsMoved
in interface IColumnCategoriesDialogListener
direction
- the direction to moveselectedPositions
- the column positions to moveprotected List<Integer> getDestinationPositions(SelectionLayer.MoveDirectionEnum direction, List<List<Integer>> selectedPositions)
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]
Copyright © 2013. All Rights Reserved.