Package net.sf.jasperreports.charts.base
Class JRBaseValueDisplay
- java.lang.Object
-
- net.sf.jasperreports.charts.base.JRBaseValueDisplay
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,JRValueDisplay,JRCloneable
- Direct Known Subclasses:
JRDesignValueDisplay
public class JRBaseValueDisplay extends java.lang.Object implements JRValueDisplay, java.io.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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JRBaseValueDisplay(JRValueDisplay valueDisplay, JRBaseObjectFactory factory)Constructs a copy of an existing value format specification and registers any expression in the new copy with the specified factory.JRBaseValueDisplay(JRValueDisplay valueDisplay, JRChart chart)Constructs a copy of an existing value format specification.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()JRBaseValueDisplayclone(JRChart parentChart)voidcollectExpressions(JRExpressionCollector collector)Adds all the expression used by this plot with the specified collector.JRChartgetChart()java.awt.ColorgetColor()Returns the color to use when writing the value.JRFontgetFont()Returns the font to use when writing the value.java.lang.StringgetMask()Returns the formatting mask to use when writing the value.
-
-
-
Field Detail
-
chart
protected JRChart chart
-
color
protected java.awt.Color color
The color to use when writing the value.
-
mask
protected java.lang.String mask
The formatting mask to use when writing the value. Must a pattern that is accepted by ajava.text.DecimalFormatobject.
-
font
protected JRFont font
The font to use when writing the value.
-
-
Constructor Detail
-
JRBaseValueDisplay
public JRBaseValueDisplay(JRValueDisplay valueDisplay, JRChart chart)
Constructs a copy of an existing value format specification.- Parameters:
valueDisplay- the value formatting object to copychart- the parent chart
-
JRBaseValueDisplay
public JRBaseValueDisplay(JRValueDisplay valueDisplay, JRBaseObjectFactory 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 copyfactory- the factory object to register expressions with
-
-
Method Detail
-
getChart
public JRChart getChart()
- Specified by:
getChartin interfaceJRValueDisplay
-
getColor
public java.awt.Color getColor()
Description copied from interface:JRValueDisplayReturns the color to use when writing the value.- Specified by:
getColorin interfaceJRValueDisplay- Returns:
- the color to use when writing the value
-
getMask
public java.lang.String getMask()
Description copied from interface:JRValueDisplayReturns the formatting mask to use when writing the value. The mask will be specified using the patterns defined injava.text.DecimalFormat.- Specified by:
getMaskin interfaceJRValueDisplay- Returns:
- the formatting mask to use when writing the value
-
getFont
public JRFont getFont()
Description copied from interface:JRValueDisplayReturns the font to use when writing the value.- Specified by:
getFontin interfaceJRValueDisplay- 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 java.lang.Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classjava.lang.Object
-
clone
public JRBaseValueDisplay clone(JRChart parentChart)
- Specified by:
clonein interfaceJRValueDisplay
-
-