Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Button


  public void widgetSelected(SelectionEvent event) {
    _currentLabelContent = WGADesignStructureHelper.loadLabel(getCurrentSelectedLabelContainer().getFile(getCurrentSelectedLabelFileName()));

    if (event.widget.equals(_buttonCheckPrefix)) {
      Button check = (Button) event.widget;
      if (check.getSelection()) {
        _comboPrefix.setEnabled(true);

      } else {
        _comboPrefix.setEnabled(false);
View Full Code Here


      _comboLanguage.select(index);
     
      label = new Label(composite, SWT.None);
      label.setText("AutoSort label files:");
     
      _chkSortLabelFiles = new Button(composite, SWT.CHECK);
      _chkSortLabelFiles.setText("enabled");
      _chkSortLabelFiles.setSelection(helper.isSortLabelFiles());
    }   
   
    return composite;
View Full Code Here

        layout.marginHeight = 0;
        layout.horizontalSpacing = 0;
        layout.verticalSpacing = 0;
        container.setLayout(layout);

        _specificHeaderCheckbox = new Button(container, SWT.CHECK);
        GridData specificHeaderCheckboxLayout = new GridData();
        specificHeaderCheckboxLayout.horizontalSpan = 3;
        _specificHeaderCheckbox.setLayoutData(specificHeaderCheckboxLayout);
        _specificHeaderCheckbox.setText("Use specific Header for this project");
        _specificHeaderCheckbox.addSelectionListener(new SelectionListener() {

            public void widgetSelected(SelectionEvent e) {
                if (_specificHeaderCheckbox.getSelection()) {
                    readAllForProject(_selectedProject);
                    for (String current : _headerFileMap.keySet()) {
                        _headerTabTextMap.get(current).setText(_headerFileMap.get(current).getSpecificHeader(_selectedProject));
                        _headerTabTextMap.get(current).setEnabled(true);
                        _importButton.setEnabled(true);
                        _exportButton.setEnabled(true);
                    }
                }
                else {
                    for (String current : _headerFileMap.keySet()) {
                        _headerTabTextMap.get(current).setText(_headerFileMap.get(current).getDefaultHeader());
                        _headerTabTextMap.get(current).setEnabled(false);
                        _importButton.setEnabled(false);
                        _exportButton.setEnabled(false);
                    }
                }
            }

            public void widgetDefaultSelected(SelectionEvent e) {
            }
        });
        _specificHeaderCheckbox.setSelection(Plugin.getDefault().getProjectPreferences(_selectedProject).getBoolean("useSpecificHeader", false));

       
        _headerTabFolder = new TabFolder(container, SWT.NONE);
       

       
        Composite buttonContainer = new Composite(container, SWT.NONE);
        GridLayout buttonLayout = new GridLayout();
        buttonLayout.numColumns = 1;
        buttonLayout.marginHeight = 0;
        buttonLayout.marginWidth = 0;            
  
        buttonContainer.setLayout(buttonLayout);
        buttonContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
       
       
       
       
       
       
        _importButton = new Button(buttonContainer, SWT.NONE);
        _importButton.setText("Import");
        _importButton.addSelectionListener(new SelectionListener() {

            public void widgetSelected(SelectionEvent e) {
                handleImport();
            }

            public void widgetDefaultSelected(SelectionEvent e) {
            }
        });

        _exportButton = new Button(buttonContainer, SWT.NONE);
        _exportButton.setText("Export");
        _exportButton.addSelectionListener(new SelectionListener() {

            public void widgetSelected(SelectionEvent e) {
                handleExport();
View Full Code Here

        factory.addFiller(subform);
        txtValue = factory.createText(subform, "Module:", "layout");              
        txtValue.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        final Text fTxtLayout = txtValue;
        Button btnBrowseLayout = new Button(subform, SWT.PUSH);
        btnBrowseLayout.setText("browse ...");
        btnBrowseLayout.addSelectionListener(new SelectionListener() {
           
            public void widgetSelected(SelectionEvent e) {
                handleBrowserLayout(fTxtLayout)
            }
           
View Full Code Here

    _tableControl = new EditableTableControl<WGADeployment>(_container, SWT.NONE) {

      @Override
      protected void createButtonArea(Composite area) {
        super.createButtonArea(area);
        Button btnUpdate = new Button(area, SWT.PUSH);
        btnUpdate.setText("update deployment");
        btnUpdate.setLayoutData(GridDataFactory.copyData(_btnLayout));
        btnUpdate.setEnabled(false);
        _buttons.put(BUTTON_UPDATE, btnUpdate);
        Button btnEdit  = new Button(area, SWT.PUSH);
        btnEdit.setText("edit");
        btnEdit.setLayoutData(GridDataFactory.copyData(_btnLayout));
        _buttons.put(BUTTON_EDIT, btnEdit);
      }
     
    };
    _tableControl.setLayoutData(new GridData(GridData.FILL_BOTH));
View Full Code Here

    _tableControl = new EditableTableControl<WGARemoteServer>(_container, SWT.NONE, SWT.BORDER | SWT.FULL_SELECTION) {

      @Override
      protected void createButtonArea(Composite area) {
        super.createButtonArea(area);
        Button btnUpdate = new Button(area, SWT.PUSH);
        btnUpdate.setText("edit");
        btnUpdate.setLayoutData(GridDataFactory.copyData(_btnLayout));
        btnUpdate.setEnabled(false);
        btnUpdate.setData(SWTBotIDs.WIDGET_KEY, ResourceIDs.EDITABLE_TABLE_CONTROL_BUTTON_EDIT);
        _buttons.put(BUTTON_EDIT, btnUpdate);
      }

    };
 
View Full Code Here

    group.setLayoutData(groupData);
    group.setLayout(new GridLayout(3, false));
   
    GridData optionStyle = new GridData();
    optionStyle.horizontalSpan = 3;
    _optionDownload = new Button(group, SWT.RADIO);
    _optionDownload.setText("Download latest WGA release from \n'" + WGADesignerPlugin.getDefault().getWGADownloadURL().toString() + "'.");
    _optionDownload.setLayoutData(GridDataFactory.copyData(optionStyle));
    _optionDownload.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        dialogchanged();
      }
     
    });
       
   
    _optionLocalFile = new Button(group, SWT.RADIO);
    _optionLocalFile.setText("Use local WGA war file ...");
    _optionLocalFile.setLayoutData(GridDataFactory.copyData(optionStyle));
   
    _optionLocalFile.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        dialogchanged();
      }
     
    });
   
    _lblFileLocation = new Label(group, SWT.None);
        _lblFileLocation.setText("File:");
        _txtFileLocation = new Text(group, SWT.BORDER);
        _txtFileLocation.setLayoutData(GridDataFactory.copyData(txtStyle));
        _txtFileLocation.addModifyListener(this);
       
        if (_deployment != null) {
            _txtFileLocation.setFocus();
        }
       
        _btnBrowse = new Button(group, SWT.PUSH);
        _btnBrowse.setText("...");
        _btnBrowse.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                handleBrowse();
            }  
        });
   

      _optionCustomURL  = new Button(group, SWT.RADIO);
        _optionCustomURL.setText("Download from ...");
        _optionCustomURL.setLayoutData(GridDataFactory.copyData(optionStyle));
        _optionCustomURL.addSelectionListener(new SelectionAdapter() {
           
            @Override
View Full Code Here

        buttonGroup.setLayout(buttonGroupLayout);
        GridData buttonGroupLayoutData = new GridData();
        buttonGroupLayoutData.horizontalSpan = 2;
        buttonGroup.setLayoutData(buttonGroupLayoutData);
       
      _btnStartRuntime = new Button(buttonGroup, SWT.PUSH);
      _btnStartRuntime.setData(SWTBotIDs.WIDGET_KEY, ResourceIDs.SWTBOT_WGARUNTIME_EDITOR_BUTTON_START);
      _btnStartRuntime.setText("Start");

      _btnStartRuntime.setImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_SERVER_START));
      _btnStartRuntime.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        try {
          StartWGARuntime.call(_model.getWgaRuntime());
          //_btnStartRuntime.setEnabled(false);
        } catch (Exception ex) {         
        }
      }
       
      });

     
      _btnStopRuntime = new Button(buttonGroup, SWT.PUSH);
      _btnStopRuntime.setText("Stop");
      _btnStopRuntime.setData(SWTBotIDs.WIDGET_KEY, ResourceIDs.SWTBOT_WGARUNTIME_EDITOR_BUTTON_STOP);
      _btnStopRuntime.setImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_SERVER_STOP));
      _btnStopRuntime.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        try {
          StopWGARuntime.call();
          //_btnStopRuntime.setEnabled(false);
        } catch (Exception ex) {         
        }
      }
       
      });
     
     
      _btnRestartRuntime = new Button(buttonGroup, SWT.PUSH);
      _btnRestartRuntime.setText("Restart");

      _btnRestartRuntime.setImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_SERVER_RESTART));
      _btnRestartRuntime.addSelectionListener(new SelectionAdapter() {
View Full Code Here

    grid_data.horizontalSpan = 1;
    control.setLayoutData(grid_data);

        // start
   
      start_button = new Button( control, SWT.PUSH );
       
       Messages.setLanguageText( start_button, "ConfigView.section.start");
      
       start_button.addSelectionListener(
         new SelectionAdapter()
         {
           public void
           widgetSelected(
             SelectionEvent e )
           {
             start_button.setEnabled( false );
            
             cancel_button.setEnabled( true );
            
             startTest();
           }
         });
      
         // cancel
      
       cancel_button = new Button( control, SWT.PUSH );
      
       Messages.setLanguageText( cancel_button, "UpdateWindow.cancel");
      
       cancel_button.addSelectionListener(
         new SelectionAdapter()
         {
           public void
           widgetSelected(
             SelectionEvent e )
           {
             cancel_button.setEnabled( false );
                         
             cancelTest();
           }
         });
   
       cancel_button.setEnabled( false );
      
      Composite options = new Composite(control, SWT.NONE);
      layout = new GridLayout();
      layout.numColumns      = 3;
      layout.marginHeight   = 4;
      layout.marginWidth     = 4;
      options.setLayout(layout);

      grid_data = new GridData(GridData.FILL_HORIZONTAL);
      options.setLayoutData(grid_data);

        Button opt1 = new Button( options, SWT.CHECK );

        opt1.setText( "ping/route" );
       
        addOption( opt1, NetStatusPluginTester.TEST_PING_ROUTE );
       
        Button opt2 = new Button( options, SWT.CHECK );

        opt2.setText( "outbound" );

        addOption( opt2, NetStatusPluginTester.TEST_OUTBOUND );

        Button opt3 = new Button( options, SWT.CHECK );

        opt3.setText( "inbound" );

        addOption( opt3, NetStatusPluginTester.TEST_INBOUND );

        Button opt4 = new Button( options, SWT.CHECK );

        opt4.setText( "nat/proxies" );

        addOption( opt4, NetStatusPluginTester.TEST_NAT_PROXIES );

        Button opt5 = new Button( options, SWT.CHECK );

        opt5.setText( "BT connect" );

        addOption( opt5, NetStatusPluginTester.TEST_BT_CONNECT );
       
      // log area
   
View Full Code Here

   
    cookieListener.hook();
       
    Label separator = new Label(shell,SWT.SEPARATOR | SWT.HORIZONTAL);
   
    Button alt_method = null;
   
    if ( isMine ){
     
      alt_method = new Button(shell,SWT.CHECK);
     
      final Button f_alt_method = alt_method;
     
      alt_method.setText(MessageText.getString("externalLogin.auth_method_proxy"));
     
      alt_method.setSelection( authMode == WebEngine.AM_PROXY );
     
      alt_method.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event arg0) {
 
          setCaptureMethod( browser, !f_alt_method.getSelection(), true );
        }
      });
    }
   
    setCaptureMethod( browser, authMode == WebEngine.AM_TRANSPARENT, true );
       
    Button cancel = new Button(shell,SWT.PUSH);
    cancel.setText(MessageText.getString("Button.cancel"));
   
    Button done = new Button(shell,SWT.PUSH);
    done.setText(MessageText.getString("Button.done"));
   
    cancel.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        if(listener != null) {
          listener.canceled(ExternalLoginWindow.this);
        }
        shell.dispose();
      }
    });
   
    done.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        if(listener != null) {
          listener.done(ExternalLoginWindow.this,cookiesToString());
        }
        shell.dispose();
      }
    });
   
    FormData data;
   
    data =  new FormData();
    data.left = new FormAttachment(0,5);
    data.right = new FormAttachment(100,-5);
    data.top = new FormAttachment(0,5);
    explain.setLayoutData(data);
   
    data =  new FormData();
    data.left = new FormAttachment(0,5);
    data.right = new FormAttachment(100,-5);
    data.top = new FormAttachment(explain,5);
    data.bottom = new FormAttachment(separator,-5);
    browser.setLayoutData(data);
   
    data =  new FormData();
    data.left = new FormAttachment(0,0);
    data.right = new FormAttachment(100,0);
    data.bottom = new FormAttachment(cancel,-5);
    separator.setLayoutData(data);
   
    if ( isMine ){
     
      data =  new FormData();
      data.width = 100;
      data.left = new FormAttachment(0,5);
      data.right = new FormAttachment(cancel,-5);
      data.bottom = new FormAttachment(100,-5);
      alt_method.setLayoutData(data);
    }
   
    data =  new FormData();
    data.width = 100;
    data.right = new FormAttachment(done,-5);
    data.bottom = new FormAttachment(100,-5);
    cancel.setLayoutData(data);
   
    data =  new FormData();
    data.width = 100;
    data.right = new FormAttachment(100,-5);
    data.bottom = new FormAttachment(100,-5);
    done.setLayoutData(data);
   
    shell.layout();
    shell.open();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Button

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.