Class JRDesignMeterPlot

    • 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_TICK_COLOR

        public static final java.lang.String PROPERTY_TICK_COLOR
        See Also:
        Constant Field Values
      • PROPERTY_TICK_COUNT

        public static final java.lang.String PROPERTY_TICK_COUNT
        See Also:
        Constant Field Values
      • PROPERTY_TICK_INTERVAL

        public static final java.lang.String PROPERTY_TICK_INTERVAL
        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 plot,
                                 JRChart chart)
        Construct a new meter plot by copying an existing one.
        Parameters:
        plot - 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​(MeterShapeEnum shape)
                      throws JRException
        Sets the shape of the meter.
        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.
      • 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​(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
      • setTickCount

        public void setTickCount​(java.lang.Integer tickCount)
        Sets the number of major tick marks on the meter scale.
        Parameters:
        tickCount - the number of major 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