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)); }
public static CTabFolder createTabFolder( Composite composite, FormData fd, String... titles ) { Composite container = new Composite( composite, SWT.NONE ); WidgetUtils.setFormLayout( container, 0 ); container.setLayoutData( fd ); CTabFolder tabFolder = new CTabFolder( container, SWT.NONE ); tabFolder.setLayoutData( new FormDataBuilder().fullSize().result() ); for ( String title : titles ) { if ( title.length() < 8 ) { title = StringUtils.rightPad( title, 8 ); } Composite tab = new Composite( tabFolder, SWT.NONE ); WidgetUtils.setFormLayout( tab, ConstUI.MEDUIM_MARGIN ); CTabItem tabItem = new CTabItem( tabFolder, SWT.NONE ); tabItem.setText( title ); tabItem.setControl( tab ); } tabFolder.setSelection( 0 ); return tabFolder; }
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
@Override protected void initData(Composite dataComposite) { 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.setFocus(); new Label(dataComposite, SWT.NONE); new Label(dataComposite, SWT.NONE); new Label(dataComposite, SWT.NONE); Composite composite = new Composite(dataComposite, SWT.NONE); composite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1)); 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
protected void initTTLTabItem() { super.initTTLTabItem(); new Label(ttlComposite, SWT.NONE); Composite composite = new Composite(ttlComposite, SWT.NONE); composite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1)); composite.setLayout(new GridLayout(2, false)); btnApply = new Button(composite, SWT.NONE); btnApply.addSelectionListener(new SelectionAdapter() { @Override setTTLApply(false); btnRefresh = new Button(composite, SWT.NONE); btnRefresh.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH));
shell.setLayout(new GridLayout(2, false)); Label lblNewLabel_1 = new Label(shell, SWT.NONE); lblNewLabel_1.setImage(questionImage); btnDeleteSubcontainerUnder = new Button(shell, SWT.CHECK); btnDeleteSubcontainerUnder.setSelection(true); btnDeleteSubcontainerUnder.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1)); 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); 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
public Composite createContent( String radioText ) { Control[] existingButtons = radioGroup.getChildren(); Button button = new Button( radioGroup, SWT.RADIO ); button.setText( radioText ); props.setLook( button ); FormData fdButton = new FormData(); fdButton.top = new FormAttachment( 0 ); fdButton.left = existingButtons.length == 0 ? new FormAttachment( 0 ) : new FormAttachment( existingButtons[existingButtons.length - 1], 40 ); button.setLayoutData( fdButton ); button.setSelection( existingButtons.length == 0 ); Composite content = new Composite( contentArea, SWT.NONE ); content.setVisible( existingButtons.length == 0 ); props.setLook( content ); content.setLayout( noMarginLayout ); content.setLayoutData( fdMaximize ); button.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected( SelectionEvent selectionEvent ) { for ( Control control : contentArea.getChildren() ) { control.setVisible( false ); } content.setVisible( true ); } } ); return content; }
tbtmServerInformation.setText(RedisClient.i18nFile.getText(I18nFile.SERVER)); Composite composite = new Composite(tabFolder, SWT.NONE); tbtmServerInformation.setControl(composite); composite.setLayout(new GridLayout(2, false)); Label lblName = new Label(composite, SWT.NONE); lblName.setText(RedisClient.i18nFile.getText(I18nFile.NAME)); text_3.setFocus(); Label lblHost = new Label(composite, SWT.NONE); lblHost.setText(RedisClient.i18nFile.getText(I18nFile.HOST)); 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_6.selectAll(); 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.setText(RedisClient.i18nFile.getText(I18nFile.OK));
tbtmString.setText(RedisClient.i18nFile.getText(I18nFile.FAVORITE)); 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)); text_2.setFocus(); 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 button.setText(RedisClient.i18nFile.getText(I18nFile.OK)); Button button_1 = new Button(composite_1, SWT.NONE); button_1.addMouseListener(new MouseAdapter() { @Override
tbtmString.setText(RedisClient.i18nFile.getText(I18nFile.KEY)); Composite composite = new Composite(tabFolder, SWT.NONE); tbtmString.setControl(composite); 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)); final Button btnCheckButton1 = new Button(composite, SWT.CHECK); btnCheckButton1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); btnCheckButton1.setSelection(true); btnCheckButton1.setVisible(true); Composite composite_1 = new Composite(shell, SWT.NONE); composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1)); composite_1.setLayout(new FillLayout(SWT.HORIZONTAL)); button = new Button(composite_1, SWT.NONE); button.setEnabled(false); button.addMouseListener(new MouseAdapter() {
tbtmString.setText(RedisClient.i18nFile.getText(I18nFile.FAVORITE)); 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)); text_2.setFocus(); Label lblFavorite = new Label(composite, SWT.NONE); lblFavorite.setText(RedisClient.i18nFile.getText(I18nFile.FAVORITE)); text.setText(oldFavorite.getFavorite()); Composite composite_1 = new Composite(shell, SWT.NONE); composite_1.setLayout(new FillLayout(SWT.HORIZONTAL)); composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.BOTTOM, false, true, 1, 1)); Button button = new Button(composite_1, SWT.NONE); button.addMouseListener(new MouseAdapter() { @Override button.setText(RedisClient.i18nFile.getText(I18nFile.OK));
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)); 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); btnNewButton.setText(RedisClient.i18nFile.getText(I18nFile.SUBSCRIBE)); 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));
shell.setLayout(new GridLayout(1, false)); Composite composite = new Composite(shell, SWT.NONE); composite.setLayout(new GridLayout(3, false)); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); image.getImageData().scaledTo((int)(width*0.5),(int)(height*0.5))); Label btnNewButton_1 = new Label(composite, SWT.FLAT); btnNewButton_1.setBounds(0, 0, 80, 27); btnNewButton_1.setImage(scaled050); Label label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL); label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1)); new Label(composite, SWT.NONE); Label lblNewLabel_1 = new Label(composite, SWT.NONE); link_2.setText("<a href=\"https://github.com/caoxinyu/RedisClient/stargazers\">" + RedisClient.i18nFile.getText(I18nFile.CLICK) + "</a>"); 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)); Button btnNewButton = new Button(composite_1, SWT.NONE); btnNewButton.addSelectionListener(new SelectionAdapter() { @Override
sashForm_2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); Composite composite_4 = new Composite(sashForm_2, SWT.NONE); composite_4.setLayout(new GridLayout(1, false)); Composite composite_5 = new Composite(composite_4, SWT.NONE); composite_5.setLayout(new GridLayout(3, false)); composite_5.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1)); label = new Label(composite_5, SWT.NONE); label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1)); label.setText(RedisClient.i18nFile.getText(I18nFile.CHANNEL)); Composite composite_6 = new Composite(composite_4, SWT.NONE); composite_6.setLayout(new GridLayout(2, false)); composite_6.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); label1 = new Label(composite_6, SWT.NONE); label1.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1)); label1.setText(RedisClient.i18nFile.getText(I18nFile.MESSAGE)); sashForm_2.setWeights(new int[] {1, 2}); btnNewButton = new Button(composite_5, SWT.NONE); btnNewButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); btnNewButton.setBounds(0, 0, 75, 25);
protected void runConfigurationSectionLayout( Class<?> PKG, String prefix ) { cRunConfiguration = new Composite( shell, SWT.NONE ); cRunConfiguration.setLayout( new FormLayout() ); props.setLook( cRunConfiguration ); FormData fdLocal = new FormData(); fdLocal.top = new FormAttachment( 0, 15 ); fdLocal.right = new FormAttachment( 100, -15 ); fdLocal.left = new FormAttachment( 0, 15 ); cRunConfiguration.setBackground( shell.getBackground() ); // the default looks ugly cRunConfiguration.setLayoutData( fdLocal ); Label wlRunConfiguration = new Label( cRunConfiguration, SWT.LEFT ); props.setLook( wlRunConfiguration ); wlRunConfiguration.setText( "Run configuration:" ); FormData fdlRunConfiguration = new FormData(); fdlRunConfiguration.top = new FormAttachment( 0 ); fdlRunConfiguration.left = new FormAttachment( 0 ); wlRunConfiguration.setLayoutData( fdlRunConfiguration ); wRunConfiguration = new CCombo( cRunConfiguration, SWT.BORDER ); props.setLook( wRunConfiguration ); FormData fdRunConfiguration = new FormData(); fdRunConfiguration.width = 200; fdRunConfiguration.top = new FormAttachment( wlRunConfiguration, 5 ); fdRunConfiguration.left = new FormAttachment( 0 ); wRunConfiguration.setLayoutData( fdRunConfiguration ); }
private void buildProperiesTab() { CTabItem wPropertiesTab = new CTabItem( wTabFolder, SWT.NONE ); wPropertiesTab.setText( BaseMessages.getString( PKG, "JmsProducerDialog.Properties.Tab" ) ); Composite wPropertiesComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wPropertiesComp ); FormLayout fieldsLayout = new FormLayout(); fieldsLayout.marginHeight = 15; fieldsLayout.marginWidth = 15; wPropertiesComp.setLayout( fieldsLayout ); FormData propertiesFormData = new FormData(); propertiesFormData.left = new FormAttachment( 0, 0 ); propertiesFormData.top = new FormAttachment( wPropertiesComp, 0 ); propertiesFormData.right = new FormAttachment( 100, 0 ); propertiesFormData.bottom = new FormAttachment( 100, 0 ); wPropertiesComp.setLayoutData( propertiesFormData ); buildPropertiesTable( wPropertiesComp ); wPropertiesComp.layout(); wPropertiesTab.setControl( wPropertiesComp ); }
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)); Button btnOk = new Button(composite_1, SWT.NONE); btnOk.addMouseListener(new MouseAdapter() { @Override btnOk.setText(RedisClient.i18nFile.getText(I18nFile.OK)); Button btnCancel = new Button(composite_1, SWT.NONE); btnCancel.addMouseListener(new MouseAdapter() { @Override
private void buildSetupTab() { wSetupTab = new CTabItem( wTabFolder, SWT.NONE ); wSetupTab.setText( BaseMessages.getString( PKG, "BaseStreamingDialog.SetupTab" ) ); wSetupComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wSetupComp ); FormLayout setupLayout = new FormLayout(); setupLayout.marginHeight = 15; setupLayout.marginWidth = 15; wSetupComp.setLayout( setupLayout ); buildSetup( wSetupComp ); FormData fdSetupComp = new FormData(); fdSetupComp.left = new FormAttachment( 0, 0 ); fdSetupComp.top = new FormAttachment( 0, 0 ); fdSetupComp.right = new FormAttachment( 100, 0 ); fdSetupComp.bottom = new FormAttachment( 100, 0 ); wSetupComp.setLayoutData( fdSetupComp ); wSetupComp.layout(); wSetupTab.setControl( wSetupComp ); }
private void buildFieldsTab() { CTabItem wFieldsTab = new CTabItem( wTabFolder, SWT.NONE, 3 ); wFieldsTab.setText( BaseMessages.getString( PKG, "MQTTConsumerDialog.FieldsTab" ) ); Composite wFieldsComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wFieldsComp ); FormLayout fieldsLayout = new FormLayout(); fieldsLayout.marginHeight = 15; fieldsLayout.marginWidth = 15; wFieldsComp.setLayout( fieldsLayout ); FormData fieldsFormData = new FormData(); fieldsFormData.left = new FormAttachment( 0, 0 ); fieldsFormData.top = new FormAttachment( wFieldsComp, 0 ); fieldsFormData.right = new FormAttachment( 100, 0 ); fieldsFormData.bottom = new FormAttachment( 100, 0 ); wFieldsComp.setLayoutData( fieldsFormData ); buildFieldTable( wFieldsComp, wFieldsComp ); wFieldsComp.layout(); wFieldsTab.setControl( wFieldsComp ); }
public void buildFieldsTab() { checkArgument( wTabFolder.getItemCount() > 0 ); CTabItem wFieldsTab = new CTabItem( wTabFolder, SWT.NONE, wTabFolder.getItemCount() - 1 ); wFieldsTab.setText( BaseMessages.getString( PKG, "JmsConsumerDialog.FieldsTab" ) ); Composite wFieldsComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wFieldsComp ); FormLayout fieldsLayout = new FormLayout(); fieldsLayout.marginHeight = 15; fieldsLayout.marginWidth = 15; wFieldsComp.setLayout( fieldsLayout ); FormData fieldsFormData = new FormData(); fieldsFormData.left = new FormAttachment( 0, 0 ); fieldsFormData.top = new FormAttachment( wFieldsComp, 0 ); fieldsFormData.right = new FormAttachment( 100, 0 ); fieldsFormData.bottom = new FormAttachment( 100, 0 ); wFieldsComp.setLayoutData( fieldsFormData ); buildFieldTable( wFieldsComp, wFieldsComp ); wFieldsComp.layout(); wFieldsTab.setControl( wFieldsComp ); }