public final class

PieDonutSlice

extends Object
java.lang.Object
   ↳ com.shinobicontrols.charts.PieDonutSlice

Class Overview

A single slice of a pie or donut series.

Summary

Public Methods
float getCenterAngle()
Gets the center angle of the slice.
int getCenterX()
Gets the X coordinate of the center of the slice in pixels, relative to the chart canvas.
int getCenterY()
Gets the Y coordinate of the center of the slice in pixels, relative to the chart canvas.
Paint getLabelBackgroundPaint()
Returns the label Paint of the slice which will be used to draw the label background.
Point getLabelCenter()
Gets the center point of the slice label in pixels, relative to the chart canvas.
Paint getLabelPaint()
Returns the label Paint of the slice which will be used to draw the label.
String getLabelText()
Gets the label text of the slice.
double getY()
Gets the internal representation of the Y value of the slice, as a double.
void setLabelText(String labelText)
Sets the label text of the slice.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public float getCenterAngle ()

Gets the center angle of the slice. Specifically this value represents the center angle found directly between the start and end angles of this slice. The zero point is the top and angles increase in the draw direction which is currently set on the PieDonutSeries. Note: The returned value does not take into consideration any rotation on the PieDonutSeries. This can be retrieved from the PieDonutSeries object.

Returns
  • the centerAngle of the slice

public int getCenterX ()

Gets the X coordinate of the center of the slice in pixels, relative to the chart canvas.

Returns
  • the X coordinate of the center of the slice in pixels, relative to the chart canvas.

public int getCenterY ()

Gets the Y coordinate of the center of the slice in pixels, relative to the chart canvas.

Returns
  • the Y coordinate of the center of the slice in pixels, relative to the chart canvas.

public Paint getLabelBackgroundPaint ()

Returns the label Paint of the slice which will be used to draw the label background.

Returns
  • the background labelPaint of the slice.

public Point getLabelCenter ()

Gets the center point of the slice label in pixels, relative to the chart canvas.

Returns
  • the center point of the slice label, in pixels, relative to the chart canvas.

public Paint getLabelPaint ()

Returns the label Paint of the slice which will be used to draw the label.

Returns
  • the labelPaint of the slice.

public String getLabelText ()

Gets the label text of the slice.

Returns
  • the labelText

public double getY ()

Gets the internal representation of the Y value of the slice, as a double.

Returns
  • the internal representation of the Y value of the slice, as a double.

public void setLabelText (String labelText)

Sets the label text of the slice.

Parameters
labelText the labelText to set
See Also

public String toString ()