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 JRExpressionprotected intThe bookmark level for the anchor associated with this chart.protected JRExpressionprotected ChartTypeEnumprotected Stringprotected JRChartDatasetprotected Stringprotected EvaluationTimeEnumstatic final Stringprotected JRExpressionprotected JRExpressionprotected JRExpressionprotected JRExpressionprotected Colorprotected Colorprotected JRFontprotected EdgeEnumprotected JRLineBoxprotected Stringprotected Stringprotected JRChartPlotstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Stringprotected Booleanprotected Colorprotected JRExpressionprotected JRFontprotected Stringprotected Colorprotected JRExpressionprotected JRFontprotected EdgeEnumFields 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_YFields 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, yFields inherited from interface net.sf.jasperreports.engine.JRAnchor
NO_BOOKMARKFields inherited from interface net.sf.jasperreports.charts.JRChart
PROPERTY_CHART_RENDER_TYPE, PROPERTY_CHART_THEME, RENDER_TYPE_DRAW, RENDER_TYPE_IMAGE, RENDER_TYPE_SVGFields inherited from interface net.sf.jasperreports.engine.JRElement
PROPERTY_ELEMENT_TEMPLATE_POPULATE_STYLE -
Constructor Summary
ConstructorsConstructorDescriptionJRDesignChart(JRDefaultStyleProvider defaultStyleProvider, ChartTypeEnum chartType) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHyperlinkParameter(JRHyperlinkParameter parameter) Adds a custom hyperlink parameter.clone()voidcollectExpressions(JRExpressionCollector collector) Returns an expression whose value represents the anchor name.intReturns 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.voidremoveHyperlinkParameter(String parameterName) Removes a custom hyperlink parameter.voidremoveHyperlinkParameter(JRHyperlinkParameter parameter) Removes a custom hyperlink parameter.voidsetAnchorNameExpression(JRExpression anchorNameExpression) voidsetBookmarkLevel(int bookmarkLevel) Sets the boomark level for the anchor associated with this chart.voidsetBookmarkLevelExpression(JRExpression bookmarkLevelExpression) voidsetChartType(ChartTypeEnum chartType) voidsetCustomizerClass(String customizerClass) Sets a user specified chart customizer class name.voidvoidsetEvaluationGroup(String group) voidsetEvaluationTime(EvaluationTimeEnum evaluationTime) voidsetHyperlinkAnchorExpression(JRExpression hyperlinkAnchorExpression) voidsetHyperlinkPageExpression(JRExpression hyperlinkPageExpression) voidsetHyperlinkReferenceExpression(JRExpression hyperlinkReferenceExpression) voidsetHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget) voidsetHyperlinkTooltipExpression(JRExpression hyperlinkTooltipExpression) Sets the expression which will be used to generate the hyperlink tooltip.voidsetHyperlinkType(HyperlinkTypeEnum hyperlinkType) Sets the link type as a built-in hyperlink type.voidsetHyperlinkWhenExpression(JRExpression hyperlinkWhenExpression) voidsetLegendBackgroundColor(Color legendBackgroundColor) voidsetLegendColor(Color legendColor) voidsetLegendFont(JRFont legendFont) voidsetLegendPosition(EdgeEnum legendPosition) voidsetLinkTarget(String target) Sets the hyperlink target.voidsetLinkType(String type) Sets the hyperlink type.voidsetRenderType(String renderType) voidsetShowLegend(Boolean isShowLegend) voidsetSubtitleColor(Color subtitleColor) voidsetSubtitleExpression(JRExpression expression) voidsetSubtitleFont(JRFont font) voidvoidsetTitleColor(Color titleColor) voidsetTitleExpression(JRExpression expression) voidsetTitleFont(JRFont font) voidsetTitlePosition(EdgeEnum titlePosition) Sets the title position relative to the chart.voidMethods inherited from class net.sf.jasperreports.engine.design.JRDesignElement
addPropertyExpression, getPropertyExpressions, getPropertyExpressionsList, removePropertyExpression, removePropertyExpression, setElementGroup, setHeight, setKey, setPrintWhenExpression, setPrintWhenGroupChanges, setStyle, setStyleExpression, setStyleNameReference, setYMethods 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, setXMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.charts.JRChart
getChartsStyleResolverMethods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnMode, getWidth, setBackcolor, setForecolor, setModeMethods 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, setXMethods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUIDMethods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasPropertiesMethods 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:
getShowLegendin interfaceJRChart
-
setShowLegend
- Specified by:
setShowLegendin interfaceJRChart
-
getRenderType
- Specified by:
getRenderTypein interfaceJRChart
-
setRenderType
- Specified by:
setRenderTypein interfaceJRChart
-
getTheme
-
setTheme
-
getEvaluationTime
Description copied from interface:JREvaluationGets the evaluation time for this text field.- Specified by:
getEvaluationTimein interfaceJREvaluation- Returns:
- one of the evaluation time constants in
JRExpression
-
setEvaluationTime
-
getEvaluationGroup
Description copied from interface:JREvaluationGets the evaluation group for this text field. Used only when evaluation time is group.- Specified by:
getEvaluationGroupin interfaceJREvaluation- See Also:
-
setEvaluationGroup
-
getLineBox
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
getTitleFont
- Specified by:
getTitleFontin interfaceJRChart
-
setTitleFont
-
getTitlePosition
Description copied from interface:JRChartGets the title position relative to the chart.- Specified by:
getTitlePositionin interfaceJRChart
-
setTitlePosition
Description copied from interface:JRChartSets the title position relative to the chart.- Specified by:
setTitlePositionin interfaceJRChart
-
getTitleColor
- Specified by:
getTitleColorin interfaceJRChart
-
getOwnTitleColor
- Specified by:
getOwnTitleColorin interfaceJRChart
-
setTitleColor
- Specified by:
setTitleColorin interfaceJRChart
-
getSubtitleFont
- Specified by:
getSubtitleFontin interfaceJRChart
-
setSubtitleFont
-
getSubtitleColor
- Specified by:
getSubtitleColorin interfaceJRChart
-
getOwnSubtitleColor
- Specified by:
getOwnSubtitleColorin interfaceJRChart
-
setSubtitleColor
- Specified by:
setSubtitleColorin interfaceJRChart
-
getOwnLegendColor
- Specified by:
getOwnLegendColorin interfaceJRChart
-
getLegendColor
- Specified by:
getLegendColorin interfaceJRChart
-
setLegendColor
- Specified by:
setLegendColorin interfaceJRChart
-
getOwnLegendBackgroundColor
- Specified by:
getOwnLegendBackgroundColorin interfaceJRChart
-
getLegendBackgroundColor
- Specified by:
getLegendBackgroundColorin interfaceJRChart
-
setLegendBackgroundColor
- Specified by:
setLegendBackgroundColorin interfaceJRChart
-
getLegendFont
- Specified by:
getLegendFontin interfaceJRChart
-
setLegendFont
-
getLegendPosition
- Specified by:
getLegendPositionin interfaceJRChart
-
setLegendPosition
- Specified by:
setLegendPositionin interfaceJRChart
-
getHyperlinkType
Description copied from interface:JRHyperlinkRetrieves 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,CUSTOMis returned.- Specified by:
getHyperlinkTypein 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:JRHyperlinkRetrieves 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.CUSTOMis returned.- Specified by:
getHyperlinkTargetin interfaceJRHyperlink- Returns:
- one of the hyperlink target constants
- See Also:
-
setHyperlinkTarget
-
getTitleExpression
Description copied from interface:JRChartGets the expression whose evaluation will form the title.- Specified by:
getTitleExpressionin interfaceJRChart
-
setTitleExpression
-
getSubtitleExpression
Description copied from interface:JRChartGets the expression whose evaluation will form the subtitle.- Specified by:
getSubtitleExpressionin interfaceJRChart
-
setSubtitleExpression
-
getAnchorNameExpression
Description copied from interface:JRAnchorReturns an expression whose value represents the anchor name.- Specified by:
getAnchorNameExpressionin interfaceJRAnchor
-
setAnchorNameExpression
-
getBookmarkLevelExpression
Description copied from interface:JRAnchorReturns 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:
getBookmarkLevelExpressionin interfaceJRAnchor
-
setBookmarkLevelExpression
-
getHyperlinkReferenceExpression
Description copied from interface:JRHyperlinkReturns the expression whose value represents the hyperlink reference. It is only used when the hyperlink type is reference or anchor- Specified by:
getHyperlinkReferenceExpressionin interfaceJRHyperlink
-
setHyperlinkReferenceExpression
-
getHyperlinkWhenExpression
Description copied from interface:JRHyperlinkReturns the expression that is evaluated in order to decide if the hyperlink should be displayed. This expression always returns a boolean value.- Specified by:
getHyperlinkWhenExpressionin interfaceJRHyperlink
-
setHyperlinkWhenExpression
-
getHyperlinkAnchorExpression
Description copied from interface:JRHyperlinkReturns the expression whose value represents the anchor. It is only used when the hyperlink type is anchor.- Specified by:
getHyperlinkAnchorExpressionin interfaceJRHyperlink
-
setHyperlinkAnchorExpression
-
getHyperlinkPageExpression
Description copied from interface:JRHyperlinkReturns 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:
getHyperlinkPageExpressionin interfaceJRHyperlink
-
setHyperlinkPageExpression
-
getDataset
Description copied from interface:JRChartGets the chart dataset. Most chart types have different dataset structures, depending on the chart type.- Specified by:
getDatasetin interfaceJRChart
-
getPlot
Description copied from interface:JRChartGets the chart plot. Plots are used to define various chart visual properties, such as colors and transparency. -
getChartType
Description copied from interface:JRChartGets the chart type. It must be one of the chart type constants in this class.- Specified by:
getChartTypein interfaceJRChart
-
setChartType
-
setDataset
-
collectExpressions
- Specified by:
collectExpressionsin interfaceJRElement
-
visit
- Specified by:
visitin interfaceJRVisitable
-
getBookmarkLevel
public int getBookmarkLevel()Description copied from interface:JRAnchorReturns the level of the bookmark corresponding to the anchor.- Specified by:
getBookmarkLevelin interfaceJRAnchor- Returns:
- the level of the bookmark corresponding to the anchor (starting from 1)
or
NO_BOOKMARKif 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_BOOKMARKif no bookmark should be created
-
getCustomizerClass
Description copied from interface:JRChartGets a user specified chart customizer class name.- Specified by:
getCustomizerClassin interfaceJRChart- See Also:
-
setCustomizerClass
Sets a user specified chart customizer class name.- See Also:
-
getMode
Description copied from interface:JRCommonElementReturns 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:
getModein interfaceJRCommonElement- Overrides:
getModein classJRBaseElement
-
getLinkType
Description copied from interface:JRHyperlinkReturns 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:
getLinkTypein 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:JRHyperlinkReturns 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:
getLinkTargetin 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:JRHyperlinkReturns the list of hyperlink parameters.The parameters can be used by custom hyperlink types to generate dynamic links.
- Specified by:
getHyperlinkParametersin 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:JRHyperlinkReturns the expression which will generate the hyperlink tooltip.- Specified by:
getHyperlinkTooltipExpressionin 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:
getDefaultLineColorin interfaceJRBoxContainer
-
clone
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classJRDesignElement
-