use of org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel.ColumnGroup in project nebula.widgets.nattable by eclipse.
the class ColumnGroupsCommandHandler method handleRemoveColumnGroupCommand.
private void handleRemoveColumnGroupCommand(int columnIndex) {
ColumnGroup columnGroup = this.model.getColumnGroupByIndex(columnIndex);
this.model.removeColumnGroup(columnGroup);
}
use of org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel.ColumnGroup in project nebula.widgets.nattable by eclipse.
the class ColumnGroupsCommandHandler method displayColumnGroupRenameDialog.
private boolean displayColumnGroupRenameDialog(DisplayColumnGroupRenameDialogCommand command) {
int columnPosition = command.getColumnPosition();
ColumnRenameDialog dialog = new ColumnRenameDialog(Display.getDefault().getActiveShell(), null, null);
Rectangle colHeaderBounds = this.contextLayer.getBoundsByPosition(columnPosition, 0);
Point point = new Point(colHeaderBounds.x, colHeaderBounds.y + colHeaderBounds.height);
dialog.setLocation(command.toDisplayCoordinates(point));
dialog.open();
if (!dialog.isCancelPressed()) {
int columnIndex = this.contextLayer.getColumnIndexByPosition(columnPosition);
ColumnGroup columnGroup = this.model.getColumnGroupByIndex(columnIndex);
columnGroup.setName(dialog.getNewColumnLabel());
}
return true;
}
Aggregations