public class PinchEvent extends com.google.gwt.event.shared.GwtEvent<PinchHandler>
PinchEvent
is fired when a user moves to finger on the display.
A pinch event is fired around a center point which is calculated by looking
at the two fingers producing the event.
if finger one is at x1, y1 and finger two is at x2, y2 the center point is (x1 + x2) / 2 and (y1 + y2) / 2
Constructor and Description |
---|
PinchEvent(int x,
int y,
double scaleFactor)
Construct a pinch event
|
Modifier and Type | Method and Description |
---|---|
protected void |
dispatch(PinchHandler handler) |
com.google.gwt.event.shared.GwtEvent.Type<PinchHandler> |
getAssociatedType() |
double |
getScaleFactor()
the new scale factor that can be applied for getting a zoom effect
|
static com.google.gwt.event.shared.GwtEvent.Type<PinchHandler> |
getType() |
int |
getX()
The x position of the center point of the pinch.
|
int |
getY()
The y position of the center point of the pinch.
|
assertLive, getSource, isLive, kill, revive
public PinchEvent(int x, int y, double scaleFactor)
x
- the mid point of the pinch in xy
- the mid point of the pinch in yscaleFactor
- the new scaling factorpublic static com.google.gwt.event.shared.GwtEvent.Type<PinchHandler> getType()
public com.google.gwt.event.shared.GwtEvent.Type<PinchHandler> getAssociatedType()
getAssociatedType
in class com.google.gwt.event.shared.GwtEvent<PinchHandler>
protected void dispatch(PinchHandler handler)
dispatch
in class com.google.gwt.event.shared.GwtEvent<PinchHandler>
public int getX()
public int getY()
public double getScaleFactor()
Copyright © 2021 Magnolia International Ltd.. All rights reserved.