public class ZoomPanModifier extends GestureModifierBase
ZoomPanModifier
provides a touch move to pan the X and Y Axes.
Add to the SciChartSurface
and set ChartModifierBase.isEnabled
to True to enable this behaviour.Constructor and Description |
---|
ZoomPanModifier() |
Modifier and Type | Method and Description |
---|---|
void |
attachTo(com.scichart.core.IServiceContainer services) |
void |
detach() |
ClipModeTarget |
getClipModeTargetX()
Gets which target is used as limit by ClipModeX when you reach the edge of the X-Axis extents
|
ClipMode |
getClipModeX()
Gets how panning behaves when you reach the edge of the X-Axis extents.
|
Direction2D |
getDirection()
Gets the
Direction2D to restrict zoom interactivity to. |
boolean |
getZoomExtentsY()
Gets whether the
ZoomPanModifier should perform zoom to extents on the Y-Axis on the each zoom operation when panning in X-Direction only. |
boolean |
onDown(android.view.MotionEvent e) |
boolean |
onFling(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float velocityX,
float velocityY) |
void |
onRenderSurfaceRendered(RenderedMessage message)
Called when parent
SciChartSurface.getRenderSurface() rendered |
boolean |
onScroll(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float xDelta,
float yDelta) |
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 how panning behaves when you reach the edge of the X-Axis extents.
|
void |
setDirection(Direction2D direction)
Sets the
Direction2D to restrict zoom interactivity to. |
void |
setZoomExtentsY(boolean zoomExtentsY)
Sets whether the
ZoomPanModifier should perform zoom to extents on the Y-Axis on the each zoom operation when panning in X-Direction only. |
getOriginalTouchEvent, onCancel, onDoubleTap, onDoubleTapEvent, onLongPress, onShowPress, onSingleTapConfirmed, onSingleTapUp, onTouch, onUp
applyThemeProvider, getContext, getEventsGroupTag, getIsEnabled, getMasterModifier, getModifierSurface, getParentSurface, getPointRelativeTo, getReceiveHandledEvents, getRenderableSeries, getRenderableSeriesArea, getServices, getXAxes, getXAxis, getXAxis, getYAxes, getYAxis, getYAxis, isAttached, isWithinSourceBounds, onAnnotationsCollectionChanged, onAnnotationsDrasticallyChanged, onGenericMotion, onIsEnabledChanged, onParentSurfaceResized, onRenderableSeriesCollectionChanged, onRenderableSeriesDrasticallyChanged, onSelectedSeriesCollectionChanged, onXAxesCollectionChanged, onXAxesDrasticallyChanged, onYAxesCollectionChanged, onYAxesDrasticallyChanged, setEventsGroupTag, setIsEnabled, setReceiveHandledEvents
public void attachTo(@NonNull com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
attachTo
in class GestureModifierBase
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
detach
in class GestureModifierBase
public final Direction2D getDirection()
Direction2D
to restrict zoom interactivity to.Direction2D
to restrict zoom interactivity to.public final void setDirection(Direction2D direction)
Direction2D
to restrict zoom interactivity to.direction
- The new Direction2D
to restrict zoom interactivity to.public final ClipMode getClipModeX()
ClipMode.ClipAtExtents
prevents panning outside of the X-Axis, ClipMode.None allows panning outside.ClipMode
, which determines behavior when you reach the edge of the X-Axis extents by panning.public final void setClipModeX(ClipMode clipModeX)
ClipMode.ClipAtExtents
prevents panning outside of the X-Axis, ClipMode.None allows panning outsideclipModeX
- 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 ClipModeXpublic final boolean getZoomExtentsY()
ZoomPanModifier
should perform zoom to extents on the Y-Axis on the each zoom operation when panning in X-Direction only.
If true, zoom to extents on the Y-Axis on the each zoom operation when panning in X-Direction only.
Use in conjunction withdirection
to achieve different zooming effects.public final void setZoomExtentsY(boolean zoomExtentsY)
ZoomPanModifier
should perform zoom to extents on the Y-Axis on the each zoom operation when panning in X-Direction only.
If true, zoom to extents on the Y-Axis on the each zoom operation when panning in X-Direction only.
Use in conjunction withdirection
to achieve different zooming effects.zoomExtentsY
- If true - zoom to extents on the Y-Axis on the each zoom operation.public boolean onDown(android.view.MotionEvent e)
onDown
in interface android.view.GestureDetector.OnGestureListener
onDown
in class GestureModifierBase
public boolean onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float xDelta, float yDelta)
onScroll
in interface android.view.GestureDetector.OnGestureListener
onScroll
in class GestureModifierBase
public boolean onFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)
onFling
in interface android.view.GestureDetector.OnGestureListener
onFling
in class GestureModifierBase
public void onRenderSurfaceRendered(RenderedMessage message)
SciChartSurface.getRenderSurface()
renderedonRenderSurfaceRendered
in interface ISciChartSurfaceChangeListener
onRenderSurfaceRendered
in class ChartModifierBase
message
- The rendered message