Package com.google.gwt.dom.client

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


    }
  }

  protected void onMouseOut(Context context, XElement parent, String currentValue, NativeEvent event,
      ValueUpdater<String> valueUpdater) {
    EventTarget from = event.getEventTarget();
    if (from != null && Element.is(from)) {
      appearance.onMouseOut(parent, Element.as(from));
    }
  }
View Full Code Here


    }
  }

  protected void onMouseOver(Context context, XElement parent, String currentValue, NativeEvent event,
      ValueUpdater<String> valueUpdater) {
    EventTarget from = event.getEventTarget();
    if (from != null && Element.is(from)) {
      appearance.onMouseOver(parent, Element.as(from));
    }
  }
View Full Code Here

    e.getStatusProxy().setStatus(true);
  }

  @Override
  protected void onDragMove(DndDragMoveEvent event) {
    EventTarget target = event.getDragMoveEvent().getNativeEvent().getEventTarget();
    if (Element.is(target) && !grid.getView().getScroller().isOrHasChild(Element.as(target))) {
      event.setCancelled(true);
      event.getStatusProxy().setStatus(false);
      return;
    }
View Full Code Here

  }

  @Override
  protected void showFeedback(DndDragMoveEvent event) {
    event.getStatusProxy().setStatus(true);
    EventTarget target = event.getDragMoveEvent().getNativeEvent().getEventTarget();
    if (feedback == Feedback.INSERT || feedback == Feedback.BOTH) {
      Element row = grid.getView().findRow(Element.as(target)).cast();

      if (row == null && grid.getStore().size() > 0) {
        row = grid.getView().getRow(grid.getStore().size() - 1).cast();
View Full Code Here

    onDataChange(null);
  }

  @Override
  protected void onClick(Event event) {
    EventTarget eventTarget = event.getEventTarget();
    if (Element.is(eventTarget)) {

      M m = store.get(getView().findRowIndex(Element.as(eventTarget)));
      if (m != null) {
        TreeNode<M> node = findNode(m);
View Full Code Here

      }
    }
  }

  protected void onMouseOut(Event ce) {
    EventTarget to = ce.getRelatedEventTarget();
    if (activeItem != null && (to == null || (Element.is(to) && !activeItem.getElement().isOrHasChild(Element.as(to))))
        && activeItem.shouldDeactivate(ce)) {
      if (to != null && Element.is(to)) {
        XElement xto = to.cast();
        if (xto.findParent("." + CommonStyles.get().ignore(), 3) != null) {
          return;
        }
      }
      deactivateActiveItem();
View Full Code Here

      deactivateActiveItem();
    }
  }

  protected void onMouseOver(Event ce) {
    EventTarget from = ce.getRelatedEventTarget();
    if (from == null || (Element.is(from) && !getElement().isOrHasChild(Element.as(from)))) {
      Widget c = findWidget((Element) ce.getEventTarget().cast());
      if (c != null && c instanceof Item) {
        Item item = (Item) c;
        if (activeItem != item && item.canActivate && item.isEnabled()) {
View Full Code Here

    title = null;
  }

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

      listener = new Listener<ComponentEvent>() {
        public void handleEvent(ComponentEvent be) {
          Element source = target.getElement();
          EventType type = be.getType();
          if (type == Events.OnMouseOver) {
            EventTarget from = be.getEvent().getRelatedEventTarget();
            if (from == null
                || (Element.is(source) && Element.is(from) && !DOM.isOrHasChild(source, (Element) Element.as(from)))) {
              onTargetOver(be);
            }
          } else if (type == Events.OnMouseOut) {
            EventTarget to = be.getEvent().getRelatedEventTarget();
            if (to == null
                || (Element.is(source) && Element.is(to) && !DOM.isOrHasChild(source, (Element) Element.as(to)))) {
              onTargetOut(be);
            }
          } else if (type == Events.OnMouseMove) {
View Full Code Here

                            switch (typeInt) {
                            case Event.ONMOUSEOVER:
                                if (dragElement == null) {
                                    break;
                                }
                                EventTarget currentEventTarget = event
                                        .getNativeEvent()
                                        .getCurrentEventTarget();
                                if (Node.is(currentEventTarget)
                                        && !dragElement.isOrHasChild(Node
                                                .as(currentEventTarget))) {
                                    // drag image appeared below, ignore
                                    break;
                                }
                            case Event.ONKEYDOWN:
                            case Event.ONKEYPRESS:
                            case Event.ONKEYUP:
                            case Event.ONBLUR:
                                // don't cancel possible drag start
                                break;
                            case Event.ONMOUSEOUT:

                                if (dragElement == null) {
                                    break;
                                }
                                EventTarget relatedEventTarget = event
                                        .getNativeEvent()
                                        .getRelatedEventTarget();
                                if (Node.is(relatedEventTarget)
                                        && !dragElement.isOrHasChild(Node
                                                .as(relatedEventTarget))) {
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.