public class StandardChartTheme extends Object implements ChartTheme, Cloneable, org.jfree.util.PublicCloneable, Serializable
ChartTheme
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.Constructor and Description |
---|
StandardChartTheme(String name)
Creates a new default instance.
|
StandardChartTheme(String name,
boolean shadow)
Creates a new default instance.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(JFreeChart chart)
Applies this theme to the supplied chart.
|
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 a
ChartTheme that doesn't apply any changes
to the JFreeChart defaults. |
boolean |
equals(Object obj)
Tests this theme for equality with an arbitrary object.
|
Paint |
getAxisLabelPaint()
Returns the axis label paint.
|
org.jfree.ui.RectangleInsets |
getAxisOffset()
Returns the axis offsets.
|
BarPainter |
getBarPainter()
Returns the bar painter.
|
Paint |
getBaselinePaint()
Returns the baseline paint.
|
Paint |
getChartBackgroundPaint()
Returns the chart background paint.
|
Paint |
getCrosshairPaint()
Returns the crosshair paint.
|
Paint |
getDomainGridlinePaint()
Returns the domain grid line paint.
|
DrawingSupplier |
getDrawingSupplier()
Returns a clone of the drawing supplier for this theme.
|
Paint |
getErrorIndicatorPaint()
Returns the error indicator paint.
|
Font |
getExtraLargeFont()
Returns the largest font for this theme.
|
Paint |
getGridBandAlternatePaint()
Returns the grid band alternate paint (used for a
SymbolAxis ). |
Paint |
getGridBandPaint()
Returns the grid band paint.
|
Paint |
getItemLabelPaint()
Returns the item label paint.
|
Paint |
getLabelLinkPaint()
Returns the label link paint for pie charts.
|
PieLabelLinkStyle |
getLabelLinkStyle()
Returns the label link style for pie charts.
|
Font |
getLargeFont()
Returns the large font for this theme.
|
Paint |
getLegendBackgroundPaint()
Returns the legend background paint.
|
Paint |
getLegendItemPaint()
Returns the legend item paint.
|
String |
getName()
Returns the name of this theme.
|
Paint |
getPlotBackgroundPaint()
Returns the plot background paint.
|
Paint |
getPlotOutlinePaint()
Returns the plot outline paint.
|
Paint |
getRangeGridlinePaint()
Returns the range grid line paint.
|
Font |
getRegularFont()
Returns the regular font.
|
Paint |
getShadowPaint()
Returns the shadow paint.
|
Font |
getSmallFont()
Returns the small font.
|
Paint |
getSubtitlePaint()
Returns the subtitle paint.
|
Paint |
getThermometerPaint()
Returns the thermometer paint.
|
Paint |
getTickLabelPaint()
Returns the tick label paint.
|
Paint |
getTitlePaint()
Returns the title paint.
|
Paint |
getWallPaint()
Returns the wall paint for charts with a 3D effect.
|
XYBarPainter |
getXYBarPainter()
Returns the XY bar painter.
|
boolean |
isShadowVisible()
Returns the shadow visibility flag.
|
void |
setAxisLabelPaint(Paint paint)
Sets the axis label paint.
|
void |
setAxisOffset(org.jfree.ui.RectangleInsets offset)
Sets the axis offset.
|
void |
setBarPainter(BarPainter painter)
Sets the bar painter.
|
void |
setBaselinePaint(Paint paint)
Sets the baseline paint.
|
void |
setChartBackgroundPaint(Paint paint)
Sets the chart background paint.
|
void |
setCrosshairPaint(Paint paint)
Sets the crosshair paint.
|
void |
setDomainGridlinePaint(Paint paint)
Sets the domain grid line paint.
|
void |
setDrawingSupplier(DrawingSupplier supplier)
Sets the drawing supplier for this theme.
|
void |
setErrorIndicatorPaint(Paint paint)
Sets the error indicator paint.
|
void |
setExtraLargeFont(Font font)
Sets the largest font for this theme.
|
void |
setGridBandAlternatePaint(Paint paint)
Sets the grid band alternate paint (used for a
SymbolAxis ). |
void |
setGridBandPaint(Paint paint)
Sets the grid band paint.
|
void |
setItemLabelPaint(Paint paint)
Sets the item label paint.
|
void |
setLabelLinkPaint(Paint paint)
Sets the label link paint for pie charts.
|
void |
setLabelLinkStyle(PieLabelLinkStyle style)
Sets the label link style for pie charts.
|
void |
setLargeFont(Font font)
Sets the large font for this theme.
|
void |
setLegendBackgroundPaint(Paint paint)
Sets the legend background paint.
|
void |
setLegendItemPaint(Paint paint)
Sets the legend item paint.
|
void |
setPlotBackgroundPaint(Paint paint)
Sets the plot background paint.
|
void |
setPlotOutlinePaint(Paint paint)
Sets the plot outline paint.
|
void |
setRangeGridlinePaint(Paint paint)
Sets the range grid line paint.
|
void |
setRegularFont(Font font)
Sets the regular font for this theme.
|
void |
setShadowPaint(Paint paint)
Sets the shadow paint.
|
void |
setShadowVisible(boolean visible)
Sets the shadow visibility flag.
|
void |
setSmallFont(Font font)
Sets the small font for this theme.
|
void |
setSubtitlePaint(Paint paint)
Sets the subtitle paint.
|
void |
setThermometerPaint(Paint paint)
Sets the thermometer paint.
|
void |
setTickLabelPaint(Paint paint)
Sets the tick label paint.
|
void |
setTitlePaint(Paint paint)
Sets the title paint.
|
void |
setWallPaint(Paint paint)
Sets the wall paint for charts with a 3D effect.
|
void |
setXYBarPainter(XYBarPainter painter)
Sets the XY bar painter.
|
public StandardChartTheme(String name)
name
- the name of the theme (null
not permitted).public StandardChartTheme(String name, boolean shadow)
name
- the name of the theme (null
not permitted).shadow
- a flag that controls whether a shadow generator is
included.public static ChartTheme createJFreeTheme()
public static ChartTheme createDarknessTheme()
public static ChartTheme createLegacyTheme()
ChartTheme
that doesn't apply any changes
to the JFreeChart defaults. This produces the "legacy" look for
JFreeChart.public Font getExtraLargeFont()
setExtraLargeFont(Font)
public void setExtraLargeFont(Font font)
font
- the font (null
not permitted).getExtraLargeFont()
public Font getLargeFont()
null
).setLargeFont(Font)
public void setLargeFont(Font font)
font
- the font (null
not permitted).getLargeFont()
public Font getRegularFont()
null
).setRegularFont(Font)
public void setRegularFont(Font font)
font
- the font (null
not permitted).getRegularFont()
public Font getSmallFont()
null
).setSmallFont(Font)
public void setSmallFont(Font font)
font
- the font (null
not permitted).getSmallFont()
public Paint getTitlePaint()
null
).setTitlePaint(Paint)
public void setTitlePaint(Paint paint)
paint
- the paint (null
not permitted).getTitlePaint()
public Paint getSubtitlePaint()
null
).setSubtitlePaint(Paint)
public void setSubtitlePaint(Paint paint)
paint
- the paint (null
not permitted).getSubtitlePaint()
public Paint getChartBackgroundPaint()
null
).setChartBackgroundPaint(Paint)
public void setChartBackgroundPaint(Paint paint)
paint
- the paint (null
not permitted).getChartBackgroundPaint()
public Paint getLegendBackgroundPaint()
null
).setLegendBackgroundPaint(Paint)
public void setLegendBackgroundPaint(Paint paint)
paint
- the paint (null
not permitted).getLegendBackgroundPaint()
public Paint getLegendItemPaint()
null
).setLegendItemPaint(Paint)
public void setLegendItemPaint(Paint paint)
paint
- the paint (null
not permitted).getLegendItemPaint()
public Paint getPlotBackgroundPaint()
null
).setPlotBackgroundPaint(Paint)
public void setPlotBackgroundPaint(Paint paint)
paint
- the paint (null
not permitted).getPlotBackgroundPaint()
public Paint getPlotOutlinePaint()
null
).setPlotOutlinePaint(Paint)
public void setPlotOutlinePaint(Paint paint)
paint
- the paint (null
not permitted).getPlotOutlinePaint()
public PieLabelLinkStyle getLabelLinkStyle()
null
).setLabelLinkStyle(PieLabelLinkStyle)
public void setLabelLinkStyle(PieLabelLinkStyle style)
style
- the style (null
not permitted).getLabelLinkStyle()
public Paint getLabelLinkPaint()
null
).setLabelLinkPaint(Paint)
public void setLabelLinkPaint(Paint paint)
paint
- the paint (null
not permitted).getLabelLinkPaint()
public Paint getDomainGridlinePaint()
null
).setDomainGridlinePaint(Paint)
public void setDomainGridlinePaint(Paint paint)
paint
- the paint (null
not permitted).getDomainGridlinePaint()
public Paint getRangeGridlinePaint()
null
).setRangeGridlinePaint(Paint)
public void setRangeGridlinePaint(Paint paint)
paint
- the paint (null
not permitted).getRangeGridlinePaint()
public Paint getBaselinePaint()
public void setBaselinePaint(Paint paint)
paint
- the paint (null
not permitted).public Paint getCrosshairPaint()
public void setCrosshairPaint(Paint paint)
paint
- the paint (null
not permitted).public org.jfree.ui.RectangleInsets getAxisOffset()
null
).setAxisOffset(RectangleInsets)
public void setAxisOffset(org.jfree.ui.RectangleInsets offset)
offset
- the offset (null
not permitted).getAxisOffset()
public Paint getAxisLabelPaint()
null
).setAxisLabelPaint(Paint)
public void setAxisLabelPaint(Paint paint)
paint
- the paint (null
not permitted).getAxisLabelPaint()
public Paint getTickLabelPaint()
null
).setTickLabelPaint(Paint)
public void setTickLabelPaint(Paint paint)
paint
- the paint (null
not permitted).getTickLabelPaint()
public Paint getItemLabelPaint()
null
).setItemLabelPaint(Paint)
public void setItemLabelPaint(Paint paint)
paint
- the paint (null
not permitted).getItemLabelPaint()
public boolean isShadowVisible()
setShadowVisible(boolean)
public void setShadowVisible(boolean visible)
visible
- the flag.isShadowVisible()
public Paint getShadowPaint()
null
).setShadowPaint(Paint)
public void setShadowPaint(Paint paint)
paint
- the paint (null
not permitted).getShadowPaint()
public BarPainter getBarPainter()
null
).setBarPainter(BarPainter)
public void setBarPainter(BarPainter painter)
painter
- the painter (null
not permitted).getBarPainter()
public XYBarPainter getXYBarPainter()
null
).setXYBarPainter(XYBarPainter)
public void setXYBarPainter(XYBarPainter painter)
painter
- the painter (null
not permitted).getXYBarPainter()
public Paint getThermometerPaint()
null
).setThermometerPaint(Paint)
public void setThermometerPaint(Paint paint)
paint
- the paint (null
not permitted).getThermometerPaint()
public Paint getWallPaint()
null
).setWallPaint(Paint)
public void setWallPaint(Paint paint)
paint
- the paint (null
not permitted).getWallPaint()
public Paint getErrorIndicatorPaint()
null
).setErrorIndicatorPaint(Paint)
public void setErrorIndicatorPaint(Paint paint)
paint
- the paint (null
not permitted).getErrorIndicatorPaint()
public Paint getGridBandPaint()
null
).setGridBandPaint(Paint)
public void setGridBandPaint(Paint paint)
paint
- the paint (null
not permitted).getGridBandPaint()
public Paint getGridBandAlternatePaint()
SymbolAxis
).null
).setGridBandAlternatePaint(Paint)
public void setGridBandAlternatePaint(Paint paint)
SymbolAxis
).paint
- the paint (null
not permitted).getGridBandAlternatePaint()
public String getName()
public DrawingSupplier getDrawingSupplier()
public void setDrawingSupplier(DrawingSupplier supplier)
supplier
- the supplier (null
not permitted).getDrawingSupplier()
public void apply(JFreeChart chart)
apply
in interface ChartTheme
chart
- the chart (null
not permitted).public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class Object
CloneNotSupportedException
- if the theme cannot be cloned.Jas4pp 1.5 © Java Analysis Studio for Particle Physics