Package org.eclipse.nebula.widgets.nattable.columnRename

Examples of org.eclipse.nebula.widgets.nattable.columnRename.ColumnRenameDialog


    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;
    }
View Full Code Here


import org.eclipse.swt.widgets.Shell;

public class ColumnRenameDialogRunner {

    public static void main(String[] args) {
        ColumnRenameDialog dialog = new ColumnRenameDialog(new Shell(),
                "Original", "New");
        dialog.open();
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.columnRename.ColumnRenameDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.