public class XAxisDragModifier extends AxisDragModifierBase
XAxisDragModifier
provides a mouse drag to scale the X-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.YAxisDragModifier
AxisDragModifierBase.AxisDragMode
services
Constructor and Description |
---|
XAxisDragModifier() |
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. |
ClipModeTarget |
getClipModeTargetX()
Gets which target is used as limit by ClipModeX when you reach the edge of the X-Axis extents
|
ClipMode |
getClipModeX()
Gets the
ClipMode which is define how panning behaves when you reach the edge of the X-Axis extents. |
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. |
void |
setClipModeTargetX(ClipModeTarget clipModeTargetX)
Sets which target is used as limit by ClipModeX when you reach the edge of the X-Axis extents
|
void |
setClipModeX(ClipMode clipModeX)
Sets the
ClipMode which is define how panning behaves when you reach the edge of the X-Axis extents. |
applyRelativeScaleToRange, getDragMode, getIsSecondHalf, 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
public final ClipMode getClipModeX()
ClipMode
which is define how panning behaves when you reach the edge of the X-Axis extents.
e.g. The ClipMode.ClipAtExtents
prevents panning outside of the X-Axis, ClipMode.None
allows panning outside.ClipMode
.public final void setClipModeX(ClipMode clipModeX)
ClipMode
which is define how panning behaves when you reach the edge of the X-Axis extents.
e.g. The ClipMode.ClipAtExtents
prevents panning outside of the X-Axis, ClipMode.None
allows panning outside.clipModeX
- The new ClipMode
, which determines behavior when you reach the edge of the X-Axis extents by panning.public final ClipModeTarget getClipModeTargetX()
public final void setClipModeTargetX(ClipModeTarget clipModeTargetX)
clipModeTargetX
- The target range which is used as limit by ClipModeXprotected 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.