|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectschmitzm.jfree.chart.style.ChartLabelStyle
schmitzm.jfree.chart.style.ChartAxisStyle
public class ChartAxisStyle
This class is defines the design style of a chart Axis
.
Field Summary | |
---|---|
protected Double |
angleDegr
Holds the angle (in degrees) the label is rotated by. |
protected String |
unitString
Holds a String that reflects the values units |
protected Double |
valuesAngleDegr
Holds the angle (in degrees) the axis values are rotated by. |
protected Format |
valuesFormat
Holds the number format to display the axis values. |
protected boolean |
visible
Holds whether the axis is visible. |
Fields inherited from class schmitzm.jfree.chart.style.ChartLabelStyle |
---|
label, LOGGER, paint |
Constructor Summary | |
---|---|
ChartAxisStyle()
Creates a new style with default values (empty label, color black, angle 0). |
|
ChartAxisStyle(String title,
Color color,
Double labelAngle,
Double valuesAngle)
Creates a new style. |
|
ChartAxisStyle(Translation title,
Color color,
Double labelAngle,
Double valuesAngle)
Creates a new style. |
Method Summary | |
---|---|
void |
applyToAxis(Axis axis)
Applies the style to a specific axis. |
protected void |
applyToCategoryAxis(CategoryAxis axis)
Applies style properties which can only be applied to CategoryAxis (values angle). |
protected void |
applyToDateAxis(DateAxis axis)
Applies style properties which can only be applied to DateAxis (values angle and format). |
protected void |
applyToNumberAxis(NumberAxis axis)
Applies style properties which can only be applied to NumberAxis (values angle and format). |
Double |
getLabelAngle()
Returns the angle (in degrees) the label text is rotated by. |
Double |
getLabelAngleRadian()
Returns the angle (in radian) the label text is rotated by. |
String |
getUnitString()
Returns a unit for the axis. |
Double |
getValuesAngle()
Returns the angle (in degrees) the axis values are rotated by. |
double |
getValuesAngleRadian()
Returns the angle (in radian) the axis values are rotated by. |
Format |
getValuesFormat()
Returns the (number) format for the axis values. |
boolean |
isVisible()
Returns whether the axis is visible. |
void |
setLabelAngle(Double angle)
Sets the angle (in degrees) the label text is rotated by. |
void |
setUnitString(String unitString)
Sets a unit for the axis. |
void |
setValuesAngle(Double angel)
Sets the angle (in degrees) the label text is rotated by. |
void |
setValuesFormat(Format format)
Sets the (number) format for the axis values. |
void |
setVisible(boolean visible)
Sets whether the axis is visible. |
Methods inherited from class schmitzm.jfree.chart.style.ChartLabelStyle |
---|
getLabel, getLabelTranslation, getPaint, setLabel, setLabelTranslation, setPaint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Double angleDegr
protected Double valuesAngleDegr
protected boolean visible
protected Format valuesFormat
protected String unitString
Constructor Detail |
---|
public ChartAxisStyle()
public ChartAxisStyle(String title, Color color, Double labelAngle, Double valuesAngle)
title
- axis titlecolor
- text color for the axis titlelabelAngle
- angel (in degrees) the axis label is rotated byvaluesAngle
- angel (in degrees) the axis values are rotated bypublic ChartAxisStyle(Translation title, Color color, Double labelAngle, Double valuesAngle)
title
- axis title as an internationalized Translation
color
- text color for the axis titlelabelAngle
- angel (in degrees) the axis label is rotated byvaluesAngle
- angel (in degrees) the axis values are rotated byMethod Detail |
---|
public Double getLabelAngle()
public Double getLabelAngleRadian()
public void setLabelAngle(Double angle)
color
- Color for the label textpublic Double getValuesAngle()
public double getValuesAngleRadian()
public void setValuesAngle(Double angel)
color
- Color for the label textpublic boolean isVisible()
public void setVisible(boolean visible)
public Format getValuesFormat()
public void setValuesFormat(Format format)
public void applyToAxis(Axis axis)
axis
- an axisprotected void applyToCategoryAxis(CategoryAxis axis)
CategoryAxis
(values angle).applyToAxis(Axis)
.
axis
- a CategoryAxis
protected void applyToNumberAxis(NumberAxis axis)
NumberAxis
(values angle and format).applyToAxis(Axis)
.
axis
- a NumberAxis
protected void applyToDateAxis(DateAxis axis)
DateAxis
(values angle and format).applyToAxis(Axis)
.
axis
- a DateAxis
public void setUnitString(String unitString)
unitString
- a string representing the unitpublic String getUnitString()
unitString
- a string representing the unit
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |