class SwipeGestureRecognizer extends java.lang.Object implements GestureRecognizer
Modifier and Type | Class and Description |
---|---|
private static class |
SwipeGestureRecognizer.CenterComputer |
private class |
SwipeGestureRecognizer.MultiTouchTracker |
private static class |
SwipeGestureRecognizer.SwipeRecognitionState |
private static class |
SwipeGestureRecognizer.TouchPointTracker |
Modifier and Type | Field and Description |
---|---|
private static double |
BACKWARD_DISTANCE_THRASHOLD |
private static double |
DISTANCE_THRESHOLD |
private ViewScene |
scene |
private SwipeGestureRecognizer.SwipeRecognitionState |
state |
private static double |
TANGENT_30_DEGREES |
private static double |
TANGENT_45_DEGREES |
(package private) SwipeGestureRecognizer.MultiTouchTracker |
tracker |
private static boolean |
VERBOSE |
Constructor and Description |
---|
SwipeGestureRecognizer(ViewScene scene) |
Modifier and Type | Method and Description |
---|---|
private EventType<SwipeEvent> |
calcSwipeType(SwipeGestureRecognizer.TouchPointTracker tracker) |
private void |
handleSwipeType(EventType<SwipeEvent> swipeType,
SwipeGestureRecognizer.CenterComputer cc,
int touchCount,
int modifiers,
boolean isDirect) |
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) |
private static final double TANGENT_30_DEGREES
private static final double TANGENT_45_DEGREES
private static final boolean VERBOSE
private static final double DISTANCE_THRESHOLD
private static final double BACKWARD_DISTANCE_THRASHOLD
private SwipeGestureRecognizer.SwipeRecognitionState state
SwipeGestureRecognizer.MultiTouchTracker tracker
private ViewScene scene
SwipeGestureRecognizer(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
public void notifyEndTouchEvent(long time)
notifyEndTouchEvent
in interface GlassTouchEventListener
private EventType<SwipeEvent> calcSwipeType(SwipeGestureRecognizer.TouchPointTracker tracker)
private void handleSwipeType(EventType<SwipeEvent> swipeType, SwipeGestureRecognizer.CenterComputer cc, int touchCount, int modifiers, boolean isDirect)