Class JRDesignChart
- All Implemented Interfaces:
Serializable
,Cloneable
,JRChart
,JRChangeEventsSupport
,JRAnchor
,JRBoxContainer
,JRChild
,JRCloneable
,JRCommonElement
,JRElement
,JREvaluation
,JRHyperlink
,JRIdentifiable
,JRPropertiesHolder
,JRStyleContainer
,JRVisitable
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JRExpression
protected int
The bookmark level for the anchor associated with this chart.protected JRExpression
protected ChartTypeEnum
protected String
protected JRChartDataset
protected String
protected EvaluationTimeEnum
static final String
protected JRExpression
protected JRExpression
protected JRExpression
protected JRExpression
protected Color
protected Color
protected JRFont
protected EdgeEnum
protected JRLineBox
protected String
protected String
protected JRChartPlot
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected String
protected Boolean
protected Color
protected JRExpression
protected JRFont
protected String
protected Color
protected JRExpression
protected JRFont
protected EdgeEnum
Fields inherited from class net.sf.jasperreports.engine.design.JRDesignElement
PROPERTY_ELEMENT_GROUP, PROPERTY_HEIGHT, PROPERTY_KEY, PROPERTY_PARENT_STYLE, PROPERTY_PARENT_STYLE_NAME_REFERENCE, PROPERTY_PRINT_WHEN_EXPRESSION, PROPERTY_PRINT_WHEN_GROUP_CHANGES, PROPERTY_PROPERTY_EXPRESSIONS, PROPERTY_STYLE_EXPRESSION, PROPERTY_Y
Fields inherited from class net.sf.jasperreports.engine.base.JRBaseElement
backcolor, defaultStyleProvider, elementGroup, forecolor, height, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, key, mode, parentStyle, parentStyleNameReference, positionType, printWhenExpression, printWhenGroupChanges, PROPERTY_POSITION_TYPE, PROPERTY_PRINT_IN_FIRST_WHOLE_BAND, PROPERTY_PRINT_REPEATED_VALUES, PROPERTY_PRINT_WHEN_DETAIL_OVERFLOWS, PROPERTY_REMOVE_LINE_WHEN_BLANK, PROPERTY_STRETCH_TYPE, PROPERTY_WIDTH, PROPERTY_X, stretchType, styleExpression, uuid, width, x, y
Fields inherited from interface net.sf.jasperreports.engine.JRAnchor
NO_BOOKMARK
Fields inherited from interface net.sf.jasperreports.charts.JRChart
PROPERTY_CHART_RENDER_TYPE, PROPERTY_CHART_THEME, RENDER_TYPE_DRAW, RENDER_TYPE_IMAGE, RENDER_TYPE_SVG
Fields inherited from interface net.sf.jasperreports.engine.JRElement
PROPERTY_ELEMENT_TEMPLATE_POPULATE_STYLE
-
Constructor Summary
ConstructorsConstructorDescriptionJRDesignChart
(JRDefaultStyleProvider defaultStyleProvider, ChartTypeEnum chartType) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHyperlinkParameter
(JRHyperlinkParameter parameter) Adds a custom hyperlink parameter.clone()
void
collectExpressions
(JRExpressionCollector collector) Returns an expression whose value represents the anchor name.int
Returns the level of the bookmark corresponding to the anchor.Returns an expression whose value represents the bookmark level (starting from 1) corresponding to this anchor.Gets the chart type.Gets a user specified chart customizer class name.Gets the chart dataset.Gets the evaluation group for this text field.Gets the evaluation time for this text field.Returns the expression whose value represents the anchor.Returns an integer representing the page index of the link.Returns the list of hyperlink parameters.Returns the list of custom hyperlink parameters.Returns the expression whose value represents the hyperlink reference.Retrieves the hyperlink target for the element.Returns the expression which will generate the hyperlink tooltip.Retrieves the hyperlink type for the element.Returns the expression that is evaluated in order to decide if the hyperlink should be displayed.Returns the hyperlink target name.Returns the hyperlink type.getMode()
Returns the element transparency mode.getPlot()
Gets the chart plot.Gets the expression whose evaluation will form the subtitle.getTheme()
Gets the expression whose evaluation will form the title.Gets the title position relative to the chart.void
removeHyperlinkParameter
(String parameterName) Removes a custom hyperlink parameter.void
removeHyperlinkParameter
(JRHyperlinkParameter parameter) Removes a custom hyperlink parameter.void
setAnchorNameExpression
(JRExpression anchorNameExpression) void
setBookmarkLevel
(int bookmarkLevel) Sets the boomark level for the anchor associated with this chart.void
setBookmarkLevelExpression
(JRExpression bookmarkLevelExpression) void
setChartType
(ChartTypeEnum chartType) void
setCustomizerClass
(String customizerClass) Sets a user specified chart customizer class name.void
void
setEvaluationGroup
(String group) void
setEvaluationTime
(EvaluationTimeEnum evaluationTime) void
setHyperlinkAnchorExpression
(JRExpression hyperlinkAnchorExpression) void
setHyperlinkPageExpression
(JRExpression hyperlinkPageExpression) void
setHyperlinkReferenceExpression
(JRExpression hyperlinkReferenceExpression) void
setHyperlinkTarget
(HyperlinkTargetEnum hyperlinkTarget) void
setHyperlinkTooltipExpression
(JRExpression hyperlinkTooltipExpression) Sets the expression which will be used to generate the hyperlink tooltip.void
setHyperlinkType
(HyperlinkTypeEnum hyperlinkType) Sets the link type as a built-in hyperlink type.void
setHyperlinkWhenExpression
(JRExpression hyperlinkWhenExpression) void
setLegendBackgroundColor
(Color legendBackgroundColor) void
setLegendColor
(Color legendColor) void
setLegendFont
(JRFont legendFont) void
setLegendPosition
(EdgeEnum legendPosition) void
setLinkTarget
(String target) Sets the hyperlink target.void
setLinkType
(String type) Sets the hyperlink type.void
setRenderType
(String renderType) void
setShowLegend
(Boolean isShowLegend) void
setSubtitleColor
(Color subtitleColor) void
setSubtitleExpression
(JRExpression expression) void
setSubtitleFont
(JRFont font) void
void
setTitleColor
(Color titleColor) void
setTitleExpression
(JRExpression expression) void
setTitleFont
(JRFont font) void
setTitlePosition
(EdgeEnum titlePosition) Sets the title position relative to the chart.void
Methods inherited from class net.sf.jasperreports.engine.design.JRDesignElement
addPropertyExpression, getPropertyExpressions, getPropertyExpressionsList, removePropertyExpression, removePropertyExpression, setElementGroup, setHeight, setKey, setPrintWhenExpression, setPrintWhenGroupChanges, setStyle, setStyleExpression, setStyleNameReference, setY
Methods inherited from class net.sf.jasperreports.engine.base.JRBaseElement
clone, clone, getBackcolor, getBaseStyle, getDefaultStyleProvider, getElementGroup, getEventSupport, getForecolor, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnMode, getParentProperties, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getStretchType, getStyle, getStyleExpression, getStyleNameReference, getStyleResolver, getUUID, getWidth, getX, getY, hasProperties, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setUUID, setWidth, setX
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.jasperreports.charts.JRChart
getChartsStyleResolver
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnMode, getWidth, setBackcolor, setForecolor, setMode
Methods inherited from interface net.sf.jasperreports.engine.JRElement
clone, getElementGroup, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchType, getStyleExpression, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleName, getStyleNameReference
-
Field Details
-
EXCEPTION_MESSAGE_KEY_UNSUPPORTED_CHART_TYPE
- See Also:
-
PROPERTY_ANCHOR_NAME_EXPRESSION
- See Also:
-
PROPERTY_BOOKMARK_LEVEL
- See Also:
-
PROPERTY_BOOKMARK_LEVEL_EXPRESSION
- See Also:
-
PROPERTY_EVALUATION_GROUP
- See Also:
-
PROPERTY_EVALUATION_TIME
- See Also:
-
PROPERTY_CHART_TYPE
- See Also:
-
PROPERTY_CUSTOMIZER_CLASS
- See Also:
-
PROPERTY_DATASET
- See Also:
-
PROPERTY_LEGEND_FONT
- See Also:
-
PROPERTY_SUBTITLE_EXPRESSION
- See Also:
-
PROPERTY_SUBTITLE_FONT
- See Also:
-
PROPERTY_TITLE_EXPRESSION
- See Also:
-
PROPERTY_TITLE_FONT
- See Also:
-
chartType
-
showLegend
-
evaluationTime
-
linkType
-
linkTarget
-
titleColor
-
subtitleColor
-
legendColor
-
legendBackgroundColor
-
renderType
-
theme
-
titleFont
-
subtitleFont
-
legendFont
-
legendPosition
-
titlePosition
-
customizerClass
-
evaluationGroup
-
titleExpression
-
subtitleExpression
-
anchorNameExpression
-
bookmarkLevelExpression
-
hyperlinkReferenceExpression
-
hyperlinkWhenExpression
-
hyperlinkAnchorExpression
-
hyperlinkPageExpression
-
dataset
-
plot
-
lineBox
-
bookmarkLevel
protected int bookmarkLevelThe bookmark level for the anchor associated with this chart.- See Also:
-
-
Constructor Details
-
JRDesignChart
-
-
Method Details
-
getShowLegend
- Specified by:
getShowLegend
in interfaceJRChart
-
setShowLegend
- Specified by:
setShowLegend
in interfaceJRChart
-
getRenderType
- Specified by:
getRenderType
in interfaceJRChart
-
setRenderType
- Specified by:
setRenderType
in interfaceJRChart
-
getTheme
-
setTheme
-
getEvaluationTime
Description copied from interface:JREvaluation
Gets the evaluation time for this text field.- Specified by:
getEvaluationTime
in interfaceJREvaluation
- Returns:
- one of the evaluation time constants in
JRExpression
-
setEvaluationTime
-
getEvaluationGroup
Description copied from interface:JREvaluation
Gets the evaluation group for this text field. Used only when evaluation time is group.- Specified by:
getEvaluationGroup
in interfaceJREvaluation
- See Also:
-
setEvaluationGroup
-
getLineBox
- Specified by:
getLineBox
in interfaceJRBoxContainer
-
getTitleFont
- Specified by:
getTitleFont
in interfaceJRChart
-
setTitleFont
-
getTitlePosition
Description copied from interface:JRChart
Gets the title position relative to the chart.- Specified by:
getTitlePosition
in interfaceJRChart
-
setTitlePosition
Description copied from interface:JRChart
Sets the title position relative to the chart.- Specified by:
setTitlePosition
in interfaceJRChart
-
getTitleColor
- Specified by:
getTitleColor
in interfaceJRChart
-
getOwnTitleColor
- Specified by:
getOwnTitleColor
in interfaceJRChart
-
setTitleColor
- Specified by:
setTitleColor
in interfaceJRChart
-
getSubtitleFont
- Specified by:
getSubtitleFont
in interfaceJRChart
-
setSubtitleFont
-
getSubtitleColor
- Specified by:
getSubtitleColor
in interfaceJRChart
-
getOwnSubtitleColor
- Specified by:
getOwnSubtitleColor
in interfaceJRChart
-
setSubtitleColor
- Specified by:
setSubtitleColor
in interfaceJRChart
-
getOwnLegendColor
- Specified by:
getOwnLegendColor
in interfaceJRChart
-
getLegendColor
- Specified by:
getLegendColor
in interfaceJRChart
-
setLegendColor
- Specified by:
setLegendColor
in interfaceJRChart
-
getOwnLegendBackgroundColor
- Specified by:
getOwnLegendBackgroundColor
in interfaceJRChart
-
getLegendBackgroundColor
- Specified by:
getLegendBackgroundColor
in interfaceJRChart
-
setLegendBackgroundColor
- Specified by:
setLegendBackgroundColor
in interfaceJRChart
-
getLegendFont
- Specified by:
getLegendFont
in interfaceJRChart
-
setLegendFont
-
getLegendPosition
- Specified by:
getLegendPosition
in interfaceJRChart
-
setLegendPosition
- Specified by:
setLegendPosition
in interfaceJRChart
-
getHyperlinkType
Description copied from interface:JRHyperlink
Retrieves the hyperlink type for the element.The actual hyperlink type is determined by
getLinkType()
. This method can is used to determine whether the hyperlink type is one of the built-in types or a custom type. When hyperlink is of custom type,CUSTOM
is returned.- Specified by:
getHyperlinkType
in interfaceJRHyperlink
- Returns:
- one of the hyperlink type constants
- See Also:
-
setHyperlinkType
Sets the link type as a built-in hyperlink type.- Parameters:
hyperlinkType
- the built-in hyperlink type- See Also:
-
getHyperlinkTarget
Description copied from interface:JRHyperlink
Retrieves the hyperlink target for the element.The actual hyperlink target is determined by
getLinkTarget()
. This method can is used to determine whether the hyperlink target is one of the built-in target names or a custom one. When hyperlink has a custom target name,HyperlinkTargetEnum.CUSTOM
is returned.- Specified by:
getHyperlinkTarget
in interfaceJRHyperlink
- Returns:
- one of the hyperlink target constants
- See Also:
-
setHyperlinkTarget
-
getTitleExpression
Description copied from interface:JRChart
Gets the expression whose evaluation will form the title.- Specified by:
getTitleExpression
in interfaceJRChart
-
setTitleExpression
-
getSubtitleExpression
Description copied from interface:JRChart
Gets the expression whose evaluation will form the subtitle.- Specified by:
getSubtitleExpression
in interfaceJRChart
-
setSubtitleExpression
-
getAnchorNameExpression
Description copied from interface:JRAnchor
Returns an expression whose value represents the anchor name.- Specified by:
getAnchorNameExpression
in interfaceJRAnchor
-
setAnchorNameExpression
-
getBookmarkLevelExpression
Description copied from interface:JRAnchor
Returns an expression whose value represents the bookmark level (starting from 1) corresponding to this anchor. When the expression is set and its value is not null, it will override the value of the bookmarkLevel attribute.- Specified by:
getBookmarkLevelExpression
in interfaceJRAnchor
-
setBookmarkLevelExpression
-
getHyperlinkReferenceExpression
Description copied from interface:JRHyperlink
Returns the expression whose value represents the hyperlink reference. It is only used when the hyperlink type is reference or anchor- Specified by:
getHyperlinkReferenceExpression
in interfaceJRHyperlink
-
setHyperlinkReferenceExpression
-
getHyperlinkWhenExpression
Description copied from interface:JRHyperlink
Returns the expression that is evaluated in order to decide if the hyperlink should be displayed. This expression always returns a boolean value.- Specified by:
getHyperlinkWhenExpression
in interfaceJRHyperlink
-
setHyperlinkWhenExpression
-
getHyperlinkAnchorExpression
Description copied from interface:JRHyperlink
Returns the expression whose value represents the anchor. It is only used when the hyperlink type is anchor.- Specified by:
getHyperlinkAnchorExpression
in interfaceJRHyperlink
-
setHyperlinkAnchorExpression
-
getHyperlinkPageExpression
Description copied from interface:JRHyperlink
Returns an integer representing the page index of the link. It is only used when the hyperlink type is page. If the expression does not evaluate to an integer, an exception will be thrown.- Specified by:
getHyperlinkPageExpression
in interfaceJRHyperlink
-
setHyperlinkPageExpression
-
getDataset
Description copied from interface:JRChart
Gets the chart dataset. Most chart types have different dataset structures, depending on the chart type.- Specified by:
getDataset
in interfaceJRChart
-
getPlot
Description copied from interface:JRChart
Gets the chart plot. Plots are used to define various chart visual properties, such as colors and transparency. -
getChartType
Description copied from interface:JRChart
Gets the chart type. It must be one of the chart type constants in this class.- Specified by:
getChartType
in interfaceJRChart
-
setChartType
-
setDataset
-
collectExpressions
- Specified by:
collectExpressions
in interfaceJRElement
-
visit
- Specified by:
visit
in interfaceJRVisitable
-
getBookmarkLevel
public int getBookmarkLevel()Description copied from interface:JRAnchor
Returns the level of the bookmark corresponding to the anchor.- Specified by:
getBookmarkLevel
in interfaceJRAnchor
- Returns:
- the level of the bookmark corresponding to the anchor (starting from 1)
or
NO_BOOKMARK
if no bookmark should be created for this anchor
-
setBookmarkLevel
public void setBookmarkLevel(int bookmarkLevel) Sets the boomark level for the anchor associated with this chart.- Parameters:
bookmarkLevel
- the bookmark level (starting from 1) orNO_BOOKMARK
if no bookmark should be created
-
getCustomizerClass
Description copied from interface:JRChart
Gets a user specified chart customizer class name.- Specified by:
getCustomizerClass
in interfaceJRChart
- See Also:
-
setCustomizerClass
Sets a user specified chart customizer class name.- See Also:
-
getMode
Description copied from interface:JRCommonElement
Returns the element transparency mode. The default value depends on the type of the report element. Graphic elements like rectangles and lines are opaque by default, but the images are transparent. Both static texts and text fields are transparent by default, and so are the subreport elements.- Specified by:
getMode
in interfaceJRCommonElement
- Overrides:
getMode
in classJRBaseElement
-
getLinkType
Description copied from interface:JRHyperlink
Returns the hyperlink type.The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
- Specified by:
getLinkType
in interfaceJRHyperlink
- Returns:
- the hyperlink type
-
setLinkType
Sets the hyperlink type.The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
- Parameters:
type
- the hyperlink type
-
getLinkTarget
Description copied from interface:JRHyperlink
Returns the hyperlink target name.The type can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
- Specified by:
getLinkTarget
in interfaceJRHyperlink
- Returns:
- the hyperlink target name
-
setLinkTarget
Sets the hyperlink target.The target can be one of the built-in target names (Self, Blank, Top, Parent), or can be an arbitrary target name.
- Parameters:
target
- the hyperlink target
-
getHyperlinkParameters
Description copied from interface:JRHyperlink
Returns the list of hyperlink parameters.The parameters can be used by custom hyperlink types to generate dynamic links.
- Specified by:
getHyperlinkParameters
in interfaceJRHyperlink
- Returns:
- the list of hyperlink parameters
-
getHyperlinkParametersList
Returns the list of custom hyperlink parameters.- Returns:
- the list of custom hyperlink parameters
-
addHyperlinkParameter
Adds a custom hyperlink parameter.- Parameters:
parameter
- the parameter to add
-
removeHyperlinkParameter
Removes a custom hyperlink parameter.- Parameters:
parameter
- the parameter to remove
-
removeHyperlinkParameter
Removes a custom hyperlink parameter.If multiple parameters having the specified name exist, all of them will be removed
- Parameters:
parameterName
- the parameter name
-
getHyperlinkTooltipExpression
Description copied from interface:JRHyperlink
Returns the expression which will generate the hyperlink tooltip.- Specified by:
getHyperlinkTooltipExpression
in interfaceJRHyperlink
- Returns:
- the expression which will generate the hyperlink tooltip
-
setHyperlinkTooltipExpression
Sets the expression which will be used to generate the hyperlink tooltip.- Parameters:
hyperlinkTooltipExpression
- the expression which will be used to generate the hyperlink tooltip- See Also:
-
getDefaultLineColor
- Specified by:
getDefaultLineColor
in interfaceJRBoxContainer
-
clone
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classJRDesignElement
-