Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.EventTarget


      }
      case Event.ONMOUSEOUT: {
        // Need to check that we really seem to have left the menu, as
        // mouse-out events get triggered whenever the mouse moves between
        // selections in the menu.
        EventTarget target = event.getRelatedEventTarget();
        Element targetElement = Element.as(target);
        if (!getElement().isOrHasChild(targetElement)) {
          handler.handleMouseOut();
        }
        break;
View Full Code Here


        event.stopPropagation();
      }
    }, new MouseOutHandler() {
      @Override
      public void onMouseOut(MouseOutEvent event) {
        EventTarget to = event.getRelatedTarget();
        // Blur, unless we're moving into a descendant.
        if (!(to != null && hoverable.isOrHasChild(Element.as(to)))) {
          exit(hoverable);
        }
        event.stopPropagation();
View Full Code Here

    return value;
  }

  protected void handleEventForCell(Event event) {
    // Get the event target.
    EventTarget eventTarget = event.getEventTarget();
    if (cell == null || !Element.is(eventTarget)) {
      return;
    }
    final XElement target = event.getEventTarget().cast();
View Full Code Here

   * @param toElement true to use {@link Event#getRelatedEventTarget()}
   * @return the within state
   */
  public final boolean within(Element element, boolean toElement) {
    if (Element.is(element)) {
      EventTarget target = toElement ? getRelatedEventTarget() : getEventTarget();
      if (Element.is(target)) {
        return element.isOrHasChild((Element) target.cast());
      }
    }
    return false;
  }
View Full Code Here

        }

        break;

      case Event.ONMOUSEOVER:
        EventTarget from = event.getRelatedEventTarget();
        if (from == null || (Element.is(from) && !grid.getElement().isOrHasChild(Element.as(from)))) {
          Element r = null;
          if (Element.is(event.getEventTarget())) {
            r = findRow(Element.as(event.getEventTarget()));
          }
          if (r != null) {
            onRowOver(r);
          }
        }
        break;
      case Event.ONMOUSEOUT:
        EventTarget to = event.getRelatedEventTarget();
        if (to == null || (Element.is(to) && !grid.getElement().isOrHasChild(Element.as(to)))) {
          if (overRow != null) {
            onRowOut(overRow);
          }
        }
View Full Code Here

  @Override
  protected void handleComponentEvent(Event ge) {
    super.handleComponentEvent(ge);
    int type = ge.getTypeInt();
    EventTarget t = ge.getEventTarget();

    if (!ignoreScroll && Element.is(t) && (type == Event.ONSCROLL && liveScroller.isOrHasChild(Element.as(t)))
        || (type == Event.ONMOUSEWHEEL && dataTable.isOrHasChild(Element.as(t)))) {
      ge.stopPropagation();
      ge.preventDefault();
View Full Code Here

    return new int[] {first, last};
  }

  protected void handleEventForCell(Event event) {
    // Get the event target.
    EventTarget eventTarget = event.getEventTarget();
    if (cell == null || !Element.is(eventTarget)) {
      return;
    }
    final Element target = event.getEventTarget().cast();
View Full Code Here

   *
   * @param event the event to handle
   */
  protected Cell<?> handleEventForCell(Event event) {
    // Get the event target.
    EventTarget eventTarget = event.getEventTarget();
    if (!Element.is(eventTarget)) {
      return null;
    }
    final Element target = event.getEventTarget().cast();

View Full Code Here

    onTargetOver(event.getNativeEvent().<Event> cast());
  }

  @Override
  protected void onTargetOut(Event ce) {
    EventTarget to = ce.getRelatedEventTarget();
    if (to == null || (Element.is(target) && Element.is(to)
            && !target.isOrHasChild(Element.as(to)))) {
      super.onTargetOut(ce);
    }
  }
View Full Code Here

    }
  }

  protected void onTargetMouseOver(MouseOverEvent event) {
    Element source = event.getNativeEvent().getEventTarget().cast();
    EventTarget from = event.getNativeEvent().getRelatedEventTarget();
    if (source != null && (from == null || !source.isOrHasChild(from.<Element> cast()))) {
      onTargetOver(event.getNativeEvent().<Event> cast());
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.EventTarget

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.