Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.ShellAdapter


  }

  private void registerListeners() {

    /* Add Shell sListener */
    getWindowConfigurer().getWindow().getShell().addShellListener(new ShellAdapter() {
      @Override
      public void shellIconified(ShellEvent e) {
        if (!fBlockIconifyEvent)
          onMinimize();
      }
View Full Code Here


    /* Apply Image */
    fTrayItem.setImage(OwlUI.getImage(fResources, OwlUI.TRAY_OWL));

    /* Minimize to Tray on Shell Iconify if set */
    fTrayShellListener = new ShellAdapter() {

      @Override
      public void shellIconified(ShellEvent e) {
        if (!fBlockIconifyEvent && (fMinimizeFromClose || fPreferences.getBoolean(DefaultPreferences.TRAY_ON_MINIMIZE)))
          moveToTray(shell);
View Full Code Here

    @Override
    protected void configureShell(Shell newShell)
    {
        super.configureShell(newShell);
        newShell.setText("Save as XML");
        newShell.addShellListener(new ShellAdapter()
        {
            @Override
            public void shellActivated(ShellEvent e)
            {
                validateInput();
View Full Code Here

   * </p>
   *
   * @return a shell listener
   */
  protected ShellListener getShellListener() {
    return new ShellAdapter() {
      public void shellClosed(ShellEvent event) {
        event.doit = false; // don't close now
        if (canHandleShellCloseEvent()) {
          handleShellCloseEvent();
        }
View Full Code Here

   * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
   */
  protected void configureShell(Shell newShell) {
    super.configureShell(newShell);
    newShell.setText(JFaceResources.getString("PreferenceDialog.title")); //$NON-NLS-1$
    newShell.addShellListener(new ShellAdapter() {
      public void shellActivated(ShellEvent e) {
        if (lastShellSize == null) {
          lastShellSize = getShell().getSize();
        }
      }
View Full Code Here

    program.createSShell();

    program.hookEvents();

    program.shell.open();
    program.shell.addShellListener(new ShellAdapter() {
      public void shellClosed(ShellEvent e) {
        if (args.length == 1 && args[0].equals("ModalAtClose")) ModalWindow.Show(display);
        super.shellClosed(e);
      }
    });
View Full Code Here

  private void createShell() {
    // Create the shell
    dialogShell = new Shell(parentShell, shellStyle);

    // To handle "ESC" case
    dialogShell.addShellListener(new ShellAdapter() {
      @Override
      public void shellClosed(ShellEvent event) {
        event.doit = false; // don't close now
        dispose();
      }
View Full Code Here

      }
    };

    dialogShell.addListener(SWT.Deactivate, deactivateListener);
    isDeactivateListenerActive = true;
    dialogShell.addShellListener(new ShellAdapter() {
      @Override
      public void shellActivated(ShellEvent e) {
        if (e.widget == dialogShell
            && dialogShell.getShells().length == 0)
          isDeactivateListenerActive = true;
View Full Code Here

      }
    };

    dialogShell.addListener(SWT.Deactivate, deactivateListener);
    isDeactivateListenerActive = true;
    dialogShell.addShellListener(new ShellAdapter() {
      @Override
      public void shellActivated(ShellEvent e) {
        if (e.widget == dialogShell && dialogShell.getShells().length == 0) {
          isDeactivateListenerActive = true;
        }
View Full Code Here

  private void createShell() {
    // Create the shell
    dialogShell = new Shell(parentShell, shellStyle);

    // To handle "ESC" case
    dialogShell.addShellListener(new ShellAdapter() {
      @Override
      public void shellClosed(ShellEvent event) {
        event.doit = false; // don't close now
        dispose();
      }
View Full Code Here

TOP

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

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.