|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maryanovsky.gwtutils.client.ui.touch.gestures.TouchGestureRecognizer
com.maryanovsky.gwtutils.client.ui.touch.gestures.buttontap.ButtonTapRecognizer
public class ButtonTapRecognizer
Recognizes button-taps and fires tap events. Unlike a regular tap (recognized
by TapRecognizer
), a button-tap gesture allows the finger to move
between the touch-start and touch-end events, does not limit the amount of
time the finger can be pressed. Additionally, there is no such thing as a
multi-button-tap and the event object does not include the location of the
tap.
Field Summary |
---|
Fields inherited from class com.maryanovsky.gwtutils.client.ui.touch.gestures.TouchGestureRecognizer |
---|
handlerManager |
Constructor Summary | |
---|---|
ButtonTapRecognizer(Object buttonTapEventsSource)
Creates a new ButtonTapRecognizer which will fire events with the
specified source object. |
|
ButtonTapRecognizer(Object buttonTapEventsSource,
Condition<? super ButtonTapEvent> buttonTapCondition)
Creates a new ButtonTapRecognizer which will fire events with the
specified source object and consult the specified button-tap condition
before firing button-tap events. |
|
ButtonTapRecognizer(Object buttonTapEventsSource,
H touchEventsSource)
Creates a new ButtonTapRecognizer which will fire events with the
specified source object and use the specified source of touch events. |
|
ButtonTapRecognizer(Object buttonTapEventsSource,
H touchEventsSource,
Condition<? super ButtonTapEvent> buttonTapCondition)
Creates a new ButtonTapRecognizer which will fire events with the
specified source object, use the specified source of touch events and
consult the specified button-tap condition before firing button-tap
events. |
Method Summary | |
---|---|
HandlerRegistration |
addButtonTapHandler(ButtonTapHandler handler)
Adds a button-tap handler. |
protected boolean |
buttonTapCondition(ButtonTapEvent evt)
Returns whether the specified ButtonTapEvent should be delivered
to the handlers. |
protected void |
onTouchEnd(TouchEndEvent evt)
Invoked when a finger touching the screen is lifted. |
Methods inherited from class com.maryanovsky.gwtutils.client.ui.touch.gestures.TouchGestureRecognizer |
---|
fireEvent, onTouchCancel, onTouchMove, onTouchStart, setTouchEventsSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ButtonTapRecognizer(Object buttonTapEventsSource)
ButtonTapRecognizer
which will fire events with the
specified source object.
public ButtonTapRecognizer(Object buttonTapEventsSource, H touchEventsSource)
ButtonTapRecognizer
which will fire events with the
specified source object and use the specified source of touch events.
public ButtonTapRecognizer(Object buttonTapEventsSource, Condition<? super ButtonTapEvent> buttonTapCondition)
ButtonTapRecognizer
which will fire events with the
specified source object and consult the specified button-tap condition
before firing button-tap events.
public ButtonTapRecognizer(Object buttonTapEventsSource, H touchEventsSource, Condition<? super ButtonTapEvent> buttonTapCondition)
ButtonTapRecognizer
which will fire events with the
specified source object, use the specified source of touch events and
consult the specified button-tap condition before firing button-tap
events.
See the documentation of buttonTapCondition(ButtonTapEvent)
for
more information on the button-tap condition.
Method Detail |
---|
public HandlerRegistration addButtonTapHandler(ButtonTapHandler handler)
addButtonTapHandler
in interface HasButtonTapHandlers
protected boolean buttonTapCondition(ButtonTapEvent evt)
ButtonTapEvent
should be delivered
to the handlers. This allows filtering tap gestures to only those you
really want.
The default implementation delegates the decision to the button-tap
condition passed in the constructor.
protected void onTouchEnd(TouchEndEvent evt)
onTouchEnd
in class TouchGestureRecognizer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |