use of org.eclipse.nebula.widgets.nattable.group.event.GroupColumnsEvent in project nebula.widgets.nattable by eclipse.
the class ColumnGroupsCommandHandler method handleGroupColumnsCommand.
public void handleGroupColumnsCommand(String columnGroupName) {
try {
List<Integer> selectedPositions = new ArrayList<Integer>(this.columnIndexesToPositionsMap.size());
int[] fullySelectedColumns = new int[this.columnIndexesToPositionsMap.size()];
int count = 0;
for (Integer columnIndex : this.columnIndexesToPositionsMap.keySet()) {
fullySelectedColumns[count++] = columnIndex.intValue();
selectedPositions.add(this.columnIndexesToPositionsMap.get(columnIndex));
}
this.model.addColumnsIndexesToGroup(columnGroupName, fullySelectedColumns);
this.selectionLayer.doCommand(new MultiColumnReorderCommand(this.selectionLayer, selectedPositions, selectedPositions.get(0)));
this.selectionLayer.clear();
} catch (Throwable t) {
}
this.contextLayer.fireLayerEvent(new GroupColumnsEvent(this.contextLayer));
}
Aggregations