class ZoomGestureRecognizer extends java.lang.Object implements GestureRecognizer
Modifier and Type | Class and Description |
---|---|
private static class |
ZoomGestureRecognizer.TouchPointTracker |
private static class |
ZoomGestureRecognizer.ZoomRecognitionState |
Modifier and Type | Field and Description |
---|---|
private double |
centerAbsX |
private double |
centerAbsY |
private double |
centerX |
private double |
centerY |
private double |
currentDistance |
private int |
currentTouchCount |
private boolean |
direct |
private double |
distanceReference |
(package private) double |
inertiaLastTime |
private Timeline |
inertiaTimeline |
private DoubleProperty |
inertiaZoomVelocity |
private double |
initialInertiaZoomVelocity |
private double |
lastTouchEventTime |
private static double |
MAX_ZOOM_IN_FACTOR |
private static double |
MAX_ZOOM_OUT_FACTOR |
private static double |
MAX_ZOOMIN_VELOCITY |
private static double |
MAX_ZOOMOUT_VELOCITY |
private int |
modifiers |
private ViewScene |
scene |
private ZoomGestureRecognizer.ZoomRecognitionState |
state |
private double |
totalZoomFactor |
private boolean |
touchPointsPressed |
private boolean |
touchPointsSetChanged |
private java.util.Map<java.lang.Long,ZoomGestureRecognizer.TouchPointTracker> |
trackers |
private static double |
ZOOM_FACTOR_THRESHOLD |
private static boolean |
ZOOM_INERTIA_ENABLED |
private static double |
ZOOM_INERTIA_MILLIS |
private double |
zoomFactor |
private double |
zoomStartTime |
Constructor and Description |
---|
ZoomGestureRecognizer(ViewScene scene) |
Modifier and Type | Method and Description |
---|---|
private void |
calculateCenter() |
private double |
calculateMaxDistance() |
void |
notifyBeginTouchEvent(long time,
int modifiers,
boolean isDirect,
int touchEventCount) |
void |
notifyEndTouchEvent(long time) |
void |
notifyNextTouchEvent(long time,
int type,
long touchId,
int x,
int y,
int xAbs,
int yAbs) |
void |
params(int modifiers,
boolean direct) |
(package private) void |
reset() |
private void |
sendZoomEvent(boolean isInertia) |
private void |
sendZoomFinishedEvent() |
private void |
sendZoomStartedEvent() |
void |
touchMoved(long id,
long nanos,
int x,
int y,
int xAbs,
int yAbs) |
void |
touchPressed(long id,
long nanos,
int x,
int y,
int xAbs,
int yAbs) |
void |
touchReleased(long id,
long nanos,
int x,
int y,
int xAbs,
int yAbs) |
private static double ZOOM_FACTOR_THRESHOLD
private static boolean ZOOM_INERTIA_ENABLED
private static double MAX_ZOOMIN_VELOCITY
private static double MAX_ZOOMOUT_VELOCITY
private static double ZOOM_INERTIA_MILLIS
private static double MAX_ZOOM_IN_FACTOR
private static double MAX_ZOOM_OUT_FACTOR
private ViewScene scene
private Timeline inertiaTimeline
private DoubleProperty inertiaZoomVelocity
private double initialInertiaZoomVelocity
private double zoomStartTime
private double lastTouchEventTime
private ZoomGestureRecognizer.ZoomRecognitionState state
private java.util.Map<java.lang.Long,ZoomGestureRecognizer.TouchPointTracker> trackers
private int modifiers
private boolean direct
private int currentTouchCount
private boolean touchPointsSetChanged
private boolean touchPointsPressed
private double centerX
private double centerY
private double centerAbsX
private double centerAbsY
private double currentDistance
private double distanceReference
private double zoomFactor
private double totalZoomFactor
double inertiaLastTime
ZoomGestureRecognizer(ViewScene scene)
public void notifyBeginTouchEvent(long time, int modifiers, boolean isDirect, int touchEventCount)
notifyBeginTouchEvent
in interface GlassTouchEventListener
public void notifyNextTouchEvent(long time, int type, long touchId, int x, int y, int xAbs, int yAbs)
notifyNextTouchEvent
in interface GlassTouchEventListener
private void calculateCenter()
private double calculateMaxDistance()
public void notifyEndTouchEvent(long time)
notifyEndTouchEvent
in interface GlassTouchEventListener
private void sendZoomStartedEvent()
private void sendZoomEvent(boolean isInertia)
private void sendZoomFinishedEvent()
public void params(int modifiers, boolean direct)
public void touchPressed(long id, long nanos, int x, int y, int xAbs, int yAbs)
public void touchReleased(long id, long nanos, int x, int y, int xAbs, int yAbs)
public void touchMoved(long id, long nanos, int x, int y, int xAbs, int yAbs)
void reset()