Package com.google.gwt.user.client

Examples of com.google.gwt.user.client.EventListener


        this(url, null, false);
        if (url == null) {
            throw new NullPointerException("The url parameter can not be null.");
        }
        final Element e = DOM.createImg();
        DOM.setEventListener((com.google.gwt.user.client.Element) e, new EventListener() {
            @Override
            public void onBrowserEvent(Event event) {
                if (event.getTypeInt() == Event.ONLOAD) {
                    width = Integer.parseInt(e.getPropertyString("width"));
                    height = Integer.parseInt(e.getPropertyString("height"));
View Full Code Here


     */
    public static <T> T findWidget(Element element,
            Class<? extends Widget> class1) {
        if (element != null) {
            /* First seek for the first EventListener (~Widget) from dom */
            EventListener eventListener = null;
            while (eventListener == null && element != null) {
                eventListener = Event.getEventListener(element);
                if (eventListener == null) {
                    element = (Element) element.getParentElement();
                }
View Full Code Here

    preview.setAutoHide(false);
    el.addEventsSunk(Event.ONMOUSEDOWN | Event.ONMOUSEOUT | Event.ONMOUSEOVER);
  }

  public void doAttach() {
    DOM.setEventListener(el.dom, new EventListener() {
      public void onBrowserEvent(Event event) {
        switch (event.getTypeInt()) {
          case Event.ONMOUSEDOWN:
            event.stopPropagation();
            event.preventDefault();
View Full Code Here

    wrap.dom.appendChild(trigger.dom);
    setElement(wrap.dom, target, index);

    super.onRender(target, index);

    triggerListener = new EventListener() {
      public void onBrowserEvent(Event event) {
        FieldEvent ce = new FieldEvent(TriggerField.this);
        ce.event = event;
        ce.type = DOM.eventGetType(event);
        ce.stopEvent();
View Full Code Here

    setElement(wrap.dom, target, index);

    super.onRender(target, index);

    triggerListener = new EventListener() {
      public void onBrowserEvent(Event event) {
        FieldEvent ce = new FieldEvent(TwinTriggerField.this);
        ce.event = event;
        ce.type = DOM.eventGetType(event);
        ce.stopEvent();
View Full Code Here

          startEvents();
        }
      }
    }));

    DOM.setEventListener(widget.getElement(), new EventListener() {
      @Override
      public void onBrowserEvent(Event event) {
        if (event.getTypeInt() == Event.ONPASTE) {
          final String before = (String) entity.getState().get();
          new Timer() {
View Full Code Here

      loadingArea.getStyle().setProperty("position", "absolute");
      loadingArea.getStyle().setProperty("width", "1px");
      loadingArea.getStyle().setProperty("height", "1px");
      loadingArea.getStyle().setProperty("overflow", "hidden");
      Document.get().getBody().appendChild(loadingArea);
      Event.setEventListener(loadingArea, new EventListener() {
        public void onBrowserEvent(Event event) {
          boolean success;
          if ("load".equals(event.getType())) {
            success = true;
          } else if ("error".equals(event.getType())) {
View Full Code Here

    preview.setAutoHide(false);
    el.addEventsSunk(Event.ONMOUSEDOWN | Event.ONMOUSEOUT | Event.ONMOUSEOVER);
  }

  public void doAttach() {
    DOM.setEventListener(el.dom, new EventListener() {
      public void onBrowserEvent(Event event) {
        switch (event.getTypeInt()) {
          case Event.ONMOUSEDOWN:
            event.stopPropagation();
            event.preventDefault();
View Full Code Here

    Element implNodelet = element.getImplNodelet();
    final EventHandler handler =
        eventHandlerId == null ? null : AnnotationPaint.eventHandlerRegistry.get(eventHandlerId);
    if (handler != null) {
      DOM.sinkEvents(DomHelper.castToOld(implNodelet), MOUSE_LISTENER_EVENTS);
      DOM.setEventListener(DomHelper.castToOld(implNodelet), new EventListener() {
        @Override
        public void onBrowserEvent(Event event) {
          handler.onEvent(element, event);
        }
      });
View Full Code Here

      return;
    }
    com.google.gwt.user.client.Element target = eventTarget.cast();

    // Get the event listener.
    EventListener listener = DOM.getEventListener(target);
    while (target != null && listener == null) {
      target = target.getParentElement().cast();
      listener = (target == null) ? null : DOM.getEventListener(target);
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.EventListener

Copyright © 2018 www.massapicom. 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.