net.sf.jasperreports.charts.base
Class JRBaseThermometerPlot

java.lang.Object
  extended by net.sf.jasperreports.engine.base.JRBaseChartPlot
      extended by 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.

Version:
$Id: JRBaseThermometerPlot.java 5180 2012-03-29 13:23:12Z teodord $
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
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  java.awt.Color mercuryColor
          The default color to use for the mercury in the thermometer.
protected  boolean showValueLines
          Deprecated. No longer used.
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.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
JRBaseThermometerPlot(JRChartPlot plot, JRChart chart)
          Constructs a new thermometer plot that is a copy of an existing one.
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.
 
Method Summary
 java.lang.Object clone(JRChart parentChart)
           
 void collectExpressions(JRExpressionCollector 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, or null if undefined.
 JRDataRange getLowRange()
          Returns the low range, or null if undefined.
 JRDataRange getMediumRange()
          Returns the medium range, or null if undefined.
 java.awt.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 getValueLocationValue()
          Returns the location where the value of the thermometer will be shown.
 boolean isShowValueLines()
          Deprecated. No longer used.
 
Methods inherited from class net.sf.jasperreports.engine.base.JRBaseChartPlot
addSeriesColor, clearSeriesColors, clone, getBackcolor, getBackgroundAlphaFloat, getChart, getEventSupport, getForegroundAlphaFloat, getLabelRotationDouble, getOrientation, getOrientationValue, getOwnBackcolor, getSeriesColors, setBackcolor, setBackgroundAlpha, setForegroundAlpha, setLabelRotation, setOrientation, 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, getOrientation, getOrientationValue, getOwnBackcolor, getSeriesColors, setBackcolor, setBackgroundAlpha, setForegroundAlpha, setLabelRotation, setOrientation, 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.


showValueLines

protected boolean showValueLines
Deprecated. No longer used.
Indicates if the boundaries of each range should be shown.


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 copy
chart - 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 copy
factory - 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 interface JRThermometerPlot
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 interface JRThermometerPlot
Returns:
formatting information for the value

isShowValueLines

public boolean isShowValueLines()
Deprecated. No longer used.

Specified by:
isShowValueLines in interface JRThermometerPlot

getValueLocationValue

public ValueLocationEnum getValueLocationValue()
Description copied from interface: JRThermometerPlot
Returns the location where the value of the thermometer will be shown. The return value will be one of net.sf.jasperreports.charts.type.ValueLocationEnum.NONE, net.sf.jasperreports.charts.type.ValueLocationEnum.LEFT, net.sf.jasperreports.charts.type.ValueLocationEnum.RIGHT or net.sf.jasperreports.charts.type.ValueLocationEnum.BULB.

Specified by:
getValueLocationValue in interface JRThermometerPlot
Returns:
the location where the value of the thermometer will be shown

getMercuryColor

public java.awt.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 interface JRThermometerPlot
Returns:
the default color of the mercury in the thermometer

getLowRange

public JRDataRange getLowRange()
Description copied from interface: JRThermometerPlot
Returns the low range, or null if undefined.

Specified by:
getLowRange in interface JRThermometerPlot
Returns:
the low range, or null if undefined.

getMediumRange

public JRDataRange getMediumRange()
Description copied from interface: JRThermometerPlot
Returns the medium range, or null if undefined.

Specified by:
getMediumRange in interface JRThermometerPlot
Returns:
the medium range, or null if undefined.

getHighRange

public JRDataRange getHighRange()
Description copied from interface: JRThermometerPlot
Returns the high range, or null if undefined.

Specified by:
getHighRange in interface JRThermometerPlot
Returns:
the high range, or null if 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:
collectExpressions in interface JRChartPlot
Parameters:
collector - the expression collector to use

clone

public java.lang.Object clone(JRChart parentChart)
Specified by:
clone in interface JRChartPlot
Overrides:
clone in class JRBaseChartPlot


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com