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


        }
      });
    }
  };
  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 static void main(String[] args) throws Exception {
    Display display = Display.getDefault();
    final Shell shell = new Shell(display);
    final DockContainer container = new DockContainer(shell, SWT.NONE);
    shell.addListener(SWT.Resize, new Listener() {
      @Override
      public void handleEvent(Event event) {
        container.setMinimumShellSize(shell);
      }
    });
View Full Code Here

    button1.setBounds(new Rectangle(120, 10, 60, 20));
    button2.setBounds(new Rectangle(190, 10, 140, 20));
    button3.setBounds(new Rectangle(340, 10, 50, 20));
    button4.setBounds(new Rectangle(400, 10, 80, 20));
   
    shell.addListener(SWT.Paint, new Listener() {
      @Override
      public void handleEvent(Event event) {
        GC gc = event.gc;
        Color foreground = gc.getForeground();
        Color background = gc.getBackground();
View Full Code Here

       
        return -1;
      }
    };
   
    shell.addListener(SWT.MouseDown, listener);
    shell.addListener(SWT.MouseMove, listener);
    shell.addListener(SWT.MouseUp, listener);
   
    shell.open();
   
View Full Code Here

        return -1;
      }
    };
   
    shell.addListener(SWT.MouseDown, listener);
    shell.addListener(SWT.MouseMove, listener);
    shell.addListener(SWT.MouseUp, listener);
   
    shell.open();
   
    while (!shell.isDisposed()) {
View Full Code Here

      }
    };
   
    shell.addListener(SWT.MouseDown, listener);
    shell.addListener(SWT.MouseMove, listener);
    shell.addListener(SWT.MouseUp, listener);
   
    shell.open();
   
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
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

      }
    }
  };
  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

          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.