Example usage for com.google.gwt.event.dom.client TouchMoveEvent getType

List of usage examples for com.google.gwt.event.dom.client TouchMoveEvent getType

Introduction

In this page you can find the example usage for com.google.gwt.event.dom.client TouchMoveEvent getType.

Prototype

public static Type<TouchMoveHandler> getType() 

Source Link

Document

Gets the event type associated with touch move events.

Usage

From source file:com.appkit.ui.client.widgets.touch.TouchFlowPanel.java

License:Apache License

@Override
public HandlerRegistration addTouchMoveHandler(TouchMoveHandler handler) {
    return addHandler(handler, TouchMoveEvent.getType());
}

From source file:com.bearsoft.gwt.ui.widgets.DropDownButton.java

@Override
public HandlerRegistration addTouchMoveHandler(TouchMoveHandler handler) {
    return super.addDomHandler(handler, TouchMoveEvent.getType());
}

From source file:com.brazoft.foundation.gwt.client.event.Events.java

License:Apache License

public static <W extends Widget> W on(W widget, TouchMoveHandler handler) {
    widget.addDomHandler(handler, TouchMoveEvent.getType());
    return widget;
}

From source file:com.github.gwtbootstrap.client.ui.Button.java

License:Apache License

/**
 * {@inheritDoc}
 */
public HandlerRegistration addTouchMoveHandler(TouchMoveHandler handler) {
    return addDomHandler(handler, TouchMoveEvent.getType());
}

From source file:com.google.code.gwt.crop.client.GWTCropper.java

License:Apache License

/**
 * Constructor with mandatory parameter of image's URL.
 *
 * @param imageURL - URL of an uncropped image
 *///from www.  j a v a2  s .  c o  m
@UiConstructor
public GWTCropper(String imageURL) {
    super("");
    this.imageURL = imageURL;

    bundleResources.css().ensureInjected();
    this._container = new AbsolutePanelImpl();
    this.addCanvas(imageURL);

    addDomHandler(this, MouseMoveEvent.getType());
    addDomHandler(this, MouseUpEvent.getType());
    addDomHandler(this, MouseOutEvent.getType());

    addDomHandler(this, TouchMoveEvent.getType());
    addDomHandler(this, TouchEndEvent.getType());
}

From source file:com.googlecode.mgwt.ui.client.widget.touch.TouchWidgetTouchImpl.java

License:Apache License

@Override
public HandlerRegistration addTouchMoveHandler(Widget w, TouchMoveHandler handler) {
    return w.addDomHandler(handler, TouchMoveEvent.getType());
}

From source file:com.sciencegadgets.client.algebra.AlgebraHistory.java

License:Open Source License

public AlgebraHistory() {
    addStyleName(CSS.ALG_OUT);//  ww  w. j a  v  a 2  s .  c o  m

    if (Moderator.isTouch) {
        this.addDomHandler(new AlgOutTouchMove(), TouchMoveEvent.getType());
        this.addDomHandler(new AlgOutTouchEnd(), TouchEndEvent.getType());
    } else {
        this.addDomHandler(new AlgOutClickHandler(), ClickEvent.getType());
    }

    String goalStr = URLParameters.getParameter(Parameter.goal);
    if (goalStr != null && !"".equals(goalStr)) {
        Label firstRowEq = new HTML("Simplify to: " + goalStr);

        FlowPanel firstRow = new FlowPanel();
        firstRowEq.addStyleName(CSS.ALG_OUT_EQ_ROW);
        firstRow.add(firstRowEq);

        Label firstRowRule = new Label();
        firstRowRule.addStyleName(CSS.ALG_OUT_RULE_ROW);
        firstRow.add(firstRowRule);

        firstRow.addStyleName(CSS.ALG_OUT_ROW);

        add(firstRow);
    }
}

From source file:com.sencha.gxt.core.client.gestures.TouchEventToGestureAdapter.java

License:sencha.com license

/**
 * Add gesture support to an existing widget.
 * If the widget is a GXT Component then handle the events in the component otherwise handle them here.
 *
 * @param targetWidget add gesture support to this widget
 * @param gestureRecongnizer is the type of touch support to be added
 *//*w w w .ja  v  a  2 s  .co m*/
public TouchEventToGestureAdapter(Widget targetWidget, GestureRecognizer gestureRecongnizer) {
    this.targetWidget = targetWidget;
    this.gestureRecognizer = gestureRecongnizer;

    gestureRecongnizer.setDelegate(targetWidget);

    // Handle events in HasGestureRecognizers widgets/components
    if (targetWidget instanceof HasGestureRecognizers) {
        ((HasGestureRecognizers) targetWidget).addGestureRecognizer(gestureRecongnizer);
    } else {
        handlerRegistration.add(targetWidget.addDomHandler(this, TouchStartEvent.getType()));
        handlerRegistration.add(targetWidget.addDomHandler(this, TouchMoveEvent.getType()));
        handlerRegistration.add(targetWidget.addDomHandler(this, TouchEndEvent.getType()));
        handlerRegistration.add(targetWidget.addDomHandler(this, TouchCancelEvent.getType()));
    }
}

From source file:com.sencha.gxt.widget.core.client.tips.ToolTip.java

License:sencha.com license

/**
 * Binds the tool tip to the target widget. Allows a tool tip to switch the target widget.
 *
 * @param widget the target widget//from w ww  .  j  a  va  2 s.c  o m
 */
public void initTarget(final Widget widget) {
    if (handlerRegistration != null) {
        handlerRegistration.removeHandler();
    }

    if (widget != null) {
        this.target = widget.getElement();

        Handler handler = new Handler();
        handlerRegistration = new GroupingHandlerRegistration();
        handlerRegistration.add(widget.addDomHandler(handler, MouseOverEvent.getType()));
        handlerRegistration.add(widget.addDomHandler(handler, MouseOutEvent.getType()));
        handlerRegistration.add(widget.addDomHandler(handler, MouseMoveEvent.getType()));
        handlerRegistration.add(widget.addDomHandler(handler, TouchMoveEvent.getType()));
        handlerRegistration.add(widget.addHandler(handler, HideEvent.getType()));
        handlerRegistration.add(widget.addHandler(handler, AttachEvent.getType()));

        // handles displaying tooltip on long press
        longPressOrTapGestureRecognizer = new LongPressOrTapGestureRecognizer() {
            @Override
            protected void onLongPress(TouchData touchData) {
                super.onLongPress(touchData);

                onTargetOver(touchData.getLastNativeEvent().<Event>cast());
            }

            @Override
            public boolean handleEnd(NativeEvent endEvent) {
                // cancel preventing default in this recognizer.
                cancel();

                return super.handleEnd(endEvent);
            }
        };

        // listen for touch events on the widget
        new TouchEventToGestureAdapter(widget, longPressOrTapGestureRecognizer);
    }
}

From source file:com.vaadin.addon.timeline.gwt.client.VTimelineBrowser.java

@Override
protected void onLoad() {
    super.onLoad();
    // Handlers are removed by super.onUnload()
    handlers.add(addDomHandler(this, MouseDownEvent.getType()));
    handlers.add(addDomHandler(this, MouseDownEvent.getType()));
    handlers.add(addDomHandler(this, MouseUpEvent.getType()));
    handlers.add(addDomHandler(this, MouseMoveEvent.getType()));
    handlers.add(addDomHandler(this, MouseWheelEvent.getType()));
    handlers.add(addDomHandler(this, DoubleClickEvent.getType()));
    handlers.add(Event.addNativePreviewHandler(this));
    handlers.add(addDomHandler(this, TouchStartEvent.getType()));
    handlers.add(addDomHandler(this, TouchMoveEvent.getType()));
    handlers.add(addDomHandler(this, TouchEndEvent.getType()));
}