-
- All Implemented Interfaces:
-
android.view.GestureDetector.OnContextClickListener,android.view.GestureDetector.OnDoubleTapListener,android.view.GestureDetector.OnGestureListener,android.view.View.OnTouchListener
public final class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBase<out BarLineScatterCandleBubbleData<out IBarLineScatterCandleBubbleDataSet<out Entry>>>>
TouchListener for Bar-, Line-, Scatter- and CandleStickChart with handles all touch interaction. Longpress == Zoom out. Double-Tap == Zoom in.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBarLineChartTouchListener.Companion
-
Field Summary
Fields Modifier and Type Field Description private Matrixmatrixprivate final ChartTouchListener.ChartGesturemLastGestureprivate final IntegermTouchModeprivate final HighlightmLastHighlightedprivate final GestureDetectormGestureDetectorprivate final BarLineChartBase<out BarLineScatterCandleBubbleData<out IBarLineScatterCandleBubbleDataSet<out Entry>>>mChart
-
Constructor Summary
Constructors Constructor Description BarLineChartTouchListener(BarLineChartBase<out BarLineScatterCandleBubbleData<out IBarLineScatterCandleBubbleDataSet<out Entry>>> chart, Matrix touchMatrix, Float dragTriggerDistance)
-
Method Summary
Modifier and Type Method Description final MatrixgetMatrix()the original touch-matrix from the chart final UnitsetMatrix(Matrix matrix)BooleanonTouch(View v, MotionEvent event)final MPPointFgetTrans(Float x, Float y)Returns a recyclable MPPointF instance. final UnitsetDragTriggerDist(Float dragTriggerDistance)Sets the minimum distance that will be interpreted as a "drag" by the chart in dp. BooleanonDoubleTap(MotionEvent e)UnitonLongPress(MotionEvent e)BooleanonSingleTapUp(MotionEvent e)BooleanonFling(MotionEvent e1, MotionEvent e2, Float velocityX, Float velocityY)final UnitstopDeceleration()final UnitcomputeScroll()-
Methods inherited from class com.github.mikephil.charting.listener.ChartTouchListener
onContextClick, onDoubleTapEvent, onDown, onScroll, onShowPress, onSingleTapConfirmed -
Methods inherited from class com.github.mikephil.charting.listener.BarLineChartTouchListener
endAction, getLastGesture, getTouchMode, performHighlight, setLastHighlighted, startAction -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BarLineChartTouchListener
BarLineChartTouchListener(BarLineChartBase<out BarLineScatterCandleBubbleData<out IBarLineScatterCandleBubbleDataSet<out Entry>>> chart, Matrix touchMatrix, Float dragTriggerDistance)
-
-
Method Detail
-
onTouch
Boolean onTouch(View v, MotionEvent event)
-
getTrans
final MPPointF getTrans(Float x, Float y)
Returns a recyclable MPPointF instance. returns the correct translation depending on the provided x and y touch points
-
setDragTriggerDist
final Unit setDragTriggerDist(Float dragTriggerDistance)
Sets the minimum distance that will be interpreted as a "drag" by the chart in dp. Default: 3dp
-
onDoubleTap
Boolean onDoubleTap(MotionEvent e)
-
onLongPress
Unit onLongPress(MotionEvent e)
-
onSingleTapUp
Boolean onSingleTapUp(MotionEvent e)
-
onFling
Boolean onFling(MotionEvent e1, MotionEvent e2, Float velocityX, Float velocityY)
-
stopDeceleration
final Unit stopDeceleration()
-
computeScroll
final Unit computeScroll()
-
-
-
-