public abstract class PieDonutRenderableSeriesBase extends java.lang.Object implements IPieRenderableSeries
ISciPieChartSurface
.Modifier and Type | Field and Description |
---|---|
protected android.graphics.PointF |
center |
static int |
DEGREE_IN_CIRCLE |
protected com.scichart.core.framework.SmartPropertyBoolean |
drawLabelsProperty |
protected com.scichart.core.framework.SmartPropertyFloat |
heightProperty |
protected com.scichart.core.framework.SmartProperty<SizingMode> |
heightSizingModeProperty |
protected com.scichart.charting.visuals.renderableSeries.InvalidatePieRenderableSeriesListener |
invalidateElementListener |
protected com.scichart.charting.visuals.renderableSeries.InvalidatePieRenderableSeriesLayoutListener |
invalidateLayoutListener |
protected com.scichart.core.framework.SmartPropertyBoolean |
isSelectedProperty |
protected com.scichart.core.framework.SmartPropertyBoolean |
isVisibleProperty |
protected float |
outerRadius |
protected com.scichart.core.framework.SmartPropertyFloat |
scaleProperty |
protected com.scichart.core.framework.SmartPropertyFloat |
segmentSpacingProperty |
protected com.scichart.core.framework.SmartPropertyFloat |
selectedSegmentOffsetProperty |
protected com.scichart.core.framework.SmartProperty<java.lang.String> |
seriesNameProperty |
protected com.scichart.core.framework.SmartPropertyFloat |
startAngleProperty |
Modifier | Constructor and Description |
---|---|
protected |
PieDonutRenderableSeriesBase(IPieDonutRenderPassData currentRenderPassData,
IPieChartHitProvider hitProvider)
Abstract constructor for
PieDonutRenderableSeriesBase |
Modifier and Type | Method and Description |
---|---|
void |
addIsSelectedChangeListener(PieRenderableSeriesChangeListener listener)
Add the listener which should be invoked if this series becomes selected/unselected.
|
void |
addIsVisibleChangeListener(PieRenderableSeriesChangeListener listener)
Add the listener which should be invoked if this series becomes visible/invisible.
|
void |
animate(long duration)
Animates this series with specified duration.
|
void |
animate(long duration,
android.animation.TimeInterpolator interpolator)
Animates associated series with specified duration.
|
void |
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
|
void |
attachTo(com.scichart.core.IServiceContainer services) |
void |
detach() |
protected void |
disposeCachedData()
This method is called when series should dispose any cached data
|
android.content.Context |
getContext() |
IPieDonutRenderPassData |
getCurrentRenderPassData()
Returns the current
IPieDonutRenderPassData instance which is used for render pass. |
boolean |
getDrawLabels()
Gets a flag indicating whether to draw labels over segments, or not.
|
float |
getHeight()
Gets the
IPieRenderableSeries height considering IPieRenderableSeries.getHeightSizingMode() |
SizingMode |
getHeightSizingMode()
Gets the
SizingMode to use for computation of this series height. |
boolean |
getIsSelected()
Gets whether this series is selected
|
boolean |
getIsVisible()
Gets whether this series is visible when drawn
|
ISciPieChartSurface |
getParentSurface()
Gets the parent surface that this instance is associated with
|
float |
getScale()
Gets the value determines which percentage of the circumference is occupied by the series.
|
PieSegmentCollection |
getSegmentsCollection()
Gets the collection of
IPieSegment that this IPieRenderableSeries draws. |
float |
getSegmentSpacing()
Gets the value indicating spacing between segments of current
IPieRenderableSeries . |
float |
getSelectedSegmentOffset()
Gets the value which specifies the offset from center, which will be used for selected
IPieSegment s. |
PieSegmentCollection |
getSelectedSegmentsCollection()
Gets the collection of
IPieSegment that are selected |
protected ISeriesAnimator |
getSeriesAnimator()
Gets a
ISeriesAnimator instance used to animate this series. |
IPieSeriesInfoProvider |
getSeriesInfoProvider()
Gets the
IPieSeriesInfoProvider instance associated with this series. |
java.lang.String |
getSeriesName()
Gets the name of this series.
|
com.scichart.core.IServiceContainer |
getServices() |
float |
getStartAngle()
Gets the start angle value from which this series will be drawn.
|
boolean |
hasSegments()
Checks if this
IPieRenderableSeries has segments in it's PieSegmentCollection . |
void |
hitTest(PieHitTestInfo hitTestResult,
float x,
float y)
Performs a hit-test at the specific point (x,y coordinate on the parent
SciPieChartSurface . |
protected abstract void |
internalDraw(android.graphics.Canvas canvas,
IPieDonutRenderPassData renderPassData)
Draws the series using the
Canvas and the IPieDonutRenderPassData passed i. |
protected void |
internalUpdateRenderPassData(IPieDonutRenderPassData renderPassDataToUpdate)
Updates the current render pass data.
|
void |
invalidateElement() |
void |
invalidateLayout()
Asynchronously requests layout for the parent
ISciPieChartSurface instance. |
boolean |
isAttached() |
protected boolean |
isUpdateOfRenderPassDataRequired()
Checks whether this pie renderable series need to update its render pass data.
|
boolean |
isValidForDrawing()
Checks whether this series is valid for drawing
|
boolean |
isValidForUpdate()
Checks whether this series is valid for update
|
void |
onDraw(android.graphics.Canvas canvas)
Draws this
IPieRenderableSeries instance. |
void |
removeIsSelectedChangeListener(PieRenderableSeriesChangeListener listener)
Removes the listener which should invoke if this series become selected/unselected.
|
void |
removeIsVisibleChangeListener(PieRenderableSeriesChangeListener listener)
Removes the listener which should invoke if this series become visible/invisible.
|
void |
setDrawLabels(boolean drawLabels)
Sets a flag indicating whether to draw labels over segments, or not.
|
void |
setHeight(float height)
Sets the
IPieRenderableSeries height. |
void |
setHeightSizingMode(SizingMode heightSizingMode)
Sets the
SizingMode to use for computation of this series height. |
void |
setIsSelected(boolean isSelected)
Sets whether this series is selected
|
void |
setIsVisible(boolean isVisible)
Sets whether this series is visible when drawn
|
void |
setScale(float scale)
Sets the value determines which percentage of the circumference is occupied by the series.
|
void |
setSegmentsCollection(PieSegmentCollection segmentsCollection)
Sets the collection of
IPieSegment that this PieDonutRenderableSeriesBase draws. |
void |
setSegmentSpacing(float segmentSpacing)
Sets the value indicating spacing between segments of current
IPieRenderableSeries . |
void |
setSelectedSegmentOffset(float offset)
Sets the value which specifies the offset from center, which will be used for selected
IPieSegment s. |
protected void |
setSeriesAnimator(ISeriesAnimator seriesAnimator)
Sets a
ISeriesAnimator instance used to animate this series. |
void |
setSeriesInfoProvider(IPieSeriesInfoProvider seriesInfoProvider)
Sets the
IPieSeriesInfoProvider instance associated with this series. |
void |
setSeriesName(java.lang.String seriesName)
Sets the name of this series.
|
void |
setStartAngle(float startAngle)
Sets the start angle value from which this series will be drawn.
|
protected static void |
tryAttachTo(IPieRenderableSeries renderableSeries,
com.scichart.core.framework.IAttachable attachable)
Helper method which attaches
IAttachable instance to renderable series |
protected static void |
tryDetachFrom(IPieRenderableSeries renderableSeries,
com.scichart.core.framework.IAttachable attachable)
Helper method which detaches
IAttachable instance from renderable series |
void |
updateLayoutPassData(PieChartLayoutState pieChartLayoutState)
Called during layout pass and updates current layout pass data.
|
public static final int DEGREE_IN_CIRCLE
protected final com.scichart.charting.visuals.renderableSeries.InvalidatePieRenderableSeriesListener invalidateElementListener
protected final com.scichart.charting.visuals.renderableSeries.InvalidatePieRenderableSeriesLayoutListener invalidateLayoutListener
protected final com.scichart.core.framework.SmartPropertyBoolean isVisibleProperty
protected final com.scichart.core.framework.SmartPropertyBoolean isSelectedProperty
protected final com.scichart.core.framework.SmartPropertyBoolean drawLabelsProperty
protected final com.scichart.core.framework.SmartPropertyFloat startAngleProperty
protected final com.scichart.core.framework.SmartPropertyFloat heightProperty
protected final com.scichart.core.framework.SmartPropertyFloat selectedSegmentOffsetProperty
protected final com.scichart.core.framework.SmartProperty<SizingMode> heightSizingModeProperty
protected final com.scichart.core.framework.SmartPropertyFloat segmentSpacingProperty
protected final com.scichart.core.framework.SmartPropertyFloat scaleProperty
protected final com.scichart.core.framework.SmartProperty<java.lang.String> seriesNameProperty
protected final android.graphics.PointF center
protected float outerRadius
protected PieDonutRenderableSeriesBase(@NonNull IPieDonutRenderPassData currentRenderPassData, IPieChartHitProvider hitProvider)
PieDonutRenderableSeriesBase
currentRenderPassData
- The render pass data instance.hitProvider
- The hit provider instance.public final boolean getIsVisible()
getIsVisible
in interface IRenderableSeriesBase
public final void setIsVisible(boolean isVisible)
setIsVisible
in interface IRenderableSeriesBase
isVisible
- New isVisible valuepublic final boolean getIsSelected()
getIsSelected
in interface IRenderableSeriesBase
public final void setIsSelected(boolean isSelected)
setIsSelected
in interface IRenderableSeriesBase
isSelected
- New isSelected valuepublic final boolean getDrawLabels()
getDrawLabels
in interface IPieRenderableSeries
public final void setDrawLabels(boolean drawLabels)
setDrawLabels
in interface IPieRenderableSeries
drawLabels
- The new drawLabels value.public final float getStartAngle()
getStartAngle
in interface IPieRenderableSeries
public final void setStartAngle(float startAngle)
setStartAngle
in interface IPieRenderableSeries
startAngle
- New start angle value.public final float getHeight()
IPieRenderableSeries
height considering IPieRenderableSeries.getHeightSizingMode()
getHeight
in interface IPieRenderableSeries
public final void setHeight(float height)
IPieRenderableSeries
height.setHeight
in interface IPieRenderableSeries
height
- New height value.public final float getSelectedSegmentOffset()
IPieSegment
s.getSelectedSegmentOffset
in interface IPieRenderableSeries
public final void setSelectedSegmentOffset(float offset)
IPieSegment
s.setSelectedSegmentOffset
in interface IPieRenderableSeries
offset
- New offset for selected segments.public final SizingMode getHeightSizingMode()
SizingMode
to use for computation of this series height.
E.g. the default of Absolute requires that the spacing value is in pixels. The value of Relative requires relative spacing valuegetHeightSizingMode
in interface IPieRenderableSeries
SizingMode
instance.public final void setHeightSizingMode(SizingMode heightSizingMode)
SizingMode
to use for computation of this series height.
E.g. the default of Absolute requires that the spacing value is in pixels. The value of Relative requires relative spacing valuesetHeightSizingMode
in interface IPieRenderableSeries
heightSizingMode
- The new SizingMode
instance.public final float getSegmentSpacing()
IPieRenderableSeries
.getSegmentSpacing
in interface IPieRenderableSeries
public final void setSegmentSpacing(float segmentSpacing)
IPieRenderableSeries
.setSegmentSpacing
in interface IPieRenderableSeries
segmentSpacing
- New spacing between segments.public final float getScale()
getScale
in interface IPieRenderableSeries
public final void setScale(float scale)
setScale
in interface IPieRenderableSeries
scale
- New scale value.public final java.lang.String getSeriesName()
getSeriesName
in interface IPieRenderableSeries
public final void setSeriesName(java.lang.String seriesName)
setSeriesName
in interface IPieRenderableSeries
seriesName
- The new name of this series.public final PieSegmentCollection getSegmentsCollection()
IPieSegment
that this IPieRenderableSeries
draws.getSegmentsCollection
in interface IPieRenderableSeries
public final PieSegmentCollection getSelectedSegmentsCollection()
IPieSegment
that are selectedgetSelectedSegmentsCollection
in interface IPieRenderableSeries
public final void setSegmentsCollection(PieSegmentCollection segmentsCollection)
IPieSegment
that this PieDonutRenderableSeriesBase
draws.segmentsCollection
- The segments collection.public final boolean hasSegments()
IPieRenderableSeries
has segments in it's PieSegmentCollection
.hasSegments
in interface IPieRenderableSeries
IPieRenderableSeries
has at least one segment. Otherwise - false.public final IPieSeriesInfoProvider getSeriesInfoProvider()
IPieSeriesInfoProvider
instance associated with this series.getSeriesInfoProvider
in interface IPieRenderableSeries
IPieSeriesInfoProvider
instance.public final void setSeriesInfoProvider(IPieSeriesInfoProvider seriesInfoProvider)
IPieSeriesInfoProvider
instance associated with this series.setSeriesInfoProvider
in interface IPieRenderableSeries
seriesInfoProvider
- New IPieSeriesInfoProvider
instance.protected final ISeriesAnimator getSeriesAnimator()
ISeriesAnimator
instance used to animate this series.ISeriesAnimator
instance.protected final void setSeriesAnimator(@NonNull ISeriesAnimator seriesAnimator)
ISeriesAnimator
instance used to animate this series.seriesAnimator
- a new ISeriesAnimator
instance.public void invalidateElement()
invalidateElement
in interface com.scichart.core.framework.IInvalidatableElement
public void invalidateLayout()
ISciPieChartSurface
instance.invalidateLayout
in interface IPieRenderableSeries
public final com.scichart.core.IServiceContainer getServices()
getServices
in interface com.scichart.core.IServiceProvider
public final android.content.Context getContext()
getContext
in interface com.scichart.core.framework.IContextProvider
public final ISciPieChartSurface getParentSurface()
getParentSurface
in interface ISciPieChartSurfaceProvider
public final IPieDonutRenderPassData getCurrentRenderPassData()
IPieDonutRenderPassData
instance which is used for render pass.getCurrentRenderPassData
in interface IPieRenderableSeries
public 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
protected void disposeCachedData()
public final boolean isAttached()
isAttached
in interface com.scichart.core.framework.IAttachable
public void applyThemeProvider(IThemeProvider themeProvider)
applyThemeProvider
in interface IThemeable
themeProvider
- The IThemeProvider
instance which provides new theme for current instancepublic void updateLayoutPassData(PieChartLayoutState pieChartLayoutState)
updateLayoutPassData
in interface IPieRenderableSeries
public final void onDraw(android.graphics.Canvas canvas)
IPieRenderableSeries
instance.onDraw
in interface IPieRenderableSeries
canvas
- The canvas instance to draw on.public void animate(long duration)
animate
in interface IPieRenderableSeries
duration
- The duration of animation in milliseconds.public void animate(long duration, android.animation.TimeInterpolator interpolator)
animate
in interface IPieRenderableSeries
duration
- The duration of animation in milliseconds.interpolator
- The interpolator to be used by this animation. A value of null
will result in LinearInterpolator
public boolean isValidForUpdate()
isValidForUpdate
in interface IRenderableSeriesBase
public boolean isValidForDrawing()
isValidForDrawing
in interface IRenderableSeriesBase
protected abstract void internalDraw(android.graphics.Canvas canvas, IPieDonutRenderPassData renderPassData)
Canvas
and the IPieDonutRenderPassData
passed i.canvas
- The canvas instance to draw on.renderPassData
- The render pass data which contain a pre-calculated data to draw this IPieRenderableSeries
instance.protected boolean isUpdateOfRenderPassDataRequired()
internalUpdateRenderPassData(IPieDonutRenderPassData)
should be called.protected void internalUpdateRenderPassData(IPieDonutRenderPassData renderPassDataToUpdate)
renderPassDataToUpdate
- The render pass data to updatepublic final void hitTest(@NonNull PieHitTestInfo hitTestResult, float x, float y)
SciPieChartSurface
.hitTest
in interface IPieRenderableSeries
hitTestResult
- The PieHitTestInfo
instance where result of hit-test should be stored.x
- The x coordinate in pixels relative to parent SciPieChartSurface
.y
- The y coordinate in pixels relative to parent SciPieChartSurface
.public final void addIsVisibleChangeListener(PieRenderableSeriesChangeListener listener)
addIsVisibleChangeListener
in interface IPieRenderableSeries
listener
- The listener to add.public final void removeIsVisibleChangeListener(PieRenderableSeriesChangeListener listener)
removeIsVisibleChangeListener
in interface IPieRenderableSeries
listener
- The listener to remove.public final void addIsSelectedChangeListener(PieRenderableSeriesChangeListener listener)
addIsSelectedChangeListener
in interface IPieRenderableSeries
listener
- The listener to add.public final void removeIsSelectedChangeListener(PieRenderableSeriesChangeListener listener)
removeIsSelectedChangeListener
in interface IPieRenderableSeries
listener
- The listener to remove.protected static void tryAttachTo(IPieRenderableSeries renderableSeries, com.scichart.core.framework.IAttachable attachable)
IAttachable
instance to renderable seriesrenderableSeries
- The target renderable seriesattachable
- The IAttachable
to attachprotected static void tryDetachFrom(IPieRenderableSeries renderableSeries, com.scichart.core.framework.IAttachable attachable)
IAttachable
instance from renderable seriesrenderableSeries
- The target renderable seriesattachable
- The IAttachable
to detach