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