Refine search
protected void mainLayout( Class<?> PKG, String prefix, Image img ) { display = parent.getDisplay(); shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.MIN | SWT.APPLICATION_MODAL ); props.setLook( shell ); shell.setImage( img ); shell.setLayout( new FormLayout() ); shell.setText( BaseMessages.getString( PKG, prefix + ".Shell.Title" ) ); }
private void open( final Display display ) { shell.pack(); if ( width > 0 ) { final int height = shell.computeSize( width, SWT.DEFAULT ).y; // for some reason the actual width and minimum width are smaller than what is requested - add the // SHELL_WIDTH_OFFSET to get the desired size shell.setMinimumSize( width + SHELL_WIDTH_OFFSET, height ); shell.setSize( width + SHELL_WIDTH_OFFSET, height ); } shell.open(); while ( !shell.isDisposed() ) { if ( !display.readAndDispatch() ) { display.sleep(); } } }
@Override public void mouseUp(MouseEvent e) { if(btnDeleteSubcontainerUnder!= null) result = btnDeleteSubcontainerUnder.getSelection(); else result = false; shell.dispose(); } });
public void hide() { if ( !splash.isDisposed() ) { splash.setVisible( false ); } }
public void dispose() { if ( !splash.isDisposed() ) { splash.dispose(); } }
public String open() { Display display = parent.getDisplay(); new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN | ( modal ? SWT.APPLICATION_MODAL | SWT.SHEET : SWT.NONE ) ); props.setLook( shell ); shell.setImage( GUIResource.getInstance().getImageSpoon() ); formLayout.marginHeight = Const.FORM_MARGIN; shell.setLayout( formLayout ); shell.setText( title ); wDesc = new Text( shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); } else { wDesc = new Text( shell, SWT.MULTI | SWT.LEFT | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL ); fdDesc.left = new FormAttachment( 0, 0 ); shell.addShellListener( new ShellAdapter() { public void shellClosed( ShellEvent e ) { checkCancel( e ); shell.open(); while ( !shell.isDisposed() ) { if ( !display.readAndDispatch() ) { display.sleep();
public int open() { Shell parent = getParent(); Display display = parent.getDisplay(); shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX ); props.setLook( shell ); formLayout.marginHeight = 15; shell.setLayout( formLayout ); shell.setText( BaseMessages.getString( PKG, "RunConfigurationDeleteDialog.Title" ) ); shell.setImage( getImage() ); Image image = display.getSystemImage( SWT.ICON_WARNING ); wcMessage.setLayout( new GridLayout() ); shell.addShellListener( new ShellAdapter() { public void shellClosed( ShellEvent e ) { cancel(); shell.layout(); shell.pack( true ); shell.open(); while ( !shell.isDisposed() ) { if ( !display.readAndDispatch() ) { display.sleep();
public void open() { Shell parent = getParent(); Display display = parent.getDisplay(); shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.SHEET | SWT.RESIZE ); shell.setImage( GUIResource.getInstance().getImageSpoon() ); shell.setLayout( new FormLayout() ); shell.setText( title ); props.setLook( shell ); fdMessage.left = new FormAttachment( wlImage, 15, SWT.RIGHT ); Button spacer = new Button( shell, SWT.NONE ); spacer.setLayoutData( fdSpacer ); spacer.setVisible( false ); props.setLook( spacer ); attachTo = wButton; Point point = shell.computeSize( 436, SWT.DEFAULT ); shell.setSize( point ); shell.open(); while ( !shell.isDisposed() ) { if ( !display.readAndDispatch() ) { display.sleep();
public void open() { shell = new Shell( parentShell, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN ); props.setLook( shell ); shell.setImage( GUIResource.getInstance().getImageSpoon() ); formLayout.marginHeight = Const.FORM_MARGIN; shell.setLayout( formLayout ); shell.setText( dialogTitle ); wClose = new Button( shell, SWT.PUSH ); wClose.setText( BaseMessages.getString( PKG, "System.Button.Close" ) ); wClose.addListener( SWT.Selection, new Listener() { public void handleEvent( Event e ) { close(); shell.addShellListener( new ShellAdapter() { public void shellClosed( ShellEvent e ) { close(); shell.open(); while ( !shell.isDisposed() ) { if ( !shell.getDisplay().readAndDispatch() ) { shell.getDisplay().sleep();
public void widgetSelected( SelectionEvent e ) { final Shell dialog = new Shell( shell, SWT.DIALOG_TRIM ); dialog.setText( BaseMessages.getString( PKG, "JobGetPOP.SelectDate" ) ); dialog.setImage( GUIResource.getInstance().getImageSpoon() ); dialog.setLayout( new GridLayout( 3, false ) ); final DateTime calendar = new DateTime( dialog, SWT.CALENDAR ); final DateTime time = new DateTime( dialog, SWT.TIME | SWT.TIME ); new Label( dialog, SWT.NONE ); new Label( dialog, SWT.NONE ); Button ok = new Button( dialog, SWT.PUSH ); ok.setText( BaseMessages.getString( PKG, "System.Button.OK" ) ); ok.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, false, false ) ); ok.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { Calendar cal = Calendar.getInstance(); cal.set( Calendar.YEAR, calendar.getYear() ); cal.set( Calendar.MONTH, calendar.getMonth() ); cal.set( Calendar.DAY_OF_MONTH, calendar.getDay() ); cal.set( Calendar.HOUR_OF_DAY, time.getHours() ); cal.set( Calendar.MINUTE, time.getMinutes() ); cal.set( Calendar.SECOND, time.getSeconds() ); wReadFrom.setText( new SimpleDateFormat( JobEntryGetPOP.DATE_PATTERN ).format( cal.getTime() ) ); dialog.close(); } } ); dialog.setDefaultButton( ok ); dialog.pack(); dialog.open(); } } );
private void fillLocalizationData() { labelDimension.setText( BaseMessages.getString( PKG, "PaloDimInputDialog.SelectDimension" ) ); labelStepName.setText( BaseMessages.getString( PKG, "PaloDimInputDialog.StepName" ) ); shell.setText( BaseMessages.getString( PKG, "PaloDimInputDialog.PaloDimInput" ) ); buttonGetLevels.setText( BaseMessages.getString( PKG, "PaloDimInputDialog.GetLevels" ) ); buttonClearLevels.setText( BaseMessages.getString( PKG, "PaloDimInputDialog.ClearLevels" ) ); labelBaseElementsOnly.setText( BaseMessages.getString( PKG, "PaloDimInputDialog.BaseElementsOnly" ) ); }
/** * * @param shell * the shell. */ public OlapInputAboutDialog( final Shell shell ) { this.dialog = new Shell( shell, SWT.BORDER | SWT.CLOSE | SWT.APPLICATION_MODAL | SWT.SHEET ); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; this.dialog.setLayout( gridLayout ); this.dialog.setText( BaseMessages.getString( PKG, "OlapInputDialog.About.Shell.Title" ) ); this.dialog.setImage( shell.getImage() ); this.buildIconCell(); this.buildPluginInfoCell(); this.buildOkButton(); this.dialog.pack(); Rectangle shellBounds = shell.getBounds(); Point dialogSize = this.dialog.getSize(); this.dialog.setLocation( shellBounds.x + ( shellBounds.width - dialogSize.x ) / 2, shellBounds.y + ( shellBounds.height - dialogSize.y ) / 2 ); }
public JobEntryInterface open() { Shell parent = getParent(); display = parent.getDisplay(); shell = new Shell( parent, props.getJobsDialogStyle() ); props.setLook( shell ); JobDialog.setShellImage( shell, jobEntry ); backupChanged = jobEntry.hasChanged(); createElements(); // Detect [X] or ALT-F4 or something that kills this window... shell.addShellListener( new ShellAdapter() { public void shellClosed( ShellEvent e ) { cancel(); } } ); getData(); setActive(); BaseStepDialog.setSize( shell ); int width = 750; int height = Const.isWindows() ? 730 : 718; shell.setSize( width, height ); shell.open(); while ( !shell.isDisposed() ) { if ( !display.readAndDispatch() ) { display.sleep(); } } return jobEntry; }
protected void openDialog() { shell.pack(); // Set the focus on the OK button wOK.setFocus(); Rectangle shellBounds = getParent().getBounds(); Point dialogSize = shell.getSize(); shell.setLocation( shellBounds.x + ( shellBounds.width - dialogSize.x ) / 2, shellBounds.y + ( shellBounds.height - dialogSize.y ) / 2 ); shell.open(); while ( !shell.isDisposed() ) { if ( !display.readAndDispatch() ) { display.sleep(); } } }
public String open() { shell.layout(); shell.open(); // Detect X or ALT-F4 or something that kills this window... shell.addShellListener( new ShellAdapter() { public void shellClosed( ShellEvent e ) { cancel(); } } ); while ( !shell.isDisposed() ) { if ( !shell.getDisplay().readAndDispatch() ) { shell.getDisplay().sleep(); } } return formula; }
Display display = Display.getDefault(); Shell dialogShell = new Shell(display, SWT.APPLICATION_MODAL); // populate dialogShell dialogShell.open(); while (!dialogShell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } }
public void open() { shell = new Shell( display ); shell.setLayout( new FillLayout() ); shell.setText( APP_NAME ); shell.setImage( GUIResource.getInstance().getImageLogoSmall() ); try { readFiles(); } catch ( Exception e ) { new ErrorDialog( shell, "Error reading translations", "There was an unexpected error reading the translations", e ); } // Put something on the screen sashform = new SashForm( shell, SWT.HORIZONTAL ); sashform.setLayout( new FormLayout() ); addLists(); addGrid(); addListeners(); sashform.setWeights( new int[] { 40, 60 } ); sashform.setVisible( true ); shell.pack(); refresh(); shell.setSize( 1024, 768 ); shell.open(); }
public static void main( String[] args ) { Display display = new Display( ); try { KettleEnvironment.init(); PropsUI.init( display, Props.TYPE_PROPERTIES_SPOON ); KettleLogStore .init( PropsUI.getInstance().getMaxNrLinesInLog(), PropsUI.getInstance().getMaxLogLineTimeoutMinutes() ); } catch ( KettleException e ) { e.printStackTrace(); } KettleClientEnvironment.getInstance().setClient( KettleClientEnvironment.ClientType.SPOON ); Shell shell = new Shell( display, SWT.DIALOG_TRIM ); shell.open(); CapabilityManagerDialog capabilityManagerDialog = new CapabilityManagerDialog( shell ); capabilityManagerDialog.open(); while ( !shell.isDisposed() ) { if ( !display.readAndDispatch() ) { display.sleep(); } } }
@Override public void modifyText( ModifyEvent arg0 ) { // Now set the combo's shell.getDisplay().asyncExec( new Runnable() { @Override public void run() { setComboBoxes(); } } ); } } );
public KettleFileRepositoryDialog( Shell parent, int style, RepositoryMeta repositoryMeta, RepositoriesMeta repositoriesMeta ) { this.display = parent.getDisplay(); this.props = PropsUI.getInstance(); this.input = (KettleFileRepositoryMeta) repositoryMeta; this.masterRepositoriesMeta = repositoriesMeta.clone(); this.masterRepositoryName = repositoryMeta.getName(); // this.repositories = repositoriesMeta; shell = new Shell( parent, style | SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN ); shell.setText( BaseMessages.getString( PKG, "KettleFileRepositoryDialog.Dialog.Main.Title" ) ); }