public class PieSlice extends Object
PieChart. These slices are entirely dependent on the
PieChart, so they can only be generated via PieChart.addSlice(double)
and PieChart.addSlices(double...).| Modifier and Type | Method and Description |
|---|---|
void |
addRefreshListener(RefreshListener listener)
Adds a refresh listener that is called whenever the source needs to be redrawn by
the GUI.
|
PieSlice |
color(int newColor)
Sets the color as ARGB int, e.g.
|
int |
getColor()
Returns the color as ARGB int, e.g.
|
double |
getValue()
Sets the value this slice represents.
|
void |
removeRefreshListener(RefreshListener listener)
Removes a refresh listener that was called whenever the source needed to be redrawn
by the GUI.
|
void |
setColor(int color)
Sets the color as ARGB int, e.g.
|
void |
setValue(double value)
Sets the value this slice represents.
|
String |
toString() |
PieSlice |
value(double newValue)
Sets the value this slice represents.
|
public void addRefreshListener(RefreshListener listener)
listener - a listenerpublic void removeRefreshListener(RefreshListener listener)
listener - a listenerpublic double getValue()
public PieSlice value(double newValue)
newValue - the valuepublic void setValue(double value)
value - the valuepublic int getColor()
0xFFFF0000 and blue is
0xFF0000FF.public PieSlice color(int newColor)
0xFFFF0000 and blue is
0xFF0000FF.newColor - the colorpublic void setColor(int color)
0xFFFF0000 and blue is
0xFF0000FF.color - the colorCopyright © 2020. All rights reserved.