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
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(); } } );
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 );
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 tblclmnNewColumn.setWidth(200); 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.setText(RedisClient.i18nFile.getText(I18nFile.DELETE)); grpOrderToAdd.setLayout(new GridLayout(2, false)); grpOrderToAdd.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 4, 1)); grpWhenListNot.setLayout(new GridLayout(2, true)); grpWhenListNot.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 4, 1));
@Override public void execute() { super.execute(); if(result.getType() != ResultType.Error){ tbtmNewItem = new CTabItem(console.getTabFolder_2(), SWT.NONE); tbtmNewItem.setText(RedisClient.i18nFile.getText(I18nFile.DATA)+(console.getTabFolder_2().indexOf(tbtmNewItem))); Composite composite = new Composite(console.getTabFolder_2(), SWT.NONE); tbtmNewItem.setControl(composite); composite.setLayout(new GridLayout(1, false)); initData(composite); console.getTabFolder_2().setSelection(tbtmNewItem); } } protected abstract void initData(Composite composite) ;
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); }
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 tblclmnNewColumn.setWidth(200); btnInsertHead.setText(RedisClient.i18nFile.getText(I18nFile.INSERTHEAD)); btnAppendTail = new Button(grpValues, SWT.NONE); btnAppendTail.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnAppendTail.setText(RedisClient.i18nFile.getText(I18nFile.APPENDTAIL)); btnDeleteHead = new Button(grpValues, SWT.NONE); btnDeleteHead.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); btnDeleteHead.addSelectionListener(new SelectionAdapter() {
tbtmNewItem.setText("New Item"); tbtmNewItem.setShowClose(true); Composite composite_2 = new Composite(tabFolder_1, SWT.NONE); tbtmNewItem.setControl(composite_2); composite_2.setLayout(new GridLayout(1, false)); tbtmNewItem.setText(key);
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); }
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));
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; }
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 tblclmnNewColumn.setWidth(200); 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.setText(RedisClient.i18nFile.getText(I18nFile.DELETE)); btnRefresh = new Button(grpValues, SWT.NONE); btnRefresh.addSelectionListener(new SelectionAdapter() { @Override
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));
public void widgetSelected( SelectionEvent e ) { final Shell dialogto = new Shell( shell, SWT.DIALOG_TRIM ); dialogto.setText( BaseMessages.getString( PKG, "MailInput.SelectDate" ) ); dialogto.setImage( GUIResource.getInstance().getImageSpoon() ); dialogto.setLayout( new GridLayout( 3, false ) ); final DateTime calendarto = new DateTime( dialogto, SWT.CALENDAR | SWT.BORDER ); final DateTime timeto = new DateTime( dialogto, SWT.TIME | SWT.TIME ); 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() { public void widgetSelected( SelectionEvent e ) { Calendar cal = Calendar.getInstance(); cal.set( Calendar.YEAR, calendarto.getYear() ); cal.set( Calendar.MONTH, calendarto.getMonth() ); cal.set( Calendar.DAY_OF_MONTH, calendarto.getDay() ); cal.set( Calendar.HOUR_OF_DAY, timeto.getHours() ); cal.set( Calendar.MINUTE, timeto.getMinutes() ); cal.set( Calendar.SECOND, timeto.getSeconds() ); wReadTo.setText( new SimpleDateFormat( MailInputMeta.DATE_PATTERN ).format( cal.getTime() ) ); dialogto.close(); } } ); dialogto.setDefaultButton( okto ); dialogto.pack(); dialogto.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, 6)); table.setHeaderVisible(true); table.addSelectionListener(new SelectionAdapter() { tblclmnMember.setText(RedisClient.i18nFile.getText(I18nFile.MEMBER)); 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.setText(RedisClient.i18nFile.getText(I18nFile.DELETE)); btnApply = new Button(grpValues, SWT.NONE); btnApply.addSelectionListener(new SelectionAdapter() { @Override
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 dialogto = new Shell( shell, SWT.DIALOG_TRIM ); dialogto.setText( BaseMessages.getString( PKG, "JobGetPOP.SelectDate" ) ); dialogto.setImage( GUIResource.getInstance().getImageSpoon() ); dialogto.setLayout( new GridLayout( 3, false ) ); final DateTime calendarto = new DateTime( dialogto, SWT.CALENDAR | SWT.BORDER ); final DateTime timeto = new DateTime( dialogto, SWT.TIME | SWT.TIME ); 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() { public void widgetSelected( SelectionEvent e ) { Calendar cal = Calendar.getInstance(); cal.set( Calendar.YEAR, calendarto.getYear() ); cal.set( Calendar.MONTH, calendarto.getMonth() ); cal.set( Calendar.DAY_OF_MONTH, calendarto.getDay() ); cal.set( Calendar.HOUR_OF_DAY, timeto.getHours() ); cal.set( Calendar.MINUTE, timeto.getMinutes() ); cal.set( Calendar.SECOND, timeto.getSeconds() ); wReadTo.setText( new SimpleDateFormat( JobEntryGetPOP.DATE_PATTERN ).format( cal.getTime() ) ); dialogto.close(); } } ); dialogto.setDefaultButton( okto ); dialogto.pack(); dialogto.open(); } } );