Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Button.addSelectionListener()


    final Button editButton = new Button(buttonBox, SWT.PUSH);
    editButton.setText("&Edit...");
    editButton.setEnabled(!fViewer.getSelection().isEmpty());
    setButtonLayoutData(editButton);
    editButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        onEdit();
      }
    });
View Full Code Here


    final Button deleteButton = new Button(buttonBox, SWT.PUSH);
    deleteButton.setText("&Delete");
    deleteButton.setEnabled(!fViewer.getSelection().isEmpty());
    setButtonLayoutData(deleteButton);
    deleteButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        onDelete();
      }
    });
View Full Code Here

      });

      Button search = new Button(control, SWT.PUSH);
      search.setText("Search...");
      search.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
      search.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          FileDialog dialog = new FileDialog(getShell(), SWT.OPEN);
          dialog.setFilterExtensions(new String[] { "*.opml", "*.xml", "*.*" });
          String file = dialog.open();
View Full Code Here

    });

    final Button addButton = new Button(buttonContainer, SWT.DOWN);
    setButtonLayoutData(addButton);
    addButton.setText(Messages.NewsColumnSelectionControl_ADD);
    addButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        Rectangle rect = addButton.getBounds();
        Point pt = new Point(rect.x, rect.y + rect.height);
        pt = addButton.toDisplay(pt);
View Full Code Here

      if (fMode == Mode.SEARCH_LOCATION) {
        Button selectAll = new Button(buttonContainer, SWT.PUSH);
        selectAll.setText(Messages.LocationControl_SELECT_ALL);
        Dialog.applyDialogFont(selectAll);
        setButtonLayoutData(selectAll);
        selectAll.addSelectionListener(new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            OwlUI.setAllChecked(fViewer.getTree(), true);
            cacheAll(true);
          }
View Full Code Here

        Button deselectAll = new Button(buttonContainer, SWT.PUSH);
        deselectAll.setText(Messages.LocationControl_DESELECT_ALL);
        Dialog.applyDialogFont(deselectAll);
        setButtonLayoutData(deselectAll);
        deselectAll.addSelectionListener(new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            OwlUI.setAllChecked(fViewer.getTree(), false);
            cacheAll(false);
          }
View Full Code Here

      else {
        Button createBin = new Button(buttonContainer, SWT.PUSH);
        createBin.setText(Messages.LocationControl_NEW_NEWSBIN);
        Dialog.applyDialogFont(createBin);
        setButtonLayoutData(createBin);
        createBin.addSelectionListener(new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            onCreateNewsBin();
          }
        });
View Full Code Here

    for (Control c : control) {

      /* Button */
      if (c instanceof Button) {
        Button button = (Button) c;
        button.addSelectionListener(new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            run.run();
          }
        });
View Full Code Here

    Button addButton = new Button(buttonBox, SWT.PUSH);
    addButton.setText(Messages.ManageLabelsPreferencePage_NEW);
    Dialog.applyDialogFont(addButton);
    setButtonLayoutData(addButton);
    addButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        onAdd();
      }
    });
View Full Code Here

    final Button editButton = new Button(buttonBox, SWT.PUSH);
    editButton.setText(Messages.ManageLabelsPreferencePage_EDIT);
    editButton.setEnabled(!fViewer.getSelection().isEmpty());
    Dialog.applyDialogFont(editButton);
    setButtonLayoutData(editButton);
    editButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        onEdit();
      }
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.