public class CalendarGestureManager extends Object implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, ScaleGestureDetector.OnScaleGestureListener
Constructor and Description |
---|
CalendarGestureManager(RadCalendarView owner)
Creates a new instance of the
CalendarGestureManager class. |
Modifier and Type | Method and Description |
---|---|
void |
enableScroll()
Used to enable the scrolling if it was previously disabled.
|
RadCalendarView.OnCellClickListener |
getOnCellClickListener()
Gets a listener that will be called when a cell is being pressed.
|
boolean |
handleDoubleTap(MotionEvent event)
Deprecated.
|
boolean |
handleFling(float velocityX,
float velocityY)
Deprecated.
|
boolean |
handleOnDown()
Deprecated.
|
boolean |
handleOnScale(ScaleGestureDetector scaleGestureDetector)
Deprecated.
|
boolean |
handleOnScaleBegin()
Deprecated.
|
void |
handleOnScaleEnd()
Deprecated.
|
boolean |
handleOnSingleTapUp()
Deprecated.
|
boolean |
handleScroll(float x,
float y,
float distanceX,
float distanceY)
Deprecated.
|
boolean |
handleSingleTapConfirmed(MotionEvent event)
Deprecated.
|
boolean |
handleTouch(MotionEvent event)
Handles the touch gesture.
|
boolean |
isUsingDoubleTapToChangeDisplayMode()
Gets a value which determines whether the display mode will be changed while the calendar is
in month or year view and the detected gesture is double tap.
|
boolean |
isUsingDragToMakeRangeSelection()
Gets a value which determines whether the drag gesture will be used to select a rage of cells.
|
boolean |
isUsingPinchCloseToChangeDisplayMode()
Gets a value which determines whether the display mode will be changed while the calendar is
in month view and the detected gesture is pinch close.
|
boolean |
isUsingPinchOpenToChangeDisplayMode()
Gets a value which determines whether the display mode will be changed while the calendar is
in year view and the detected gesture is pinch open.
|
boolean |
isUsingSwipeDownToChangeDisplayMode()
Gets a value which determines whether the display mode will be changed while the calendar is
in week view and the detected gesture is swipe down.
|
boolean |
isUsingSwipeUpToChangeDisplayMode()
Gets a value which determines whether the display mode will be changed while the calendar is
in month view and the detected gesture is swipe up.
|
boolean |
isUsingTapToChangeDisplayMode()
Gets a value which determines whether the display mode will be changed while the calendar is
in year view and the detected gesture is tap.
|
boolean |
onDoubleTap(MotionEvent event) |
boolean |
onDoubleTapEvent(MotionEvent e) |
boolean |
onDown(MotionEvent event) |
boolean |
onFling(MotionEvent event1,
MotionEvent event2,
float velocityX,
float velocityY) |
void |
onLongPress(MotionEvent e) |
boolean |
onScale(ScaleGestureDetector detector) |
boolean |
onScaleBegin(ScaleGestureDetector detector) |
void |
onScaleEnd(ScaleGestureDetector detector) |
boolean |
onScroll(MotionEvent e1,
MotionEvent e2,
float distanceX,
float distanceY) |
void |
onShowPress(MotionEvent e) |
boolean |
onSingleTapConfirmed(MotionEvent event) |
boolean |
onSingleTapUp(MotionEvent e) |
void |
setDoubleTapToChangeDisplayMode(boolean doubleTapToChangeDisplayMode)
Sets a value which determines whether the display mode will be changed while the calendar is
in month or year view and the detected gesture is double tap.
|
void |
setOnCellClickListener(RadCalendarView.OnCellClickListener onCellClickListener)
Sets a listener that will be called when a cell is being pressed.
|
void |
setPinchCloseToChangeDisplayMode(boolean pinchCloseToChangeDisplayMode)
Sets a value which determines whether the display mode will be changed while the calendar is
in month view and the detected gesture is pinch close.
|
void |
setPinchOpenToChangeDisplayMode(boolean pinchOpenToChangeDisplayMode)
Sets a value which determines whether the display mode will be changed while the calendar is
in year view and the detected gesture is pinch open.
|
void |
setSwipeDownToChangeDisplayMode(boolean swipeDownToChangeDisplayMode)
Sets a value which determines whether the display mode will be changed while the calendar is
in week view and the detected gesture is swipe down.
|
void |
setSwipeUpToChangeDisplayMode(boolean swipeUpToChangeDisplayMode)
Sets a value which determines whether the display mode will be changed while the calendar is
in month view and the detected gesture is swipe up.
|
void |
setTapToChangeDisplayMode(boolean tapToChangeDisplayMode)
Sets a value which determines whether the display mode will be changed while the calendar is
in year view and the detected gesture is tap.
|
void |
setUsingDragToMakeRangeSelection(boolean usingDragToMakeRangeSelection)
Sets a value which determines whether the drag gesture will be used to select a rage of cells.
|
void |
suspendScroll()
Used to prevent the processing of the scrolling from the current manager instance.
|
public CalendarGestureManager(RadCalendarView owner)
CalendarGestureManager
class.owner
- the calendar view instance owning the current gesture manager.public void suspendScroll()
enableScroll()
public void enableScroll()
suspendScroll()
public boolean isUsingPinchOpenToChangeDisplayMode()
public void setPinchOpenToChangeDisplayMode(boolean pinchOpenToChangeDisplayMode)
pinchOpenToChangeDisplayMode
- whether display mode is changed while in year view and the detected gesture is pinch openpublic boolean isUsingPinchCloseToChangeDisplayMode()
public void setPinchCloseToChangeDisplayMode(boolean pinchCloseToChangeDisplayMode)
pinchCloseToChangeDisplayMode
- whether display mode is changed while in month view and the detected gesture is pinch closepublic boolean isUsingSwipeDownToChangeDisplayMode()
public void setSwipeDownToChangeDisplayMode(boolean swipeDownToChangeDisplayMode)
swipeDownToChangeDisplayMode
- whether display mode is changed while in week view and the detected gesture swipe downpublic boolean isUsingSwipeUpToChangeDisplayMode()
public void setSwipeUpToChangeDisplayMode(boolean swipeUpToChangeDisplayMode)
swipeUpToChangeDisplayMode
- whether display mode is changed while in month view and the detected gesture is swipe uppublic boolean isUsingTapToChangeDisplayMode()
public void setTapToChangeDisplayMode(boolean tapToChangeDisplayMode)
tapToChangeDisplayMode
- whether display mode is changed while in year view and the detected gesture is tappublic boolean isUsingDoubleTapToChangeDisplayMode()
public void setDoubleTapToChangeDisplayMode(boolean doubleTapToChangeDisplayMode)
doubleTapToChangeDisplayMode
- whether display mode is changed while in month or year view and the detected gesture is double tappublic boolean isUsingDragToMakeRangeSelection()
true
if drag for range selection is enabled, false
otherwise.public void setUsingDragToMakeRangeSelection(boolean usingDragToMakeRangeSelection)
usingDragToMakeRangeSelection
- the new drag state.public RadCalendarView.OnCellClickListener getOnCellClickListener()
public void setOnCellClickListener(RadCalendarView.OnCellClickListener onCellClickListener)
onCellClickListener
- the new pressed cell listener.public boolean handleScroll(float x, float y, float distanceX, float distanceY)
onScroll(android.view.MotionEvent, android.view.MotionEvent, float, float)
method.x
- the current finger position along the x axis.y
- the current finger position along the y axis.distanceX
- the distance of the scroll along the x axis.distanceY
- the distance of the scroll along the y axis.true
if the gesture was handled, false
otherwise.public boolean handleTouch(MotionEvent event)
event
- the event to be handled.true
if the gesture was handled, false
otherwise.public boolean handleFling(float velocityX, float velocityY)
onFling(android.view.MotionEvent, android.view.MotionEvent, float, float)
method.velocityX
- the velocity produced by the gesture along the x axis.velocityY
- the velocity produced by the gesture along the y axis.true
if the gesture was handled, false
otherwise.public boolean handleOnDown()
onDown(android.view.MotionEvent)
method.true
if the event was handled, false
otherwise.public boolean handleSingleTapConfirmed(MotionEvent event)
onSingleTapConfirmed(android.view.MotionEvent)
method.event
- the event.true
if the event was handled, false
otherwise.public boolean handleDoubleTap(MotionEvent event)
onDoubleTap(android.view.MotionEvent)
method.event
- the event to be handled.true
if the event was handled, false
otherwise.public boolean handleOnScaleBegin()
onScaleBegin(android.view.ScaleGestureDetector)
method.true
if the gesture was handled, false
otherwise.public void handleOnScaleEnd()
onScaleEnd(android.view.ScaleGestureDetector)
method.public boolean handleOnScale(ScaleGestureDetector scaleGestureDetector)
onScale(android.view.ScaleGestureDetector)
method.scaleGestureDetector
- the shapeScale gesture detector to be used from which to take the current shapeScale factor.true
if the gesture was handled, false
otherwise.public boolean handleOnSingleTapUp()
onSingleTapUp(android.view.MotionEvent)
method.true
if the gesture was handled, false
otherwise.public boolean onSingleTapConfirmed(MotionEvent event)
onSingleTapConfirmed
in interface GestureDetector.OnDoubleTapListener
public boolean onDoubleTap(MotionEvent event)
onDoubleTap
in interface GestureDetector.OnDoubleTapListener
public boolean onDoubleTapEvent(MotionEvent e)
onDoubleTapEvent
in interface GestureDetector.OnDoubleTapListener
public boolean onDown(MotionEvent event)
onDown
in interface GestureDetector.OnGestureListener
public void onShowPress(MotionEvent e)
onShowPress
in interface GestureDetector.OnGestureListener
public boolean onSingleTapUp(MotionEvent e)
onSingleTapUp
in interface GestureDetector.OnGestureListener
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
onScroll
in interface GestureDetector.OnGestureListener
public void onLongPress(MotionEvent e)
onLongPress
in interface GestureDetector.OnGestureListener
public boolean onFling(MotionEvent event1, MotionEvent event2, float velocityX, float velocityY)
onFling
in interface GestureDetector.OnGestureListener
public boolean onScale(ScaleGestureDetector detector)
onScale
in interface ScaleGestureDetector.OnScaleGestureListener
public boolean onScaleBegin(ScaleGestureDetector detector)
onScaleBegin
in interface ScaleGestureDetector.OnScaleGestureListener
public void onScaleEnd(ScaleGestureDetector detector)
onScaleEnd
in interface ScaleGestureDetector.OnScaleGestureListener