for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId; touchMap.put(real, touchId = getAvailablePointer()); for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId = touchMap.get(real); deltaX[touchId] = getRelativeX(touch, canvas) - touchX[touchId]; for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId = touchMap.get(real); touchMap.remove(real); for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId = touchMap.get(real); touchMap.remove(real);
for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId; touchMap.put(real, touchId = getAvailablePointer()); for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId = touchMap.get(real); deltaX[touchId] = getRelativeX(touch, canvas) - touchX[touchId]; for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId = touchMap.get(real); touchMap.remove(real); for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId = touchMap.get(real); touchMap.remove(real);
public TouchPoint(Touch touch) { this.id = touch.getIdentifier(); this.x = touch.getPageX(); this.y = touch.getPageY(); }
public TouchPoint(Touch touch) { this.id = touch.getIdentifier(); this.x = touch.getPageX(); this.y = touch.getPageY(); }
public static TouchCopy copy(Touch touch) { return new TouchCopy(touch.getPageX(), touch.getPageY(), touch.getIdentifier()); }
public static TouchCopy copy(Touch touch) { return new TouchCopy(touch.getPageX(), touch.getPageY(), touch.getIdentifier()); }
@Override public void onTouchMove(TouchMoveEvent event) { switch (state) { case WAITING: case FINGERS_DOWN: case FINGERS_UP: // compare positions JsArray<Touch> currentTouches = event.getTouches(); for (int i = 0; i < currentTouches.length(); i++) { Touch currentTouch = currentTouches.get(i); for (TouchPoint startTouch : startPositions) { if (currentTouch.getIdentifier() == startTouch.getId()) { if (Math.abs(currentTouch.getPageX() - startTouch.getX()) > DEFAULT_MAX_DISTANCE || Math.abs(currentTouch.getPageY() - startTouch.getY()) > DEFAULT_MAX_DISTANCE) { state = State.INVALID; break; } } if (state == State.INVALID) { break; } } } break; default: state = State.INVALID; break; } }
@Override public void onTouchMove(TouchMoveEvent event) { switch (state) { case WAITING: case FINGERS_DOWN: case FINGERS_UP: // compare positions JsArray<Touch> currentTouches = event.getTouches(); for (int i = 0; i < currentTouches.length(); i++) { Touch currentTouch = currentTouches.get(i); for (TouchPoint startTouch : startPositions) { if (currentTouch.getIdentifier() == startTouch.getId()) { if (Math.abs(currentTouch.getPageX() - startTouch.getX()) > DEFAULT_MAX_DISTANCE || Math.abs(currentTouch.getPageY() - startTouch.getY()) > DEFAULT_MAX_DISTANCE) { state = State.INVALID; break; } } if (state == State.INVALID) { break; } } } break; default: state = State.INVALID; break; } }
@Override public void onTouchMove(TouchMoveEvent event) { switch (state) { case FINGERS_GOING_DOWN: case FINGERS_GOING_UP: // compare positions JsArray<Touch> currentTouches = event.getTouches(); for (int i = 0; i < currentTouches.length(); i++) { Touch currentTouch = currentTouches.get(i); for (int j = 0; j < touches.length(); j++) { TouchCopy startTouch = touches.get(j); if (currentTouch.getIdentifier() == startTouch.getIdentifier()) { if (Math.abs(currentTouch.getPageX() - startTouch.getPageX()) > distance || Math.abs(currentTouch.getPageY() - startTouch.getPageY()) > distance) { state = State.INVALID; break; } } if (state == State.INVALID) { break; } } } break; default: break; } }
@Override public void onTouchMove(TouchMoveEvent event) { switch (state) { case FINGERS_GOING_DOWN: case FINGERS_GOING_UP: // compare positions JsArray<Touch> currentTouches = event.getTouches(); for (int i = 0; i < currentTouches.length(); i++) { Touch currentTouch = currentTouches.get(i); for (int j = 0; j < touches.length(); j++) { TouchCopy startTouch = touches.get(j); if (currentTouch.getIdentifier() == startTouch.getIdentifier()) { if (Math.abs(currentTouch.getPageX() - startTouch.getPageX()) > distance || Math.abs(currentTouch.getPageY() - startTouch.getPageY()) > distance) { state = State.INVALID; break; } } if (state == State.INVALID) { break; } } } break; default: break; } }
@Override public void onTouchMove(TouchMoveEvent event) { switch (state) { case WAITING: case FINGERS_DOWN: case FINGERS_UP: // compare positions JsArray<Touch> currentTouches = event.getTouches(); for (int i = 0; i < currentTouches.length(); i++) { Touch currentTouch = currentTouches.get(i); for (int j = 0; j < startPositions.length(); j++) { TouchCopy startTouch = startPositions.get(j); if (currentTouch.getIdentifier() == startTouch.getIdentifier()) { if (Math.abs(currentTouch.getPageX() - startTouch.getPageX()) > distance || Math.abs(currentTouch.getPageY() - startTouch.getPageY()) > distance) { state = State.INVALID; break; } } if (state == State.INVALID) { break; } } } break; default: state = State.INVALID; break; } }
@Override public void onTouchMove(TouchMoveEvent event) { switch (state) { case WAITING: case FINGERS_DOWN: case FINGERS_UP: // compare positions JsArray<Touch> currentTouches = event.getTouches(); for (int i = 0; i < currentTouches.length(); i++) { Touch currentTouch = currentTouches.get(i); for (int j = 0; j < startPositions.length(); j++) { TouchCopy startTouch = startPositions.get(j); if (currentTouch.getIdentifier() == startTouch.getIdentifier()) { if (Math.abs(currentTouch.getPageX() - startTouch.getPageX()) > distance || Math.abs(currentTouch.getPageY() - startTouch.getPageY()) > distance) { state = State.INVALID; break; } } if (state == State.INVALID) { break; } } } break; default: state = State.INVALID; break; } }
final int real = touch.getIdentifier(); int touchId; this.touchMap.put( real, touchId = this.getAvailablePointer() ); final int real = touch.getIdentifier(); final int touchId = this.touchMap.get( real ); this.deltaX[ touchId ] = this.getRelativeX( touch, this.canvas ) - this.touchX[ touchId ]; final int real = touch.getIdentifier(); final int touchId = this.touchMap.get( real ); this.touchMap.remove( real ); final int real = touch.getIdentifier(); final int touchId = this.touchMap.get( real ); this.touchMap.remove( real );
for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId; touchMap.put(real, touchId = getAvailablePointer()); for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId = touchMap.get(real); deltaX[touchId] = getRelativeX(touch, canvas) - touchX[touchId]; for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId = touchMap.get(real); touchMap.remove(real); for (int i = 0, j = touches.length(); i < j; i++) { Touch touch = touches.get(i); int real = touch.getIdentifier(); int touchId = touchMap.get(real); touchMap.remove(real);