public abstract class ChartModifierBase extends com.scichart.core.utility.touch.ReceiveMotionEventsBase implements IChartModifier, ISciChartSurfaceProvider
SciChartSurface
Constructor and Description |
---|
ChartModifierBase() |
Modifier and Type | Method and Description |
---|---|
void |
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
|
void |
attachTo(com.scichart.core.IServiceContainer services) |
void |
detach() |
android.content.Context |
getContext() |
java.lang.String |
getEventsGroupTag()
Gets a string ID used for propagating motion events from the master chart.
|
boolean |
getIsEnabled()
Get whether the modifier is enabled for interaction
|
protected static <T extends IChartModifier> |
getMasterModifier(T modifier,
com.scichart.core.utility.touch.IReceiveMotionEvents source) |
IChartModifierSurface |
getModifierSurface()
Gets the parent
SciChartSurface.getModifierSurface() |
ISciChartSurface |
getParentSurface()
Gets the parent surface that this instance is associated with
|
boolean |
getPointRelativeTo(android.graphics.PointF point,
com.scichart.core.framework.IHitTestable relativeTo)
Transforms point with coordinates relative to parent surface and transforms it relative to specified
IHitTestable instance |
boolean |
getReceiveHandledEvents() |
java.util.List<IRenderableSeries> |
getRenderableSeries()
Gets the parent
SciChartSurface.getRenderableSeries() collection |
protected IRenderableSeriesArea |
getRenderableSeriesArea()
Gets the parent
SciChartSurface.getRenderableSeriesArea() |
com.scichart.core.IServiceContainer |
getServices() |
java.util.List<IAxis> |
getXAxes()
Gets the parent
SciChartSurface.getXAxes() collection |
IAxis |
getXAxis()
Gets the primary XAxis, this is the first axis in the XAxes collection
|
protected IAxis |
getXAxis(java.lang.String axisId)
Gets XAxis specified by id if it exists, otherwise returns null
|
java.util.List<IAxis> |
getYAxes()
Gets the parent
SciChartSurface.getYAxes() collection |
IAxis |
getYAxis()
Gets the primary YAxis, this is the first axis in the YAxes collection
|
protected IAxis |
getYAxis(java.lang.String axisId)
Gets YAxis specified by id if it exists, otherwise returns null
|
boolean |
isAttached() |
protected boolean |
isWithinSourceBounds(float x,
float y,
boolean isMaster,
com.scichart.core.utility.touch.IReceiveMotionEvents source)
Performs a check whether the point is inside the boundaries of the initial
IChartModifierSurface . |
void |
onAnnotationsCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IAnnotation> args)
Called when parent
SciChartSurface.getAnnotations() collection changes |
void |
onAnnotationsDrasticallyChanged(ISciChartSurface surface)
Called when parent
SciChartSurface.getAnnotations() collection drastically changed |
void |
onGenericMotion(com.scichart.core.utility.touch.ModifierTouchEventArgs args) |
protected void |
onIsEnabledChanged(boolean isEnabled)
Called when isEnabled value has changed
|
void |
onParentSurfaceResized(ResizedMessage message)
Called when parent
SciChartSurface resized |
void |
onRenderableSeriesCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IRenderableSeries> args)
Called when parent
SciChartSurface.getRenderableSeries() collection changes |
void |
onRenderableSeriesDrasticallyChanged(ISciChartSurface surface)
Called when parent
SciChartSurface.getRenderableSeries() collection drastically changed |
void |
onRenderSurfaceRendered(RenderedMessage message)
Called when parent
SciChartSurface.getRenderSurface() rendered |
void |
onSelectedSeriesCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IRenderableSeries> args)
Called when parent
SciChartSurface.getSelectedRenderableSeries() collection changes |
void |
onTouch(com.scichart.core.utility.touch.ModifierTouchEventArgs args) |
void |
onXAxesCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IAxis> args)
Called when parent
SciChartSurface.getXAxes() collection changes |
void |
onXAxesDrasticallyChanged(ISciChartSurface surface)
Called when parent
SciChartSurface.getXAxes() collection drastically changed |
void |
onYAxesCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IAxis> args)
Called when parent
SciChartSurface.getYAxes() collection changes |
void |
onYAxesDrasticallyChanged(ISciChartSurface surface)
Called when parent
SciChartSurface.getYAxes() collection drastically changed |
void |
setEventsGroupTag(java.lang.String eventsGroupTag)
Sets a string ID used for propagating motion events from the master chart.
|
void |
setIsEnabled(boolean isEnabled)
Sets whether the modifier is enabled for interaction
|
void |
setReceiveHandledEvents(boolean receiveHandledEvents)
Sets a value indicating whether motion events should be propagated to the target.
|
public final com.scichart.core.IServiceContainer getServices()
getServices
in interface com.scichart.core.IServiceProvider
public final ISciChartSurface getParentSurface()
getParentSurface
in interface ISciChartSurfaceProvider
public final boolean getReceiveHandledEvents()
getReceiveHandledEvents
in interface com.scichart.core.utility.touch.IReceiveMotionEvents
public final void setReceiveHandledEvents(boolean receiveHandledEvents)
receiveHandledEvents
- The new receiveHandledEvents. True if motion events should be propagated to the target.public java.lang.String getEventsGroupTag()
getEventsGroupTag
in interface IChartModifierBase
public void setEventsGroupTag(java.lang.String eventsGroupTag)
eventsGroupTag
- New tag of the event group.public final boolean getIsEnabled()
getIsEnabled
in interface IChartModifierBase
getIsEnabled
in interface com.scichart.core.utility.touch.IReceiveMotionEvents
public final void setIsEnabled(boolean isEnabled)
setIsEnabled
in interface IChartModifierBase
isEnabled
- The new isEnabled valueprotected void onIsEnabledChanged(boolean isEnabled)
isEnabled
- The new isEnabled valuepublic void attachTo(@NonNull com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
public final boolean isAttached()
isAttached
in interface com.scichart.core.framework.IAttachable
protected boolean isWithinSourceBounds(float x, float y, boolean isMaster, com.scichart.core.utility.touch.IReceiveMotionEvents source)
IChartModifierSurface
.x
- The x-coordinate of the point to check.y
- The y-coordinate of the point to check.isMaster
- Indicates whether this check is performed on the master IChartModifierSurface
instance.source
- The IReceiveMotionEvents
instance.IChartModifierSurface
.public void applyThemeProvider(IThemeProvider themeProvider)
applyThemeProvider
in interface IThemeable
themeProvider
- The IThemeProvider
instance which provides new theme for current instancepublic final java.util.List<IRenderableSeries> getRenderableSeries()
SciChartSurface.getRenderableSeries()
collectiongetRenderableSeries
in interface IChartModifier
public final java.util.List<IAxis> getXAxes()
SciChartSurface.getXAxes()
collectiongetXAxes
in interface IChartModifier
public final java.util.List<IAxis> getYAxes()
SciChartSurface.getYAxes()
collectiongetYAxes
in interface IChartModifier
protected final IAxis getXAxis(java.lang.String axisId)
axisId
- The XAxis idprotected final IAxis getYAxis(java.lang.String axisId)
axisId
- The YAxis idpublic IAxis getXAxis()
getXAxis
in interface IChartModifier
public IAxis getYAxis()
getYAxis
in interface IChartModifier
public final IChartModifierSurface getModifierSurface()
SciChartSurface.getModifierSurface()
getModifierSurface
in interface IChartModifierBase
protected final IRenderableSeriesArea getRenderableSeriesArea()
SciChartSurface.getRenderableSeriesArea()
public final android.content.Context getContext()
getContext
in interface com.scichart.core.framework.IContextProvider
public final boolean getPointRelativeTo(android.graphics.PointF point, com.scichart.core.framework.IHitTestable relativeTo)
IHitTestable
instancepoint
- The point to translaterelativeTo
- The target IHitTestable
instancepublic void onTouch(com.scichart.core.utility.touch.ModifierTouchEventArgs args)
onTouch
in interface com.scichart.core.utility.touch.IReceiveMotionEvents
public void onGenericMotion(com.scichart.core.utility.touch.ModifierTouchEventArgs args)
onGenericMotion
in interface com.scichart.core.utility.touch.IReceiveMotionEvents
public void onParentSurfaceResized(ResizedMessage message)
SciChartSurface
resizedonParentSurfaceResized
in interface ISciChartSurfaceChangeListener
message
- The resized messagepublic void onRenderSurfaceRendered(RenderedMessage message)
SciChartSurface.getRenderSurface()
renderedonRenderSurfaceRendered
in interface ISciChartSurfaceChangeListener
message
- The rendered messagepublic void onXAxesDrasticallyChanged(ISciChartSurface surface)
SciChartSurface.getXAxes()
collection drastically changedonXAxesDrasticallyChanged
in interface ISciChartSurfaceChangeListener
surface
- The parent surfacepublic void onYAxesDrasticallyChanged(ISciChartSurface surface)
SciChartSurface.getYAxes()
collection drastically changedonYAxesDrasticallyChanged
in interface ISciChartSurfaceChangeListener
surface
- The parent surfacepublic void onRenderableSeriesDrasticallyChanged(ISciChartSurface surface)
SciChartSurface.getRenderableSeries()
collection drastically changedonRenderableSeriesDrasticallyChanged
in interface ISciChartSurfaceChangeListener
surface
- The parent surfacepublic void onAnnotationsDrasticallyChanged(ISciChartSurface surface)
SciChartSurface.getAnnotations()
collection drastically changedonAnnotationsDrasticallyChanged
in interface ISciChartSurfaceChangeListener
surface
- The parent surfacepublic void onXAxesCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IAxis> args)
SciChartSurface.getXAxes()
collection changesonXAxesCollectionChanged
in interface ISciChartSurfaceChangeListener
args
- The collection changed event argspublic void onYAxesCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IAxis> args)
SciChartSurface.getYAxes()
collection changesonYAxesCollectionChanged
in interface ISciChartSurfaceChangeListener
args
- The collection changed event argspublic void onRenderableSeriesCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IRenderableSeries> args)
SciChartSurface.getRenderableSeries()
collection changesonRenderableSeriesCollectionChanged
in interface ISciChartSurfaceChangeListener
args
- The collection changed event argspublic void onAnnotationsCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IAnnotation> args)
SciChartSurface.getAnnotations()
collection changesonAnnotationsCollectionChanged
in interface ISciChartSurfaceChangeListener
args
- The collection changed event argspublic void onSelectedSeriesCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IRenderableSeries> args)
SciChartSurface.getSelectedRenderableSeries()
collection changesonSelectedSeriesCollectionChanged
in interface ISciChartSurfaceChangeListener
args
- The collection changed event argsprotected static <T extends IChartModifier> T getMasterModifier(T modifier, com.scichart.core.utility.touch.IReceiveMotionEvents source)