public class YAxisDragModifier extends AxisDragModifierBase
YAxisDragModifier
provides a mouse drag to scale the Y-Axis.
This behaviour scales the axis in a different direction depending on which half of the axis the user starts the operation in.
Add to a SciChartSurface
and set IsEnabled to true to enable this behaviour.XAxisDragModifier
AxisDragModifierBase.AxisDragMode
services
Constructor and Description |
---|
YAxisDragModifier() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyScaleToRange(com.scichart.data.model.IRange applyTo,
float xDelta,
float yDelta,
boolean isSecondHalf,
IAxis axis)
When overridden in a derived class, calculates an output
IRange to apply to the associated IAxis which is given in the input parameters. |
protected java.lang.Iterable<IAxis> |
getApplicableAxes()
Gets the
Iterable collection of the IAxis to which this modifier may be applicable on. |
protected boolean |
getIsSecondHalf(float x,
float y,
android.graphics.RectF axisBounds,
boolean isHorizontalAxis)
Gets whether the specified mouse point is within the second (right-most or top-most) half of the Axis bounds.
|
protected void |
performPan(float xDelta,
float yDelta,
boolean isSecondHalf,
IAxis axis)
Performs a pan on the associated
IAxis which is given in the input parameters. |
applyRelativeScaleToRange, getDragMode, getMinTouchArea, onCancel, onDown, onScroll, onUp, performScale, setDragMode, setMinTouchArea
attachTo, detach, getOriginalTouchEvent, onDoubleTap, onDoubleTapEvent, onFling, onLongPress, onShowPress, onSingleTapConfirmed, onSingleTapUp, onTouch
getContext, getMasterModifier, getModifierSurface, getParentSurface, getPointRelativeTo, getRenderableSeries, getRenderableSeriesArea, getXAxes, getXAxis, getXAxis, getYAxes, getYAxis, getYAxis, isWithinSourceBounds, onAnnotationsCollectionChanged, onAnnotationsDrasticallyChanged, onParentSurfaceResized, onRenderSurfaceRendered, onXAxesCollectionChanged, onXAxesDrasticallyChanged, onYAxesCollectionChanged, onYAxesDrasticallyChanged
applyThemeProvider, checkPointerCounter, getEventsGroupTag, getIsEnabled, getReceiveHandledEvents, getServices, isAttached, onGenericMotion, onIsEnabledChanged, onRenderableSeriesCollectionChanged, onRenderableSeriesDrasticallyChanged, onSelectedSeriesCollectionChanged, setEventsGroupTag, setIsEnabled, setReceiveHandledEvents
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventsGroupTag, getIsEnabled, setIsEnabled
getName, getReceiveHandledEvents, onGenericMotion
applyThemeProvider
onRenderableSeriesCollectionChanged, onRenderableSeriesDrasticallyChanged, onSelectedSeriesCollectionChanged
protected boolean getIsSecondHalf(float x, float y, android.graphics.RectF axisBounds, boolean isHorizontalAxis)
getIsSecondHalf
in class AxisDragModifierBase
x
- The x value of the MotionEvent
.y
- The y value of the MotionEvent
.axisBounds
- The axis bounds.isHorizontalAxis
- Value, which indicates whether current axis is horizontal or not.protected void applyScaleToRange(com.scichart.data.model.IRange applyTo, float xDelta, float yDelta, boolean isSecondHalf, IAxis axis)
IRange
to apply to the associated IAxis
which is given in the input parameters.applyScaleToRange
in class AxisDragModifierBase
applyTo
- The IRange
instance which will be scaled.xDelta
- The x delta value.yDelta
- The y delta value.isSecondHalf
- Boolean flag to determine which side of the axis is scaled.axis
- The IAxis
instance being operated on.protected void performPan(float xDelta, float yDelta, boolean isSecondHalf, IAxis axis)
IAxis
which is given in the input parameters.performPan
in class AxisDragModifierBase
xDelta
- The x delta value.yDelta
- The y delta value.isSecondHalf
- Boolean flag to determine which side of the axis is panned.axis
- The IAxis
instance being operated on.protected java.lang.Iterable<IAxis> getApplicableAxes()
Iterable
collection of the IAxis
to which this modifier may be applicable on.getApplicableAxes
in class AxisDragModifierBase
IAxis
which this modifier may be applicable on.