Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Shell.addDisposeListener()


     
      if (parentShell != null) {
        parentShell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
      }
     
      shell.addDisposeListener(new DisposeListener() {
        public void widgetDisposed(DisposeEvent e) {
          try{
            if (parentShell != null) {
              parentShell.setCursor(e.display.getSystemCursor(SWT.CURSOR_ARROW));
            }
View Full Code Here


      Shell firstShellWithStyle = Utils.findFirstShellWithStyle(SWT.APPLICATION_MODAL);
      if (firstShellWithStyle != null && firstShellWithStyle != this) {
        // ok, there's a window with application_modal set, which on OSX will mean
        // that if we open our window, it will be on top, but users won't be able
        // to interact with it.  So, wait until the modal window goes away..
        firstShellWithStyle.addDisposeListener(new DisposeListener() {
          public void widgetDisposed(DisposeEvent e) {
            // wait for dispose to complete, then run open again to check for
            // any new application modal shells to wait for
            Utils.execSWTThreadLater(0, new AERunnable() {
              public void runSupport() {
View Full Code Here

        return view.getFullTitle();
      }
    };
    UIUpdaterSWT.getInstance().addUpdater(viewUpdater);

    shell.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        UIUpdaterSWT.getInstance().removeUpdater(viewUpdater);
      }
    });
View Full Code Here

          System.out.println("\t" + cats[i]);
        }
      }
    });
   
    shell.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent arg0) {
        if (dogImage != null) {
          dogImage.dispose();
          dogImage = null;
        }
View Full Code Here

    FillLayout fillLayout = new FillLayout();
    fillLayout.marginWidth = 0;
    fillLayout.marginHeight = 0;
    shell.setLayout(fillLayout);
    browserShells.add(shell);
    shell.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        if (e.widget == shell) {
          browserShells.remove(shell);
        }
      }
View Full Code Here

    final Shell shell = holder.getShell();
    if (shell == null || shell.isDisposed() || holder.getMenu() == null) return;
    if (!manager.containsKey(shell))
    {
      manager.put(shell, new ShortcutMap());
      shell.addDisposeListener(new DisposeListener()
      {
        public void widgetDisposed(DisposeEvent e)
        {
          if (manager.containsKey(shell))
          {
View Full Code Here

        } catch (Exception e) {
            e.printStackTrace();
        }
        shell.open();
        shell.addDisposeListener(new DisposeListener() {
          public void widgetDisposed(DisposeEvent e) {
            try {
              viewer.close();
            } catch (RuntimeException exception) {
              exception.printStackTrace();
View Full Code Here

    FillLayout fillLayout = new FillLayout();
    fillLayout.marginWidth = 0;
    fillLayout.marginHeight = 0;
    shell.setLayout(fillLayout);
    browserShells.add(shell);
    shell.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        if (e.widget == shell) {
          browserShells.remove(shell);
        }
      }
View Full Code Here

                          IStatus.INFO | IStatus.WARNING
                          | IStatus.ERROR, modal);
                      dialog.open();
                      Shell dialogShell = dialog.getShell();
                      if(dialogShell != null)
                        dialogShell.addDisposeListener(
                            disposeListener);
                    }
                  }
                });
        }
View Full Code Here

        if (!availableShells.isEmpty()) {
            result = (Shell)availableShells.removeFirst();
        } else {
            result = new Shell(parentShell, flags);
            result.addShellListener(this.closeListener);
            result.addDisposeListener(disposeListener);
        }
       
        result.setData(CLOSE_LISTENER, closeListener);
        return result;
    }
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.