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.design
Class JRDesignMeterPlot

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

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

    public class JRDesignMeterPlot

extends JRBaseMeterPlot

A meter plot that displays a single value against a range of values. The range can be further subdivided into multiple color coded regions.

Version:
  $Id: JRDesignMeterPlot.java 3676 2010-04-02 09:35:07Z shertage $
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
`static java.lang.String` | `PROPERTY_DATA_RANGE`
`static java.lang.String` | `PROPERTY_INTERVALS`
`static java.lang.String` | `PROPERTY_METER_ANGLE`
`static java.lang.String` | `PROPERTY_METER_BACKGROUND_COLOR`
`static java.lang.String` | `PROPERTY_NEEDLE_COLOR`
`static java.lang.String` | `PROPERTY_SHAPE`
`static java.lang.String` | `PROPERTY_TICK_COLOR`
`static java.lang.String` | `PROPERTY_TICK_INTERVAL`
`static java.lang.String` | `PROPERTY_TICK_LABEL_FONT`
`static java.lang.String` | `PROPERTY_UNITS`
`static java.lang.String` | `PROPERTY_VALUE_DISPLAY`

Fields inherited from class net.sf.jasperreports.charts.base.JRBaseMeterPlot
`dataRange, intervals, meterAngleInteger, meterBackgroundColor, needleColor, shapeValue, tickColor, tickIntervalDouble, tickLabelFont, units, valueDisplay`

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
`JRDesignMeterPlot(JRChartPlot meterPlot, JRChart chart)` Construct a new meter plot by copying an existing one.

Method Summary
`void` | `addInterval(JRMeterInterval interval)` Adds an interval to the meter.
`void` | `clearIntervals()` Removes all the intervals for the meter.
`void` | `setDataRange(JRDataRange dataRange)` Sets the range of values that the meter can display.
`void` | `setIntervals(java.util.Collection intervals)` Sets the meter intervals.
`void` | `setMeterAngle(int meterAngle)` Deprecated. Replaced by `setMeterAngle(Integer)`
`void` | `setMeterAngle(java.lang.Integer meterAngle)` Sets the size of the meter face in degrees.
`void` | `setMeterBackgroundColor(java.awt.Color meterBackgroundColor)` Sets the color to use for the meter face.
`void` | `setNeedleColor(java.awt.Color needleColor)` Sets the color to use for the meter pointer.
`void` | `setShape(byte shape)` Deprecated. Replaced by `setShape(MeterShapeEnum)`
`void` | `setShape(java.lang.Byte shape)` Deprecated. Replaced by `setShape(MeterShapeEnum)`
`void` | `setShape(MeterShapeEnum shape)` Sets the shape of the meter.
`void` | `setTickColor(java.awt.Color tickColor)` Sets the color to use when drawing tick marks on the meter.
`void` | `setTickInterval(double tickInterval)` Deprecated. Replaced by `setTickInterval(Double)`
`void` | `setTickInterval(java.lang.Double tickInterval)` Sets the space between tick marks on the face of the meter.
`void` | `setTickLabelFont(JRFont tickLabelFont)` Sets the font to use when displaying the tick label.
`void` | `setUnits(java.lang.String units)` Sets the units string to use.
`void` | `setValueDisplay(JRValueDisplay valueDisplay)` Sets the value display formatting options.

Methods inherited from class net.sf.jasperreports.charts.base.JRBaseMeterPlot
`clone, collectExpressions, getDataRange, getIntervals, getMeterAngle, getMeterAngleInteger, getMeterBackgroundColor, getNeedleColor, getShape, getShapeByte, getShapeValue, getTickColor, getTickInterval, getTickIntervalDouble, getTickLabelFont, getUnits, getValueDisplay`

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

### PROPERTY_DATA_RANGE

    public static final java.lang.String PROPERTY_DATA_RANGE

See Also:
  Constant Field Values

### PROPERTY_METER_ANGLE

    public static final java.lang.String PROPERTY_METER_ANGLE

See Also:
  Constant Field Values

### PROPERTY_METER_BACKGROUND_COLOR

    public static final java.lang.String PROPERTY_METER_BACKGROUND_COLOR

See Also:
  Constant Field Values

### PROPERTY_NEEDLE_COLOR

    public static final java.lang.String PROPERTY_NEEDLE_COLOR

See Also:
  Constant Field Values

### PROPERTY_SHAPE

    public static final java.lang.String PROPERTY_SHAPE

See Also:
  Constant Field Values

### PROPERTY_TICK_COLOR

    public static final java.lang.String PROPERTY_TICK_COLOR

See Also:
  Constant Field Values

### PROPERTY_TICK_INTERVAL

    public static final java.lang.String PROPERTY_TICK_INTERVAL

See Also:
  Constant Field Values

### PROPERTY_UNITS

    public static final java.lang.String PROPERTY_UNITS

See Also:
  Constant Field Values

### PROPERTY_VALUE_DISPLAY

    public static final java.lang.String PROPERTY_VALUE_DISPLAY

See Also:
  Constant Field Values

### PROPERTY_INTERVALS

    public static final java.lang.String PROPERTY_INTERVALS

See Also:
  Constant Field Values

### PROPERTY_TICK_LABEL_FONT

    public static final java.lang.String PROPERTY_TICK_LABEL_FONT

See Also:
  Constant Field Values

Constructor Detail

### JRDesignMeterPlot

    public JRDesignMeterPlot(JRChartPlot meterPlot,
                             JRChart chart)

  Construct a new meter plot by copying an existing one.

  Parameters:
    `meterPlot` - the plot to copy

Method Detail

### setDataRange

    public void setDataRange(JRDataRange dataRange)
                      throws JRException

  Sets the range of values that the meter can display. Before changing this for an existing meter you should clear any existing intervals to ensure that you don't end up with intervals that are outside of the new range.

  Parameters:
    `dataRange` - the range of values that the meter can display
  Throws:
    `JRException`

### setValueDisplay

    public void setValueDisplay(JRValueDisplay valueDisplay)

  Sets the value display formatting options.

  Parameters:
    `valueDisplay` - how to show the textual representation of the value

### setShape

    public void setShape(byte shape)
                  throws JRException

  Deprecated. Replaced by `setShape(MeterShapeEnum)`

  Throws:
    `JRException`

### setShape

    public void setShape(java.lang.Byte shape)
                  throws JRException

  Deprecated. Replaced by `setShape(MeterShapeEnum)`

  Throws:
    `JRException`

### setShape

    public void setShape(MeterShapeEnum shape)
                  throws JRException

  Sets the shape of the meter. Must be one of `MeterShapeEnum.CHORD`, `MeterShapeEnum.CIRCLE`, `MeterShapeEnum.PIE` or `MeterShapeEnum.DIAL`.

  Parameters:
    `shape` - the shape of the meter
  Throws:
    `JRException` - invalid shape was specified

### addInterval

    public void addInterval(JRMeterInterval interval)

  Adds an interval to the meter. An interval is used to indicate a section of the meter.

  Parameters:
    `interval` - the interval to add to the meter

### clearIntervals

    public void clearIntervals()

  Removes all the intervals for the meter.

### setIntervals

    public void setIntervals(java.util.Collection intervals)

  Sets the meter intervals.

  Parameters:
    `intervals` - the list of meter intervals (`JRMeterInterval` instances)
  See Also:
    `addInterval(JRMeterInterval)`

### setMeterAngle

    public void setMeterAngle(int meterAngle)

  Deprecated. Replaced by `setMeterAngle(Integer)`

### setMeterAngle

    public void setMeterAngle(java.lang.Integer meterAngle)

  Sets the size of the meter face in degrees.

  Parameters:
    `meterAngle` - the size of the meter in degrees

### setUnits

    public void setUnits(java.lang.String units)

  Sets the units string to use. This string is appended to the value when it is displayed.

  Parameters:
    `units` - the units string to use

### setTickInterval

    public void setTickInterval(double tickInterval)

  Deprecated. Replaced by `setTickInterval(Double)`

### setTickInterval

    public void setTickInterval(java.lang.Double tickInterval)

  Sets the space between tick marks on the face of the meter. The spacing is relative to the range of the meter. If the meter is displaying the range 100 to 200 and the tick interval is 20, four tick marks will be shown, one each at 120, 140, 160 and 180.

  Parameters:
    `tickInterval` - the space between tick marks on the meter

### setMeterBackgroundColor

    public void setMeterBackgroundColor(java.awt.Color meterBackgroundColor)

  Sets the color to use for the meter face.

  Parameters:
    `meterBackgroundColor` - the color to use for the meter face

### setNeedleColor

    public void setNeedleColor(java.awt.Color needleColor)

  Sets the color to use for the meter pointer.

  Parameters:
    `needleColor` - the color to use for the meter pointer

### setTickColor

    public void setTickColor(java.awt.Color tickColor)

  Sets the color to use when drawing tick marks on the meter.

  Parameters:
    `tickColor` - the color to use when drawing tick marks

### setTickLabelFont

    public void setTickLabelFont(JRFont tickLabelFont)

  Sets the font to use when displaying the tick label.

  Parameters:
    `tickLabelFont` - the font to use when displaying the tick label

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