Java 类com.google.gwt.event.dom.client.TouchStartHandler 实例源码

项目:empiria.player    文件:TouchReservationHandler.java   
@Inject
public TouchReservationHandler(@Assisted IsWidget widget, final EventsBus eventsBus) {
    handlerRegistration = widget.asWidget().addDomHandler(new TouchStartHandler() {

        @Override
        public void onTouchStart(TouchStartEvent event) {
            eventsBus.fireEvent(new PlayerEvent(PlayerEventTypes.TOUCH_EVENT_RESERVATION));

        }
    }, TouchStartEvent.getType());
}
项目:firefly    文件:WebPlotView.java   
/**
 * Create a new PlotView.  This constructor is typically used when the
 * PlotView <em>will</em> be placed insides a scrolled window.
 */
public WebPlotView() {
    initWidgets();
    _scrollingRootPanel.addDomHandler(new MouseDownHandler() {
        public void onMouseDown(MouseDownEvent ev) {
            if (_mpw != null) _mpw.selectSelf();
        }
    }, MouseDownEvent.getType());

    _scrollingRootPanel.addDomHandler(new TouchStartHandler() {
        public void onTouchStart(TouchStartEvent event) {
            if (_mpw != null) _mpw.selectSelf();
        }
    }, TouchStartEvent.getType());

}
项目:empiria.player    文件:VideoFullScreenViewImpl.java   
@Inject
public VideoFullScreenViewImpl(EventsBus eventsBus) {
    this.eventsBus = eventsBus;
    initWidget(uiBinder.createAndBindUi(this));
    container.addDomHandler(new TouchStartHandler() {

        @Override
        public void onTouchStart(TouchStartEvent event) {
            VideoFullScreenViewImpl.this.eventsBus.fireEvent(new PlayerEvent(PlayerEventTypes.TOUCH_EVENT_RESERVATION));
        }
    }, TouchStartEvent.getType());
}
项目:empiria.player    文件:TouchReservationHandlerJUnitTest.java   
@Before
public void before() {
    isWidget = mock(IsWidget.class);
    Widget widget = mock(Widget.class);
    doReturn(handlerRegistration).when(widget)
            .addDomHandler(Matchers.any(TouchStartHandler.class), Matchers.any(Type.class));
    doReturn(widget).when(isWidget)
            .asWidget();

    eventsBus = mock(EventsBus.class);

}
项目:empiria.player    文件:TouchReservationHandlerJUnitTest.java   
@Test
public void TouchReservationHandler() throws Exception {
    TouchReservationHandler instance = new TouchReservationHandler(isWidget, eventsBus);
    verify(isWidget.asWidget()).addDomHandler(Matchers.any(TouchStartHandler.class), typeCaptor.capture());
    assertTrue(typeCaptor.getValue()
            .equals(TouchStartEvent.getType()));

}
项目:empiria.player    文件:SimulationModuleTest.java   
@Test
public void initializeCanvasTest() {
    Canvas canvas = mock(Canvas.class);
    testObj.initializeCanvas(canvas);

    verify(canvas).addTouchStartHandler(Matchers.any(TouchStartHandler.class));
    verify(moduleView).add(canvas);
    verify(preloader).hidePreloaderAndRemoveFromParent();

}
项目:appinventor-extensions    文件:HandlerPanel.java   
public HandlerRegistration addTouchStartHandler(TouchStartHandler handler) {
  return addDomHandler(handler, TouchStartEvent.getType());
}
项目:putnami-web-toolkit    文件:AbstractInput.java   
@Override
public com.google.gwt.event.shared.HandlerRegistration addTouchStartHandler(TouchStartHandler handler) {
    return this.addDomHandler(handler, TouchStartEvent.getType());
}
项目:putnami-web-toolkit    文件:ListItem.java   
@Override
public HandlerRegistration addTouchStartHandler(TouchStartHandler handler) {
    return this.addDomHandler(handler, TouchStartEvent.getType());
}
项目:putnami-web-toolkit    文件:Anchor.java   
@Override
public HandlerRegistration addTouchStartHandler(TouchStartHandler handler) {
    return this.addDomHandler(handler, TouchStartEvent.getType());
}
项目:atom    文件:GxtListBoxProxy.java   
@Override
public HandlerRegistration addTouchStartHandler(TouchStartHandler handler) {
    return addDomHandler(handler, TouchStartEvent.getType());
}
项目:geomajas-project-client-gwt2    文件:MapWidgetImpl.java   
@Override
public HandlerRegistration addTouchStartHandler(TouchStartHandler handler) {
    return addDomHandler(handler, TouchStartEvent.getType());
}
项目:rosa    文件:DisplayAreaView.java   
@Override
public HandlerRegistration addTouchStartHandler(TouchStartHandler handler) {
    return viewport.addTouchStartHandler(handler);
}