Package net.sf.jasperreports.charts.base
Class JRBaseItemLabel
- java.lang.Object
-
- net.sf.jasperreports.charts.base.JRBaseItemLabel
-
- All Implemented Interfaces:
Serializable
,Cloneable
,JRItemLabel
,JRCloneable
- Direct Known Subclasses:
JRDesignItemLabel
public class JRBaseItemLabel extends Object implements JRItemLabel, Serializable
An immutable representation of the formatting options for showing the item labels in a category plot.- Author:
- Sanda Zaharia (shertage@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JRBaseItemLabel(JRItemLabel itemLabel, ChartsBaseObjectFactory factory)
Constructs a copy of an existing item label specification and registers any expression in the new copy with the specified factory.JRBaseItemLabel(JRItemLabel itemLabel, JRChart chart)
Constructs a copy of an existing item label specification.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
JRItemLabel
clone(JRChart parentChart)
Returns the item label formatting mask.void
collectExpressions(JRExpressionCollector collector)
Adds all the expression used by this plot with the specified collector.Color
getBackgroundColor()
JRChart
getChart()
Color
getColor()
JRFont
getFont()
-
-
-
Constructor Detail
-
JRBaseItemLabel
public JRBaseItemLabel(JRItemLabel itemLabel, JRChart chart)
Constructs a copy of an existing item label specification.- Parameters:
itemLabel
- the item label object to copychart
- the parent chart
-
JRBaseItemLabel
public JRBaseItemLabel(JRItemLabel itemLabel, ChartsBaseObjectFactory factory)
Constructs a copy of an existing item label specification and registers any expression in the new copy with the specified factory.- Parameters:
itemLabel
- the item label object to copyfactory
- the factory object to register expressions with
-
-
Method Detail
-
getChart
public JRChart getChart()
- Specified by:
getChart
in interfaceJRItemLabel
- Returns:
- the chart the current item label belongs to.
-
getColor
public Color getColor()
- Specified by:
getColor
in interfaceJRItemLabel
- Returns:
- the item label text color
-
getBackgroundColor
public Color getBackgroundColor()
- Specified by:
getBackgroundColor
in interfaceJRItemLabel
- Returns:
- the item label background color
-
getFont
public JRFont getFont()
- Specified by:
getFont
in interfaceJRItemLabel
- Returns:
- the item label font. Allows full font customization for the item label.
-
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 interfaceJRCloneable
- Overrides:
clone
in classObject
-
clone
public JRItemLabel clone(JRChart parentChart)
Description copied from interface:JRItemLabel
Returns the item label formatting mask. The mask will be specified using the patterns defined injava.text.DecimalFormat
.- Specified by:
clone
in interfaceJRItemLabel
- Returns:
- the item label formatting mask
-
-