Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Button


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

      @Override
      protected void createButtonArea(Composite area) {
        super.createButtonArea(area);
        Button btnEdit  = new Button(area, SWT.PUSH);
        btnEdit.setText("edit");
        btnEdit.setLayoutData(GridDataFactory.copyData(_btnLayout));
        _buttons.put(BUTTON_EDIT, btnEdit);
      }
     
     
 
View Full Code Here


    }
    _comboContext.addModifyListener(this);
   
    Label lblEnabled = new Label(composite, SWT.None);
    lblEnabled.setText("");
    _chkEnabled = new Button(composite, SWT.CHECK);
    _chkEnabled.setText("enabled");
    if (_snippet != null) {
      _chkEnabled.setSelection(_snippet.isEnabled());
    } else {
      _chkEnabled.setSelection(true);
View Full Code Here

  gridData.grabExcessHorizontalSpace = true;
    panel.setLayoutData(gridData);
  
    new Label(panel, SWT.NULL);
   
    Button ok = new Button(panel,SWT.PUSH);
    gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_END);
    gridData.widthHint = 70;   
  gridData.grabExcessHorizontalSpace = true;
    ok.setLayoutData(gridData);
    ok.setText(MessageText.getString("Button.ok"));
    ok.addListener(SWT.Selection,new Listener() {
      public void handleEvent(Event e) {    
        last_referrer  = referrer_combo.getText().trim();
       
        if(! referrers.contains(last_referrer)) {
          referrers.add(last_referrer);
          COConfigurationManager.setParameter("url_open_referrers",referrers);
          COConfigurationManager.save();
        }
       
        COConfigurationManager.setParameter( CONFIG_REFERRER_DEFAULT, last_referrer );
        COConfigurationManager.save();
       
        String  url_str = url.getText();
       
        url_str = UrlUtils.parseTextForURL( url_str, true );
       
        if (url_str == null) {
          url_str = UrlUtils.parseTextForMagnets(url.getText());
        }
       
        if ( url_str == null ){
         
          url_str = url.getText();
        }
       
        new FileDownloadWindow(parent,url_str, last_referrer, null, listener );
        shell.dispose();
      }
    });
   
    shell.setDefaultButton (ok);
   
    Button cancel = new Button(panel,SWT.PUSH);
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
  gridData.grabExcessHorizontalSpace = false;
    gridData.widthHint = 70;
    cancel.setLayoutData(gridData);
    cancel.setText(MessageText.getString("Button.cancel"));
    cancel.addListener(SWT.Selection,new Listener() {
      public void handleEvent(Event e) {
        shell.dispose();
      }
    });       
   
View Full Code Here

    layout = new GridLayout();
    layout.numColumns = 1;
    gRadio.setLayout( layout );


    Button off_button = new Button (gRadio, SWT.RADIO);
    Messages.setLanguageText(off_button, "beta.wizard.off");
    final Button on_button = new Button (gRadio, SWT.RADIO);
    Messages.setLanguageText(on_button, "beta.wizard.on");
   
    SelectionAdapter l = new SelectionAdapter()
      {
        public void
        widgetSelected(
          SelectionEvent arg0 )
        {
          wizard.setBetaEnabled( on_button.getSelection());
        }
      };
    off_button.addSelectionListener(l);
    on_button.addSelectionListener(l);
   
    on_button.setSelection( wizard.getBetaEnabled());
    off_button.setSelection( !wizard.getBetaEnabled());

    LinkLabel forum = new LinkLabel( rootPanel, "beta.wizard.forum", MessageText.getString( "beta.wizard.forum.url" ));
    Label forum_label = link.getlabel();
   
View Full Code Here

    GridData groupLayoutData = new GridData(GridData.FILL_HORIZONTAL);
    groupLayoutData.horizontalSpan = 3;
    _tmlscriptOptionsGrp.setLayoutData(groupLayoutData);

    for (String current : _defaultTMLScripts.keySet()) {
      Button currrentButton = new Button(_tmlscriptOptionsGrp, SWT.RADIO);
      currrentButton.setText(current);
      if (current.equals(EMPTY)) {
        currrentButton.setSelection(true);
      }
      _scriptOptionsButtons.add(currrentButton);
    }

    if (_selectedContainer != null) {
View Full Code Here

      _txtTargetLocation.setText(_selectedContainer.getFullPath().toString());
    }
   
   
    new Label(container, SWT.None).setText("DirectAccess:");
    _chkDirectAccess = new Button(container, SWT.CHECK);
    _chkDirectAccess.setText("enabled");
    _chkDirectAccess.setData("directAccess");

    new Label(container, SWT.None).setText("Caching:");
    _chkCachable = new Button(container, SWT.CHECK);
    _chkCachable.setText("enabled");
    _chkCachable.setData("browser cachable");

    setControl(container);
  }
View Full Code Here

        pageChanged();       
      }
     
    });
   
    _btnBrowse = new Button(container, SWT.None);
    _btnBrowse.setText("...");
    _btnBrowse.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        handleBrowse();
      }
     
    });
   
   
    Label lblBuild = new Label(container, SWT.None);
    lblBuild.setText("Build:");
   
    _txtBuild = new Text(container, SWT.BORDER);
    _txtBuild.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    _txtBuild.setText(Integer.toString(getModel().getPluginBuild()));   
    _txtBuild.addModifyListener(new ModifyListener() {

      public void modifyText(ModifyEvent e) {
        pageChanged();     
      }
     
    });
    _txtBuild.addVerifyListener(new VerifyListener() {

      public void verifyText(VerifyEvent e) {
        if (!Character.isIdentifierIgnorable(e.character)) {
          if (Character.isDigit(e.character)) {
            e.doit = true;
          } else {
            e.doit = false;
          }
        }
      }
     
    });
    new Label(container, SWT.None);
   
   
    Group optFileNameGroup = new Group(container, SWT.None);
    optFileNameGroup.setText("File name");
    GridLayout groupLayout = new GridLayout();
    groupLayout.numColumns = 1;
    optFileNameGroup.setLayout(groupLayout);
    GridData groupLayoutData = new GridData(GridData.FILL_HORIZONTAL);
    groupLayoutData.horizontalSpan = 3;
    optFileNameGroup.setLayoutData(groupLayoutData);
    _optFileNameShort = new Button(optFileNameGroup, SWT.RADIO);
    _optFileNameShort.setText("Short");
    _optFileNameShort.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    _optFileNameShort.setSelection(true);
    _optFileNameShort.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        pageChanged();
      }
     
    });
    _optFileNameFQ = new Button(optFileNameGroup, SWT.RADIO);
    _optFileNameFQ.setText("Fully qualified");
    _optFileNameFQ.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    _optFileNameFQ.addSelectionListener(new SelectionAdapter() {

      @Override
View Full Code Here

    String exportLocation = Plugin.getDefault().getPreferenceStore().getString(Preferences.DESIGN_EXPORT_LOCATION);
    _txtExportLocation.setText(new File(exportLocation, _model.getDesignKey() + ".wgadesign").getAbsolutePath());
   
    _txtExportLocation.addModifyListener(this);
   
    _btnBrowse = new Button(container, SWT.None);
    _btnBrowse.setText("...");
    _btnBrowse.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
View Full Code Here

        composite.setLayout(layout);
        new Label(composite, SWT.NONE).setText("Add properties to content type");
        new Label(composite, SWT.NONE);
       
        for (WGMetaFieldDefinition def : METADATA_DEFINITIONS.values()) {
            Button checkMetaData = new Button(composite, SWT.CHECK);
            checkMetaData.setText(METADATA_DEFINITION_LABELS.get(def.getName()));
            if (hasMetaDataDefinition(_contentTypeDefinition, def)) {
                checkMetaData.setSelection(true);
                checkMetaData.setEnabled(false);
            }
            checkMetaData.setData(def);
            _checkBoxes.add(checkMetaData);
        }
       
       
        return composite;
View Full Code Here

    group.setLayout(layout);

    group.setText("Prefix");

    // new Label(group,SWT.NONE)
    _buttonCheckPrefix = new Button(group, SWT.CHECK);
    _buttonCheckPrefix.setText("use Prefix");
    _buttonCheckPrefix.setLayoutData(data);
   

    Label labelPrefix = new Label(group, SWT.NONE);
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.