class GChartLabel extends Object implements ChartLabel, Consumer<JsObject>
This is open source software released under the Apache 2.0 License
| Modifier and Type | Field and Description |
|---|---|
private Color |
color |
private Font |
font |
private String |
text |
| Constructor and Description |
|---|
GChartLabel()
Constructor
|
GChartLabel(Color color,
Font font)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(JsObject label) |
(package private) Color |
getColor()
Returns the text color for label
|
(package private) String |
getColorHex()
Returns the value of the text color as a hex string
|
(package private) Font |
getFont()
Returns the font for label
|
(package private) String |
getText()
Returns the text for labe;
|
(package private) boolean |
isBold()
Returns true if the font is bold
|
(package private) boolean |
isItalic()
Returns true if font is italic
|
ChartLabel |
withColor(Color color)
Sets the text color
|
ChartLabel |
withFont(Font font)
Sets the font for this text style
|
ChartLabel |
withText(String text)
Sets the text for this label
|
Font getFont()
Color getColor()
String getText()
boolean isBold()
boolean isItalic()
String getColorHex()
public ChartLabel withText(String text)
ChartLabelwithText in interface ChartLabeltext - the text for labelpublic ChartLabel withColor(Color color)
ChartLabelwithColor in interface ChartLabelcolor - color valuepublic ChartLabel withFont(Font font)
ChartLabelwithFont in interface ChartLabelfont - sets the font for textCopyright 2014-2017, Xavier Witdouck