|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ChartStyle
This interface is a general super class for a design style of a JFreeChart
.
Sub classes should read the style from an xml element or something like that.
Maybe there could be a general implementation representing a style for
basic charts (bar, line and area charts) and special implementations for
special chart types (e.g. financial, statistical oder spider charts).
Field Summary | |
---|---|
static int |
DOMAIN_AXIS
Constant for the domain axis (X). |
static Logger |
LOGGER
|
static int |
RANGE_AXIS
Constant for the range axis (Y). |
static int |
RANGE_AXIS2
Constant for the second range axis (Y). |
static int |
X_AXIS
Constant for the domain axis (X). |
static int |
Y_AXIS
Constant for the range axis (Y). |
static int |
Y_AXIS_LEFT
Constant for the range axis (Y). |
static int |
Y_AXIS_RIGHT
Constant for the second range axis (Y). |
static int |
Y_AXIS2
Constant for the second range axis (Y). |
Method Summary | |
---|---|
void |
applyToChart(JFreeChart chart)
Applies the style to an existing chart. |
JFreeChart |
applyToDataset(Dataset dataset)
Generates a chart using the given data and the style represented by this class. |
int |
getAxisCount()
Returns count of axis of the chart. |
ChartAxisStyle |
getAxisStyle(int axis)
Returns the style of a chart axis. |
Color |
getBackground()
Returns the background color of the chart. |
ChartLabelStyle |
getDescStyle()
Returns the style of the long chart description. |
String |
getID()
Returns an (unique) ID for the style. |
PlotOrientation |
getOrientation()
Returns the orientation of the chart. |
ChartPlotStyle |
getPlotStyle()
Returns the style of the chart's plot. |
int |
getRendererCount()
Returns count of renderer for the chart. |
ChartRendererStyle |
getRendererStyle(int dataset)
Returns the style of a dataset renderer. |
ChartLabelStyle |
getTitleStyle()
Returns the style of the chart title. |
ChartType |
getType()
Returns the type of the chart style. |
boolean |
hasLegend()
Returns whether the chart is configured to generate a legend. |
boolean |
hasTooltips()
Returns whether the chart is configured to generate tooltips for the data. |
boolean |
hasURLs()
Returns whether the chart is configured to generate URLs. |
boolean |
isBorderVisible()
Returns whether a border is shown around the whole chart. |
void |
setAxisStyle(int axis,
ChartAxisStyle style)
Sets the style of a chart axis. |
void |
setBackground(Color paint)
Sets the background color of the chart. |
void |
setBorderVisible(boolean visible)
Sets whether a border is shown around the whole chart. |
void |
setDescStyle(ChartLabelStyle descStyle)
Sets the long description for the chart. |
void |
setLegend(boolean legend)
Sets whether the chart is configured to generate a legend. |
void |
setOrientation(PlotOrientation orientation)
Sets the orientation of the chart. |
void |
setPlotStyle(ChartPlotStyle style)
Sets the style of the chart's plot. |
void |
setRendererStyle(int dataset,
ChartRendererStyle style)
Sets the style of a dataset renderer. |
void |
setTitleStyle(ChartLabelStyle titleStyle)
Sets the title for the chart. |
void |
setTooltips(boolean tooltips)
Sets whether the chart is configured to generate tooltips for the data. |
void |
setURLs(boolean urls)
Sets whether the chart is configured to generate URLs. |
Methods inherited from interface skrueger.geotools.Copyable |
---|
copy, copyTo |
Field Detail |
---|
static final Logger LOGGER
static final int DOMAIN_AXIS
static final int X_AXIS
DOMAIN_AXIS
.
static final int RANGE_AXIS
static final int Y_AXIS
RANGE_AXIS
.
static final int Y_AXIS_LEFT
RANGE_AXIS
.
static final int RANGE_AXIS2
static final int Y_AXIS2
RANGE_AXIS2
.
static final int Y_AXIS_RIGHT
RANGE_AXIS2
.
Method Detail |
---|
String getID()
ChartType getType()
PlotOrientation getOrientation()
PlotOrientation#HORIZONTAL
,
PlotOrientation#VERTICAL
void setOrientation(PlotOrientation orientation)
orientation
- the orientation of the chartChartLabelStyle getTitleStyle()
null
!!
void setTitleStyle(ChartLabelStyle titleStyle)
titleStyle
- the new chart title styleChartLabelStyle getDescStyle()
void setDescStyle(ChartLabelStyle descStyle)
descStyle
- the new chart description styleColor getBackground()
void setBackground(Color paint)
paint
- the background color for the chartboolean isBorderVisible()
void setBorderVisible(boolean visible)
boolean hasLegend()
void setLegend(boolean legend)
boolean hasTooltips()
void setTooltips(boolean tooltips)
boolean hasURLs()
void setURLs(boolean urls)
int getAxisCount()
ChartAxisStyle getAxisStyle(int axis)
null
if axis style is not availablevoid setAxisStyle(int axis, ChartAxisStyle style)
axis
- axis number (0=domain, 1=range, ...)style
- style for the axisint getRendererCount()
ChartRendererStyle getRendererStyle(int dataset)
dataset
- dataset number (starting with 0)
null
if the chart has no such renderervoid setRendererStyle(int dataset, ChartRendererStyle style)
dataset
- dataset number (starting with 0)style
- style for the axisChartPlotStyle getPlotStyle()
null
if no such style is definedvoid setPlotStyle(ChartPlotStyle style)
style
- style for the plotvoid applyToChart(JFreeChart chart)
chart
- chart to be styled
UnsupportedOperationException
- if the style can not be applied
to the given chartJFreeChart applyToDataset(Dataset dataset)
dataset
- the data for the chart
UnsupportedOperationException
- if the style can not be applied
to the given dataset
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |