Refine search
/** * build Ok Button. */ protected void buildOkButton() { Button ok = new Button( this.dialog, SWT.PUSH ); ok.setText( BaseMessages.getString( PKG, "TeraFastDialog.About.Plugin.Close" ) ); GridData grdData = new GridData( GridData.HORIZONTAL_ALIGN_CENTER ); grdData.horizontalSpan = 2; grdData.verticalIndent = DEFAULT_INDENT; grdData.horizontalIndent = DEFAULT_INDENT; ok.setLayoutData( grdData ); ok.addListener( SWT.Selection, new Listener() { public void handleEvent( Event arg0 ) { dialog.dispose(); } } ); }
protected Button addStandardCheckBox( String labelMessageKey, Control prevControl ) { addStandardLabel( labelMessageKey, prevControl ); Button targetControl = new Button( shell, SWT.CHECK ); targetControl.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { input.setChanged(); } } ); targetControl.setLayoutData( standardInputSpacing( prevControl ) ); return targetControl; }
private void setAddDateBeforeExtension() { wlAddDateBeforeExtension.setEnabled( wAddDate.getSelection() || wAddTime.getSelection() || wSpecifyFormat.getSelection() ); wAddDateBeforeExtension.setEnabled( wAddDate.getSelection() || wAddTime.getSelection() || wSpecifyFormat.getSelection() ); if ( !wAddDate.getSelection() && !wAddTime.getSelection() && !wSpecifyFormat.getSelection() ) { wAddDateBeforeExtension.setSelection( false ); } }
public String open() { Shell parent = getParent(); Display display = parent.getDisplay(); wDesc.setLayoutData( fdDesc ); wOK = new Button( shell, SWT.PUSH ); wOK.setText( BaseMessages.getString( PKG, "System.Button.OK" ) ); wCancel = new Button( shell, SWT.PUSH ); wCancel.setText( BaseMessages.getString( PKG, "System.Button.Cancel" ) ); wOK.setLayoutData( fdOK ); wCancel.setLayoutData( fdCancel ); wOK.addListener( SWT.Selection, lsOK ); wCancel.addListener( SWT.Selection, lsCancel ); } else { wOK = new Button( shell, SWT.PUSH ); wOK.setText( BaseMessages.getString( PKG, "System.Button.Close" ) ); wOK.setLayoutData( fdOK ); wOK.addListener( SWT.Selection, lsOK ); if ( !display.readAndDispatch() ) { display.sleep();
btnNext = new Button( sShell, SWT.PUSH ); btnNext.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.FindNext" ) ); btnNext.setEnabled( false ); btnNext.setLayoutData( frmData ); btnCancel = new Button( sShell, SWT.PUSH ); btnCancel.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.Close" ) ); btnCancel.setLayoutData( frmData ); btnIgnoreCase = new Button( sShell, SWT.CHECK ); btnIgnoreCase.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.CaseSensitive" ) ); btnIgnoreCase.setLayoutData( frmData ); btnWrapSearch = new Button( sShell, SWT.CHECK ); btnWrapSearch.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.WrapSearch" ) ); btnWrapSearch.setLayoutData( frmData ); optForward = new Button( grpDir, SWT.RADIO ); optForward.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.Forward" ) ); optForward.setBounds( 5, 15, 75, 15 ); Button optBackward = new Button( grpDir, SWT.RADIO ); optBackward.setBounds( 5, 33, 75, 15 ); optForward.setSelection( true ); optBackward.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.Backward" ) );
shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX ); props.setLook( shell ); formLayout.marginHeight = 15; shell.setLayout( formLayout ); Image image = display.getSystemImage( SWT.ICON_WARNING ); wcMessage.setLayout( new GridLayout() ); wcMessage.setLayoutData( fdcMessage ); Button wbNo = new Button( shell, SWT.PUSH ); wbNo.setText( BaseMessages.getString( PKG, "System.Button.No" ) ); wbNo.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected( SelectionEvent selectionEvent ) { quit( SWT.NO ); wbNo.setLayoutData( fdlNo ); Button wbYes = new Button( shell, SWT.PUSH ); wbYes.setText( BaseMessages.getString( PKG, "RunConfigurationDeleteDialog.Label.Yes" ) ); wbYes.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected( SelectionEvent selectionEvent ) { quit( SWT.YES ); wbYes.setLayoutData( fdlYes );
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(); } } );
wStep = new Button( shell, SWT.CHECK ); props.setLook( wStep ); wStep.setToolTipText( BaseMessages.getString( PKG, "EnterSearchDialog.Step.Tooltip" ) ); wStep.setLayoutData( fdStep ); wDB = new Button( shell, SWT.CHECK ); props.setLook( wDB ); wDB.setToolTipText( BaseMessages.getString( PKG, "EnterSearchDialog.DB.Tooltip" ) ); wDB.setLayoutData( fdDB ); wNote = new Button( shell, SWT.CHECK ); props.setLook( wNote ); wNote.setToolTipText( BaseMessages.getString( PKG, "EnterSearchDialog.Note.Tooltip" ) ); wNote.setLayoutData( fdNote ); Button wOK = new Button( shell, SWT.PUSH ); wOK.setText( BaseMessages.getString( PKG, "System.Button.OK" ) ); wOK.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { ok(); Button wCancel = new Button( shell, SWT.PUSH ); wCancel.setText( BaseMessages.getString( PKG, "System.Button.Cancel" ) ); wCancel.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { cancel();
public void open() { display = parent.getDisplay(); shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN ); props.setLook( shell ); formLayout.marginHeight = Const.FORM_MARGIN; shell.setText( BaseMessages.getString( PKG, "RepositoryImportDialog.Title" ) ); shell.setImage( GUIResource.getInstance().getImageSpoon() ); shell.setLayout( formLayout ); wLabel = new Label( shell, SWT.LEFT ); props.setLook( wLabel ); wClose = new Button( shell, SWT.PUSH ); wClose.setText( BaseMessages.getString( PKG, "System.Button.Close" ) ); wClose.setEnabled( false ); wClose.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { dispose(); wLogging = new Text( shell, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL ); props.setLook( wLabel ); display.asyncExec( new Runnable() { public void run() {
Button okButton = new Button( shell, SWT.NONE ); okButton.setText( "OK" ); FormData fd_okButton = new FormData(); if ( Const.isOSX() ) { okButton.setLayoutData( fd_okButton ); okButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { ok(); Button cancelButton = new Button( shell, SWT.NONE ); cancelButton.setText( "Cancel" ); cancelButton.setLayoutData( fd_cancelButton ); cancelButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { dispose(); Button btnHelp = new Button( shell, SWT.NONE ); btnHelp.setImage( GUIResource.getInstance().getImageHelpWeb() ); btnHelp.setText( BaseMessages.getString( PKG, "System.Button.Help" ) ); btnHelp.setToolTipText( BaseMessages.getString( PKG, "System.Tooltip.Help" ) ); btnHelp.setLayoutData( fd_btnHelp ); btnHelp.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected( SelectionEvent evt ) {
@Override protected Control addAdditionalComponentIfNeed( int middle, int margin, Composite wFileComp, Composite topComp ) { // Run this as a command instead? wlFileIsCommand = new Label( wFileComp, SWT.RIGHT ); wlFileIsCommand .setText( BaseMessages.getString( textFileOutputLegacyMetaClass, "TextFileOutputLegacyDialog.FileIsCommand.Label" ) ); props.setLook( wlFileIsCommand ); fdlFileIsCommand = new FormData(); fdlFileIsCommand.left = new FormAttachment( 0, 0 ); fdlFileIsCommand.top = new FormAttachment( topComp, margin ); fdlFileIsCommand.right = new FormAttachment( middle, -margin ); wlFileIsCommand.setLayoutData( fdlFileIsCommand ); wFileIsCommand = new Button( wFileComp, SWT.CHECK ); props.setLook( wFileIsCommand ); fdFileIsCommand = new FormData(); fdFileIsCommand.left = new FormAttachment( middle, 0 ); fdFileIsCommand.top = new FormAttachment( topComp, margin ); fdFileIsCommand.right = new FormAttachment( 100, 0 ); wFileIsCommand.setLayoutData( fdFileIsCommand ); wFileIsCommand.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { input.setChanged(); enableParentFolder(); } } ); return wlFileIsCommand; }
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() ); 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 ); Button wButton = new Button( shell, SWT.PUSH ); wButton.setText( label ); wButton.setLayoutData( fdButton ); wButton.addListener( SWT.Selection, listenAndDispose( listenerMap.get( label ) ) ); props.setLook( wButton ); attachTo = wButton; if ( !display.readAndDispatch() ) { display.sleep();
Label label = new Label( perfComposite, SWT.CENTER ); label.setText( BaseMessages.getString( PKG, "TransLog.Dialog.PerformanceMonitoringNotEnabled.Message" ) ); label.setBackground( perfComposite.getBackground() ); label.setFont( GUIResource.getInstance().getFontMedium() ); fdLabel.left = new FormAttachment( 5, 0 ); fdLabel.right = new FormAttachment( 95, 0 ); fdLabel.top = new FormAttachment( 5, 0 ); label.setLayoutData( fdLabel ); Button button = new Button( perfComposite, SWT.CENTER ); button.setText( BaseMessages.getString( PKG, "TransLog.Dialog.PerformanceMonitoring.Button" ) ); button.setBackground( perfComposite.getBackground() ); button.setFont( GUIResource.getInstance().getFontMedium() ); button.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent event ) { TransGraph.editProperties( fdButton.right = new FormAttachment( 60, 0 ); fdButton.top = new FormAttachment( label, 5 ); button.setLayoutData( fdButton );
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(); while ( !shell.isDisposed() ) { if ( !shell.getDisplay().readAndDispatch() ) { shell.getDisplay().sleep();
protected void addFileWidgets() { Label wlLocation = new Label( this, SWT.RIGHT ); wlLocation.setText( BaseMessages.getString( PKG, "VfsFileChooserControls.Location.Label" ) ); wlLocation.setLayoutData( new FormDataBuilder( ).left( 0, 0 ).top( 0, 0 ).result() ); wLocation = new CCombo( this, SWT.BORDER | SWT.READ_ONLY ); List<VFSScheme> availableVFSSchemes = getAvailableVFSSchemes(); wPath.setLayoutData( new FormDataBuilder().left( 0, 0 ).top( wlPath, FIELD_LABEL_SEP ).width( FIELD_LARGE + VAR_EXTRA_WIDTH ).result() ); wbBrowse = new Button( this, SWT.PUSH ); wbBrowse.setText( BaseMessages.getString( PKG, "System.Button.Browse" ) ); wbBrowse.addListener( SWT.Selection, event -> browseForFileInputPath() ); int bOffset = ( wbBrowse.computeSize( SWT.DEFAULT, SWT.DEFAULT, false ).y - wPath.computeSize( SWT.DEFAULT, SWT.DEFAULT, false ).y ) / 2; wbBrowse.setLayoutData( new FormDataBuilder().left( wPath, FIELD_LABEL_SEP ).top( wlPath, FIELD_LABEL_SEP - bOffset ).result() );
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" ) ); }
public Composite getComposite( Composite parent, ImportRuleInterface importRule ) { rule = (DatabaseConfigurationImportRule) importRule; databaseMeta = rule.getDatabaseMeta(); PropsUI props = PropsUI.getInstance(); composite = new Composite( parent, SWT.NONE ); props.setLook( composite ); composite.setLayout( new FillLayout() ); label = new Label( composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT ); props.setLook( label ); label.setText( "Database configuration : (not configured)" ); button = new Button( composite, SWT.PUSH ); button.setText( "Edit..." ); button.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent event ) { editDatabase(); } } ); return composite; }
protected Button createSettingsButton( Composite p, String text, String title, Control top, SelectionAdapter sa ) { Button button = new Button( p, SWT.CHECK ); button.setText( BaseMessages.getString( PKG, text ) ); button.setToolTipText( BaseMessages.getString( PKG, title ) ); props.setLook( button ); FormData fd = new FormData(); fd.left = new FormAttachment( 0, Const.MARGIN * 2 ); if ( top == null ) { fd.top = new FormAttachment( 0, 10 ); } else { fd.top = new FormAttachment( top, 5 ); } fd.right = new FormAttachment( 100, 0 ); button.setLayoutData( fd ); button.addSelectionListener( sa ); return button; }
private static Button newButton( final Composite parent ) { Button button = new Button( parent, SWT.PUSH ); button.setImage( GUIResource.getInstance().getImageHelpWeb() ); button.setText( BaseMessages.getString( PKG, "System.Button.Help" ) ); button.setToolTipText( BaseMessages.getString( PKG, "System.Tooltip.Help" ) ); FormData fdButton = new FormData(); fdButton.left = new FormAttachment( 0, 0 ); fdButton.bottom = new FormAttachment( 100, 0 ); button.setLayoutData( fdButton ); return button; }