Class PieMapper
java.lang.Object
com.codename1.charts.views.PieMapper
PieChart Segment Selection Management.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPieSegment(int dataIndex, float value, float startAngle, float angle) Add configuration for a PieChart SegmentbooleanareAllSegmentPresent(int datasetSize) If we have all PieChart Config then there is no point in reloading itvoidClears the pie segments list.doubleFetches angle relative to pie chart center point where 3 O'Clock is 0 and 12 O'Clock is 270degreesgetSegmentShape(int dataIndex) getSeriesAndPointForScreenCoordinate(Point screenPoint) Fetches the SeriesSelection for the PieSegment selected.booleanisOnPieChart(Point screenPoint) Checks if Point falls within PieChartvoidsetDimensions(int pieRadius, int centerX, int centerY) Set PieChart location on screen.Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()booleanIndicates whether some other object is "equal to" this one.final ClassgetClass()Returns the runtime class of an object.inthashCode()Returns a hash code value for the object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
-
Constructor Details
-
PieMapper
public PieMapper()
-
-
Method Details
-
setDimensions
public void setDimensions(int pieRadius, int centerX, int centerY) Set PieChart location on screen.
Parameters
-
pieRadius -
centerX -
centerY
-
-
areAllSegmentPresent
public boolean areAllSegmentPresent(int datasetSize) If we have all PieChart Config then there is no point in reloading it
Parameters
datasetSize
Returns
true if cfg for each segment is present
-
addPieSegment
public void addPieSegment(int dataIndex, float value, float startAngle, float angle) Add configuration for a PieChart Segment
Parameters
-
dataIndex -
value -
startAngle -
angle
-
-
clearPieSegments
public void clearPieSegments()Clears the pie segments list. -
getAngle
Fetches angle relative to pie chart center point where 3 O'Clock is 0 and 12 O'Clock is 270degrees
Parameters
screenPoint
Returns
angle in degress from 0-360.
-
isOnPieChart
Checks if Point falls within PieChart
Parameters
screenPoint
Returns
true if in PieChart
-
getSeriesAndPointForScreenCoordinate
Fetches the SeriesSelection for the PieSegment selected.
Parameters
screenPoint: - the user tap location
Returns
null if screen point is not in PieChart or its config if it is
-
getSegmentShape
-