Class JRBaseValueDisplay

java.lang.Object
net.sf.jasperreports.charts.base.JRBaseValueDisplay
All Implemented Interfaces:
Serializable, Cloneable, JRValueDisplay, JRCloneable
Direct Known Subclasses:
JRDesignValueDisplay

public class JRBaseValueDisplay extends Object implements JRValueDisplay, Serializable
An immutable representation of the formatting options for showing the value of a value dataset. Used by charts that display a single value, such as a Meter or Thermometer.
Author:
Barry Klawans (bklawans@users.sourceforge.net)
See Also:
  • Field Details

    • chart

      protected JRChart chart
    • color

      protected Color color
      The color to use when writing the value.
    • mask

      protected String mask
      The formatting mask to use when writing the value. Must a pattern that is accepted by a java.text.DecimalFormat object.
    • font

      protected JRFont font
      The font to use when writing the value.
  • Constructor Details

    • JRBaseValueDisplay

      public JRBaseValueDisplay(JRValueDisplay valueDisplay, JRChart chart)
      Constructs a copy of an existing value format specification.
      Parameters:
      valueDisplay - the value formatting object to copy
      chart - the parent chart
    • JRBaseValueDisplay

      public JRBaseValueDisplay(JRValueDisplay valueDisplay, ChartsBaseObjectFactory factory)
      Constructs a copy of an existing value format specification and registers any expression in the new copy with the specified factory.
      Parameters:
      valueDisplay - the value formatting object to copy
      factory - the factory object to register expressions with
  • Method Details

    • getChart

      public JRChart getChart()
      Specified by:
      getChart in interface JRValueDisplay
    • getColor

      public Color getColor()
      Description copied from interface: JRValueDisplay
      Returns the color to use when writing the value.
      Specified by:
      getColor in interface JRValueDisplay
      Returns:
      the color to use when writing the value
    • getMask

      public String getMask()
      Description copied from interface: JRValueDisplay
      Returns the formatting mask to use when writing the value. The mask will be specified using the patterns defined in java.text.DecimalFormat.
      Specified by:
      getMask in interface JRValueDisplay
      Returns:
      the formatting mask to use when writing the value
    • getFont

      public JRFont getFont()
      Description copied from interface: JRValueDisplay
      Returns the font to use when writing the value.
      Specified by:
      getFont in interface JRValueDisplay
      Returns:
      the font to use when writing the value
    • 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.
      Parameters:
      collector - the expression collector to use
    • clone

      public Object clone()
      Specified by:
      clone in interface JRCloneable
      Overrides:
      clone in class Object
    • clone

      public JRBaseValueDisplay clone(JRChart parentChart)
      Specified by:
      clone in interface JRValueDisplay