Package org.jfree.chart
Class StandardChartTheme
- java.lang.Object
-
- org.jfree.chart.StandardChartTheme
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,ChartTheme
,PublicCloneable
public class StandardChartTheme extends java.lang.Object implements ChartTheme, java.lang.Cloneable, PublicCloneable, java.io.Serializable
A default implementation of theChartTheme
interface. This implementation just collects a whole bunch of chart attributes and mimics the manual process of applying each attribute to the right sub-object within the JFreeChart instance. It's not elegant code, but it works.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Paint
axisLabelPaint
The axis label paint.private RectangleInsets
axisOffset
The axis offsets.private BarPainter
barPainter
The bar painter.private java.awt.Paint
baselinePaint
private java.awt.Paint
chartBackgroundPaint
The background paint for the chart.private java.awt.Paint
crosshairPaint
The crosshair paint.private java.awt.Paint
domainGridlinePaint
The domain grid line paint.private DrawingSupplier
drawingSupplier
The drawing supplier.private java.awt.Paint
errorIndicatorPaint
The error indicator paint for theStatisticalBarRenderer
.private java.awt.Font
extraLargeFont
The largest font size.private java.awt.Paint
gridBandAlternatePaint
The grid band alternate paint for aSymbolAxis
.private java.awt.Paint
gridBandPaint
The grid band paint for aSymbolAxis
.private java.awt.Paint
itemLabelPaint
The item label paint.private java.awt.Paint
labelLinkPaint
The label link paint for pie charts.private PieLabelLinkStyle
labelLinkStyle
The label link style for pie charts.private java.awt.Font
largeFont
A large font.private java.awt.Paint
legendBackgroundPaint
The legend background paint.private java.awt.Paint
legendItemPaint
The legend item paint.private java.lang.String
name
The name of this theme.private java.awt.Paint
plotBackgroundPaint
The background paint for the plot.private java.awt.Paint
plotOutlinePaint
The plot outline paint.private java.awt.Paint
rangeGridlinePaint
The range grid line paint.private java.awt.Font
regularFont
The regular font size.private ShadowGenerator
shadowGenerator
private java.awt.Paint
shadowPaint
The shadow paint.private boolean
shadowVisible
A flag that controls whether or not shadows are visible (for example, in a bar renderer).private java.awt.Font
smallFont
The small font size.private java.awt.Paint
subtitlePaint
The paint used to display subtitles.private java.awt.Paint
thermometerPaint
The thermometer paint.private java.awt.Paint
tickLabelPaint
The tick label paint.private java.awt.Paint
titlePaint
The paint used to display the main chart title.private XYBarPainter
xyBarPainter
The XY bar painter.
-
Constructor Summary
Constructors Constructor Description StandardChartTheme(java.lang.String name)
Creates a new default instance.StandardChartTheme(java.lang.String name, boolean shadow)
Creates a new default instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(JFreeChart chart)
Applies this theme to the supplied chart.protected void
applyToAbstractRenderer(AbstractRenderer renderer)
Applies the attributes for this theme to anAbstractRenderer
.protected void
applyToBlock(Block b)
Applies the attributes of this theme to the specified block.protected void
applyToBlockContainer(BlockContainer bc)
Applies the attributes of this theme to the specified container.protected void
applyToCategoryAxis(CategoryAxis axis)
Applies the attributes for this theme to aCategoryAxis
.protected void
applyToCategoryItemRenderer(CategoryItemRenderer renderer)
Applies the settings of this theme to the specified renderer.protected void
applyToCategoryPlot(CategoryPlot plot)
Applies the attributes of this theme to aCategoryPlot
.protected void
applyToFastScatterPlot(FastScatterPlot plot)
Applies the attributes of this theme to aFastScatterPlot
.protected void
applyToMeterPlot(MeterPlot plot)
Applies the attributes of this theme to aMeterPlot
.protected void
applyToMultiplePiePlot(MultiplePiePlot plot)
Applies the attributes of this theme to aMultiplePiePlot
.protected void
applyToPeriodAxis(PeriodAxis axis)
Applies the attributes for this theme to aPeriodAxis
.protected void
applyToPiePlot(PiePlot plot)
Applies the attributes of this theme to aPiePlot
instance.protected void
applyToPlot(Plot plot)
Applies the attributes of this theme to a plot.protected void
applyToPolarPlot(PolarPlot plot)
Applies the attributes of this theme to aPolarPlot
.protected void
applyToSpiderWebPlot(SpiderWebPlot plot)
Applies the attributes of this theme to aSpiderWebPlot
.protected void
applyToSymbolAxis(SymbolAxis axis)
Applies the attributes for this theme to aSymbolAxis
.protected void
applyToThermometerPlot(ThermometerPlot plot)
Applies the attributes for this theme to aThermometerPlot
.protected void
applyToTitle(Title title)
Applies the attributes of this theme to the specified title.protected void
applyToValueAxis(ValueAxis axis)
Applies the attributes for this theme to aValueAxis
.protected void
applyToXYAnnotation(XYAnnotation annotation)
Applies the settings of this theme to the specified annotation.protected void
applyToXYItemRenderer(XYItemRenderer renderer)
Applies the settings of this theme to the specified renderer.protected void
applyToXYPlot(XYPlot plot)
Applies the attributes of this theme to aXYPlot
.java.lang.Object
clone()
Returns a clone of this theme.static ChartTheme
createDarknessTheme()
Creates and returns a theme called "Darkness".static ChartTheme
createJFreeTheme()
Creates and returns the default 'JFree' chart theme.static ChartTheme
createLegacyTheme()
Creates and returns aChartTheme
that doesn't apply any changes to the JFreeChart defaults.boolean
equals(java.lang.Object obj)
Tests this theme for equality with an arbitrary object.java.awt.Paint
getAxisLabelPaint()
Returns the axis label paint.RectangleInsets
getAxisOffset()
Returns the axis offsets.BarPainter
getBarPainter()
Returns the bar painter.java.awt.Paint
getBaselinePaint()
Returns the baseline paint.java.awt.Paint
getChartBackgroundPaint()
Returns the chart background paint.java.awt.Paint
getCrosshairPaint()
Returns the crosshair paint.java.awt.Paint
getDomainGridlinePaint()
Returns the domain grid line paint.DrawingSupplier
getDrawingSupplier()
Returns a clone of the drawing supplier for this theme.java.awt.Paint
getErrorIndicatorPaint()
Returns the error indicator paint.java.awt.Font
getExtraLargeFont()
Returns the largest font for this theme.java.awt.Paint
getGridBandAlternatePaint()
Returns the grid band alternate paint (used for aSymbolAxis
).java.awt.Paint
getGridBandPaint()
Returns the grid band paint.java.awt.Paint
getItemLabelPaint()
Returns the item label paint.java.awt.Paint
getLabelLinkPaint()
Returns the label link paint for pie charts.PieLabelLinkStyle
getLabelLinkStyle()
Returns the label link style for pie charts.java.awt.Font
getLargeFont()
Returns the large font for this theme.java.awt.Paint
getLegendBackgroundPaint()
Returns the legend background paint.java.awt.Paint
getLegendItemPaint()
Returns the legend item paint.java.lang.String
getName()
Returns the name of this theme.java.awt.Paint
getPlotBackgroundPaint()
Returns the plot background paint.java.awt.Paint
getPlotOutlinePaint()
Returns the plot outline paint.java.awt.Paint
getRangeGridlinePaint()
Returns the range grid line paint.java.awt.Font
getRegularFont()
Returns the regular font.java.awt.Paint
getShadowPaint()
Returns the shadow paint.java.awt.Font
getSmallFont()
Returns the small font.java.awt.Paint
getSubtitlePaint()
Returns the subtitle paint.java.awt.Paint
getThermometerPaint()
Returns the thermometer paint.java.awt.Paint
getTickLabelPaint()
Returns the tick label paint.java.awt.Paint
getTitlePaint()
Returns the title paint.XYBarPainter
getXYBarPainter()
Returns the XY bar painter.int
hashCode()
boolean
isShadowVisible()
Returns the shadow visibility flag.private void
readObject(java.io.ObjectInputStream stream)
Provides serialization support.void
setAxisLabelPaint(java.awt.Paint paint)
Sets the axis label paint.void
setAxisOffset(RectangleInsets offset)
Sets the axis offset.void
setBarPainter(BarPainter painter)
Sets the bar painter.void
setBaselinePaint(java.awt.Paint paint)
Sets the baseline paint.void
setChartBackgroundPaint(java.awt.Paint paint)
Sets the chart background paint.void
setCrosshairPaint(java.awt.Paint paint)
Sets the crosshair paint.void
setDomainGridlinePaint(java.awt.Paint paint)
Sets the domain grid line paint.void
setDrawingSupplier(DrawingSupplier supplier)
Sets the drawing supplier for this theme.void
setErrorIndicatorPaint(java.awt.Paint paint)
Sets the error indicator paint.void
setExtraLargeFont(java.awt.Font font)
Sets the largest font for this theme.void
setGridBandAlternatePaint(java.awt.Paint paint)
Sets the grid band alternate paint (used for aSymbolAxis
).void
setGridBandPaint(java.awt.Paint paint)
Sets the grid band paint.void
setItemLabelPaint(java.awt.Paint paint)
Sets the item label paint.void
setLabelLinkPaint(java.awt.Paint paint)
Sets the label link paint for pie charts.void
setLabelLinkStyle(PieLabelLinkStyle style)
Sets the label link style for pie charts.void
setLargeFont(java.awt.Font font)
Sets the large font for this theme.void
setLegendBackgroundPaint(java.awt.Paint paint)
Sets the legend background paint.void
setLegendItemPaint(java.awt.Paint paint)
Sets the legend item paint.void
setPlotBackgroundPaint(java.awt.Paint paint)
Sets the plot background paint.void
setPlotOutlinePaint(java.awt.Paint paint)
Sets the plot outline paint.void
setRangeGridlinePaint(java.awt.Paint paint)
Sets the range grid line paint.void
setRegularFont(java.awt.Font font)
Sets the regular font for this theme.void
setShadowPaint(java.awt.Paint paint)
Sets the shadow paint.void
setShadowVisible(boolean visible)
Sets the shadow visibility flag.void
setSmallFont(java.awt.Font font)
Sets the small font for this theme.void
setSubtitlePaint(java.awt.Paint paint)
Sets the subtitle paint.void
setThermometerPaint(java.awt.Paint paint)
Sets the thermometer paint.void
setTickLabelPaint(java.awt.Paint paint)
Sets the tick label paint.void
setTitlePaint(java.awt.Paint paint)
Sets the title paint.void
setXYBarPainter(XYBarPainter painter)
Sets the XY bar painter.private void
writeObject(java.io.ObjectOutputStream stream)
Provides serialization support.
-
-
-
Field Detail
-
name
private java.lang.String name
The name of this theme.
-
extraLargeFont
private java.awt.Font extraLargeFont
The largest font size. Use for the main chart title.
-
largeFont
private java.awt.Font largeFont
A large font. Used for subtitles.
-
regularFont
private java.awt.Font regularFont
The regular font size. Used for axis tick labels, legend items etc.
-
smallFont
private java.awt.Font smallFont
The small font size.
-
titlePaint
private transient java.awt.Paint titlePaint
The paint used to display the main chart title.
-
subtitlePaint
private transient java.awt.Paint subtitlePaint
The paint used to display subtitles.
-
chartBackgroundPaint
private transient java.awt.Paint chartBackgroundPaint
The background paint for the chart.
-
legendBackgroundPaint
private transient java.awt.Paint legendBackgroundPaint
The legend background paint.
-
legendItemPaint
private transient java.awt.Paint legendItemPaint
The legend item paint.
-
drawingSupplier
private DrawingSupplier drawingSupplier
The drawing supplier.
-
plotBackgroundPaint
private transient java.awt.Paint plotBackgroundPaint
The background paint for the plot.
-
plotOutlinePaint
private transient java.awt.Paint plotOutlinePaint
The plot outline paint.
-
labelLinkStyle
private PieLabelLinkStyle labelLinkStyle
The label link style for pie charts.
-
labelLinkPaint
private transient java.awt.Paint labelLinkPaint
The label link paint for pie charts.
-
domainGridlinePaint
private transient java.awt.Paint domainGridlinePaint
The domain grid line paint.
-
rangeGridlinePaint
private transient java.awt.Paint rangeGridlinePaint
The range grid line paint.
-
baselinePaint
private transient java.awt.Paint baselinePaint
-
crosshairPaint
private transient java.awt.Paint crosshairPaint
The crosshair paint.
-
axisOffset
private RectangleInsets axisOffset
The axis offsets.
-
axisLabelPaint
private transient java.awt.Paint axisLabelPaint
The axis label paint.
-
tickLabelPaint
private transient java.awt.Paint tickLabelPaint
The tick label paint.
-
itemLabelPaint
private transient java.awt.Paint itemLabelPaint
The item label paint.
-
shadowVisible
private boolean shadowVisible
A flag that controls whether or not shadows are visible (for example, in a bar renderer).
-
shadowPaint
private transient java.awt.Paint shadowPaint
The shadow paint.
-
barPainter
private BarPainter barPainter
The bar painter.
-
xyBarPainter
private XYBarPainter xyBarPainter
The XY bar painter.
-
thermometerPaint
private transient java.awt.Paint thermometerPaint
The thermometer paint.
-
errorIndicatorPaint
private transient java.awt.Paint errorIndicatorPaint
The error indicator paint for theStatisticalBarRenderer
.
-
gridBandPaint
private transient java.awt.Paint gridBandPaint
The grid band paint for aSymbolAxis
.
-
gridBandAlternatePaint
private transient java.awt.Paint gridBandAlternatePaint
The grid band alternate paint for aSymbolAxis
.
-
shadowGenerator
private ShadowGenerator shadowGenerator
-
-
Constructor Detail
-
StandardChartTheme
public StandardChartTheme(java.lang.String name)
Creates a new default instance.- Parameters:
name
- the name of the theme (null
not permitted).
-
StandardChartTheme
public StandardChartTheme(java.lang.String name, boolean shadow)
Creates a new default instance.- Parameters:
name
- the name of the theme (null
not permitted).shadow
- a flag that controls whether a shadow generator is included.
-
-
Method Detail
-
createJFreeTheme
public static ChartTheme createJFreeTheme()
Creates and returns the default 'JFree' chart theme.- Returns:
- A chart theme.
-
createDarknessTheme
public static ChartTheme createDarknessTheme()
Creates and returns a theme called "Darkness". In this theme, the charts have a black background.- Returns:
- The "Darkness" theme.
-
createLegacyTheme
public static ChartTheme createLegacyTheme()
Creates and returns aChartTheme
that doesn't apply any changes to the JFreeChart defaults. This produces the "legacy" look for JFreeChart.- Returns:
- A legacy theme.
-
getExtraLargeFont
public java.awt.Font getExtraLargeFont()
Returns the largest font for this theme.- Returns:
- The largest font for this theme.
- See Also:
setExtraLargeFont(Font)
-
setExtraLargeFont
public void setExtraLargeFont(java.awt.Font font)
Sets the largest font for this theme.- Parameters:
font
- the font (null
not permitted).- See Also:
getExtraLargeFont()
-
getLargeFont
public java.awt.Font getLargeFont()
Returns the large font for this theme.- Returns:
- The large font (never
null
). - See Also:
setLargeFont(Font)
-
setLargeFont
public void setLargeFont(java.awt.Font font)
Sets the large font for this theme.- Parameters:
font
- the font (null
not permitted).- See Also:
getLargeFont()
-
getRegularFont
public java.awt.Font getRegularFont()
Returns the regular font.- Returns:
- The regular font (never
null
). - See Also:
setRegularFont(Font)
-
setRegularFont
public void setRegularFont(java.awt.Font font)
Sets the regular font for this theme.- Parameters:
font
- the font (null
not permitted).- See Also:
getRegularFont()
-
getSmallFont
public java.awt.Font getSmallFont()
Returns the small font.- Returns:
- The small font (never
null
). - See Also:
setSmallFont(Font)
-
setSmallFont
public void setSmallFont(java.awt.Font font)
Sets the small font for this theme.- Parameters:
font
- the font (null
not permitted).- See Also:
getSmallFont()
-
getTitlePaint
public java.awt.Paint getTitlePaint()
Returns the title paint.- Returns:
- The title paint (never
null
). - See Also:
setTitlePaint(Paint)
-
setTitlePaint
public void setTitlePaint(java.awt.Paint paint)
Sets the title paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getTitlePaint()
-
getSubtitlePaint
public java.awt.Paint getSubtitlePaint()
Returns the subtitle paint.- Returns:
- The subtitle paint (never
null
). - See Also:
setSubtitlePaint(Paint)
-
setSubtitlePaint
public void setSubtitlePaint(java.awt.Paint paint)
Sets the subtitle paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getSubtitlePaint()
-
getChartBackgroundPaint
public java.awt.Paint getChartBackgroundPaint()
Returns the chart background paint.- Returns:
- The chart background paint (never
null
). - See Also:
setChartBackgroundPaint(Paint)
-
setChartBackgroundPaint
public void setChartBackgroundPaint(java.awt.Paint paint)
Sets the chart background paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getChartBackgroundPaint()
-
getLegendBackgroundPaint
public java.awt.Paint getLegendBackgroundPaint()
Returns the legend background paint.- Returns:
- The legend background paint (never
null
). - See Also:
setLegendBackgroundPaint(Paint)
-
setLegendBackgroundPaint
public void setLegendBackgroundPaint(java.awt.Paint paint)
Sets the legend background paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getLegendBackgroundPaint()
-
getLegendItemPaint
public java.awt.Paint getLegendItemPaint()
Returns the legend item paint.- Returns:
- The legend item paint (never
null
). - See Also:
setLegendItemPaint(Paint)
-
setLegendItemPaint
public void setLegendItemPaint(java.awt.Paint paint)
Sets the legend item paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getLegendItemPaint()
-
getPlotBackgroundPaint
public java.awt.Paint getPlotBackgroundPaint()
Returns the plot background paint.- Returns:
- The plot background paint (never
null
). - See Also:
setPlotBackgroundPaint(Paint)
-
setPlotBackgroundPaint
public void setPlotBackgroundPaint(java.awt.Paint paint)
Sets the plot background paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getPlotBackgroundPaint()
-
getPlotOutlinePaint
public java.awt.Paint getPlotOutlinePaint()
Returns the plot outline paint.- Returns:
- The plot outline paint (never
null
). - See Also:
setPlotOutlinePaint(Paint)
-
setPlotOutlinePaint
public void setPlotOutlinePaint(java.awt.Paint paint)
Sets the plot outline paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getPlotOutlinePaint()
-
getLabelLinkStyle
public PieLabelLinkStyle getLabelLinkStyle()
Returns the label link style for pie charts.- Returns:
- The label link style (never
null
). - See Also:
setLabelLinkStyle(PieLabelLinkStyle)
-
setLabelLinkStyle
public void setLabelLinkStyle(PieLabelLinkStyle style)
Sets the label link style for pie charts.- Parameters:
style
- the style (null
not permitted).- See Also:
getLabelLinkStyle()
-
getLabelLinkPaint
public java.awt.Paint getLabelLinkPaint()
Returns the label link paint for pie charts.- Returns:
- The label link paint (never
null
). - See Also:
setLabelLinkPaint(Paint)
-
setLabelLinkPaint
public void setLabelLinkPaint(java.awt.Paint paint)
Sets the label link paint for pie charts.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getLabelLinkPaint()
-
getDomainGridlinePaint
public java.awt.Paint getDomainGridlinePaint()
Returns the domain grid line paint.- Returns:
- The domain grid line paint (never
null
). - See Also:
setDomainGridlinePaint(Paint)
-
setDomainGridlinePaint
public void setDomainGridlinePaint(java.awt.Paint paint)
Sets the domain grid line paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getDomainGridlinePaint()
-
getRangeGridlinePaint
public java.awt.Paint getRangeGridlinePaint()
Returns the range grid line paint.- Returns:
- The range grid line paint (never
null
). - See Also:
setRangeGridlinePaint(Paint)
-
setRangeGridlinePaint
public void setRangeGridlinePaint(java.awt.Paint paint)
Sets the range grid line paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getRangeGridlinePaint()
-
getBaselinePaint
public java.awt.Paint getBaselinePaint()
Returns the baseline paint.- Returns:
- The baseline paint.
-
setBaselinePaint
public void setBaselinePaint(java.awt.Paint paint)
Sets the baseline paint.- Parameters:
paint
- the paint (null
not permitted).
-
getCrosshairPaint
public java.awt.Paint getCrosshairPaint()
Returns the crosshair paint.- Returns:
- The crosshair paint.
-
setCrosshairPaint
public void setCrosshairPaint(java.awt.Paint paint)
Sets the crosshair paint.- Parameters:
paint
- the paint (null
not permitted).
-
getAxisOffset
public RectangleInsets getAxisOffset()
Returns the axis offsets.- Returns:
- The axis offsets (never
null
). - See Also:
setAxisOffset(RectangleInsets)
-
setAxisOffset
public void setAxisOffset(RectangleInsets offset)
Sets the axis offset.- Parameters:
offset
- the offset (null
not permitted).- See Also:
getAxisOffset()
-
getAxisLabelPaint
public java.awt.Paint getAxisLabelPaint()
Returns the axis label paint.- Returns:
- The axis label paint (never
null
). - See Also:
setAxisLabelPaint(Paint)
-
setAxisLabelPaint
public void setAxisLabelPaint(java.awt.Paint paint)
Sets the axis label paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getAxisLabelPaint()
-
getTickLabelPaint
public java.awt.Paint getTickLabelPaint()
Returns the tick label paint.- Returns:
- The tick label paint (never
null
). - See Also:
setTickLabelPaint(Paint)
-
setTickLabelPaint
public void setTickLabelPaint(java.awt.Paint paint)
Sets the tick label paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getTickLabelPaint()
-
getItemLabelPaint
public java.awt.Paint getItemLabelPaint()
Returns the item label paint.- Returns:
- The item label paint (never
null
). - See Also:
setItemLabelPaint(Paint)
-
setItemLabelPaint
public void setItemLabelPaint(java.awt.Paint paint)
Sets the item label paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getItemLabelPaint()
-
isShadowVisible
public boolean isShadowVisible()
Returns the shadow visibility flag.- Returns:
- The shadow visibility flag.
- See Also:
setShadowVisible(boolean)
-
setShadowVisible
public void setShadowVisible(boolean visible)
Sets the shadow visibility flag.- Parameters:
visible
- the flag.- See Also:
isShadowVisible()
-
getShadowPaint
public java.awt.Paint getShadowPaint()
Returns the shadow paint.- Returns:
- The shadow paint (never
null
). - See Also:
setShadowPaint(Paint)
-
setShadowPaint
public void setShadowPaint(java.awt.Paint paint)
Sets the shadow paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getShadowPaint()
-
getBarPainter
public BarPainter getBarPainter()
Returns the bar painter.- Returns:
- The bar painter (never
null
). - See Also:
setBarPainter(BarPainter)
-
setBarPainter
public void setBarPainter(BarPainter painter)
Sets the bar painter.- Parameters:
painter
- the painter (null
not permitted).- See Also:
getBarPainter()
-
getXYBarPainter
public XYBarPainter getXYBarPainter()
Returns the XY bar painter.- Returns:
- The XY bar painter (never
null
). - See Also:
setXYBarPainter(XYBarPainter)
-
setXYBarPainter
public void setXYBarPainter(XYBarPainter painter)
Sets the XY bar painter.- Parameters:
painter
- the painter (null
not permitted).- See Also:
getXYBarPainter()
-
getThermometerPaint
public java.awt.Paint getThermometerPaint()
Returns the thermometer paint.- Returns:
- The thermometer paint (never
null
). - See Also:
setThermometerPaint(Paint)
-
setThermometerPaint
public void setThermometerPaint(java.awt.Paint paint)
Sets the thermometer paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getThermometerPaint()
-
getErrorIndicatorPaint
public java.awt.Paint getErrorIndicatorPaint()
Returns the error indicator paint.- Returns:
- The error indicator paint (never
null
). - See Also:
setErrorIndicatorPaint(Paint)
-
setErrorIndicatorPaint
public void setErrorIndicatorPaint(java.awt.Paint paint)
Sets the error indicator paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getErrorIndicatorPaint()
-
getGridBandPaint
public java.awt.Paint getGridBandPaint()
Returns the grid band paint.- Returns:
- The grid band paint (never
null
). - See Also:
setGridBandPaint(Paint)
-
setGridBandPaint
public void setGridBandPaint(java.awt.Paint paint)
Sets the grid band paint.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getGridBandPaint()
-
getGridBandAlternatePaint
public java.awt.Paint getGridBandAlternatePaint()
Returns the grid band alternate paint (used for aSymbolAxis
).- Returns:
- The paint (never
null
). - See Also:
setGridBandAlternatePaint(Paint)
-
setGridBandAlternatePaint
public void setGridBandAlternatePaint(java.awt.Paint paint)
Sets the grid band alternate paint (used for aSymbolAxis
).- Parameters:
paint
- the paint (null
not permitted).- See Also:
getGridBandAlternatePaint()
-
getName
public java.lang.String getName()
Returns the name of this theme.- Returns:
- The name of this theme.
-
getDrawingSupplier
public DrawingSupplier getDrawingSupplier()
Returns a clone of the drawing supplier for this theme.- Returns:
- A clone of the drawing supplier.
-
setDrawingSupplier
public void setDrawingSupplier(DrawingSupplier supplier)
Sets the drawing supplier for this theme.- Parameters:
supplier
- the supplier (null
not permitted).- See Also:
getDrawingSupplier()
-
apply
public void apply(JFreeChart chart)
Applies this theme to the supplied chart.- Specified by:
apply
in interfaceChartTheme
- Parameters:
chart
- the chart (null
not permitted).
-
applyToTitle
protected void applyToTitle(Title title)
Applies the attributes of this theme to the specified title.- Parameters:
title
- the title.
-
applyToBlockContainer
protected void applyToBlockContainer(BlockContainer bc)
Applies the attributes of this theme to the specified container.- Parameters:
bc
- a block container (null
not permitted).
-
applyToBlock
protected void applyToBlock(Block b)
Applies the attributes of this theme to the specified block.- Parameters:
b
- the block.
-
applyToPlot
protected void applyToPlot(Plot plot)
Applies the attributes of this theme to a plot.- Parameters:
plot
- the plot (null
).
-
applyToPiePlot
protected void applyToPiePlot(PiePlot plot)
Applies the attributes of this theme to aPiePlot
instance. This method also clears any set values for the section paint, outline etc, so that the theme'sDrawingSupplier
will be used.- Parameters:
plot
- the plot (null
not permitted).
-
applyToMultiplePiePlot
protected void applyToMultiplePiePlot(MultiplePiePlot plot)
Applies the attributes of this theme to aMultiplePiePlot
.- Parameters:
plot
- the plot (null
not permitted).
-
applyToCategoryPlot
protected void applyToCategoryPlot(CategoryPlot plot)
Applies the attributes of this theme to aCategoryPlot
.- Parameters:
plot
- the plot (null
not permitted).
-
applyToXYPlot
protected void applyToXYPlot(XYPlot plot)
Applies the attributes of this theme to aXYPlot
.- Parameters:
plot
- the plot (null
not permitted).
-
applyToFastScatterPlot
protected void applyToFastScatterPlot(FastScatterPlot plot)
Applies the attributes of this theme to aFastScatterPlot
.- Parameters:
plot
- the plot (null
not permitted).
-
applyToPolarPlot
protected void applyToPolarPlot(PolarPlot plot)
Applies the attributes of this theme to aPolarPlot
. This method is called from theapplyToPlot(Plot)
method.- Parameters:
plot
- the plot (null
not permitted).
-
applyToSpiderWebPlot
protected void applyToSpiderWebPlot(SpiderWebPlot plot)
Applies the attributes of this theme to aSpiderWebPlot
.- Parameters:
plot
- the plot (null
not permitted).
-
applyToMeterPlot
protected void applyToMeterPlot(MeterPlot plot)
Applies the attributes of this theme to aMeterPlot
.- Parameters:
plot
- the plot (null
not permitted).
-
applyToThermometerPlot
protected void applyToThermometerPlot(ThermometerPlot plot)
Applies the attributes for this theme to aThermometerPlot
. This method is called from theapplyToPlot(Plot)
method.- Parameters:
plot
- the plot.
-
applyToCategoryAxis
protected void applyToCategoryAxis(CategoryAxis axis)
Applies the attributes for this theme to aCategoryAxis
.- Parameters:
axis
- the axis (null
not permitted).
-
applyToValueAxis
protected void applyToValueAxis(ValueAxis axis)
Applies the attributes for this theme to aValueAxis
.- Parameters:
axis
- the axis (null
not permitted).
-
applyToSymbolAxis
protected void applyToSymbolAxis(SymbolAxis axis)
Applies the attributes for this theme to aSymbolAxis
.- Parameters:
axis
- the axis (null
not permitted).
-
applyToPeriodAxis
protected void applyToPeriodAxis(PeriodAxis axis)
Applies the attributes for this theme to aPeriodAxis
.- Parameters:
axis
- the axis (null
not permitted).
-
applyToAbstractRenderer
protected void applyToAbstractRenderer(AbstractRenderer renderer)
Applies the attributes for this theme to anAbstractRenderer
.- Parameters:
renderer
- the renderer (null
not permitted).
-
applyToCategoryItemRenderer
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer)
Applies the settings of this theme to the specified renderer.- Parameters:
renderer
- the renderer (null
not permitted).
-
applyToXYItemRenderer
protected void applyToXYItemRenderer(XYItemRenderer renderer)
Applies the settings of this theme to the specified renderer.- Parameters:
renderer
- the renderer (null
not permitted).
-
applyToXYAnnotation
protected void applyToXYAnnotation(XYAnnotation annotation)
Applies the settings of this theme to the specified annotation.- Parameters:
annotation
- the annotation.
-
equals
public boolean equals(java.lang.Object obj)
Tests this theme for equality with an arbitrary object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Returns a clone of this theme.- Specified by:
clone
in interfacePublicCloneable
- Overrides:
clone
in classjava.lang.Object
- Returns:
- A clone.
- Throws:
java.lang.CloneNotSupportedException
- if the theme cannot be cloned.
-
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException
Provides serialization support.- Parameters:
stream
- the output stream (null
not permitted).- Throws:
java.io.IOException
- if there is an I/O error.
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
Provides serialization support.- Parameters:
stream
- the input stream (null
not permitted).- Throws:
java.io.IOException
- if there is an I/O error.java.lang.ClassNotFoundException
- if there is a classpath problem.
-
-