Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.charts.base
Class JRBaseMeterPlot

    java.lang.Object
      net.sf.jasperreports.engine.base.JRBaseChartPlot
          net.sf.jasperreports.charts.base.JRBaseMeterPlot

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, JRMeterPlot, JRChangeEventsSupport, JRChartPlot, JRCloneable

Direct Known Subclasses:
  JRDesignMeterPlot

    public class JRBaseMeterPlot

extends JRBaseChartPlot
implements JRMeterPlot

An immutable representation of the layout of a Meter chart.

Version:
  $Id: JRBaseMeterPlot.java 3932 2010-08-04 12:17:40Z 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 displayed by the Meter.
`protected java.util.List` | `intervals` The defined intervals for the Meter.
`protected java.lang.Integer` | `meterAngleInteger` The extend of the meter face in degrees.
`protected java.awt.Color` | `meterBackgroundColor` The color to use for the face of the meter.
`protected java.awt.Color` | `needleColor` The color to use for the pointer on the meter.
`protected MeterShapeEnum` | `shapeValue` The shape to use when drawing the Meter.
`protected java.awt.Color` | `tickColor` The color to use for each tick on the face of the meter.
`protected java.lang.Double` | `tickIntervalDouble` How often to draw ticks around the face of the meter.
`protected JRFont` | `tickLabelFont` The font to use when writing tick labels.
`protected java.lang.String` | `units` Optional description of what the meter is displaying.
`protected JRValueDisplay` | `valueDisplay` Formatting information for the textual display of the value.

Fields inherited from class net.sf.jasperreports.engine.base.JRBaseChartPlot
`backcolor, backgroundAlphaFloat, chart, foregroundAlphaFloat, labelRotationDouble, orientation, PROPERTY_BACKCOLOR, PROPERTY_BACKGROUND_ALPHA, PROPERTY_FOREGROUND_ALPHA, PROPERTY_LABEL_ROTATION, PROPERTY_ORIENTATION, PROPERTY_SERIES_COLORS, seriesColors`

Fields inherited from interface net.sf.jasperreports.charts.JRMeterPlot
`SHAPE_CHORD, SHAPE_CIRCLE, SHAPE_DIAL, SHAPE_PIE`

Constructor Summary
`JRBaseMeterPlot(JRChartPlot plot, JRChart chart)` Constructs a copy of an existing meter.
`JRBaseMeterPlot(JRMeterPlot meterPlot, JRBaseObjectFactory factory)` Constructs a copy of an existing meter and registers all expressions maintained by the meter plot with a 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 that the Meter can display.
`java.util.List` | `getIntervals()` Returns a list of all the intervals contained in this Meter.
`int` | `getMeterAngle()` Deprecated. Replaced by `getMeterAngleInteger()`
`java.lang.Integer` | `getMeterAngleInteger()` Returns the size of the Meter face in degrees.
`java.awt.Color` | `getMeterBackgroundColor()` Returns the background color of the meter.
`java.awt.Color` | `getNeedleColor()` Returns the color used when drawing the meter's pointer.
`byte` | `getShape()` Deprecated. Replaced by `getShapeValue()`
`java.lang.Byte` | `getShapeByte()` Deprecated. Replaced by `getShapeValue()`
`MeterShapeEnum` | `getShapeValue()` Returns the shape of the Meter.
`java.awt.Color` | `getTickColor()` Returns the color used when drawing tick marks on the meter.
`double` | `getTickInterval()` Deprecated. Replaced by `getTickIntervalDouble()`
`java.lang.Double` | `getTickIntervalDouble()` Returns the spacing between the ticks on the face of the meter.
`JRFont` | `getTickLabelFont()` Returns the font used to write tick labels on the meter.
`java.lang.String` | `getUnits()` Returns the name of the units that the Meter is displaying.
`JRValueDisplay` | `getValueDisplay()` Returns a description of how the value of the Meter is displayed.

Methods inherited from class net.sf.jasperreports.engine.base.JRBaseChartPlot
`addSeriesColor, clearSeriesColors, clone, getBackcolor, getBackgroundAlpha, getBackgroundAlphaFloat, getChart, getEventSupport, getForegroundAlpha, getForegroundAlphaFloat, getLabelRotation, getLabelRotationDouble, getOrientation, getOwnBackcolor, getSeriesColors, setBackcolor, setBackgroundAlpha, setBackgroundAlpha, setForegroundAlpha, setForegroundAlpha, setLabelRotation, 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, getBackgroundAlpha, getBackgroundAlphaFloat, getChart, getForegroundAlpha, getForegroundAlphaFloat, getLabelRotation, getLabelRotationDouble, getOrientation, getOwnBackcolor, getSeriesColors, setBackcolor, setBackgroundAlpha, setBackgroundAlpha, setForegroundAlpha, setForegroundAlpha, setLabelRotation, setLabelRotation, setOrientation, setSeriesColors`

Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
`clone`

Field Detail

### dataRange

    protected JRDataRange dataRange

  The range displayed by the Meter.

### valueDisplay

    protected JRValueDisplay valueDisplay

  Formatting information for the textual display of the value.

### shapeValue

    protected MeterShapeEnum shapeValue

  The shape to use when drawing the Meter. Only applied if the meter is over 180 degrees wide and less than a full circle.

### intervals

    protected java.util.List intervals

  The defined intervals for the Meter. Each interval indicates a subsection of the meter and a color to use for that section.

### meterAngleInteger

    protected java.lang.Integer meterAngleInteger

  The extend of the meter face in degrees. It will always be centered around the straight up position.

### units

    protected java.lang.String units

  Optional description of what the meter is displaying. It will be appended to the textual representation of the value.

### tickIntervalDouble

    protected java.lang.Double tickIntervalDouble

  How often to draw ticks around the face of the meter. The interval is relative to the meter range - if the meter displays 100 to 200 and the tickInterval is 20, there will be 4 ticks at 120, 140, 160 and 180.

### meterBackgroundColor

    protected java.awt.Color meterBackgroundColor

  The color to use for the face of the meter.

### needleColor

    protected java.awt.Color needleColor

  The color to use for the pointer on the meter.

### tickColor

    protected java.awt.Color tickColor

  The color to use for each tick on the face of the meter.

### tickLabelFont

    protected JRFont tickLabelFont

  The font to use when writing tick labels.

Constructor Detail

### JRBaseMeterPlot

    public JRBaseMeterPlot(JRChartPlot plot,
                           JRChart chart)

  Constructs a copy of an existing meter.

  Parameters:
    `plot` - the plot to copy

### JRBaseMeterPlot

    public JRBaseMeterPlot(JRMeterPlot meterPlot,
                           JRBaseObjectFactory factory)

  Constructs a copy of an existing meter and registers all expressions maintained by the meter plot with a factory.

  Parameters:
    `meterPlot` - the meter to copy
    `factory` - the factory to register expressions with

Method Detail

### getDataRange

    public JRDataRange getDataRange()

  Description copied from interface: `JRMeterPlot`
  Returns the range of values that the Meter can display.

  Specified by:
    `getDataRange` in interface `JRMeterPlot`
  Returns:
    the range of values that the Meter can display

### getValueDisplay

    public JRValueDisplay getValueDisplay()

  Description copied from interface: `JRMeterPlot`
  Returns a description of how the value of the Meter is displayed. This includes any font and color information, the location of the value, a formatting mask and an optional "units" string to append to the value.

  Specified by:
    `getValueDisplay` in interface `JRMeterPlot`
  Returns:
    a description of how the value of the Meter is displayed.

### getShape

    public byte getShape()

  Deprecated. Replaced by `getShapeValue()`

  Specified by:
    `getShape` in interface `JRMeterPlot`

### getShapeByte

    public java.lang.Byte getShapeByte()

  Deprecated. Replaced by `getShapeValue()`

  Specified by:
    `getShapeByte` in interface `JRMeterPlot`

### getShapeValue

    public MeterShapeEnum getShapeValue()

  Description copied from interface: `JRMeterPlot`
  Returns the shape of the Meter. The shape is only relevant if the Meter face is over 180 degrees wide, and controls how the portion of the circle described by the Meter but outside of the Meter is drawn. (If the meter is 240 degrees wide the shape setting controls how the remaining 120 degrees is displayed.)
  The value returned is one of the shape constants defined in `MeterShapeEnum`.

  Specified by:
    `getShapeValue` in interface `JRMeterPlot`
  Returns:
    a description of how the value of the Meter is displayed.

### getIntervals

    public java.util.List getIntervals()

  Description copied from interface: `JRMeterPlot`
  Returns a list of all the intervals contained in this Meter. The return value is never `null` but can be an empty list. Each element in the list is a ``net.sf.jasperreports.charts.util.JRMeterInterval``

  Specified by:
    `getIntervals` in interface `JRMeterPlot`
  Returns:
    a list of all the intervals contained in this Meter

### getMeterAngle

    public int getMeterAngle()

  Deprecated. Replaced by `getMeterAngleInteger()`

  Specified by:
    `getMeterAngle` in interface `JRMeterPlot`

### getMeterAngleInteger

    public java.lang.Integer getMeterAngleInteger()

  Description copied from interface: `JRMeterPlot`
  Returns the size of the Meter face in degrees.

  Specified by:
    `getMeterAngleInteger` in interface `JRMeterPlot`
  Returns:
    the size of the Meter face in degrees

### getUnits

    public java.lang.String getUnits()

  Description copied from interface: `JRMeterPlot`
  Returns the name of the units that the Meter is displaying. This value will be appended to the value when displayed.

  Specified by:
    `getUnits` in interface `JRMeterPlot`
  Returns:
    the name of the units that the Meter is displaying

### getTickInterval

    public double getTickInterval()

  Deprecated. Replaced by `getTickIntervalDouble()`

  Specified by:
    `getTickInterval` in interface `JRMeterPlot`

### getTickIntervalDouble

    public java.lang.Double getTickIntervalDouble()

  Description copied from interface: `JRMeterPlot`
  Returns the spacing between the ticks on the face of the meter. The spacing is relative to the range that the meter is displaying - if the range is 0 to 500 and the tick interval is 50 then 10 ticks will be displayed.

  Specified by:
    `getTickIntervalDouble` in interface `JRMeterPlot`
  Returns:
    the spacing between the ticks on the face of the meter

### getMeterBackgroundColor

    public java.awt.Color getMeterBackgroundColor()

  Description copied from interface: `JRMeterPlot`
  Returns the background color of the meter. This is the color of the meter's face.

  Specified by:
    `getMeterBackgroundColor` in interface `JRMeterPlot`
  Returns:
    the background color of the meter.

### getNeedleColor

    public java.awt.Color getNeedleColor()

  Description copied from interface: `JRMeterPlot`
  Returns the color used when drawing the meter's pointer.

  Specified by:
    `getNeedleColor` in interface `JRMeterPlot`
  Returns:
    the color used when drawing the meter's pointer

### getTickColor

    public java.awt.Color getTickColor()

  Description copied from interface: `JRMeterPlot`
  Returns the color used when drawing tick marks on the meter.

  Specified by:
    `getTickColor` in interface `JRMeterPlot`
  Returns:
    the color used when drawing tick marks on the meter

### getTickLabelFont

    public JRFont getTickLabelFont()

  Description copied from interface: `JRMeterPlot`
  Returns the font used to write tick labels on the meter.

  Specified by:
    `getTickLabelFont` in interface `JRMeterPlot`
  Returns:
    the font used to write tick labels on the meter

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com