shell.setText(RedisClient.i18nFile.getText(I18nFile.ADDFAVORITE)); shell.setLayout(new GridLayout(1, false)); tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); Composite composite = new Composite(tabFolder, SWT.NONE); tbtmString.setControl(composite); composite.setLayout(new GridLayout(2, false)); Label lblNewKey = new Label(composite, SWT.NONE); lblNewKey.setText(RedisClient.i18nFile.getText(I18nFile.NAME)); Composite composite_1 = new Composite(shell, SWT.NONE); composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.BOTTOM, false, true, 1, 1)); composite_1.setLayout(new FillLayout(SWT.HORIZONTAL)); Button button = new Button(composite_1, SWT.NONE); button.addMouseListener(new MouseAdapter() { @Override public void mouseUp(MouseEvent e) { button.setText(RedisClient.i18nFile.getText(I18nFile.OK)); Button button_1 = new Button(composite_1, SWT.NONE);
if ( perfComposite.isDisposed() ) { return; 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.setLayoutData( fdButton ); perfComposite.layout( true, true );
private boolean checkPaste() { try { Clipboard clipboard = new Clipboard( xParent.getDisplay() ); TextTransfer transfer = TextTransfer.getInstance(); String text = (String) clipboard.getContents( transfer ); if ( text != null && text.length() > 0 ) { return true; } else { return false; } } catch ( Exception e ) { return false; } }
public void layoutPerfComposite() { if ( !perfComposite.isDisposed() ) { perfComposite.layout( true, true ); } }
private void setCompositeEnabled( Composite comp, boolean enabled ) { // TODO: move to TableView? comp.setEnabled( enabled ); for ( Control child : comp.getChildren() ) { child.setEnabled( enabled ); } }
@Override public void widgetSelected( SelectionEvent selectionEvent ) { for ( Control control : contentArea.getChildren() ) { control.setVisible( false ); } content.setVisible( true ); } } );
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 ); Image image = display.getSystemImage( SWT.ICON_WARNING ); Composite wcMessage = new Composite( shell, SWT.NONE ); props.setLook( wcMessage ); 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 ); if ( !display.readAndDispatch() ) { display.sleep();
public RunConfiguration 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 ); Composite wSettings = new Composite( shell, SWT.SHADOW_NONE ); props.setLook( wSettings ); specLayout.marginWidth = 0; specLayout.marginHeight = 0; wSettings.setLayout( specLayout ); wName.setLayoutData( fdName ); wName.addModifyListener( modifyEvent -> { gOptions.setLayoutData( fdOptions ); wCancel = new Button( shell, SWT.PUSH ); wSettings.setLayoutData( fdSettings ); if ( !display.readAndDispatch() ) { display.sleep();
@Override public String open() { Shell parent = getParent(); Display display = parent.getDisplay(); wTabFolder.setUnselectedCloseVisible( true ); wCancel = new Button( shell, SWT.PUSH ); wCancel.setText( BaseMessages.getString( PKG, "System.Button.Cancel" ) ); wCancel.setLayoutData( fdCancel ); wSetupTab.setText( BaseMessages.getString( PKG, "JmsProducerDialog.SetupTab" ) ); Composite wSetupComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wSetupComp ); FormLayout setupLayout = new FormLayout(); setupLayout.marginHeight = 15; setupLayout.marginWidth = 15; wSetupComp.setLayout( setupLayout ); wSetupComp.setLayoutData( fdSetupComp ); wSetupComp.layout(); wSetupTab.setControl( wSetupComp ); if ( !display.readAndDispatch() ) { display.sleep();
public void open() { final Display display = parent.getDisplay(); shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN ); props.setLook( shell ); shell.setImage( GUIResource.getInstance().getImageSpoon() ); Button closeButton = new Button( shell, SWT.PUSH ); closeButton.setText( BaseMessages.getString( getClass(), "System.Button.Close" ) ); closeButton.addListener( SWT.Selection, new Listener() { public void handleEvent( Event e ) { shell.dispose(); Composite mainPanel = new Composite( scrollpane, SWT.NONE ); scrollpane.setContent( mainPanel ); scrollpane.setSize( 250, 400 ); mainPanel.setLayout( new GridLayout( 1, false ) ); button.setLayoutData( new GridData( GridData.FILL_BOTH, SWT.BEGINNING, false, false ) ); mainPanel.setSize( mainPanel.computeSize( SWT.DEFAULT, SWT.DEFAULT ) ); scrollpane.setMinSize( mainPanel.computeSize( SWT.DEFAULT, SWT.DEFAULT ) ); BaseStepDialog.setSize( shell, 250, 400, false ); if ( !display.readAndDispatch() ) { display.sleep();
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 = new Text(ttlComposite, SWT.BORDER); ttl.setEnabled(false); ttl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); btnExpire.addSelectionListener(new SelectionAdapter() {
composite_3 = new Composite(tabFolder, SWT.NONE); tbtmNewItem.setControl(composite_3); composite_3.setLayout(new GridLayout(1, false)); tbtmNewItem.setText(server.getName() +" "+RedisClient.i18nFile.getText(I18nFile.SUBSCRIBE)); tbtmNewItem.setImage(subImage); Composite composite_4 = new Composite(composite_3, SWT.NONE); composite_4.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); composite_4.setLayout(new GridLayout(3, false)); lblNewLabel = new Label(composite_4, SWT.NONE); lblNewLabel.setBounds(0, 0, 55, 15); lblNewLabel.setText(RedisClient.i18nFile.getText(I18nFile.CHANNEL)); final Text channel = new Text(composite_4, SWT.BORDER); channel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); channel.setBounds(0, 0, 88, 23); btnNewButton = new Button(composite_4, SWT.NONE); btnNewButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); btnNewButton.setBounds(0, 0, 75, 25); Composite composite_5 = new Composite(composite_3, SWT.NONE); composite_5.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); composite_5.setLayout(new GridLayout(1, false)); tabFolder_2.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
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); }
public JobEntryInterface open() { Shell parent = getParent(); display = parent.getDisplay(); shell = new Shell( parent, props.getJobsDialogStyle() ); props.setLook( shell ); JobDialog.setShellImage( shell, jobEntry ); shell.setImage( GUIResource.getInstance().getImageStart() ); wName.setLayoutData( fdName ); BaseStepDialog.setSize( shell, 350, 120, true ); wRepeat = new Button( shell, SWT.CHECK ); wRepeat.addListener( SWT.Selection, new Listener() { public void handleEvent( Event arg0 ) { enableDisableControls(); wIntervalSeconds ); Composite time = new Composite( shell, SWT.NONE ); time.setLayout( new FillLayout() ); wHour = new Spinner( time, SWT.SINGLE | SWT.LEFT | SWT.BORDER ); wHour.setMinimum( 0 ); wOK = new Button( shell, SWT.PUSH ); if ( !display.readAndDispatch() ) { display.sleep();
protected Composite createComposite(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); composite.setFont(parent.getFont()); return composite; }
shell.setText(RedisClient.i18nFile.getText(I18nFile.DELETE)); shell.setLayout(new GridLayout(2, false)); Label lblNewLabel_1 = new Label(shell, SWT.NONE); lblNewLabel_1.setImage(questionImage); Label lblNewLabel = new Label(shell, SWT.NONE); lblNewLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1)); if(containerNo == -1) lblNewLabel.setText(RedisClient.i18nFile.getText(I18nFile.DELETECONTAINERS)); btnDeleteSubcontainerUnder = new Button(shell, SWT.CHECK); btnDeleteSubcontainerUnder.setSelection(true); btnDeleteSubcontainerUnder.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1)); btnDeleteSubcontainerUnder.setText(RedisClient.i18nFile.getText(I18nFile.DELETESUBCONTAINER)); }else btnDeleteSubcontainerUnder = null; Composite composite_1 = new Composite(shell, SWT.NONE); composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 2, 1)); composite_1.setLayout(new FillLayout(SWT.HORIZONTAL)); Button button = new Button(composite_1, SWT.NONE);
shell.setText(RedisClient.i18nFile.getText(I18nFile.DONATION)); 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 arg0) { btnOk.setText(RedisClient.i18nFile.getText(I18nFile.OK));
Composite composite = new Composite( parent, SWT.NONE ); props.setLook( composite ); compLayout.marginHeight = Const.FORM_MARGIN; compLayout.marginWidth = Const.FORM_MARGIN; composite.setLayout( compLayout ); wlServername = new Label( composite, SWT.RIGHT ); wlServername.setText( BaseMessages.getString( PKG, "CreateDatabaseWizardPageInformix.Servername.Label" ) ); props.setLook( wlServername ); fdlServername = new FormData(); fdlServername.top = new FormAttachment( 0, 0 ); fdlServername.left = new FormAttachment( 0, 0 ); fdlServername.right = new FormAttachment( middle, 0 ); wlServername.setLayoutData( fdlServername ); wServername = new Text( composite, SWT.SINGLE | SWT.BORDER ); props.setLook( wServername ); fdServername = new FormData(); fdServername.left = new FormAttachment( middle, margin ); fdServername.right = new FormAttachment( 100, 0 ); wServername.setLayoutData( fdServername ); wServername.addModifyListener( new ModifyListener() { public void modifyText( ModifyEvent arg0 ) { setPageComplete( false );
public int open() { display = parent.getDisplay(); shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.SHEET | SWT.RESIZE | SWT.MAX | SWT.MIN ); props.setLook( shell ); shell.setImage( GUIResource.getInstance().getImageTransGraph() ); middle = props.getMiddlePct(); wComposite = new Composite( shell, SWT.BORDER ); props.setLook( wComposite ); fdComposite.top = new FormAttachment( 0, margin ); fdComposite.bottom = new FormAttachment( wOK, -margin * 2 ); wComposite.setLayoutData( fdComposite ); compositeLayout.marginWidth = Const.FORM_MARGIN; compositeLayout.marginHeight = Const.FORM_MARGIN; wComposite.setLayout( compositeLayout ); while ( !shell.isDisposed() ) { if ( !display.readAndDispatch() ) { display.sleep();
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; }