本文整理汇总了Java中com.google.gwt.event.dom.client.TouchEndEvent.stopPropagation方法的典型用法代码示例。如果您正苦于以下问题:Java TouchEndEvent.stopPropagation方法的具体用法?Java TouchEndEvent.stopPropagation怎么用?Java TouchEndEvent.stopPropagation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.event.dom.client.TouchEndEvent
的用法示例。
在下文中一共展示了TouchEndEvent.stopPropagation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onTouchEnd
import com.google.gwt.event.dom.client.TouchEndEvent; //导入方法依赖的package包/类
@Override
public void onTouchEnd(TouchEndEvent event) {
if (startEvent != null) {
event.stopPropagation();
PressEndEvent endEvent = new PressEndEvent(startEvent);
if (endEvent != null) {
eventBus.fireEvent(startEvent);
eventBus.fireEvent(endEvent);
}
reset();
}
}
示例2: onTouchEnd
import com.google.gwt.event.dom.client.TouchEndEvent; //导入方法依赖的package包/类
@Override
public void onTouchEnd(TouchEndEvent event) {
event.stopPropagation();
PressEndEvent endEvent = null;
if (lastMoveEvent != null) {
endEvent = new PressEndEvent(lastMoveEvent);
} else if (startEvent != null) {
endEvent = new PressEndEvent(startEvent);
}
if (endEvent != null) {
eventBus.fireEvent(endEvent);
this.fireEvent(endEvent);
}
reset();
}
示例3: onTouchEnd
import com.google.gwt.event.dom.client.TouchEndEvent; //导入方法依赖的package包/类
@Override
public void onTouchEnd(TouchEndEvent event) {
if (touchStarted) {
event.preventDefault();
event.stopPropagation();
NativeEvent nativeEvent = event.getNativeEvent();
NativeEvent evt = Document.get().createClickEvent(1,
nativeEvent.getScreenX(), nativeEvent.getScreenY(),
nativeEvent.getClientX(), nativeEvent.getClientY(), false,
false, false, false);
getElement().dispatchEvent(evt);
touchStarted = false;
fastClickAt = new Date();
}
}
示例4: onTouchEnd
import com.google.gwt.event.dom.client.TouchEndEvent; //导入方法依赖的package包/类
public void onTouchEnd(TouchEndEvent event) {
if (touchStarted) {
event.preventDefault();
event.stopPropagation();
NativeEvent nativeEvent = event.getNativeEvent();
NativeEvent evt = Document.get().createClickEvent(1,
nativeEvent.getScreenX(), nativeEvent.getScreenY(),
nativeEvent.getClientX(), nativeEvent.getClientY(), false,
false, false, false);
getElement().dispatchEvent(evt);
touchStarted = false;
fastClickAt = new Date();
}
}
示例5: onTouchEnd
import com.google.gwt.event.dom.client.TouchEndEvent; //导入方法依赖的package包/类
@Override
public void onTouchEnd(TouchEndEvent event) {
if (dispatch(event, event.getNativeEvent().getEventTarget().<Element>cast())) {
event.stopPropagation();
}
}