private boolean displayColumnGroupRenameDialog(
DisplayColumnGroupRenameDialogCommand command) {
int columnPosition = command.getColumnPosition();
ColumnRenameDialog dialog = new ColumnRenameDialog(Display.getDefault()
.getActiveShell(), null, null);
Rectangle colHeaderBounds = 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 = contextLayer
.getColumnIndexByPosition(columnPosition);
ColumnGroup columnGroup = model.getColumnGroupByIndex(columnIndex);
columnGroup.setName(dialog.getNewColumnLabel());
}
return true;
}