Package org.eclipse.swt.widgets

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


    }
    });
       
    window.setDefaultButton( btnOk );
   
    window.addListener(SWT.Traverse, new Listener() { 
    public void handleEvent(Event e) {
      if ( e.character == SWT.ESC){
           window.dispose();
       }
    }
View Full Code Here


      public void handleEvent(Event e) {
        shell.dispose();
      }
    });       
   
  shell.addListener(SWT.Traverse, new Listener() {
    
    public void handleEvent(Event e) {
     
      if ( e.character == SWT.ESC){
        shell.dispose();
View Full Code Here

          setSet(false);
          shell.dispose();
        }
      });
       
        shell.addListener(SWT.Traverse, new Listener() {
          public void handleEvent(Event event) {
            if(event.detail == SWT.TRAVERSE_ESCAPE)
              event.doit = false;
          }
        });
View Full Code Here

        public void handleEvent(Event event) {
          shell.dispose();
        }
      });
     
      shell.addListener(SWT.Traverse, new Listener() {
        public void handleEvent(Event event) {
          if(event.detail == SWT.TRAVERSE_ESCAPE)
            event.doit = false;
        }
      });
View Full Code Here

        public void handleEvent(Event event) {
          shell.dispose();
        }
      });
       
        shell.addListener(SWT.Traverse, new Listener() {
          public void handleEvent(Event event) {
            if(event.detail == SWT.TRAVERSE_ESCAPE)
              event.doit = false;
          }
        });
View Full Code Here

          break;
      }
    }
  };
  Shell shell = parent.getShell ();
  shell.addListener (SWT.Deiconify, shellListener);
  shell.addListener (SWT.Iconify, shellListener);
 
  Listener listener = new Listener () {
    public void handleEvent (Event e) {
      switch (e.type) {
View Full Code Here

      }
    }
  };
  Shell shell = parent.getShell ();
  shell.addListener (SWT.Deiconify, shellListener);
  shell.addListener (SWT.Iconify, shellListener);
 
  Listener listener = new Listener () {
    public void handleEvent (Event e) {
      switch (e.type) {
        case SWT.Dispose:
View Full Code Here

        }
      });
    }
  };
  parent.addComponentListener(listener);
  shell.addListener(SWT.Dispose, new Listener() {
    public void handleEvent(Event event) {
      parent.removeComponentListener(listener);
    }
  });
  shell.setVisible (true);
View Full Code Here

      public void handleEvent(Event e) {
        resizeHasOccurred = true;
      }
    };

    newShell.addListener(SWT.Resize, resizeListener);
    newShell.setData(this);

    //Add a listener
    newShell.addShellListener(getShellListener());
View Full Code Here

        control.addListener(SWT.MouseDown, this);
        control.addListener(SWT.Dispose, this);
        control.addListener(SWT.FocusOut, this);
        // Listeners on the target control's shell
        Shell controlShell = control.getShell();
        controlShell.addListener(SWT.Move, this);
        controlShell.addListener(SWT.Resize, this);

      }

      // Remove installed listeners
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.