Package org.eclipse.swt.widgets

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


    final Control coolBar = createCoolBarControl(coolbarCacheWrapper
        .getControl());
    // need to resize the shell, not just the coolbar's immediate
    // parent, if the coolbar wants to grow or shrink

    coolBar.addListener(SWT.Resize, new Listener() {
      public void handleEvent(Event event) {
        // If the user is dragging the sash then we will need to force
        // a resize. However, if the coolbar was resized programatically
        // then everything is already layed out correctly. There is no
        // direct way to tell the difference between these cases,
View Full Code Here


  void setExampleWidgetPopupMenu() {
    Control[] controls = getExampleControls();
    for (int i = 0; i < controls.length; i++) {
      final Control control = controls[i];
      control.addListener(SWT.MenuDetect, new Listener() {
        public void handleEvent(Event event) {
          Menu menu = control.getMenu();
          if (menu != null && samplePopup) {
            menu.dispose();
            menu = null;
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.