public FontDefinitionDialog(Shell shellParent, FontDefinition fdCurrent, ColorDefinition cdCurrent) { this.fdCurrent = (FontDefinition) EcoreUtil.copy(fdCurrent); this.cdCurrent = (ColorDefinition) EcoreUtil.copy(cdCurrent); this.fdBackup = (FontDefinition) EcoreUtil.copy(fdCurrent); this.cdBackup = (ColorDefinition) EcoreUtil.copy(cdCurrent); shell = new Shell(shellParent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL); shell.setLayout(new FillLayout()); placeComponents(); populateLists(); shell.setText(Messages.getString("FontDefinitionDialog.Title.FontDescriptor")); shell.setSize(450, 480); shell.setDefaultButton(btnAccept); UIHelper.centerOnScreen(shell); shell.layout(); shell.open(); while (!shell.isDisposed()) { if (!shell.getDisplay().readAndDispatch()) { shell.getDisplay().sleep(); } } }
public FontDefinitionDialog( Shell shellParent, FontDefinition fdCurrent, ColorDefinition cdCurrent ) { this.fdCurrent = fdCurrent == null ? FontDefinitionImpl.createEmpty( ) : (FontDefinition) EcoreUtil.copy( fdCurrent ); this.cdCurrent = cdCurrent == null ? ColorDefinitionImpl.create( 0, 0, 0 ) : (ColorDefinition) EcoreUtil.copy( cdCurrent ); this.fdBackup = (FontDefinition) EcoreUtil.copy( this.fdCurrent ); this.cdBackup = (ColorDefinition) EcoreUtil.copy( this.cdCurrent ); shell = new Shell( shellParent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL ); shell.setLayout( new FillLayout( ) ); placeComponents( ); populateLists( ); shell.setText( Messages.getString( "FontDefinitionDialog.Title.FontDescriptor" ) ); shell.setSize( 450, 480 ); shell.setDefaultButton( btnAccept ); UIHelper.centerOnScreen( shell ); shell.layout( ); shell.open( ); while ( !shell.isDisposed( ) ) { if ( !shell.getDisplay( ).readAndDispatch( ) ) { shell.getDisplay( ).sleep( ); } } }
    public FontDefinitionDialog(Shell shellParent, FontDefinition fdCurrent, ColorDefinition cdCurrent)    {        this.fdCurrent = (FontDefinition) EcoreUtil.copy(fdCurrent);        this.cdCurrent = (ColorDefinition) EcoreUtil.copy(cdCurrent);        this.fdBackup = (FontDefinition) EcoreUtil.copy(fdCurrent);        this.cdBackup = (ColorDefinition) EcoreUtil.copy(cdCurrent);        shell = new Shell(shellParent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);        shell.setLayout(new FillLayout());        placeComponents();        populateLists();        shell.setText(Messages.getString("FontDefinitionDialog.Title.FontDescriptor")); //$NON-NLS-1$        shell.setSize(450, 480);        shell.setDefaultButton(btnAccept);        UIHelper.centerOnScreen(shell);        shell.layout();        shell.open();        while (!shell.isDisposed())        {            if (!shell.getDisplay().readAndDispatch())            {                shell.getDisplay().sleep();            }        }    }