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

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

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

Event.sinkEvents介绍

[英]Sets the current set of events sunk by a given element. These events will be fired to the nearest EventListener specified on any of the element's parents.
[中]设置给定元素接收的当前事件集。这些事件将被激发到在元素的任何父元素上指定的最近的EventListener。

代码示例

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

UnclippedState(Element element) {
 // This case is relatively unusual, in that we swapped a clipped image
 // out, so does not need to be efficient.
 Event.sinkEvents(element, Event.ONCLICK | Event.ONDBLCLICK | Event.MOUSEEVENTS | Event.ONLOAD
   | Event.ONERROR | Event.ONMOUSEWHEEL | Event.TOUCHEVENTS | Event.GESTUREEVENTS);
}

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

@Override
public void sinkEvents(int eventBitsToAdd) {
 // Like CheckBox, we want to hear about inputElem. We
 // also want to know what's going on with the label, to
 // make sure onBrowserEvent is able to record value changes
 // initiated by label events
 if (isOrWasAttached()) {
  Event.sinkEvents(inputElem, eventBitsToAdd
    | Event.getEventsSunk(inputElem));
  Event.sinkEvents(labelElem, eventBitsToAdd
    | Event.getEventsSunk(labelElem));
 } else {
  super.sinkEvents(eventBitsToAdd);
 }
}

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

public HandlerRegistration addScrollHandler(ScrollHandler handler) {
 /*
  * Sink the event on the scrollable element, which may not be the root
  * element.
  */
 Event.sinkEvents(getScrollableElement(), Event.ONSCROLL);
 return addHandler(handler, ScrollEvent.getType());
}

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

@Override
public void sinkEvents(int eventBitsToAdd) {
 if (isOrWasAttached()) {
  Event.sinkEvents(inputElem, eventBitsToAdd
    | Event.getEventsSunk(inputElem));
 } else {
  super.sinkEvents(eventBitsToAdd);
 }
}

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

public HandlerRegistration addScrollHandler(ScrollHandler handler) {
 // Sink the event on the scrollable element, not the root element.
 Event.sinkEvents(getScrollableElement(), Event.ONSCROLL);
 return addHandler(handler, ScrollEvent.getType());
}

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

UnclippedState(Image image) {
 image.replaceElement(Document.get().createImageElement());
 // We are working around an IE race condition that can make the image
 // incorrectly cache itself if the load event is assigned at the same time
 // as the image is added to the dom.
 Event.sinkEvents(image.getElement(), Event.ONLOAD);
 // Todo(ecc) this could be more efficient overall.
 image.sinkEvents(Event.ONCLICK | Event.ONDBLCLICK | Event.MOUSEEVENTS | Event.ONLOAD
   | Event.ONERROR | Event.ONMOUSEWHEEL | Event.TOUCHEVENTS | Event.GESTUREEVENTS);
}

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

Event.sinkEvents(elem, Event.getEventsSunk(inputElem));
Event.sinkEvents(inputElem, 0);
inputElem = newInputElem;
Event.sinkEvents(inputElem, sunkEvents);
inputElem.setId(uid);
if (!"".equals(accessKey)) {

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

UnclippedState(Element element) {
 // This case is relatively unusual, in that we swapped a clipped image
 // out, so does not need to be efficient.
 Event.sinkEvents(element, Event.ONCLICK | Event.ONDBLCLICK | Event.MOUSEEVENTS | Event.ONLOAD
   | Event.ONERROR | Event.ONMOUSEWHEEL | Event.TOUCHEVENTS | Event.GESTUREEVENTS);
}

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

Event.sinkEvents(getElement(), Event.ONSCROLL);
Event.sinkEvents(getScrollableElement(), Event.ONSCROLL);

代码示例来源:origin: GwtMaterialDesign/gwt-material

@Override
public void sinkEvents(int eventBitsToAdd) {
  if (isOrWasAttached()) {
    Event.sinkEvents(inputElem, eventBitsToAdd
        | Event.getEventsSunk(inputElem));
  } else {
    super.sinkEvents(eventBitsToAdd);
  }
}

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3

@Override
public void sinkEvents(int eventBitsToAdd) {
  if (isOrWasAttached()) {
    Event.sinkEvents(inputElem, eventBitsToAdd | Event.getEventsSunk(inputElem));
  } else {
    super.sinkEvents(eventBitsToAdd);
  }
}

代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3

@Override
public void sinkEvents(int eventBitsToAdd) {
  if (isOrWasAttached()) {
    Event.sinkEvents(inputElem, eventBitsToAdd | Event.getEventsSunk(inputElem));
  } else {
    super.sinkEvents(eventBitsToAdd);
  }
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material

@Override
public void sinkEvents(int eventBitsToAdd) {
  if (isOrWasAttached()) {
    Event.sinkEvents(inputElem, eventBitsToAdd
        | Event.getEventsSunk(inputElem));
  } else {
    super.sinkEvents(eventBitsToAdd);
  }
}

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

public HandlerRegistration addScrollHandler(ScrollHandler handler) {
 /*
  * Sink the event on the scrollable element, which may not be the root
  * element.
  */
 Event.sinkEvents(getScrollableElement(), Event.ONSCROLL);
 return addHandler(handler, ScrollEvent.getType());
}

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

public HandlerRegistration addScrollHandler(ScrollHandler handler) {
 // Sink the event on the scrollable element, not the root element.
 Event.sinkEvents(getScrollableElement(), Event.ONSCROLL);
 return addHandler(handler, ScrollEvent.getType());
}

代码示例来源:origin: gwtbootstrap/gwt-bootstrap

@Override
public void sinkEvents(int eventBitsToAdd) {
  if (isOrWasAttached()) {
    Event.sinkEvents(inputElem, eventBitsToAdd | Event.getEventsSunk(inputElem));
  } else {
    super.sinkEvents(eventBitsToAdd);
  }
}

代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit

public CubaWindowWidget() {
  DOM.sinkEvents(header, DOM.getEventsSunk(header) | Event.ONCONTEXTMENU);
  addStyleName(NONMODAL_WINDOW_CLASSNAME);
  Event.sinkEvents(getModalityCurtain(), Event.ONCLICK);
  Event.setEventListener(getModalityCurtain(), event -> {
    if (closeOnClickOutside) {
      if (clickOnModalityCurtain != null) {
        clickOnModalityCurtain.run();
      }
    }
  });
}

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

UnclippedState(Image image) {
 image.replaceElement(Document.get().createImageElement());
 // We are working around an IE race condition that can make the image
 // incorrectly cache itself if the load event is assigned at the same time
 // as the image is added to the dom.
 Event.sinkEvents(image.getElement(), Event.ONLOAD);
 // Todo(ecc) this could be more efficient overall.
 image.sinkEvents(Event.ONCLICK | Event.ONDBLCLICK | Event.MOUSEEVENTS | Event.ONLOAD
   | Event.ONERROR | Event.ONMOUSEWHEEL | Event.TOUCHEVENTS | Event.GESTUREEVENTS);
}

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3

@Override
public void sinkEvents(int eventBitsToAdd) {
  // Sink on the actual element because that's what gets clicked
  if (isOrWasAttached()) {
    Event.sinkEvents(getElement(),
        eventBitsToAdd | Event.getEventsSunk(getElement()));
  } else {
    super.sinkEvents(eventBitsToAdd);
  }
}

代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3

@Override
public void sinkEvents(int eventBitsToAdd) {
  // Sink on the actual element because that's what gets clicked
  if (isOrWasAttached()) {
    Event.sinkEvents(getElement(),
        eventBitsToAdd | Event.getEventsSunk(getElement()));
  } else {
    super.sinkEvents(eventBitsToAdd);
  }
}

相关文章