@Override protected void initData(Composite dataComposite) { Label label = new Label(dataComposite, SWT.NONE); label.setText(RedisClient.i18nFile.getText(I18nFile.VALUE)); label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 1, 1)); 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)); } public Text getText() {
protected void initContents() { Composite composite_1 = new Composite(shell, SWT.NONE); composite_1.setLayout(new FillLayout(SWT.HORIZONTAL)); composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1)); btnOk = new Button(composite_1, SWT.NONE); btnOk.addSelectionListener(okSelection); btnOk.setText(RedisClient.i18nFile.getText(I18nFile.OK)); Button btnCancel = new Button(composite_1, SWT.NONE); btnCancel.addSelectionListener(cancelSelection); btnCancel.setText(RedisClient.i18nFile.getText(I18nFile.CANCEL)); }
@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; }
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(); } } );
protected void initData(Composite dataComposite) { grpValues = new Group(dataComposite, SWT.NONE); grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4, 1)); grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES)); grpValues.setLayout(new GridLayout(4, false)); table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 4)); table.addSelectionListener(new SelectionAdapter() { @Override Button btnAdd = new Button(grpValues, SWT.NONE); btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnAdd.addSelectionListener(new SelectionAdapter() { @Override btnDelete = new Button(grpValues, SWT.NONE); btnDelete.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnDelete.addSelectionListener(new SelectionAdapter() { btnUp = new Button(grpValues, SWT.NONE); btnUp.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnUp.addSelectionListener(new SelectionAdapter() { @Override btnDown.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnDown.addSelectionListener(new SelectionAdapter() {
public UpdateTTLTabItem(TabFolder parent, final int id, final int db, final String key) { super(parent); new Label(composite, SWT.NONE); btnApplyButton = new Button(composite, SWT.NONE); btnApplyButton.addSelectionListener(new SelectionAdapter() { @Override btnApplyButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); btnApplyButton.setText(RedisClient.i18nFile.getText(I18nFile.APPLY)); btnApplyButton.setEnabled(false);
schemas.add( "https://" ); GridData protocolLabelData = new GridData( SWT.NONE, SWT.FILL, false, false ); GridData urlLabelData = new GridData( SWT.FILL, SWT.FILL, true, false ); GridLayout gridLayout = new GridLayout( 2, false ); 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" ) ); props.setLook( schemaCombo ); GridData protocolData = new GridData( SWT.NONE, SWT.FILL, false, false ); schemaCombo.setLayoutData( protocolData ); urlText.setText( sparkRunConfiguration.getUrl() ); GridData urlData = new GridData( SWT.FILL, SWT.FILL, true, false ); urlData.heightHint = 16; urlText.setLayoutData( urlData );
shell.setLayout(new GridLayout(1, false)); Composite composite = new Composite(shell, SWT.NONE); composite.setLayout(new GridLayout(1, false)); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); Label lblNewLabel = new Label(composite, SWT.WRAP); lblNewLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); lblNewLabel.setText(RedisClient.i18nFile.getText(I18nFile.DONATIONMESSAGE)); Label label = new Label(composite, SWT.NONE); label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1)); label.setAlignment(SWT.CENTER); label.setImage(code); Composite composite_1 = new Composite(shell, SWT.NONE); composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1)); composite_1.setLayout(new FillLayout(SWT.HORIZONTAL)); Button btnOk = new Button(composite_1, SWT.NONE); btnOk.addSelectionListener(new SelectionAdapter() { @Override
dialog.setText( BaseMessages.getString( PKG, "SalesforceInputDialog.SelectDate" ) ); dialog.setImage( GUIResource.getInstance().getImageSpoon() ); dialog.setLayout( new GridLayout( 3, false ) ); 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() { @Override
protected void initData(Composite dataComposite) { grpValues = new Group(dataComposite, SWT.NONE); grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4, 1)); grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES)); grpValues.setLayout(new GridLayout(4, false)); table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 5)); table.addSelectionListener(new SelectionAdapter() { @Override btnInsertHead = new Button(grpValues, SWT.NONE); btnInsertHead.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnInsertHead.addSelectionListener(new SelectionAdapter() { @Override btnAppendTail = new Button(grpValues, SWT.NONE); btnAppendTail.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnAppendTail.addSelectionListener(new SelectionAdapter() { btnDeleteHead = new Button(grpValues, SWT.NONE); btnDeleteHead.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnDeleteHead.addSelectionListener(new SelectionAdapter() { @Override btnDeleteTail.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnDeleteTail.addSelectionListener(new SelectionAdapter() {
/** * build icon cell */ protected void buildIconCell() { Image icon = Display.getCurrent().getSystemImage( SWT.ICON_INFORMATION ); this.iconLabel = new Label( this.dialog, SWT.NONE ); this.iconLabel.setImage( icon ); GridData grdData = new GridData(); grdData.horizontalIndent = DEFAULT_INDENT; grdData.verticalIndent = DEFAULT_INDENT; this.iconLabel.setLayoutData( grdData ); }
this.setText(RedisClient.i18nFile.getText(I18nFile.TTL)); composite = new Composite(parent, SWT.NONE); this.setControl(composite); composite.setLayout(new GridLayout(2, false)); btnExpire = new Button(composite, SWT.CHECK); btnExpire.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1)); btnExpire.setText(RedisClient.i18nFile.getText(I18nFile.EXPIRE)); labelTTL = new Label(composite, SWT.NONE); labelTTL.setEnabled(false); labelTTL.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); labelTTL.setText(RedisClient.i18nFile.getText(I18nFile.TTLS)); ttl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
dialogto.setText( BaseMessages.getString( PKG, "SalesforceInputDialog.SelectDate" ) ); dialogto.setImage( GUIResource.getInstance().getImageSpoon() ); dialogto.setLayout( new GridLayout( 3, false ) ); new Label( dialogto, SWT.NONE ); new Label( dialogto, SWT.NONE ); Button okto = new Button( dialogto, SWT.PUSH ); okto.setText( BaseMessages.getString( PKG, "System.Button.OK" ) ); okto.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, false, false ) ); okto.addSelectionListener( new SelectionAdapter() { @Override
protected void initData(Composite dataComposite) { grpValues = new Group(dataComposite, SWT.NONE); grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4, 1)); grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES)); grpValues.setLayout(new GridLayout(4, false)); table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 2)); table.addSelectionListener(new SelectionAdapter() { @Override tblclmnNewColumn.setWidth(200); Button btnAdd = new Button(grpValues, SWT.NONE); btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnAdd.addSelectionListener(new SelectionAdapter() { @Override btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD)); btnDelete = new Button(grpValues, SWT.NONE); btnDelete.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnDelete.addSelectionListener(new SelectionAdapter() {
/** * build icon cell */ protected void buildIconCell() { Image icon = Display.getCurrent().getSystemImage( SWT.ICON_INFORMATION ); this.iconLabel = new Label( this.dialog, SWT.NONE ); this.iconLabel.setImage( icon ); GridData grdData = new GridData(); grdData.horizontalIndent = DEFAULT_INDENT; grdData.verticalIndent = DEFAULT_INDENT; this.iconLabel.setLayoutData( grdData ); }
ttlTabItem.setText(RedisClient.i18nFile.getText(I18nFile.TTL)); ttlComposite = new Composite(tabFolder, SWT.NONE); ttlTabItem.setControl(ttlComposite); ttlComposite.setLayout(new GridLayout(2, false)); btnExpire = new Button(ttlComposite, SWT.CHECK); btnExpire.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1)); btnExpire.setText(RedisClient.i18nFile.getText(I18nFile.EXPIRE)); labelTTL = new Label(ttlComposite, SWT.NONE); labelTTL.setEnabled(false); labelTTL.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); labelTTL.setText(RedisClient.i18nFile.getText(I18nFile.TTLS)); ttl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
public void widgetSelected( SelectionEvent e ) { final Shell dialog = new Shell( shell, SWT.DIALOG_TRIM ); dialog.setText( BaseMessages.getString( PKG, "MailInput.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( MailInputMeta.DATE_PATTERN ).format( cal.getTime() ) ); dialog.close(); } } ); dialog.setDefaultButton( ok ); dialog.pack(); dialog.open(); } } );
protected void initData(Composite dataComposite) { grpValues = new Group(dataComposite, SWT.NONE); grpValues.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4, 1)); grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES)); grpValues.setLayout(new GridLayout(4, false)); table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 4)); table.addSelectionListener(new SelectionAdapter() { @Override btnAdd = new Button(grpValues, SWT.NONE); btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnAdd.addSelectionListener(new SelectionAdapter() { @Override btnDelete = new Button(grpValues, SWT.NONE); btnDelete.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnDelete.addSelectionListener(new SelectionAdapter() { btnRefresh.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH)); btnWatch = new Button(grpValues, SWT.NONE); btnWatch.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnWatch.setText(RedisClient.i18nFile.getText(I18nFile.WATCH)); btnWatch.addSelectionListener(new SelectionAdapter() {
/** * build icon cell */ protected void buildIconCell() { Image icon = Display.getCurrent().getSystemImage( SWT.ICON_INFORMATION ); this.iconLabel = new Label( this.dialog, SWT.NONE ); this.iconLabel.setImage( icon ); GridData grdData = new GridData(); grdData.horizontalIndent = DEFAULT_INDENT; grdData.verticalIndent = DEFAULT_INDENT; this.iconLabel.setLayoutData( grdData ); }
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); }