public static interface

ShinobiChart.OnGestureListener

com.shinobicontrols.charts.ShinobiChart.OnGestureListener

Class Overview

Interface definition for callbacks to be invoked when the user makes touch gestures. Note that these callbacks are solely concerned with the touch gestures themselves. If you wish to be notified about any possible effect of the gestures, subscribe to the specific listeners involved (e.g. ShinobiChart.OnAxisRangeChangeListener)

Summary

Public Methods
abstract void onDoubleTapDown(ShinobiChart chart, PointF position)
Called when a double tap gesture is started.
abstract void onDoubleTapUp(ShinobiChart chart, PointF position)
Called when the second tap of a double tap gesture is lifted
abstract void onLongTouchDown(ShinobiChart chart, PointF position)
Called when a long touch gesture is started.
abstract void onLongTouchUp(ShinobiChart chart, PointF position)
Called when a long touch gesture is lifted.
abstract void onPinch(ShinobiChart chart, PointF startFocus, PointF endFocus, PointF scaleFactor)
Called repeatedly when 2 fingers are moved while touching (a pinch gesure).
abstract void onPinchEnd(ShinobiChart chart, PointF focus, boolean flinging, PointF scaleFactor)
Called when one of the fingers is lifted at the end of a pinch gesture.
abstract void onSecondTouchDown(ShinobiChart chart, PointF position, PointF position2)
Called when a 2 finger gesture is started.
abstract void onSecondTouchUp(ShinobiChart chart, PointF position, PointF position2)
Called when one finger of a 2 finger gesture is lifted.
abstract void onSingleTouchDown(ShinobiChart chart, PointF position)
Called when a single tap gesture is started.
abstract void onSingleTouchUp(ShinobiChart chart, PointF position)
Called when a single tap gesture is lifted.
abstract void onSwipe(ShinobiChart chart, PointF startPosition, PointF endPosition)
Called repeatedly when a single finger is moved while touching (a swipe gesure).
abstract void onSwipeEnd(ShinobiChart chart, PointF position, boolean flinging, PointF velocity)
Called when the finger is lifted at the end of a swipe gesture.

Public Methods

public abstract void onDoubleTapDown (ShinobiChart chart, PointF position)

Called when a double tap gesture is started.

Parameters
chart The chart making the callback.
position The current finger position, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.

public abstract void onDoubleTapUp (ShinobiChart chart, PointF position)

Called when the second tap of a double tap gesture is lifted

Parameters
chart The chart making the callback.
position The current finger position, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.

public abstract void onLongTouchDown (ShinobiChart chart, PointF position)

Called when a long touch gesture is started.

Parameters
chart The chart making the callback.
position The current finger position, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.

public abstract void onLongTouchUp (ShinobiChart chart, PointF position)

Called when a long touch gesture is lifted.

Parameters
chart The chart making the callback.
position The current finger position, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.

public abstract void onPinch (ShinobiChart chart, PointF startFocus, PointF endFocus, PointF scaleFactor)

Called repeatedly when 2 fingers are moved while touching (a pinch gesure).

Parameters
chart The chart making the callback.
startFocus The mid-point of the 2 current finger positions at the beginning of this increment of motion (i.e not the position at the start of the whole gesture), relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behaviour by modifying it.
endFocus The mid-point of the 2 current finger positions, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.
scaleFactor The ratios by which the distance between the fingers have changed during the course of this increment of motion.

public abstract void onPinchEnd (ShinobiChart chart, PointF focus, boolean flinging, PointF scaleFactor)

Called when one of the fingers is lifted at the end of a pinch gesture.

Parameters
chart The chart making the callback.
focus The mid-point of the 2 current finger positions, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.
flinging Whether the finger had sufficient velocity to trigger a fling gesture.
scaleFactor The current rate of change in the ratios by which the distance between the fingers is changing.

public abstract void onSecondTouchDown (ShinobiChart chart, PointF position, PointF position2)

Called when a 2 finger gesture is started.

Parameters
chart The chart making the callback.
position The current position of the first finger to touch down, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.
position2 The current position of the second finger to touch down, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.

public abstract void onSecondTouchUp (ShinobiChart chart, PointF position, PointF position2)

Called when one finger of a 2 finger gesture is lifted.

Parameters
chart The chart making the callback.
position The current position of the first finger to touch down, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.
position2 The current position of the second finger to touch down, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.

public abstract void onSingleTouchDown (ShinobiChart chart, PointF position)

Called when a single tap gesture is started.

Parameters
chart The chart making the callback.
position The current finger position, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.

public abstract void onSingleTouchUp (ShinobiChart chart, PointF position)

Called when a single tap gesture is lifted.

Parameters
chart The chart making the callback.
position The current finger position, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.

public abstract void onSwipe (ShinobiChart chart, PointF startPosition, PointF endPosition)

Called repeatedly when a single finger is moved while touching (a swipe gesure).

Parameters
chart The chart making the callback.
startPosition The finger position at the beginning of this increment of motion (i.e not the position at the start of the whole gesture), relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behaviour by modifying it.
endPosition The current finger position, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.

public abstract void onSwipeEnd (ShinobiChart chart, PointF position, boolean flinging, PointF velocity)

Called when the finger is lifted at the end of a swipe gesture.

Parameters
chart The chart making the callback.
position The current finger position, relative to the top left corner of the chart. Note that this is a copy - you cannot change the chart behavior by modifying it.
flinging Whether the finger had sufficient velocity to trigger a fling gesture.
velocity The velocity of the finger, in pixels / second.