public class ZoomPanModifier extends GestureModifierBase
ZoomPanModifier
provides a touch move to pan the X and Y Axes.
Add to the SciChartSurface
and set ChartModifierCore.getIsEnabled()
to True to enable this behaviour.services
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
|
ClipModeTarget |
getClipModeTargetY()
Gets which target is used as limit by ClipModeY when you reach the edge of the Y-Axis extents
|
ClipMode |
getClipModeX()
Gets how panning behaves when you reach the edge of the X-Axis extents.
|
ClipMode |
getClipModeY()
Gets how panning behaves when you reach the edge of the Y-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) |
protected void |
scroll(float xDelta,
float yDelta)
Performs scroll on charts using specified X and Y delta values in pixels
|
void |
setClipModeTargetX(ClipModeTarget clipModeTargetX)
Sets which target is used as limit by ClipModeX when you reach the edge of the X-Axis extents
|
void |
setClipModeTargetY(ClipModeTarget clipModeTargetY)
Sets which target is used as limit by ClipModeY when you reach the edge of the Y-Axis extents
|
void |
setClipModeX(ClipMode clipModeX)
Sets how panning behaves when you reach the edge of the X-Axis extents.
|
void |
setClipModeY(ClipMode clipModeY)
Sets how panning behaves when you reach the edge of the Y-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
getContext, getMasterModifier, getModifierSurface, getParentSurface, getPointRelativeTo, getRenderableSeries, getRenderableSeriesArea, getXAxes, getXAxis, getXAxis, getYAxes, getYAxis, getYAxis, isWithinSourceBounds, onAnnotationsCollectionChanged, onAnnotationsDrasticallyChanged, onParentSurfaceResized, 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 void attachTo(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 ClipMode getClipModeY()
ClipMode.ClipAtExtents
prevents panning outside of the Y-Axis, ClipMode.None allows panning outside.ClipMode
, which determines behavior when you reach the edge of the Y-Axis extents by panning.public final void setClipModeY(ClipMode clipModeY)
ClipMode.ClipAtExtents
prevents panning outside of the Y-Axis, ClipMode.None allows panning outsideclipModeY
- The new ClipMode
, which determines behavior when you reach the edge of the Y-Axis extents by panning.public final ClipModeTarget getClipModeTargetY()
public final void setClipModeTargetY(ClipModeTarget clipModeTargetY)
clipModeTargetY
- The target range which is used as limit by ClipModeYpublic 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
protected void scroll(float xDelta, float yDelta)
xDelta
- The xDelta value to use for scrollingyDelta
- The yDelta value to use for scrollingpublic 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