com.google.gwt.user.client.Event.getCurrentEventTarget()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中com.google.gwt.user.client.Event.getCurrentEventTarget()方法的一些代码示例,展示了Event.getCurrentEventTarget()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getCurrentEventTarget()方法的具体详情如下:
包路径:com.google.gwt.user.client.Event
类名称:Event
方法名:getCurrentEventTarget

Event.getCurrentEventTarget介绍

暂无

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Gets the current target element of the given event. This is the element
 * whose listener fired last, not the element which fired the event initially.
 * 
 * @param evt the event
 * @return the event's current target element
 * @see DOM#eventGetTarget(Event)
 */
public static com.google.gwt.user.client.Element eventGetCurrentTarget(Event evt) {
 return evt.getCurrentEventTarget().cast();
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Gets the current target element of this event. This is the element whose
 * listener fired last, not the element which fired the event initially.
 * 
 * @return the event's current target element
 * @deprecated use {@link NativeEvent#getCurrentEventTarget()} instead
 */
@Deprecated
public final Element getCurrentTarget() {
 return getCurrentEventTarget().cast();
}

代码示例来源:origin: com.google.gwt/gwt-servlet

private static Element getFirstAncestorWithListener(Event evt) {
 Element curElem = evt.getCurrentEventTarget().cast();
 while (curElem != null && getEventListener(curElem) == null) {
  curElem = curElem.getParentNode().cast();
 }
 return curElem;
}

代码示例来源:origin: com.google.gwt/gwt-servlet

private static void dispatchUnhandledEvent(Event evt) {
 Element element = evt.getCurrentEventTarget().cast();
 element.setPropertyString("__gwtLastUnhandledEvent", evt.getType());
 dispatchEvent(evt);
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Gets the current target element of this event. This is the element whose
 * listener fired last, not the element which fired the event initially.
 * 
 * @return the event's current target element
 * @deprecated use {@link NativeEvent#getCurrentEventTarget()} instead
 */
@Deprecated
public final Element getCurrentTarget() {
 return getCurrentEventTarget().cast();
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Gets the current target element of the given event. This is the element
 * whose listener fired last, not the element which fired the event initially.
 * 
 * @param evt the event
 * @return the event's current target element
 * @see DOM#eventGetTarget(Event)
 */
public static com.google.gwt.user.client.Element eventGetCurrentTarget(Event evt) {
 return evt.getCurrentEventTarget().cast();
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Gets the current target element of the given event. This is the element
 * whose listener fired last, not the element which fired the event initially.
 * 
 * @param evt the event
 * @return the event's current target element
 * @see DOM#eventGetTarget(Event)
 */
public static com.google.gwt.user.client.Element eventGetCurrentTarget(Event evt) {
 return evt.getCurrentEventTarget().cast();
}

代码示例来源:origin: com.googlecode.gwtquery/gwtquery

public Function setEvent(Event e) {
 event = e;
 element =
   e != null ? e.getCurrentEventTarget().<com.google.gwt.dom.client.Element> cast() : null;
 return this;
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Gets the current target element of this event. This is the element whose
 * listener fired last, not the element which fired the event initially.
 * 
 * @return the event's current target element
 * @deprecated use {@link NativeEvent#getCurrentEventTarget()} instead
 */
@Deprecated
public final Element getCurrentTarget() {
 return getCurrentEventTarget().cast();
}

代码示例来源:origin: com.googlecode.gwtquery/gwtquery

/**
 * Return the element whose the listener fired last. It represent the context element where the
 * {@link LiveBindFunction} was binded.
 *
 */
private Element getCurrentEventTarget(Event e) {
 EventTarget currentEventTarget = e.getCurrentEventTarget();
 if (!Element.is(currentEventTarget)) {
  return null;
 }
 return Element.as(currentEventTarget);
}

代码示例来源:origin: com.googlecode.gwtquery/gwtquery

/**
 * Wrap a GQuery around an event's target element.
 */
public static GQuery $(Event event) {
 return event == null ? $() : $((Element) event.getCurrentEventTarget().cast());
}

代码示例来源:origin: net.wetheinter/gwt-user

private static void dispatchUnhandledEvent(Event evt) {
 Element element = evt.getCurrentEventTarget().cast();
 element.setPropertyString("__gwtLastUnhandledEvent", evt.getType());
 dispatchEvent(evt);
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

private static Element getFirstAncestorWithListener(Event evt) {
 Element curElem = evt.getCurrentEventTarget().cast();
 while (curElem != null && getEventListener(curElem) == null) {
  curElem = curElem.getParentNode().cast();
 }
 return curElem;
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

private static void dispatchUnhandledEvent(Event evt) {
 Element element = evt.getCurrentEventTarget().cast();
 element.setPropertyString("__gwtLastUnhandledEvent", evt.getType());
 dispatchEvent(evt);
}

代码示例来源:origin: net.wetheinter/gwt-user

private static Element getFirstAncestorWithListener(Event evt) {
 Element curElem = evt.getCurrentEventTarget().cast();
 while (curElem != null && getEventListener(curElem) == null) {
  curElem = curElem.getParentNode().cast();
 }
 return curElem;
}

代码示例来源:origin: com.googlecode.gwtquery/gwtquery

public boolean f(Event e, Object... arg) {
  EventTarget eventTarget = e.getCurrentEventTarget();
  Element target = eventTarget != null ? eventTarget.<Element> cast() : null;
  EventTarget relatedEventTarget = e.getRelatedEventTarget();
  Element related = relatedEventTarget != null ? relatedEventTarget.<Element> cast() : null;
  if (related == null || (related != target && !GQuery.contains(target, related))) {
   getInstance(target).dispatchEvent(e, type);
  }
  return true;
 };
};

代码示例来源:origin: com.extjs/gxt

@SuppressWarnings("unchecked")
public void handleEvent(ComponentEvent ce) {
 if (ce.getType() == keyEvent) {
  if (component.getElement() != (Element) ce.getEvent().getCurrentEventTarget().cast()) {
   return;

相关文章