Package org.eclipse.swt.widgets

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


        fHelpButton != null && fHelpButton.getSelection()) { // help button was not selected before
      if (getShell() != null) {
        Control c = getShell().getDisplay().getFocusControl();
        while (c != null) {
          if (c.isListening(SWT.Help)) {
            c.notifyListeners(SWT.Help, new Event());
            break;
          }
          c = c.getParent();
        }
        if (fHelpButton != null && getTray() != null) {
View Full Code Here


                    focusControl.getDisplay().asyncExec(
                        new Runnable() {
                          public void run() {
                            if (!focusControl
                                .isDisposed()) {
                              focusControl
                                  .notifyListeners(
                                      SWT.Selection,
                                      null);
                            }
                          }
View Full Code Here

            throw new Error("Something is seriously wrong here"); //$NON-NLS-1$
          }
        } else if (numParams == 0) {
          // This is a no-argument selectAll method.
          methodToExecute.invoke(focusControl, null);
          focusControl.notifyListeners(SWT.Selection, null);

        } else if (numParams == 1) {
          // This is a single-point selection method.
          final Method textLimitAccessor = focusControl.getClass()
              .getMethod("getTextLimit", NO_PARAMETERS); //$NON-NLS-1$
View Full Code Here

          final Integer textLimit = (Integer) textLimitAccessor
              .invoke(focusControl, null);
          final Object[] parameters = { new Point(0, textLimit
              .intValue()) };
          methodToExecute.invoke(focusControl, parameters);
          focusControl.notifyListeners(SWT.Selection, null);

        } else {
          /*
           * This means that getMethodToExecute() has been changed,
           * while this method hasn't.
View Full Code Here

    MenuItem theItem = null;
    // try three times to get the menu item
    for (int i = 0; i < 3; i++) {
      Control control = (Control) bot.widget;
      // for dynamic menus, we need to issue this event
      control.notifyListeners(SWT.MenuDetect, new Event());
      Menu menu = control.getMenu();
      for (String text : texts) {
        Matcher<?> matcher = allOf(instanceOf(MenuItem.class),
            withMnemonic(text));
        theItem = show(menu, matcher);
View Full Code Here

  private void helpPressed() {
      if (getShell() != null) {
        Control c = getShell().getDisplay().getFocusControl();
        while (c != null) {
          if (c.isListening(SWT.Help)) {
            c.notifyListeners(SWT.Help, new Event());
            break;
          }
          c = c.getParent();
        }
      }
View Full Code Here

        MenuItem menuItem = null;
        Control control = bot.widget;

        // MenuDetectEvent added by Stefan Schaefer
        Event event = new Event();
        control.notifyListeners(SWT.MenuDetect, event);
        if (!event.doit) {
          return null;
        }

        Menu menu = control.getMenu();
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.