class ScrollGestureRecognizer extends java.lang.Object implements GestureRecognizer
Modifier and Type | Class and Description |
---|---|
private static class |
ScrollGestureRecognizer.ScrollRecognitionState |
private static class |
ScrollGestureRecognizer.TouchPointTracker |
Modifier and Type | Field and Description |
---|---|
private double |
centerAbsX |
private double |
centerAbsY |
private double |
centerX |
private double |
centerY |
private int |
currentTouchCount |
private double |
deltaX |
private double |
deltaY |
private boolean |
direct |
private double |
factorX |
private double |
factorY |
(package private) double |
inertiaLastTime |
private DoubleProperty |
inertiaScrollVelocity |
private Timeline |
inertiaTimeline |
private double |
initialInertiaScrollVelocity |
private double |
lastCenterAbsX |
private double |
lastCenterAbsY |
private int |
lastTouchCount |
private double |
lastTouchEventTime |
private static double |
MAX_INITIAL_VELOCITY |
private int |
modifiers |
private ViewScene |
scene |
private static boolean |
SCROLL_INERTIA_ENABLED |
private static double |
SCROLL_INERTIA_MILLIS |
private static double |
SCROLL_THRESHOLD |
private double |
scrollStartTime |
private ScrollGestureRecognizer.ScrollRecognitionState |
state |
private double |
totalDeltaX |
private double |
totalDeltaY |
private boolean |
touchPointsPressed |
private boolean |
touchPointsSetChanged |
private java.util.Map<java.lang.Long,ScrollGestureRecognizer.TouchPointTracker> |
trackers |
Constructor and Description |
---|
ScrollGestureRecognizer(ViewScene scene) |
Modifier and Type | Method and Description |
---|---|
private void |
calculateCenter() |
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 |
sendScrollEvent(boolean isInertia,
double centerX,
double centerY,
int touchCount) |
private void |
sendScrollFinishedEvent(double centerX,
double centerY,
int touchCount) |
private void |
sendScrollStartedEvent(double centerX,
double centerY,
int touchCount) |
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 SCROLL_THRESHOLD
private static boolean SCROLL_INERTIA_ENABLED
private static double MAX_INITIAL_VELOCITY
private static double SCROLL_INERTIA_MILLIS
private ViewScene scene
private ScrollGestureRecognizer.ScrollRecognitionState state
private Timeline inertiaTimeline
private DoubleProperty inertiaScrollVelocity
private double initialInertiaScrollVelocity
private double scrollStartTime
private double lastTouchEventTime
private java.util.Map<java.lang.Long,ScrollGestureRecognizer.TouchPointTracker> trackers
private int modifiers
private boolean direct
private int currentTouchCount
private int lastTouchCount
private boolean touchPointsSetChanged
private boolean touchPointsPressed
private double centerX
private double centerY
private double centerAbsX
private double centerAbsY
private double lastCenterAbsX
private double lastCenterAbsY
private double deltaX
private double deltaY
private double totalDeltaX
private double totalDeltaY
private double factorX
private double factorY
double inertiaLastTime
ScrollGestureRecognizer(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()
public void notifyEndTouchEvent(long time)
notifyEndTouchEvent
in interface GlassTouchEventListener
private void sendScrollStartedEvent(double centerX, double centerY, int touchCount)
private void sendScrollEvent(boolean isInertia, double centerX, double centerY, int touchCount)
private void sendScrollFinishedEvent(double centerX, double centerY, int touchCount)
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()