@Override protected Control createMessageArea( Composite composite ) { GridLayout gridLayout = (GridLayout) composite.getLayout(); gridLayout.numColumns = 1; composite.setLayout( gridLayout ); if ( this.message != null ) { this.messageLabel = new Label( composite, this.getMessageLabelStyle() ); this.messageLabel.setText( this.message ); } if ( this.details != null ) { this.detailsText = new Text( composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL ); this.detailsText.pack(); this.detailsText.setText( this.details ); GridData gridData = new GridData( ); gridData.widthHint = 1024; gridData.heightHint = 300; this.detailsText.setLayoutData( gridData ); this.detailsText.setSelection( this.details.length() ); } return composite; }
private void setWarningText( String message, int maxTextWidth ) { description = new Text( shell, SWT.MULTI | SWT.LEFT | SWT.WRAP | SWT.NO_FOCUS | SWT.HIDE_SELECTION ); description.setText( message ); description.setEditable( false ); FormData fdlDesc = new FormData(); fdlDesc.left = new FormAttachment( warningIcon, margin ); // Text should be right of the icon and at the top fdlDesc.top = new FormAttachment( 0, 0 ); fdlDesc.width = maxTextWidth; description.setLayoutData( fdlDesc ); props.setLook( description ); }
private void initNamespace(TabFolder tabFolder) { TabItem tbtmNamespace = new TabItem(tabFolder, SWT.NONE); tbtmNamespace.setText(RedisClient.i18nFile.getText(I18nFile.NAMESPACE)); Composite composite = new Composite(tabFolder, SWT.NONE); tbtmNamespace.setControl(composite); composite.setLayout(new GridLayout(2, false)); Label lblSeparator = new Label(composite, SWT.NONE); lblSeparator.setText(RedisClient.i18nFile.getText(I18nFile.SEPARATOR)); separator = new Text(composite, SWT.BORDER); separator.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); separator.setText(ConfigFile.getSeparator()); separator.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { separator.setData(true); } }); separator.setData(false); }
@Override public void widgetSelected(SelectionEvent e) { if (!currentText) { imageType.setEnabled(false); textType.setEnabled(true); if (label != null && !label.isDisposed()) { label.setVisible(false); label.dispose(); } text = new Text(grpValue, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI); text.setEditable(false); text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); text.setText(value); tranformText(textType, text); currentText = true; } } });
private void initPaging(TabFolder tabFolder) { TabItem tbtmPaging = new TabItem(tabFolder, SWT.NONE); tbtmPaging.setText(RedisClient.i18nFile.getText(I18nFile.PAGING)); Composite composite = new Composite(tabFolder, SWT.NONE); tbtmPaging.setControl(composite); composite.setLayout(new GridLayout(2, false)); Label lblPaging = new Label(composite, SWT.NONE); lblPaging.setText(RedisClient.i18nFile.getText(I18nFile.PAGESIZE)); size = new Text(composite, SWT.BORDER); size.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); size.setText(String.valueOf(ConfigFile.getPagesize())); size.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { size.setData(true); } }); size.setData(false); }
protected Composite initDataTabItem(){ dataTabItem = new TabItem(tabFolder, SWT.NONE); dataTabItem.setText(RedisClient.i18nFile.getText(dataTitle)); Composite dataComposite = new Composite(tabFolder, SWT.NONE); dataTabItem.setControl(dataComposite); dataComposite.setLayout(new GridLayout(4, true)); label = new Label(dataComposite, SWT.NONE); label.setText(RedisClient.i18nFile.getText(I18nFile.SERVER)); Label label_1 = new Label(dataComposite, SWT.NONE); label_1.setText(server); label_2 = new Label(dataComposite, SWT.NONE); label_2.setText(RedisClient.i18nFile.getText(I18nFile.DATABASE)); Label label_3 = new Label(dataComposite, SWT.NONE); label_3.setText(String.valueOf(db)); lblKey = new Label(dataComposite, SWT.NONE); lblKey.setText(RedisClient.i18nFile.getText(I18nFile.KEY)); inputKey = new Text(dataComposite, SWT.BORDER); inputKey.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1)); inputKey.setText(key); inputKey.selectAll(); inputKey.setFocus(); return dataComposite; }
final Text text_value = new Text(dataComposite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI); text_value.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1)); text_value.setText(value); text_value.selectAll(); text_value.setFocus(); new Label(dataComposite, SWT.NONE); new Label(dataComposite, SWT.NONE); new Label(dataComposite, SWT.NONE); composite.setLayout(new GridLayout(4, false)); btnOk = new Button(composite, SWT.NONE); btnOk.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); btnOk.setText(RedisClient.i18nFile.getText(I18nFile.APPLY)); setApply(false); btnCancel = new Button(composite, SWT.NONE); btnCancel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); btnCancel.setEnabled(false); btnRefresh = new Button(composite, SWT.NONE); btnRefresh.addSelectionListener(new SelectionAdapter() { @Override
composite.setLayout(new GridLayout(2, false)); Label lblt1 = new Label(composite, SWT.NONE); lblt1.setText(RedisClient.i18nFile.getText(I18nFile.COMMANDTIMEOUT)); t1 = new Text(composite, SWT.BORDER); t1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); t1.setText(String.valueOf(ConfigFile.getT1())); t1.setFocus(); t1.addModifyListener(new ModifyListener() { t1.setData(false); Label lblt12 = new Label(composite, SWT.NONE); lblt12.setText(RedisClient.i18nFile.getText(I18nFile.CONSOLETIMEOUT)); t2 = new Text(composite, SWT.BORDER); t2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); t2.setText(String.valueOf(ConfigFile.getT2())); t2.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) {
composite.setLayout(new GridLayout(2, false)); Label lblName = new Label(composite, SWT.NONE); lblName.setText(RedisClient.i18nFile.getText(I18nFile.NAME)); text_3 = new Text(composite, SWT.BORDER); text_3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); text_3.setFocus(); Label lblHost = new Label(composite, SWT.NONE); lblHost.setText(RedisClient.i18nFile.getText(I18nFile.HOST)); text_4 = new Text(composite, SWT.BORDER); text_4.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); Label lblPort = new Label(composite, SWT.NONE); lblPort.setText(RedisClient.i18nFile.getText(I18nFile.PORT)); text_5 = new Text(composite, SWT.BORDER); text_5.setText("6379"); text_5.selectAll(); composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1)); btnOk.setText(RedisClient.i18nFile.getText(I18nFile.OK));
composite.setLayout(new GridLayout(2, false)); Label lblNewKey = new Label(composite, SWT.NONE); lblNewKey.setText(RedisClient.i18nFile.getText(I18nFile.NAME)); final Text text_2 = new Text(composite, SWT.BORDER); text_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); text_2.setText(oldFavorite.getName()); text_2.selectAll(); text_2.setFocus(); Label lblFavorite = new Label(composite, SWT.NONE); lblFavorite.setText(RedisClient.i18nFile.getText(I18nFile.FAVORITE)); text = new Text(composite, SWT.BORDER); text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); text.setEditable(false); text.setText(oldFavorite.getFavorite()); Button button = new Button(composite_1, SWT.NONE); button.addMouseListener(new MouseAdapter() { @Override button.setText(RedisClient.i18nFile.getText(I18nFile.OK)); Button button_1 = new Button(composite_1, SWT.NONE); button_1.addMouseListener(new MouseAdapter() { @Override
runConfigurationDialog.getGroup().setLayout( gridLayout ); Label schemaLabel = new Label( runConfigurationDialog.getGroup(), SWT.LEFT ); props.setLook( schemaLabel ); schemaLabel.setText( BaseMessages.getString( PKG, "SparkRunConfigurationDialog.Label.Schema" ) ); schemaLabel.setLayoutData( protocolLabelData ); Label optionLabel = new Label( runConfigurationDialog.getGroup(), SWT.LEFT ); props.setLook( optionLabel ); optionLabel.setText( BaseMessages.getString( PKG, "SparkRunConfigurationDialog.Label.URL" ) ); optionLabel.setLayoutData( urlLabelData ); Text urlText = new Text( runConfigurationDialog.getGroup(), SWT.SINGLE | SWT.LEFT | SWT.BORDER ); props.setLook( urlText ); urlText.setText( sparkRunConfiguration.getUrl() ); urlText.setLayoutData( urlData );
composite.setLayout(new GridLayout(2, false)); Label lblNewKey = new Label(composite, SWT.NONE); lblNewKey.setText(RedisClient.i18nFile.getText(I18nFile.NAME)); final Text text_2 = new Text(composite, SWT.BORDER); text_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); text_2.setText(container==null?"": container); text_2.selectAll(); text_2.setFocus(); composite_1.setLayout(new FillLayout(SWT.HORIZONTAL)); Button button = new Button(composite_1, SWT.NONE); button.addMouseListener(new MouseAdapter() { @Override button.setText(RedisClient.i18nFile.getText(I18nFile.OK)); Button button_1 = new Button(composite_1, SWT.NONE); button_1.addMouseListener(new MouseAdapter() { @Override
composite.setLayout(new GridLayout(4, true)); Label lblKey = new Label(composite, SWT.NONE); lblKey.setText(RedisClient.i18nFile.getText(I18nFile.SERVER)); Label label_1 = new Label(composite, SWT.NONE); label_1.setText(server); Label lblDatabase = new Label(composite, SWT.NONE); lblDatabase.setText(RedisClient.i18nFile.getText(I18nFile.DATABASE)); Label label_3 = new Label(composite, SWT.NONE); lblNewKey.setText(RedisClient.i18nFile.getText(I18nFile.NEWKEY)); text_2 = new Text(composite, SWT.BORDER); text_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1)); text_2.setText(oldContainer); text_2.selectAll(); text_2.setFocus(); final Button btnCheckButton1 = new Button(composite, SWT.CHECK); btnCheckButton1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); btnCheckButton1.setSelection(true); composite_1.setLayout(new FillLayout(SWT.HORIZONTAL));
wDesc = new Text( shell, SWT.MULTI | SWT.LEFT | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL ); wDesc.setText( exMsgFunction.apply( text.toString() ) ); } else { text.append( message ); wDesc.setText( exMsgFunction.apply( text.toString() ) ); fdDesc.right = new FormAttachment( 100, 0 ); fdDesc.bottom = new FormAttachment( 100, -50 ); wDesc.setLayoutData( fdDesc ); wDesc.setEditable( false ); wDetails = new Button( shell, SWT.PUSH ); wDetails.setText( BaseMessages.getString( PKG, "System.Button.Details" ) ); wOK.addListener( SWT.Selection, new Listener() { public void handleEvent( Event e ) { ok(); wCancel.addListener( SWT.Selection, new Listener() { public void handleEvent( Event e ) { cancel(); wDetails.addListener( SWT.Selection, new Listener() { public void handleEvent( Event e ) { showDetails( details.toString() );
sShell.setLayout( formLayout ); btnNext = new Button( sShell, SWT.PUSH ); btnNext.setText( BaseMessages.getString( PKG, "Widget.Styled.CompReplace.FindNext" ) ); btnNext.setEnabled( false ); btnNext.setLayoutData( frmData ); btnReplace = new Button( sShell, SWT.PUSH ); btnReplace.setText( BaseMessages.getString( PKG, "Widget.Styled.CompReplace.Replace" ) ); btnReplace.setEnabled( false ); btnReplace.setLayoutData( frmData ); btnReplaceAll = new Button( sShell, SWT.PUSH ); btnReplaceAll.setText( BaseMessages.getString( PKG, "Widget.Styled.CompReplace.ReplaceAll" ) ); btnReplaceAll.setEnabled( false ); btnIgnoreCase.setLayoutData( frmData ); btnNext.addListener( SWT.Selection, new Listener() { public void handleEvent( Event e ) { if ( !findText() ) { searchText.setText( text.getSelectionText() ); replaceText.setFocus();
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 ); wDesc.setText( "" ); if ( fixed ) { props.setLook( wDesc, Props.WIDGET_STYLE_FIXED ); fdDesc.right = new FormAttachment( 100, 0 ); fdDesc.bottom = new FormAttachment( 100, -50 ); wDesc.setLayoutData( fdDesc ); wDesc.setEditable( !readonly ); 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.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.addListener( SWT.Selection, lsOK );
sShell.setLayout( formLayout ); 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" ) ); frmData = new FormData(); btnCancel.setLayoutData( frmData ); btnIgnoreCase = new Button( sShell, SWT.CHECK ); btnIgnoreCase.setText( BaseMessages.getString( PKG, "Widget.Styled.Comp.CaseSensitive" ) ); frmData = new FormData(); grpDir.setLayoutData( frmData ); btnNext.addListener( SWT.Selection, new Listener() { public void handleEvent( Event e ) { if ( !findText() ) { String tt = text.getSelectionText(); if ( tt.indexOf( '\n' ) < 0 ) { searchText.setText( text.getSelectionText() );
private void buildHeader() { buildPreHeader(); // Step icon final Label wicon = new Label( shell, SWT.RIGHT ); wicon.setImage( getImage() ); wicon.setLayoutData( new FormDataBuilder().top( 0, -BaseDialog.LABEL_SPACING ).right( 100, 0 ).result() ); props.setLook( wicon ); // Step name label wlStepname = new Label( shell, SWT.RIGHT ); wlStepname.setText( BaseMessages.getString( PKG, "CommonStepDialog.Stepname.Label" ) ); //$NON-NLS-1$ props.setLook( wlStepname ); fdlStepname = new FormDataBuilder().left( 0, 0 ).top( 0, -BaseDialog.LABEL_SPACING ).result(); wlStepname.setLayoutData( fdlStepname ); // Step name field wStepname = new Text( shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); wStepname.setText( stepname ); props.setLook( wStepname ); wStepname.addModifyListener( lsMod ); wStepname.addSelectionListener( lsDef ); fdStepname = new FormDataBuilder().width( BaseDialog.MEDIUM_FIELD ).left( 0, 0 ).top( wlStepname, BaseDialog.LABEL_SPACING ).result(); wStepname.setLayoutData( fdStepname ); // horizontal separator between step name and tabs headerSpacer = new Label( shell, SWT.HORIZONTAL | SWT.SEPARATOR ); props.setLook( headerSpacer ); headerSpacer.setLayoutData( new FormDataBuilder().left().right( 100, 0 ).top( wStepname, BaseDialog.MARGIN_SIZE ).width( SHELL_WIDTH - 2 * ( BaseDialog.MARGIN_SIZE ) ).result() ); buildPostHeader(); }
wlStepname = new Label( shell, SWT.RIGHT ); wlStepname.setText( BaseMessages.getString( PKG, "TableAgileMartDialog.Stepname.Label" ) ); props.setLook( wlStepname ); fdlStepname = new FormData(); fdlStepname.right = new FormAttachment( middle, -margin ); fdlStepname.top = new FormAttachment( 0, margin ); wlStepname.setLayoutData( fdlStepname ); wStepname = new Text( shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); wStepname.setText( stepname ); props.setLook( wStepname ); wStepname.addModifyListener( lsMod ); fdStepname.top = new FormAttachment( 0, margin ); fdStepname.right = new FormAttachment( 100, 0 ); wStepname.setLayoutData( fdStepname ); 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" ) ); wCancel.addListener( SWT.Selection, lsCancel ); wOK.addListener( SWT.Selection, lsOK );
wlStepname = new Label( shell, SWT.RIGHT ); wlStepname.setText( BaseMessages.getString( PKG, "RowsToResultDialog.Stepname.Label" ) ); props.setLook( wlStepname ); fdlStepname = new FormData(); fdlStepname.right = new FormAttachment( middle, -margin ); fdlStepname.top = new FormAttachment( 0, margin ); wlStepname.setLayoutData( fdlStepname ); wStepname = new Text( shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); wStepname.setText( stepname ); props.setLook( wStepname ); wStepname.addModifyListener( lsMod ); fdStepname.top = new FormAttachment( 0, margin ); fdStepname.right = new FormAttachment( 100, 0 ); wStepname.setLayoutData( fdStepname ); 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" ) ); wCancel.addListener( SWT.Selection, lsCancel ); wOK.addListener( SWT.Selection, lsOK );