Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Button


  build(
    Composite    parent )
  {
    parent.setLayout(new FormLayout());
       
    Button cancel_button = new Button( parent, SWT.NULL );

    cancel_button.setText( "Cancel" );
   
    cancel_button.addListener(
        SWT.Selection,
        new Listener()
        {
          public void
          handleEvent(
            Event arg0 )
          {
            synchronized( SimpleInstallUI.this ){
           
              cancelled = true;

              if ( current_downloader != null ){
               
                current_downloader.cancel();
              }
            }
           
            instance.cancel();
          }
        });
     
    FormData  data = new FormData();
    data.right   = new FormAttachment(100,0);
    data.top  = new FormAttachment(0,0);
    data.bottom  = new FormAttachment(100,0);

    cancel_button.setLayoutData( data );
     
    final Label label = new Label(parent, SWT.NULL );
   
    label.setText( "blah blah " );
   
View Full Code Here


    final Text textPath = new Text(panel,SWT.BORDER);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    textPath.setLayoutData(gridData);
    textPath.setText(((ExportTorrentWizard)wizard).getExportFile());
 
    Button browse = new Button(panel,SWT.PUSH);
    Messages.setLanguageText(browse, "exportTorrentWizard.exportfile.browse");
    browse.addListener(SWT.Selection,new Listener() {
     
      public void handleEvent(Event arg0){
       
      FileDialog fd = new FileDialog(wizard.getWizardWindow(), SWT.SAVE );
     
View Full Code Here

        updateTrackers();
        refreshDetails();
      }
    });
          
    btnNew = new Button(panel, SWT.PUSH);  
    Messages.setLanguageText(btnNew, "wizard.multitracker.new");
    gridData = new GridData();
    gridData.widthHint = 100;
    btnNew.setLayoutData(gridData);
    btnNew.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event e) {
        List group = new ArrayList();
        List tracker = new ArrayList();
        tracker.add(((NewTorrentWizard)wizard).trackerURL);
        group.add(tracker);
        new MultiTrackerEditor(null,group,MultiTrackerPanel.this);
      }
    });
   
    btnEdit = new Button(panel, SWT.PUSH);  
    Messages.setLanguageText(btnEdit, "wizard.multitracker.edit");
    gridData = new GridData();
    gridData.widthHint = 100;
    btnEdit.setLayoutData(gridData);
    btnEdit.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event e) {
        int selection = configList.getSelectionIndex();
        String selected = configList.getItem(selection);
        Map multiTrackers = TrackersUtil.getInstance().getMultiTrackers();
        new MultiTrackerEditor(selected,(List)multiTrackers.get(selected),MultiTrackerPanel.this);
      }
    });
   
    btnDelete = new Button(panel, SWT.PUSH);  
    Messages.setLanguageText(btnDelete, "wizard.multitracker.delete");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
    gridData.widthHint = 100;   
    btnDelete.setLayoutData(gridData);
    btnDelete.addListener(SWT.Selection, new Listener() {
View Full Code Here

        updateWebSeeds();
        refreshDetails();
      }
    });
          
    btnNew = new Button(panel, SWT.PUSH);  
    Messages.setLanguageText(btnNew, "wizard.multitracker.new");
    gridData = new GridData();
    gridData.widthHint = 100;
    btnNew.setLayoutData(gridData);
    btnNew.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event e) {
      Map webseeds = new HashMap();
         webseeds.put( "getright", new ArrayList());
         webseeds.put( "webseed", new ArrayList());
        new WebSeedsEditor(null,webseeds,WebSeedPanel.this);
      }
    });
   
    btnEdit = new Button(panel, SWT.PUSH);  
    Messages.setLanguageText(btnEdit, "wizard.multitracker.edit");
    gridData = new GridData();
    gridData.widthHint = 100;
    btnEdit.setLayoutData(gridData);
    btnEdit.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event e) {
        int selection = configList.getSelectionIndex();
        String selected = configList.getItem(selection);
        Map webseeds = TrackersUtil.getInstance().getWebSeeds();
        new WebSeedsEditor(selected,(Map)webseeds.get(selected),WebSeedPanel.this);
      }
    });
   
    btnDelete = new Button(panel, SWT.PUSH);  
    Messages.setLanguageText(btnDelete, "wizard.multitracker.delete");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
    gridData.widthHint = 100;   
    btnDelete.setLayoutData(gridData);
    btnDelete.addListener(SWT.Selection, new Listener() {
View Full Code Here

    final Text textPath = new Text(panel,SWT.BORDER);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    textPath.setLayoutData(gridData);
    textPath.setText("");
 
    Button browse = new Button(panel,SWT.PUSH);
    Messages.setLanguageText(browse, "exportTorrentWizard.torrentfile.browse");
    browse.addListener(SWT.Selection,new Listener() {
      public void handleEvent(Event arg0) {
       
      FileDialog fd = new FileDialog(wizard.getWizardWindow());
     
      fd.setFileName(textPath.getText());
View Full Code Here

        // reset
     
      Label reset_label = new Label(networkGroup, SWT.NULL );
      Messages.setLanguageText(reset_label, CFG_PREFIX + "resetnetwork");

      Button reset_button = new Button(networkGroup, SWT.PUSH);

      Messages.setLanguageText(reset_button, CFG_PREFIX + "reset.button" );

      reset_button.addListener(SWT.Selection,
        new Listener()
      {
            public void
        handleEvent(Event event)
            {
View Full Code Here

    label = new Label(shell, SWT.NONE);
    gridData = new GridData( GridData.FILL_HORIZONTAL );
    label.setLayoutData(gridData);
   
    Button ok = new Button(shell, SWT.PUSH);
    ok.setText(MessageText.getString("Button.ok"));
    gridData = new GridData();
    gridData.widthHint = 70;
    ok.setLayoutData(gridData);
    shell.setDefaultButton(ok);
    ok.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        try {
          shell.dispose();
        }
        catch (Exception e) {
View Full Code Here

      }
    });
    file.setText(((NewTorrentWizard) wizard).directoryPath);
    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    file.setLayoutData(gridData);
    Button browse = new Button(panel, SWT.PUSH);
    browse.addListener(SWT.Selection, new Listener() {
      /*
       * (non-Javadoc)
       *
       * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
       */
 
View Full Code Here

  panel.setLayoutData(gridData);
  layout = new GridLayout();
  layout.numColumns = 1;
  panel.setLayout(layout);

  Button bListMode = new Button(panel,SWT.RADIO);
  Messages.setLanguageText(bListMode,"installPluginsWizard.mode.list");
  bListMode.setData("mode",new Integer(MODE_FROM_LIST));
  if(((InstallPluginWizard)wizard).mode == MODE_FROM_LIST) bListMode.setSelection(true);
   
  Button bFileMode = new Button(panel,SWT.RADIO);
  Messages.setLanguageText(bFileMode,"installPluginsWizard.mode.file");
  bFileMode.setData("mode",new Integer(MODE_FROM_FILE));
  if(((InstallPluginWizard)wizard).mode == MODE_FROM_FILE) bFileMode.setSelection(true);
 
  Listener modeListener = new Listener() {
    public void handleEvent(Event e) {
      mode = ((Integer) e.widget.getData("mode")).intValue();
      ((InstallPluginWizard)wizard).mode = mode;
    }
  };

  bListMode.addListener(SWT.Selection,modeListener);
  bFileMode.addListener(SWT.Selection,modeListener);
 
  if(userMode < 2){
      Group cWiki = new Group(panel, SWT.WRAP);
      cWiki.setText(MessageText.getString("installPluginsWizard.installMode.info.title"));
      gridData = new GridData( GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL);
View Full Code Here

      latency_factor.setLayoutData(gridData);

        Label reset_label = new Label(cSection, SWT.NULL );
        Messages.setLanguageText(reset_label, CFG_PREFIX + "reset");

        Button reset_button = new Button(cSection, SWT.PUSH);

        Messages.setLanguageText(reset_button, CFG_PREFIX + "reset.button" );

        reset_button.addListener(SWT.Selection,
            new Listener()
          {
                public void
            handleEvent(Event event)
                {
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.