|
|||||||||
| 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.mouse.TapClickEventsConverter
public class TapClickEventsConverter
Generates synthetic click events from corresponding tap events. This is useful for widget implementers that want to add basic iPhone support without modifying their widget's API. The converter can be used in two ways:
| Constructor Summary | |
|---|---|
TapClickEventsConverter(UIObject target)
Creates a new TapClickEventsConverter with the specified target
widget. |
|
TapClickEventsConverter(UIObject target,
H buttonTapEventsSource)
Creates a new TapClickEventsConverter with the specified target
widget. |
|
TapClickEventsConverter(UIObject target,
H tapEventsSource)
Creates a new TapClickEventsConverter with the specified target
widget. |
|
| Method Summary | ||
|---|---|---|
HandlerRegistration |
addClickHandler(ClickHandler handler)
|
|
void |
fireEvent(GwtEvent<?> event)
|
|
protected void |
onButtonTap(ButtonTapEvent evt)
Invoked when a button-tap occurs. |
|
protected void |
onTap(TapEvent evt)
Invoked when a tap occurs. |
|
|
setButtonTapEventsSource(H source)
Sets the source of button-tap events for this recognizer. |
|
|
setTapEventsSource(H source)
Sets the source of tap events for this recognizer. |
|
void |
stop()
Unregisters this TapClickEventsConverter from its source, which
will cause it to stop firing any click events. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TapClickEventsConverter(UIObject target)
TapClickEventsConverter with the specified target
widget. If the target widget is not null, synthetic click
events will be dispatched on it, and its element will be used as the
element relative to which event coordinates are measured.
public TapClickEventsConverter(UIObject target,
H tapEventsSource)
TapClickEventsConverter with the specified target
widget. If the target widget is not null, synthetic click
events will be dispatched on it, and its element will be used as the
element relative to which event coordinates are measured. Additionally,
you may pass the source of tap events.
public TapClickEventsConverter(UIObject target,
H buttonTapEventsSource)
TapClickEventsConverter with the specified target
widget. If the target widget is not null, synthetic click
events will be dispatched on it, and its element will be used as the
element relative to which event coordinates are measured. Additionally,
you may pass the source of button-tap events.
| Method Detail |
|---|
public <H extends HasTapHandlers> void setTapEventsSource(H source)
null will cause the recognizer to deregister itself from the
previous source. You may not simultaneously set both a regular and a
button-tap source.
public <H extends HasButtonTapHandlers> void setButtonTapEventsSource(H source)
null will cause the recognizer to deregister itself from the
previous source. You may not simultaneously set both a regular and a
button-tap source.
public HandlerRegistration addClickHandler(ClickHandler handler)
addClickHandler in interface HasClickHandlerspublic void fireEvent(GwtEvent<?> event)
fireEvent in interface HasHandlerspublic void stop()
TapClickEventsConverter from its source, which
will cause it to stop firing any click events. You cannot "restart" a
the converter after it has been stopped.
protected void onTap(TapEvent evt)
protected void onButtonTap(ButtonTapEvent evt)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||