|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectschmitzm.jfree.chart.style.ChartRendererStyle
public class ChartRendererStyle
This class defines the rendering style the charts series. The following properties are available:
XYBarRenderer
)
Nested Class Summary | |
---|---|
protected class |
ChartRendererStyle.LegendLabelGenerator
This class implements a label generator based on the legend label definitions of this style, which can be used also for AbstractCategoryItemRenderer and AbstractXYItemRenderer . |
protected class |
ChartRendererStyle.LegendTooltipGenerator
This class implements a label generator based on the legend tooltip definitions of this style, which can be used also for AbstractCategoryItemRenderer and AbstractXYItemRenderer . |
Field Summary | |
---|---|
protected CategorySeriesLabelGenerator |
LABELGEN_CAT
Standard label generator used for Category-Charts. |
protected XYSeriesLabelGenerator |
LABELGEN_XY
Standard label generator used for XY-Charts. |
protected ChartRendererStyle.LegendLabelGenerator |
legendLabelGenerator
Label generator bases on the legend label definitions of this style. |
protected ChartRendererStyle.LegendTooltipGenerator |
legendTooltipGenerator
Label generator bases on the legend tooltip definitions of this style. |
protected Category |
LOGGER
Logger for this class |
protected double |
margin
Holds the (percentage) margin for the bars. |
protected int |
maxSeriesIdx
Holds the maximum series index for which a series is specified. |
protected Map<Integer,Boolean> |
seriesItemLabelsVisible
Holds whether the item labels are visible for a series. |
protected Map<Integer,ChartLabelStyle> |
seriesLegendLabel
Holds the label shown in the legend for the series. |
protected Map<Integer,ChartLabelStyle> |
seriesLegendTooltip
Holds the tooltip shown in the legend for the series. |
protected Map<Integer,Boolean> |
seriesLegendVisible
Holds whether the series is visible in the legend. |
protected Map<Integer,Color> |
seriesPaint
Holds the color a series is painted with. |
protected Map<Integer,Boolean> |
seriesShapesVisible
Holds whether the shape of a series is visible. |
Constructor Summary | |
---|---|
ChartRendererStyle()
Creates a new style with default values. |
Method Summary | |
---|---|
protected void |
applyToBarRenderer(XYBarRenderer renderer)
Applies style properties which can only be applied to XYBarRenderer . |
protected void |
applyToCategoryItemRenderer(AbstractCategoryItemRenderer renderer)
Applies style properties which can only be applied to AbstractCategoryItemRenderer . |
void |
applyToRenderer(AbstractRenderer renderer)
Applies the style to a specific renderer. |
protected void |
applyToXYItemRenderer(AbstractXYItemRenderer renderer)
Applies style properties which can only be applied to AbstractXYItemRenderer . |
ChartRendererStyle |
copy()
Creates a (deep) clone of this style. |
ChartRendererStyle |
copyTo(ChartRendererStyle dest)
Copies all properties of this style to another one. |
ChartRendererStyle.LegendLabelGenerator |
getLegendLabelGenerator()
Returns a label generator based on the legend label definitions of this style. |
ChartRendererStyle.LegendTooltipGenerator |
getLegendTooltipGenerator()
Returns a label generator based on the legend tooltip definitions of this style. |
Double |
getMargin()
Returns the margin (percentage) between the chart bars. |
int |
getSeriesCount()
Returns the count of series the style is defined for. |
ChartLabelStyle |
getSeriesLegendLabel(int series)
Returns the style of the series label in the legend. |
ChartLabelStyle |
getSeriesLegendTooltip(int series)
Returns the style of the series tooltip in the legend. |
Color |
getSeriesPaint(int series)
Returns the color, a series is painted with. |
Boolean |
isSeriesItemLabelsVisible(int series)
Returns whether the item labels of a series are visible. |
Boolean |
isSeriesLegendVisible(int series)
Returns whether the series is shown in the legend. |
Boolean |
isSeriesShapesVisible(int series)
Returns whether the shapes of a series are visible. |
void |
setMargin(Double margin)
Sets the margin (percentage) between the chart bars. |
void |
setSeriesItemLabelsVisible(int series,
Boolean visible)
Sets whether the item labels of a series are visible. |
void |
setSeriesLegendLabel(int series,
ChartLabelStyle labelStyle)
Sets the style of the series label in the legend. |
void |
setSeriesLegendTooltip(int series,
ChartLabelStyle tooltipStyle)
Sets the style of the series tooltip in the legend. |
void |
setSeriesLegendVisible(int series,
Boolean visible)
Sets whether the series is shown in the legend. |
void |
setSeriesPaint(int series,
Color color)
Sets the color, a series is painted with. |
void |
setSeriesShapesVisible(int series,
Boolean visible)
Sets whether the shapes of a series are visible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Category LOGGER
protected XYSeriesLabelGenerator LABELGEN_XY
protected CategorySeriesLabelGenerator LABELGEN_CAT
protected Map<Integer,Boolean> seriesItemLabelsVisible
protected Map<Integer,Color> seriesPaint
protected Map<Integer,Boolean> seriesShapesVisible
protected Map<Integer,Boolean> seriesLegendVisible
protected Map<Integer,ChartLabelStyle> seriesLegendLabel
protected Map<Integer,ChartLabelStyle> seriesLegendTooltip
protected int maxSeriesIdx
protected double margin
XYBarRenderer
.
protected ChartRendererStyle.LegendLabelGenerator legendLabelGenerator
protected ChartRendererStyle.LegendTooltipGenerator legendTooltipGenerator
Constructor Detail |
---|
public ChartRendererStyle()
Method Detail |
---|
public ChartRendererStyle copy()
copy
in interface Copyable<ChartRendererStyle>
public ChartRendererStyle copyTo(ChartRendererStyle dest)
copyTo
in interface Copyable<ChartRendererStyle>
dest
- destination object (if null
the copy
is created by copy()
)
dest
or the new instancepublic Double getMargin()
public void setMargin(Double margin)
public int getSeriesCount()
public Color getSeriesPaint(int series)
series
- series index
null
if no specific color is set for the seriespublic void setSeriesPaint(int series, Color color)
series
- series indexcolor
- color for the series (can be null
to reset
to a non-specific color)public Boolean isSeriesItemLabelsVisible(int series)
series
- series index
null
if property is not set for the seriespublic void setSeriesItemLabelsVisible(int series, Boolean visible)
series
- series indexvisible
- indicates the visibility of the series (can be
null
to reset to a non-specific property)public Boolean isSeriesShapesVisible(int series)
series
- series index
null
if property is not set for the seriespublic void setSeriesShapesVisible(int series, Boolean visible)
series
- series indexvisible
- indicates the visibility of the series (can be
null
to reset to a non-specific property)public Boolean isSeriesLegendVisible(int series)
series
- series index
null
if property is not set for the seriespublic void setSeriesLegendVisible(int series, Boolean visible)
series
- series indexvisible
- indicates the visibility of the series legend item (can be
null
to reset to a non-specific property)public ChartLabelStyle getSeriesLegendLabel(int series)
series
- series index
null
if property is not set for the seriespublic void setSeriesLegendLabel(int series, ChartLabelStyle labelStyle)
series
- series indexlabelStyle
- the style for the series label in the legend (can be
null
to reset to a non-specific property)public ChartLabelStyle getSeriesLegendTooltip(int series)
series
- series index
null
if property is not set for the seriespublic void setSeriesLegendTooltip(int series, ChartLabelStyle tooltipStyle)
series
- series indexlabelStyle
- the style for the series tooltip in the legend (can be
null
to reset to a non-specific property)public ChartRendererStyle.LegendLabelGenerator getLegendLabelGenerator()
public ChartRendererStyle.LegendTooltipGenerator getLegendTooltipGenerator()
public void applyToRenderer(AbstractRenderer renderer)
ChartStyle#applyToChart(org.jfree.chart.JFreeChart)
renderer
- a rendererprotected void applyToBarRenderer(XYBarRenderer renderer)
XYBarRenderer
.applyToRenderer(AbstractRenderer)
.
renderer
- a XYBarRenderer
protected void applyToXYItemRenderer(AbstractXYItemRenderer renderer)
AbstractXYItemRenderer
.applyToRenderer(AbstractRenderer)
.
renderer
- a AbstractXYItemRenderer
protected void applyToCategoryItemRenderer(AbstractCategoryItemRenderer renderer)
AbstractCategoryItemRenderer
.applyToRenderer(AbstractRenderer)
.
renderer
- a AbstractCategoryItemRenderer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |