public class Bar extends Object
BarChart
. These bars are entirely dependent on the
BarChart
, so they can only be generated via BarChart.addBar(double)
and
BarChart.addBars(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.
|
Bar |
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 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 represents.
|
String |
toString() |
Bar |
value(double newValue)
Sets the value this represents.
|
public void addRefreshListener(RefreshListener listener)
listener
- a listenerpublic void removeRefreshListener(RefreshListener listener)
listener
- a listenerpublic double getValue()
public Bar value(double newValue)
newValue
- the valuepublic void setValue(double value)
value
- the valuepublic int getColor()
0xFFFF0000
and blue is
0xFF0000FF
.public Bar 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.