Package net.sf.jasperreports.charts.base
Class JRBaseThermometerPlot
- java.lang.Object
-
- net.sf.jasperreports.charts.base.JRBaseChartPlot
-
- net.sf.jasperreports.charts.base.JRBaseThermometerPlot
-
- All Implemented Interfaces:
Serializable
,Cloneable
,JRChartPlot
,JRThermometerPlot
,JRChangeEventsSupport
,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.charts.base.JRBaseChartPlot
JRBaseChartPlot.JRBaseSeriesColor
-
Nested classes/interfaces inherited from interface net.sf.jasperreports.charts.JRChartPlot
JRChartPlot.JRSeriesColor
-
-
Field Summary
Fields Modifier and Type Field Description protected JRDataRange
dataRange
The range of values that can be displayed by this thermometer.protected JRDataRange
highRange
The boundaries of the high range.protected JRDataRange
lowRange
The boundaries of the low range.protected JRDataRange
mediumRange
The boundaries of the medium range.protected Color
mercuryColor
The default color to use for the mercury in the thermometer.protected JRValueDisplay
valueDisplay
Formatting information for the textual display of the value, including font, color and a mask.protected ValueLocationEnum
valueLocationObject
Specifies where the textual display of the value should be shown.-
Fields inherited from class net.sf.jasperreports.charts.base.JRBaseChartPlot
backcolor, backgroundAlpha, chart, foregroundAlpha, labelRotation, orientation, PROPERTY_BACKCOLOR, PROPERTY_BACKGROUND_ALPHA, PROPERTY_FOREGROUND_ALPHA, PROPERTY_LABEL_ROTATION, PROPERTY_ORIENTATION, PROPERTY_SERIES_COLORS, seriesColors
-
-
Constructor Summary
Constructors Constructor Description JRBaseThermometerPlot(JRChartPlot plot, JRChart chart)
Constructs a new thermometer plot that is a copy of an existing one.JRBaseThermometerPlot(JRThermometerPlot thermoPlot, ChartsBaseObjectFactory 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone(JRChart parentChart)
void
collectExpressions(ChartsExpressionCollector collector)
Adds all the expression used by this plot with the specified collector.JRDataRange
getDataRange()
Returns the range of values displayed by this thermometer.JRDataRange
getHighRange()
Returns the high range, ornull
if undefined.JRDataRange
getLowRange()
Returns the low range, ornull
if undefined.JRDataRange
getMediumRange()
Returns the medium range, ornull
if undefined.Color
getMercuryColor()
Returns the color of the "mercury" in the thermometer when the value is not in a defined range.JRValueDisplay
getValueDisplay()
Returns formatting information for the textual representation of the value.ValueLocationEnum
getValueLocation()
Returns the location where the value of the thermometer will be shown.-
Methods inherited from class net.sf.jasperreports.charts.base.JRBaseChartPlot
addSeriesColor, clearSeriesColors, clone, getBackcolor, getBackgroundAlpha, getChart, getEventSupport, getForegroundAlpha, getLabelRotation, getOrientation, 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.charts.JRChartPlot
addSeriesColor, clearSeriesColors, getBackcolor, getBackgroundAlpha, getChart, getForegroundAlpha, getLabelRotation, getOrientation, 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 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, ChartsBaseObjectFactory 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:JRThermometerPlot
Returns the range of values displayed by this thermometer. This range corresponds with the scale on the thermometer.- Specified by:
getDataRange
in interfaceJRThermometerPlot
- Returns:
- the range of values displayed by this thermometer
-
getValueDisplay
public JRValueDisplay getValueDisplay()
Description copied from interface:JRThermometerPlot
Returns formatting information for the textual representation of the value.- Specified by:
getValueDisplay
in interfaceJRThermometerPlot
- Returns:
- formatting information for the value
-
getValueLocation
public ValueLocationEnum getValueLocation()
Description copied from interface:JRThermometerPlot
Returns the location where the value of the thermometer will be shown. The return value will be one ofNONE
,LEFT
,RIGHT
orBULB
.- Specified by:
getValueLocation
in interfaceJRThermometerPlot
- Returns:
- the location where the value of the thermometer will be shown
-
getMercuryColor
public Color getMercuryColor()
Description copied from interface:JRThermometerPlot
Returns the color of the "mercury" in the thermometer when the value is not in a defined range.- Specified by:
getMercuryColor
in interfaceJRThermometerPlot
- Returns:
- the default color of the mercury in the thermometer
-
getLowRange
public JRDataRange getLowRange()
Description copied from interface:JRThermometerPlot
Returns the low range, ornull
if undefined.- Specified by:
getLowRange
in interfaceJRThermometerPlot
- Returns:
- the low range, or
null
if undefined.
-
getMediumRange
public JRDataRange getMediumRange()
Description copied from interface:JRThermometerPlot
Returns the medium range, ornull
if undefined.- Specified by:
getMediumRange
in interfaceJRThermometerPlot
- Returns:
- the medium range, or
null
if undefined.
-
getHighRange
public JRDataRange getHighRange()
Description copied from interface:JRThermometerPlot
Returns the high range, ornull
if undefined.- Specified by:
getHighRange
in interfaceJRThermometerPlot
- Returns:
- the high range, or
null
if undefined.
-
collectExpressions
public void collectExpressions(ChartsExpressionCollector 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:
collectExpressions
in interfaceJRChartPlot
- Parameters:
collector
- the expression collector to use
-
clone
public Object clone(JRChart parentChart)
- Specified by:
clone
in interfaceJRChartPlot
- Overrides:
clone
in classJRBaseChartPlot
-
-