/** * Delegates events to the pick handler or the native WorldWind navigation handlers. */ @Override public boolean onTouchEvent(MotionEvent event) { boolean consumed = super.onTouchEvent(event); if (!consumed) { consumed = this.pickGestureDetector.onTouchEvent(event); } return consumed; }
/** * Delegates events to the pick handler or the native WorldWind navigation handlers. */ @Override public boolean onTouchEvent(MotionEvent event) { // Allow pick listener to process the event first. boolean consumed = this.pickGestureDetector.onTouchEvent(event); // If event was not consumed by the pick operation, pass it on the globe navigation handlers if (!consumed) { // The super class performs the pan, tilt, rotate and zoom return super.onTouchEvent(event); } return consumed; }
/** * Delegates events to the pick handler or the native WorldWind navigation handlers. */ @Override public boolean onTouchEvent(MotionEvent event) { // Allow pick listener to process the event first. boolean consumed = this.pickGestureDetector.onTouchEvent(event); // If event was not consumed by the pick operation, pass it on the globe navigation handlers if (!consumed) { // The super class performs the pan, tilt, rotate and zoom return super.onTouchEvent(event); } return consumed; }
/** * Delegates events to the select/drag handlers or the native World Wind navigation handlers. */ @Override public boolean onTouchEvent(MotionEvent event) { // Allow our select and drag handlers to process the event first. They'll set the state flags which will // either preempt or allow the event to be subsequently processed by the globe's navigation event handlers. boolean consumed = this.selectDragDetector.onTouchEvent(event); // Is a dragging operation started or in progress? Any ACTION_UP event cancels a drag operation. if (this.isDragging && event.getAction() == MotionEvent.ACTION_UP) { this.isDragging = false; this.isDraggingArmed = false; } // Preempt the globe's pan navigation recognizer if we're dragging super.panRecognizer.setEnabled(!isDragging); // Pass on the event on to the default globe navigation handlers if (!consumed) { consumed = super.onTouchEvent(event); } return consumed; }
/** * Delegates events to the select/drag handlers or the native WorldWind navigation handlers. */ @Override public boolean onTouchEvent(MotionEvent event) { // Allow our select and drag handlers to process the event first. They'll set the state flags which will // either preempt or allow the event to be subsequently processed by the globe's navigation event handlers. boolean consumed = this.selectDragDetector.onTouchEvent(event); // Is a dragging operation started or in progress? Any ACTION_UP event cancels a drag operation. if (this.isDragging && event.getAction() == MotionEvent.ACTION_UP) { this.isDragging = false; this.isDraggingArmed = false; } // Preempt the globe's pan navigation recognizer if we're dragging super.panRecognizer.setEnabled(!isDragging); // Pass on the event on to the default globe navigation handlers if (!consumed) { consumed = super.onTouchEvent(event); } return consumed; }