Package net.sf.jasperreports.charts.base
Class JRBaseThermometerPlot
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseChartPlot
-
- net.sf.jasperreports.charts.base.JRBaseThermometerPlot
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,JRThermometerPlot,JRChangeEventsSupport,JRChartPlot,JRCloneable
- Direct Known Subclasses:
JRDesignThermometerPlot
public class JRBaseThermometerPlot extends JRBaseChartPlot implements JRThermometerPlot
An immutable representation of the layout of a thermometer plot.- Author:
- Barry Klawans (bklawans@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.base.JRBaseChartPlot
JRBaseChartPlot.JRBaseSeriesColor
-
Nested classes/interfaces inherited from interface net.sf.jasperreports.engine.JRChartPlot
JRChartPlot.JRSeriesColor
-
-
Field Summary
Fields Modifier and Type Field Description protected JRDataRangedataRangeThe range of values that can be displayed by this thermometer.protected JRDataRangehighRangeThe boundaries of the high range.protected JRDataRangelowRangeThe boundaries of the low range.protected JRDataRangemediumRangeThe boundaries of the medium range.protected java.awt.ColormercuryColorThe default color to use for the mercury in the thermometer.protected JRValueDisplayvalueDisplayFormatting information for the textual display of the value, including font, color and a mask.protected ValueLocationEnumvalueLocationObjectSpecifies where the textual display of the value should be shown.-
Fields inherited from class net.sf.jasperreports.engine.base.JRBaseChartPlot
backcolor, backgroundAlphaFloat, chart, foregroundAlphaFloat, labelRotationDouble, orientationValue, PROPERTY_BACKCOLOR, PROPERTY_BACKGROUND_ALPHA, PROPERTY_FOREGROUND_ALPHA, PROPERTY_LABEL_ROTATION, PROPERTY_ORIENTATION, PROPERTY_SERIES_COLORS, seriesColors
-
-
Constructor Summary
Constructors Constructor Description JRBaseThermometerPlot(JRThermometerPlot thermoPlot, JRBaseObjectFactory factory)Constructs a new plot that is a copy of an existing one, and registers all expression used by the plot with the specified factory.JRBaseThermometerPlot(JRChartPlot plot, JRChart chart)Constructs a new thermometer plot that is a copy of an existing one.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone(JRChart parentChart)voidcollectExpressions(JRExpressionCollector collector)Adds all the expression used by this plot with the specified collector.JRDataRangegetDataRange()Returns the range of values displayed by this thermometer.JRDataRangegetHighRange()Returns the high range, ornullif undefined.JRDataRangegetLowRange()Returns the low range, ornullif undefined.JRDataRangegetMediumRange()Returns the medium range, ornullif undefined.java.awt.ColorgetMercuryColor()Returns the color of the "mercury" in the thermometer when the value is not in a defined range.JRValueDisplaygetValueDisplay()Returns formatting information for the textual representation of the value.ValueLocationEnumgetValueLocationValue()Returns the location where the value of the thermometer will be shown.-
Methods inherited from class net.sf.jasperreports.engine.base.JRBaseChartPlot
addSeriesColor, clearSeriesColors, clone, getBackcolor, getBackgroundAlphaFloat, getChart, getEventSupport, getForegroundAlphaFloat, getLabelRotationDouble, getOrientationValue, getOwnBackcolor, getSeriesColors, getStyleResolver, setBackcolor, setBackgroundAlpha, setForegroundAlpha, setLabelRotation, setOrientation, setSeriesColors
-
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
addSeriesColor, clearSeriesColors, getBackcolor, getBackgroundAlphaFloat, getChart, getForegroundAlphaFloat, getLabelRotationDouble, getOrientationValue, getOwnBackcolor, getSeriesColors, setBackcolor, setBackgroundAlpha, setForegroundAlpha, setLabelRotation, setOrientation, setSeriesColors
-
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
-
-
-
-
Field Detail
-
dataRange
protected JRDataRange dataRange
The range of values that can be displayed by this thermometer. Specifies the upper and lower bounds of the meter itself.
-
valueDisplay
protected JRValueDisplay valueDisplay
Formatting information for the textual display of the value, including font, color and a mask.
-
valueLocationObject
protected ValueLocationEnum valueLocationObject
Specifies where the textual display of the value should be shown.
-
mercuryColor
protected java.awt.Color mercuryColor
The default color to use for the mercury in the thermometer.
-
lowRange
protected JRDataRange lowRange
The boundaries of the low range.
-
mediumRange
protected JRDataRange mediumRange
The boundaries of the medium range.
-
highRange
protected JRDataRange highRange
The boundaries of the high range.
-
-
Constructor Detail
-
JRBaseThermometerPlot
public JRBaseThermometerPlot(JRChartPlot plot, JRChart chart)
Constructs a new thermometer plot that is a copy of an existing one.- Parameters:
plot- the plot to copychart- the parent chart
-
JRBaseThermometerPlot
public JRBaseThermometerPlot(JRThermometerPlot thermoPlot, JRBaseObjectFactory factory)
Constructs a new plot that is a copy of an existing one, and registers all expression used by the plot with the specified factory.- Parameters:
thermoPlot- the plot to copyfactory- the factory to register any expressions with
-
-
Method Detail
-
getDataRange
public JRDataRange getDataRange()
Description copied from interface:JRThermometerPlotReturns the range of values displayed by this thermometer. This range corresponds with the scale on the thermometer.- Specified by:
getDataRangein interfaceJRThermometerPlot- Returns:
- the range of values displayed by this thermometer
-
getValueDisplay
public JRValueDisplay getValueDisplay()
Description copied from interface:JRThermometerPlotReturns formatting information for the textual representation of the value.- Specified by:
getValueDisplayin interfaceJRThermometerPlot- Returns:
- formatting information for the value
-
getValueLocationValue
public ValueLocationEnum getValueLocationValue()
Description copied from interface:JRThermometerPlotReturns the location where the value of the thermometer will be shown. The return value will be one ofNONE,LEFT,RIGHTorBULB.- Specified by:
getValueLocationValuein interfaceJRThermometerPlot- Returns:
- the location where the value of the thermometer will be shown
-
getMercuryColor
public java.awt.Color getMercuryColor()
Description copied from interface:JRThermometerPlotReturns the color of the "mercury" in the thermometer when the value is not in a defined range.- Specified by:
getMercuryColorin interfaceJRThermometerPlot- Returns:
- the default color of the mercury in the thermometer
-
getLowRange
public JRDataRange getLowRange()
Description copied from interface:JRThermometerPlotReturns the low range, ornullif undefined.- Specified by:
getLowRangein interfaceJRThermometerPlot- Returns:
- the low range, or
nullif undefined.
-
getMediumRange
public JRDataRange getMediumRange()
Description copied from interface:JRThermometerPlotReturns the medium range, ornullif undefined.- Specified by:
getMediumRangein interfaceJRThermometerPlot- Returns:
- the medium range, or
nullif undefined.
-
getHighRange
public JRDataRange getHighRange()
Description copied from interface:JRThermometerPlotReturns the high range, ornullif undefined.- Specified by:
getHighRangein interfaceJRThermometerPlot- Returns:
- the high range, or
nullif undefined.
-
collectExpressions
public void collectExpressions(JRExpressionCollector collector)
Adds all the expression used by this plot with the specified collector. All collected expression that are also registered with a factory will be included with the report is compiled.- Specified by:
collectExpressionsin interfaceJRChartPlot- Parameters:
collector- the expression collector to use
-
clone
public java.lang.Object clone(JRChart parentChart)
- Specified by:
clonein interfaceJRChartPlot- Overrides:
clonein classJRBaseChartPlot
-
-