Package net.sf.jasperreports.engine.base
Class JRBaseChartPlot
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseChartPlot
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,JRChangeEventsSupport,JRChartPlot,JRCloneable
- Direct Known Subclasses:
JRBaseAreaPlot,JRBaseBar3DPlot,JRBaseBarPlot,JRBaseBubblePlot,JRBaseCandlestickPlot,JRBaseHighLowPlot,JRBaseLinePlot,JRBaseMeterPlot,JRBaseMultiAxisPlot,JRBasePie3DPlot,JRBasePiePlot,JRBaseScatterPlot,JRBaseThermometerPlot,JRBaseTimeSeriesPlot
public abstract class JRBaseChartPlot extends java.lang.Object implements JRChartPlot, java.io.Serializable, JRChangeEventsSupport
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJRBaseChartPlot.JRBaseSeriesColor-
Nested classes/interfaces inherited from interface net.sf.jasperreports.engine.JRChartPlot
JRChartPlot.JRSeriesColor
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.Colorbackcolorprotected java.lang.FloatbackgroundAlphaFloatprotected JRChartchartprotected java.lang.FloatforegroundAlphaFloatprotected java.lang.DoublelabelRotationDoubleprotected PlotOrientationEnumorientationValuestatic java.lang.StringPROPERTY_BACKCOLORstatic java.lang.StringPROPERTY_BACKGROUND_ALPHAstatic java.lang.StringPROPERTY_FOREGROUND_ALPHAstatic java.lang.StringPROPERTY_LABEL_ROTATIONstatic java.lang.StringPROPERTY_ORIENTATIONstatic java.lang.StringPROPERTY_SERIES_COLORSprotected java.util.SortedSet<JRChartPlot.JRSeriesColor>seriesColors
-
Constructor Summary
Constructors Modifier Constructor Description protectedJRBaseChartPlot(JRChartPlot plot, JRBaseObjectFactory factory)protectedJRBaseChartPlot(JRChartPlot plot, JRChart chart)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddSeriesColor(JRChartPlot.JRSeriesColor seriesColor)Adds the specified series color to the plot.voidclearSeriesColors()Removes all defined series colors.java.lang.Objectclone()java.lang.Objectclone(JRChart parentChart)java.awt.ColorgetBackcolor()Gets the chart background color.java.lang.FloatgetBackgroundAlphaFloat()Gets the transparency factor for this plot background.JRChartgetChart()Gets the chart associated with this chart plot, if available.JRPropertyChangeSupportgetEventSupport()Returns the property change support object for this instance.java.lang.FloatgetForegroundAlphaFloat()Gets the transparency factor for this plot foreground.java.lang.DoublegetLabelRotationDouble()Deprecated.PlotOrientationEnumgetOrientationValue()Gets the plot orientation (horizontal or vertical).java.awt.ColorgetOwnBackcolor()java.util.SortedSet<JRChartPlot.JRSeriesColor>getSeriesColors()Returns a list of all the defined series colors.protected StyleResolvergetStyleResolver()voidsetBackcolor(java.awt.Color backcolor)Sets the chart background color.voidsetBackgroundAlpha(java.lang.Float backgroundAlpha)Sets the transparency factor for this plot background.voidsetForegroundAlpha(java.lang.Float foregroundAlpha)Sets the transparency factor for this plot foreground.voidsetLabelRotation(java.lang.Double labelRotation)Deprecated.voidsetOrientation(PlotOrientationEnum orientationValue)Sets the plot orientation (horizontal or vertical).voidsetSeriesColors(java.util.Collection<JRChartPlot.JRSeriesColor> colors)Set the list of series colors.-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.engine.JRChartPlot
collectExpressions
-
-
-
-
Field Detail
-
PROPERTY_BACKCOLOR
public static final java.lang.String PROPERTY_BACKCOLOR
- See Also:
- Constant Field Values
-
PROPERTY_BACKGROUND_ALPHA
public static final java.lang.String PROPERTY_BACKGROUND_ALPHA
- See Also:
- Constant Field Values
-
PROPERTY_FOREGROUND_ALPHA
public static final java.lang.String PROPERTY_FOREGROUND_ALPHA
- See Also:
- Constant Field Values
-
PROPERTY_LABEL_ROTATION
public static final java.lang.String PROPERTY_LABEL_ROTATION
- See Also:
- Constant Field Values
-
PROPERTY_ORIENTATION
public static final java.lang.String PROPERTY_ORIENTATION
- See Also:
- Constant Field Values
-
PROPERTY_SERIES_COLORS
public static final java.lang.String PROPERTY_SERIES_COLORS
- See Also:
- Constant Field Values
-
chart
protected JRChart chart
-
backcolor
protected java.awt.Color backcolor
-
orientationValue
protected PlotOrientationEnum orientationValue
-
backgroundAlphaFloat
protected java.lang.Float backgroundAlphaFloat
-
foregroundAlphaFloat
protected java.lang.Float foregroundAlphaFloat
-
labelRotationDouble
protected java.lang.Double labelRotationDouble
-
seriesColors
protected java.util.SortedSet<JRChartPlot.JRSeriesColor> seriesColors
-
-
Constructor Detail
-
JRBaseChartPlot
protected JRBaseChartPlot(JRChartPlot plot, JRChart chart)
-
JRBaseChartPlot
protected JRBaseChartPlot(JRChartPlot plot, JRBaseObjectFactory factory)
-
-
Method Detail
-
getStyleResolver
protected StyleResolver getStyleResolver()
-
getChart
public JRChart getChart()
Description copied from interface:JRChartPlotGets the chart associated with this chart plot, if available. Implementations can return null on this method, especially if the chart plot is reused by multiple charts, which is not recommended since it prevents style properties inheritence from parent chart.- Specified by:
getChartin interfaceJRChartPlot
-
getBackcolor
public java.awt.Color getBackcolor()
Description copied from interface:JRChartPlotGets the chart background color.- Specified by:
getBackcolorin interfaceJRChartPlot
-
getOwnBackcolor
public java.awt.Color getOwnBackcolor()
- Specified by:
getOwnBackcolorin interfaceJRChartPlot
-
setBackcolor
public void setBackcolor(java.awt.Color backcolor)
Description copied from interface:JRChartPlotSets the chart background color.- Specified by:
setBackcolorin interfaceJRChartPlot
-
getOrientationValue
public PlotOrientationEnum getOrientationValue()
Description copied from interface:JRChartPlotGets the plot orientation (horizontal or vertical).- Specified by:
getOrientationValuein interfaceJRChartPlot
-
setOrientation
public void setOrientation(PlotOrientationEnum orientationValue)
Description copied from interface:JRChartPlotSets the plot orientation (horizontal or vertical).- Specified by:
setOrientationin interfaceJRChartPlot
-
getBackgroundAlphaFloat
public java.lang.Float getBackgroundAlphaFloat()
Description copied from interface:JRChartPlotGets the transparency factor for this plot background. The range is from 0 to 1, where 0 means transparent and 1 opaque. The default is 1.- Specified by:
getBackgroundAlphaFloatin interfaceJRChartPlot- Returns:
- a float value between 0 and 1.
-
setBackgroundAlpha
public void setBackgroundAlpha(java.lang.Float backgroundAlpha)
Description copied from interface:JRChartPlotSets the transparency factor for this plot background. The range is from 0 to 1, where 0 means transparent and 1 opaque. The default is 1.- Specified by:
setBackgroundAlphain interfaceJRChartPlot
-
getForegroundAlphaFloat
public java.lang.Float getForegroundAlphaFloat()
Description copied from interface:JRChartPlotGets the transparency factor for this plot foreground. The range is from 0 to 1, where 0 means transparent and 1 opaque. The default is 1.- Specified by:
getForegroundAlphaFloatin interfaceJRChartPlot- Returns:
- a float value between 0 and 1.
-
setForegroundAlpha
public void setForegroundAlpha(java.lang.Float foregroundAlpha)
Description copied from interface:JRChartPlotSets the transparency factor for this plot foreground. The range is from 0 to 1, where 0 means transparent and 1 opaque. The default is 1.- Specified by:
setForegroundAlphain interfaceJRChartPlot
-
getLabelRotationDouble
public java.lang.Double getLabelRotationDouble()
Deprecated.Gets the angle in degrees to rotate the data axis labels. The range is -360 to 360. A positive value angles the label so it reads downwards wile a negative value angles the label so it reads upwards. Only charts that use a category based axis (such as line or bar charts) support label rotation.- Specified by:
getLabelRotationDoublein interfaceJRChartPlot
-
setLabelRotation
public void setLabelRotation(java.lang.Double labelRotation)
Deprecated.Sets the angle in degrees to rotate the data axis labels. The range is -360 to 360. A positive value angles the label so it reads downwards wile a negative value angles the label so it reads upwards. Only charts that use a category based axis (such as line or bar charts) support label rotation.- Specified by:
setLabelRotationin interfaceJRChartPlot
-
getSeriesColors
public java.util.SortedSet<JRChartPlot.JRSeriesColor> getSeriesColors()
Returns a list of all the defined series colors. Every entry in the list is of type JRChartPlot.JRSeriesColor. If there are no defined series colors this method will return an empty list, not null.- Specified by:
getSeriesColorsin interfaceJRChartPlot
-
clearSeriesColors
public void clearSeriesColors()
Removes all defined series colors.- Specified by:
clearSeriesColorsin interfaceJRChartPlot
-
addSeriesColor
public void addSeriesColor(JRChartPlot.JRSeriesColor seriesColor)
Adds the specified series color to the plot.- Specified by:
addSeriesColorin interfaceJRChartPlot
-
setSeriesColors
public void setSeriesColors(java.util.Collection<JRChartPlot.JRSeriesColor> colors)
Description copied from interface:JRChartPlotSet the list of series colors.- Specified by:
setSeriesColorsin interfaceJRChartPlot- Parameters:
colors- the list of series colors (JRChartPlot.JRSeriesColorinstances}
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classjava.lang.Object
-
clone
public java.lang.Object clone(JRChart parentChart)
- Specified by:
clonein interfaceJRChartPlot
-
getEventSupport
public JRPropertyChangeSupport getEventSupport()
Description copied from interface:JRChangeEventsSupportReturns the property change support object for this instance.- Specified by:
getEventSupportin interfaceJRChangeEventsSupport- Returns:
- the property change support object for this instance
-
-