|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectschmitzm.jfree.chart.style.ChartLabelStyle
public class ChartLabelStyle
This class is a general super class for a design style of text displayed
in a chart. This can be an localized text according to Translation
or
a simple (unlocalized) String. The setLabel(String)
method will
try to decode the string for multiple languages. If this is not possible
the core string is taken as label.
Field Summary | |
---|---|
protected Translation |
label
Holds the label text. |
protected Category |
LOGGER
Logger for this class |
protected Color |
paint
Holds the text color of the label. |
Constructor Summary | |
---|---|
ChartLabelStyle()
Creates a new style with default values (empty label, color undefined). |
|
ChartLabelStyle(String label)
Creates a new style (color undefined). |
|
ChartLabelStyle(String label,
Color color)
Creates a new style. |
|
ChartLabelStyle(Translation label,
Color color)
Creates a new style. |
Method Summary | |
---|---|
ChartLabelStyle |
copy()
Creates a (deep) clone of this style. |
ChartLabelStyle |
copyTo(ChartLabelStyle dest)
Copies all properties of this style to another one. |
String |
getLabel()
Returns the label text in the default localization. |
Translation |
getLabelTranslation()
Returns the label text for all localizations. |
Color |
getPaint()
Returns the color for the label text. |
void |
setLabel(String label)
Sets the label text. |
void |
setLabelTranslation(Translation label)
Sets the label text. |
void |
setPaint(Color color)
Sets the color for the label text. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Category LOGGER
protected Translation label
protected Color paint
Constructor Detail |
---|
public ChartLabelStyle()
public ChartLabelStyle(String label)
label
- label text (localized or static label is provided)public ChartLabelStyle(String label, Color color)
label
- label text (localized or static label is provided)color
- text colorpublic ChartLabelStyle(Translation label, Color color)
label
- label text (staticcolor
- text colorMethod Detail |
---|
public String toString()
toString
in class Object
public ChartLabelStyle copy()
copy
in interface Copyable<ChartLabelStyle>
public ChartLabelStyle copyTo(ChartLabelStyle dest)
copyTo
in interface Copyable<ChartLabelStyle>
dest
- destination object (if null
the copy
is created by copy()
)
dest
or the new instancepublic String getLabel()
Locale.getDefault()
public void setLabel(String label)
label
- the text for the label (localized or static label is provided)public Translation getLabelTranslation()
public void setLabelTranslation(Translation label)
label
- the text for the labelpublic Color getPaint()
public void setPaint(Color color)
color
- Color for the label text
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |