当前位置: 首页>>代码示例>>Java>>正文


Java TouchCancelEvent类代码示例

本文整理汇总了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());
    }
}
 
开发者ID:tltv,项目名称:gantt,代码行数:17,代码来源:SvgArrowWidget.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:17,代码来源:GfxUtilImpl.java

示例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()));
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:12,代码来源:TouchHandlerInitializerTest.java

示例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()));
  }
}
 
开发者ID:kroc702,项目名称:fullmetalgalaxy,代码行数:10,代码来源:WgtScroll.java

示例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());
}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:16,代码来源:VSwitch.java

示例7: onTouchCancel

import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
public void onTouchCancel(TouchCancelEvent event) {
    if (isEnabled()) {
        handleMouseUp(true);
    }
}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:6,代码来源:VSwitch.java

示例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());
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:5,代码来源:TouchHandlersInitializer.java

示例9: onTouchCancel

import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public void onTouchCancel(TouchCancelEvent event) {
    touchOnCancelHandler.onCancel(event.getNativeEvent());
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:5,代码来源:TouchCancelHandlerImpl.java

示例10: addTouchCancelHandler

import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
public HandlerRegistration addTouchCancelHandler(TouchCancelHandler handler) {
  return addDomHandler(handler, TouchCancelEvent.getType());
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:4,代码来源:HandlerPanel.java

示例11: onTouchCancel

import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
public void onTouchCancel(TouchCancelEvent event) {
//	    GWT.log("touchcancel");;
	    event.preventDefault();
	    dragging = false;
	}
 
开发者ID:sharpie7,项目名称:circuitjs1,代码行数:6,代码来源:Scrollbar.java

示例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());
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:5,代码来源:AbstractInput.java

示例13: addTouchCancelHandler

import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public HandlerRegistration addTouchCancelHandler(TouchCancelHandler handler) {
	return this.addDomHandler(handler, TouchCancelEvent.getType());
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:5,代码来源:ListItem.java

示例14: onTouchCancel

import com.google.gwt.event.dom.client.TouchCancelEvent; //导入依赖的package包/类
@Override
public void onTouchCancel(TouchCancelEvent event) {
    containerScrollStartPosY = -1;
    containerScrollStartPosX = -1;
    onCancelTouch(event.getNativeEvent());
}
 
开发者ID:tltv,项目名称:gantt,代码行数:7,代码来源:GanttWidget.java

示例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;
        }
    }
}
 
开发者ID:tltv,项目名称:gantt,代码行数:63,代码来源:GanttWidget.java


注:本文中的com.google.gwt.event.dom.client.TouchCancelEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。