Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.DisposeListener


          public void run() {
            if (dialog == null || dialog.getShell().isDisposed()) {
              dialog = new SafeRunnableDialog(status);
              dialog.create();
              dialog.getShell().addDisposeListener(
                  new DisposeListener() {
                    public void widgetDisposed(
                        DisposeEvent e) {
                      dialog = null;
                    }
                  });
View Full Code Here


            System.out.println("POPUP OPENED BY PRECEDING EVENT"); //$NON-NLS-1$
          }
          recordCursorPosition();
          popup = new ContentProposalPopup(null, proposals);
          popup.open();
          popup.getShell().addDisposeListener(new DisposeListener() {
            public void widgetDisposed(DisposeEvent event) {
              popup = null;
            }
          });
          internalPopupOpened();
View Full Code Here

                          getShell());
                      infoPopup.open();
                      infoPopup
                          .getShell()
                          .addDisposeListener(
                              new DisposeListener() {
                                public void widgetDisposed(
                                    DisposeEvent event) {
                                  infoPopup = null;
                                }
                              });
View Full Code Here

  /**
   * Add any listeners needed on the target control and on the composite where
   * the decoration is to be rendered.
   */
  private void addControlListeners() {
    disposeListener = new DisposeListener() {
      public void widgetDisposed(DisposeEvent event) {
        dispose();
      }
    };
    printAddListener(control, "DISPOSE"); //$NON-NLS-1$
View Full Code Here

    if ((feature & KEYBOARD_ACTIVATION) == KEYBOARD_ACTIVATION) {
      this.editorActivationStrategy
          .setEnableEditorActivationWithKeyboard(true);
    }
    this.feature = feature;
    this.disposeListener = new DisposeListener() {

      public void widgetDisposed(DisposeEvent e) {
        if( viewer.isCellEditorActive() ) {
          cancelEditing();
        }
View Full Code Here

      };
      shell.getParent().addListener(SWT.Deactivate,
          parentDeactivateListener);
    }

    shell.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent event) {
        handleDispose();
      }
    });
  }
View Full Code Here

   * @see #NO_RECREATE
   */
  public ToolTip(Control control, int style, boolean manualActivation) {
    this.control = control;
    this.style = style;
    this.control.addDisposeListener(new DisposeListener() {

      public void widgetDisposed(DisposeEvent e) {
        data = null;
        deactivate();
      }
View Full Code Here

  /**
   * Add any listeners needed on the target control.
   */
  private void addControlListeners() {
    control.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent event) {
        if (hover != null) {
          hover.dispose();
        }
      }
View Full Code Here

      public void getRole(AccessibleControlEvent e) {
        e.detail = ACC.ROLE_STATUSBAR;
      }
    });

    addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        handleDispose();
      }
    });

    // StatusLineManager skips over the standard status line widgets
    // in its update method. There is thus a dependency
    // between this code defining the creation and layout of the standard
    // widgets and the update method.

    setLayout(new StatusLineLayout());

    fMessageLabel = new CLabel(this, SWT.NONE);// SWT.SHADOW_IN);
   
    // this would need extra work to make this accessible
    // from the workbench command framework.
    Menu menu = new Menu(fMessageLabel);
    fMessageLabel.setMenu(menu);
    copyMenuItem = new MenuItem(menu, SWT.PUSH);
    copyMenuItem.setText(JFaceResources.getString("copy")); //$NON-NLS-1$
    copyMenuItem.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        String text = fMessageLabel.getText();
        if (text != null && text.length() > 0) {
          text = LegacyActionTools.removeMnemonics(text);
          Clipboard cp = new Clipboard(e.display);
          cp.setContents(new Object[] { text },
              new Transfer[] { TextTransfer.getInstance() });
          cp.dispose();
        }
      }
    });
   
    fProgressIsVisible = false;
    fCancelEnabled = false;

    fToolBar = new ToolBar(this, SWT.FLAT);
    fCancelButton = new ToolItem(fToolBar, SWT.PUSH);
    fCancelButton.setImage(fgStopImage.createImage());
    fCancelButton.setToolTipText(JFaceResources
        .getString("Cancel_Current_Operation")); //$NON-NLS-1$
    fCancelButton.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        setCanceled(true);
      }
    });
    fCancelButton.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        Image i = fCancelButton.getImage();
        if ((i != null) && (!i.isDisposed())) {
          i.dispose();
        }
View Full Code Here

          }
        }

      };
      getPreferenceStore().addPropertyChangeListener(listener);
      viewer.getTree().addDisposeListener(new DisposeListener() {

        public void widgetDisposed(DisposeEvent e) {
          getPreferenceStore().removePropertyChangeListener(listener);
          String name = "columnOrderFor" + config.getName();
          String getOrderString = getOrderString(columnOrder);
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.DisposeListener

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.