Package org.eclipse.swt.widgets

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


      }
    }
  };
  Shell shell = parent.getShell ();
  shell.addListener (SWT.Deiconify, shellListener);
  shell.addListener (SWT.Iconify, shellListener);
 
  /*
  * Generate the appropriate events to activate and deactivate
  * the embedded frame. This is needed in order to make keyboard
  * focus work properly for lightweights.
View Full Code Here


      if (hasFocus) return;
      if (getEditable ()) text.selectAll ();
      hasFocus = true;
      Shell shell = getShell ();
      shell.removeListener (SWT.Deactivate, listener);
      shell.addListener (SWT.Deactivate, listener);
      Display display = getDisplay ();
      display.removeFilter (SWT.FocusIn, filter);
      display.addFilter (SWT.FocusIn, filter);
      Event e = new Event ();
      notifyListeners (SWT.FocusIn, e);
View Full Code Here

        shell.setLayout(new GridLayout());      
        int x = display.getBounds().width;
        int y = display.getBounds().height;
        shell.setBounds(x/4, y/4, width, height);
       
        shell.addListener(SWT.Traverse, new Listener () {
            public void handleEvent (Event event) {
                switch (event.detail) {
                    case SWT.TRAVERSE_ESCAPE:
                        shell.close ();
                        event.detail = SWT.TRAVERSE_NONE;
View Full Code Here

    {
        final Shell shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
        shell.setText(title);
        shell.setLayout(new GridLayout());      
       
        shell.addListener(SWT.Traverse, new Listener () {
            public void handleEvent (Event event) {
                switch (event.detail) {
                    case SWT.TRAVERSE_ESCAPE:
                        shell.close ();
                        event.detail = SWT.TRAVERSE_NONE;
View Full Code Here

      offset[0] = null;
      break;
    }
      }
  };
  shell.addListener(SWT.MouseDown, listener);
  shell.addListener(SWT.MouseUp, listener);
  shell.addListener(SWT.MouseMove, listener);
  shell.setBounds(350, 350, 200, 200);
  shell.open();
  while (!shell.isDisposed())
View Full Code Here

      break;
    }
      }
  };
  shell.addListener(SWT.MouseDown, listener);
  shell.addListener(SWT.MouseUp, listener);
  shell.addListener(SWT.MouseMove, listener);
  shell.setBounds(350, 350, 200, 200);
  shell.open();
  while (!shell.isDisposed())
  {
View Full Code Here

    }
      }
  };
  shell.addListener(SWT.MouseDown, listener);
  shell.addListener(SWT.MouseUp, listener);
  shell.addListener(SWT.MouseMove, listener);
  shell.setBounds(350, 350, 200, 200);
  shell.open();
  while (!shell.isDisposed())
  {
      if (!display.readAndDispatch())
View Full Code Here

        shell.setLayout(new GridLayout());      
        int x = display.getBounds().width;
        int y = display.getBounds().height;
        shell.setBounds(x/4, y/4, width, height);
       
        shell.addListener(SWT.Traverse, new Listener () {
            public void handleEvent (Event event) {
                switch (event.detail) {
                    case SWT.TRAVERSE_ESCAPE:
                        shell.close ();
                        event.detail = SWT.TRAVERSE_NONE;
View Full Code Here

    {
        final Shell shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
        shell.setText(title);
        shell.setLayout(new GridLayout());      
       
        shell.addListener(SWT.Traverse, new Listener () {
            public void handleEvent (Event event) {
                switch (event.detail) {
                    case SWT.TRAVERSE_ESCAPE:
                        shell.close ();
                        event.detail = SWT.TRAVERSE_NONE;
View Full Code Here

          break;
      }
    }
  };
  Shell shell = parent.getShell ();
  shell.addListener (SWT.Deiconify, shellListener);
  shell.addListener (SWT.Iconify, shellListener);
 
  /*
  * Generate the appropriate events to activate and deactivate
  * the embedded frame. This is needed in order to make keyboard
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.