Examples of FocusEvent


Examples of ae.java.awt.event.FocusEvent

            descendant = heavyweight;
        }

        KeyboardFocusManager manager = getCurrentKeyboardFocusManager(SunToolkit.targetToAppContext(descendant));

        FocusEvent currentFocusOwnerEvent = null;
        FocusEvent newFocusOwnerEvent = null;
        Component currentFocusOwner = manager.getGlobalFocusOwner();

        synchronized (heavyweightRequests) {
            HeavyweightFocusRequest hwFocusRequest = getLastHWRequest();
            if (hwFocusRequest == null &&
                heavyweight == manager.getNativeFocusOwner() &&
                allowSyncFocusRequests)
            {

                if (descendant == currentFocusOwner) {
                    // Redundant request.
                    return true;
                }

                // 'heavyweight' owns the native focus and there are no pending
                // requests. 'heavyweight' must be a Container and
                // 'descendant' must not be the focus owner. Otherwise,
                // we would never have gotten this far.
                manager.enqueueKeyEvents(time, descendant);

                hwFocusRequest =
                    new HeavyweightFocusRequest(heavyweight, descendant,
                                                temporary, CausedFocusEvent.Cause.UNKNOWN);
                heavyweightRequests.add(hwFocusRequest);

                if (currentFocusOwner != null) {
                    currentFocusOwnerEvent =
                        new FocusEvent(currentFocusOwner,
                                       FocusEvent.FOCUS_LOST,
                                       temporary, descendant);
                }
                newFocusOwnerEvent =
                    new FocusEvent(descendant, FocusEvent.FOCUS_GAINED,
                                   temporary, currentFocusOwner);
            }
        }
        boolean result = false;
        final boolean clearing = clearingCurrentLightweightRequests;
View Full Code Here

Examples of charva.awt.event.FocusEvent

  Window ancestor = getAncestorWindow();
  Component currentFocus = ancestor.getCurrentFocus();
  if ( currentFocus != this) {
      EventQueue evtQueue =
        Toolkit.getDefaultToolkit().getSystemEventQueue();
      FocusEvent evt = new FocusEvent(AWTEvent.FOCUS_LOST, currentFocus);
      evtQueue.postEvent(evt);

      evt = new FocusEvent(AWTEvent.FOCUS_GAINED, this);
      evtQueue.postEvent(evt);

//      if (getParent() != null)
    getParent().setFocus(this);
View Full Code Here

Examples of com.badlogic.gdx.scenes.scene2d.utils.FocusListener.FocusEvent

  /** Sets the actor that will receive key events.
   * @param actor May be null. */
  public void setKeyboardFocus (Actor actor) {
    if (keyboardFocus == actor) return;
    FocusEvent event = Pools.obtain(FocusEvent.class);
    event.setStage(this);
    event.setType(FocusEvent.Type.keyboard);
    Actor oldKeyboardFocus = keyboardFocus;
    if (oldKeyboardFocus != null) {
      event.setFocused(false);
      event.setRelatedActor(actor);
      oldKeyboardFocus.fire(event);
    }
    if (!event.isCancelled()) {
      keyboardFocus = actor;
      if (actor != null) {
        event.setFocused(true);
        event.setRelatedActor(oldKeyboardFocus);
        actor.fire(event);
        if (event.isCancelled()) setKeyboardFocus(oldKeyboardFocus);
      }
    }
    Pools.free(event);
  }
View Full Code Here

Examples of com.google.gwt.event.dom.client.FocusEvent

            }
        }
    }
   
    protected static void onFocusEvent(final Widget widget, Event event) {
        FocusEvent fevent = new FocusEvent() {
            @Override
            public Object getSource() {
                return widget;
            }
        };
        fevent.setNativeEvent(event);
        List<FocusHandler> handlers = FOCUS_HANDLERS.get(widget);
        if (handlers != null) {
            for (FocusHandler handler : handlers) {
                handler.onFocus(fevent);
            }
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.event.FocusEvent

      logger.finest("onFocus firing focus event " + parent.getId());
    }

    focusContext = context;
    appearance.onFocus(parent, true);
    fireEvent(context, new FocusEvent());
  }
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.event.FocusEvent

      logger.finest("onFocus firing focus event " + parent.getId());
    }

    focusContext = context;
    getAppearance().onFocus(parent, true);
    fireEvent(context, new FocusEvent());
  }
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.event.FocusEvent

      toolTip.enable();
    }
  }

  protected void onFocus(Event event) {
    fireEvent(new FocusEvent());
  }
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.event.FocusEvent

      removeStyleName(disabledStyle);
    }
  }

  protected void onFocus(Event event) {
    fireEvent(new FocusEvent());
  }
View Full Code Here

Examples of com.vaadin.event.FieldEvents.FocusEvent

                }
            }
            firePendingTextChangeEvent();

            if (variables.containsKey(FocusEvent.EVENT_ID)) {
                fireEvent(new FocusEvent(this));
            }
            if (variables.containsKey(BlurEvent.EVENT_ID)) {
                fireEvent(new BlurEvent(this));
            }
        } finally {
View Full Code Here

Examples of com.vaadin.event.FieldEvents.FocusEvent

                setValue(null);
            }
        }

        if (variables.containsKey(FocusEvent.EVENT_ID)) {
            fireEvent(new FocusEvent(this));
        }

        if (variables.containsKey(BlurEvent.EVENT_ID)) {
            fireEvent(new BlurEvent(this));
        }
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.