本文整理汇总了Java中com.google.gwt.event.dom.client.TouchCancelEvent类的典型用法代码示例。如果您正苦于以下问题:Java TouchCancelEvent类的具体用法?Java TouchCancelEvent怎么用?Java TouchCancelEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TouchCancelEvent类属于com.google.gwt.event.dom.client包,在下文中一共展示了TouchCancelEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addMoveHandler
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
protected void addMoveHandler() {
if (msTouchSupported) {
moveRegisteration = addDomHandler(pointerMoveHandler,
PointerMoveEvent.getType());
touchCancelRegisteration = addDomHandler(pointerCancelHandler,
PointerCancelEvent.getType());
} else if (touchSupported) {
moveRegisteration = addDomHandler(touchMoveHandler,
TouchMoveEvent.getType());
touchCancelRegisteration = addDomHandler(touchCancelHandler,
TouchCancelEvent.getType());
} else {
moveRegisteration = addDomHandler(mouseMoveHandler,
MouseMoveEvent.getType());
}
}
示例2: applyController
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public List<HandlerRegistration> applyController(VectorObject shape, MapController mapController) {
List<HandlerRegistration> registrations = new ArrayList<HandlerRegistration>();
registrations.add(shape.addMouseDownHandler(mapController));
registrations.add(shape.addMouseUpHandler(mapController));
registrations.add(shape.addMouseMoveHandler(mapController));
registrations.add(shape.addMouseOutHandler(mapController));
registrations.add(shape.addMouseOverHandler(mapController));
registrations.add(shape.addMouseWheelHandler(mapController));
registrations.add(shape.addDoubleClickHandler(mapController));
registrations.add(shape.addDomHandler(mapController, TouchStartEvent.getType()));
registrations.add(shape.addDomHandler(mapController, TouchEndEvent.getType()));
registrations.add(shape.addDomHandler(mapController, TouchMoveEvent.getType()));
registrations.add(shape.addDomHandler(mapController, TouchCancelEvent.getType()));
return registrations;
}
示例3: shouldAddTouchCancelHandler
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Test
public void shouldAddTouchCancelHandler() {
// given
TouchOnCancelHandler touchOnStartHandler = mock(TouchOnCancelHandler.class);
// when
testObj.addTouchCancelHandler(touchOnStartHandler, listenOn);
// then
verify(listenOn).addDomHandler(any(TouchCancelHandlerImpl.class), eq(TouchCancelEvent.getType()));
}
示例4: onTouchCancel
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public void onTouchCancel(TouchCancelEvent p_event)
{
Touch touch = getTouch(p_event.getChangedTouches(), m_currentTouchEventId);
if (touch != null) {
m_currentTouchEventId = -1;
onOut(Element.as(touch.getTarget()));
}
}
示例5: onTouchCancel
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public void onTouchCancel(TouchCancelEvent event) {
// button.setText("onTouchCanceled");
// event.preventDefault();
// if (event.getTargetTouches().length() == 0) {
// hasTargetTouch = false;
// touchTarget = null;
// }
}
开发者ID:languageininteraction,项目名称:GraphemeColourSynaesthesiaApp,代码行数:10,代码来源:SingleShotEventListner.java
示例6: addHandlers
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
private void addHandlers() {
addDomHandler(this, KeyUpEvent.getType());
if (TouchEvent.isSupported()) {
addDomHandler(this, TouchStartEvent.getType());
addDomHandler(this, TouchMoveEvent.getType());
addDomHandler(this, TouchEndEvent.getType());
addDomHandler(this, TouchCancelEvent.getType());
} else {
addDomHandler(this, MouseDownEvent.getType());
addDomHandler(this, MouseUpEvent.getType());
addDomHandler(this, MouseMoveEvent.getType());
}
addDomHandler(this, FocusEvent.getType());
addDomHandler(this, BlurEvent.getType());
}
示例7: onTouchCancel
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
public void onTouchCancel(TouchCancelEvent event) {
if (isEnabled()) {
handleMouseUp(true);
}
}
示例8: addTouchCancelHandler
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public void addTouchCancelHandler(final TouchOnCancelHandler touchCancelHandler, Widget listenOn) {
listenOn.addDomHandler(new TouchCancelHandlerImpl(touchCancelHandler), TouchCancelEvent.getType());
}
示例9: onTouchCancel
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public void onTouchCancel(TouchCancelEvent event) {
touchOnCancelHandler.onCancel(event.getNativeEvent());
}
示例10: addTouchCancelHandler
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
public HandlerRegistration addTouchCancelHandler(TouchCancelHandler handler) {
return addDomHandler(handler, TouchCancelEvent.getType());
}
示例11: onTouchCancel
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
public void onTouchCancel(TouchCancelEvent event) {
// GWT.log("touchcancel");;
event.preventDefault();
dragging = false;
}
示例12: addTouchCancelHandler
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public com.google.gwt.event.shared.HandlerRegistration addTouchCancelHandler(TouchCancelHandler handler) {
return this.addDomHandler(handler, TouchCancelEvent.getType());
}
示例13: addTouchCancelHandler
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public HandlerRegistration addTouchCancelHandler(TouchCancelHandler handler) {
return this.addDomHandler(handler, TouchCancelEvent.getType());
}
示例14: onTouchCancel
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public void onTouchCancel(TouchCancelEvent event) {
containerScrollStartPosY = -1;
containerScrollStartPosX = -1;
onCancelTouch(event.getNativeEvent());
}
示例15: resetListeners
import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
/**
* Reset listeners.
*/
public void resetListeners() {
Event.sinkEvents(container, Event.ONSCROLL | Event.ONCONTEXTMENU);
if (contextMenuHandlerRegistration == null) {
contextMenuHandlerRegistration = addDomHandler(contextMenuHandler, ContextMenuEvent.getType());
}
if (scrollHandlerRegistration == null) {
scrollHandlerRegistration = addHandler(scrollHandler, ScrollEvent.getType());
}
if (isMsTouchSupported()) {
// IE10 pointer events (ms-prefixed events)
if (pointerDownHandlerRegistration == null) {
pointerDownHandlerRegistration = addDomHandler(msPointerDownHandler, PointerDownEvent.getType());
}
if (pointerUpHandlerRegistration == null) {
pointerUpHandlerRegistration = addDomHandler(msPointerUpHandler, PointerUpEvent.getType());
}
if (pointerMoveHandlerRegistration == null) {
pointerMoveHandlerRegistration = addDomHandler(msPointerMoveHandler, PointerMoveEvent.getType());
}
if (pointerCancelHandlerRegistration == null) {
pointerCancelHandlerRegistration = addHandler(msPointerCancelHandler, PointerCancelEvent.getType());
}
} else if (touchSupported) {
// touch events replaces mouse events
if (touchStartHandlerRegistration == null) {
touchStartHandlerRegistration = addDomHandler(touchStartHandler, TouchStartEvent.getType());
}
if (touchEndHandlerRegistration == null) {
touchEndHandlerRegistration = addDomHandler(touchEndHandler, TouchEndEvent.getType());
}
if (touchMoveHandlerRegistration == null) {
touchMoveHandlerRegistration = addDomHandler(touchMoveHandler, TouchMoveEvent.getType());
}
if (touchCancelHandlerRegistration == null) {
touchCancelHandlerRegistration = addHandler(touchCancelHandler, TouchCancelEvent.getType());
}
} else {
if (mouseDblClickHandlerRegistration == null) {
mouseDblClickHandlerRegistration = addDomHandler(doubleClickHandler, DoubleClickEvent.getType());
}
if (mouseDownHandlerRegistration == null) {
mouseDownHandlerRegistration = addDomHandler(mouseDownHandler, MouseDownEvent.getType());
}
if (mouseUpHandlerRegistration == null) {
mouseUpHandlerRegistration = addDomHandler(mouseUpHandler, MouseUpEvent.getType());
}
if (isMovableSteps() || isResizableSteps()) {
if (mouseMoveHandlerRegistration == null) {
mouseMoveHandlerRegistration = addDomHandler(mouseMoveHandler, MouseMoveEvent.getType());
}
} else if (mouseMoveHandlerRegistration != null) {
mouseMoveHandlerRegistration.removeHandler();
mouseMoveHandlerRegistration = null;
}
}
}