net.sf.jasperreports.engine.design
Class JRDesignChart

java.lang.Object
  extended bynet.sf.jasperreports.engine.base.JRBaseElement
      extended bynet.sf.jasperreports.engine.design.JRDesignElement
          extended bynet.sf.jasperreports.engine.design.JRDesignChart
All Implemented Interfaces:
JRAnchor, JRChart, JRChild, JRElement, JRHyperlink, java.io.Serializable

public class JRDesignChart
extends JRDesignElement
implements JRChart

Version:
$Id: JRDesignChart.java,v 1.20 2005/10/09 21:34:26 teodord Exp $
Author:
Teodor Danciu (teodord@users.sourceforge.net)
See Also:
Serialized Form

Field Summary
protected  JRExpression anchorNameExpression
           
protected  int bookmarkLevel
          The bookmark level for the anchor associated with this chart.
protected  JRBox box
           
protected  byte chartType
           
protected  java.lang.String customizerClass
           
protected  JRChartDataset dataset
           
protected  JRGroup evaluationGroup
           
protected  byte evaluationTime
           
protected  JRExpression hyperlinkAnchorExpression
           
protected  JRExpression hyperlinkPageExpression
           
protected  JRExpression hyperlinkReferenceExpression
           
protected  byte hyperlinkTarget
           
protected  byte hyperlinkType
           
protected  boolean isShowLegend
           
protected  JRChartPlot plot
           
protected  java.awt.Color subtitleColor
           
protected  JRExpression subtitleExpression
           
protected  JRFont subtitleFont
           
protected  java.awt.Color titleColor
           
protected  JRExpression titleExpression
           
protected  JRFont titleFont
           
protected  byte titlePosition
           
 
Fields inherited from class net.sf.jasperreports.engine.base.JRBaseElement
backcolor, elementGroup, forecolor, height, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, key, mode, positionType, printWhenExpression, printWhenGroupChanges, stretchType, width, x, y
 
Fields inherited from interface net.sf.jasperreports.engine.JRChart
CHART_TYPE_AREA, CHART_TYPE_BAR, CHART_TYPE_BAR3D, CHART_TYPE_BUBBLE, CHART_TYPE_CANDLESTICK, CHART_TYPE_HIGHLOW, CHART_TYPE_LINE, CHART_TYPE_PIE, CHART_TYPE_PIE3D, CHART_TYPE_SCATTER, CHART_TYPE_STACKEDBAR, CHART_TYPE_STACKEDBAR3D, CHART_TYPE_TIMESERIES, CHART_TYPE_XYAREA, CHART_TYPE_XYBAR, CHART_TYPE_XYLINE, TITLE_POSITION_BOTTOM, TITLE_POSITION_LEFT, TITLE_POSITION_RIGHT, TITLE_POSITION_TOP
 
Fields inherited from interface net.sf.jasperreports.engine.JRElement
MODE_OPAQUE, MODE_TRANSPARENT, POSITION_TYPE_FIX_RELATIVE_TO_BOTTOM, POSITION_TYPE_FIX_RELATIVE_TO_TOP, POSITION_TYPE_FLOAT, STRETCH_TYPE_NO_STRETCH, STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT, STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT
 
Fields inherited from interface net.sf.jasperreports.engine.JRAnchor
NO_BOOKMARK
 
Fields inherited from interface net.sf.jasperreports.engine.JRHyperlink
HYPERLINK_TARGET_BLANK, HYPERLINK_TARGET_SELF, HYPERLINK_TYPE_LOCAL_ANCHOR, HYPERLINK_TYPE_LOCAL_PAGE, HYPERLINK_TYPE_NONE, HYPERLINK_TYPE_REFERENCE, HYPERLINK_TYPE_REMOTE_ANCHOR, HYPERLINK_TYPE_REMOTE_PAGE
 
Constructor Summary
JRDesignChart(byte chartType)
           
 
Method Summary
 void collectExpressions(JRExpressionCollector collector)
           
 JRExpression getAnchorNameExpression()
          Returns an expression whose value represents the anchor name.
 int getBookmarkLevel()
          Returns the level of the bookmark corresponding to the anchor.
 JRBox getBox()
          Gets the box around the element.
 byte getChartType()
          Gets the chart type.
 JRChild getCopy(JRAbstractObjectFactory factory)
           
 java.lang.String getCustomizerClass()
          Gets a user specified chart customizer class name.
 JRChartDataset getDataset()
          Gets the chart dataset.
 JRGroup getEvaluationGroup()
          Gets the evaluation group for this chart (only applies when evaluation time is group).
 byte getEvaluationTime()
          Returns the evaluation time for this chart.
 JRExpression getHyperlinkAnchorExpression()
          Returns the expression whose value represents the anchor.
 JRExpression getHyperlinkPageExpression()
          Returns an integer representing the page index of the link.
 JRExpression getHyperlinkReferenceExpression()
          Returns the expression whose value represents the hyperlink reference.
 byte getHyperlinkTarget()
          Retrieves the hyperlink target for the element.
 byte getHyperlinkType()
          Retrieves the hyperlink type for the element.
 JRChartPlot getPlot()
          Gets the chart plot.
 java.awt.Color getSubtitleColor()
           
 JRExpression getSubtitleExpression()
          Gets the expression whose evaluation will form the subtitle.
 JRFont getSubtitleFont()
           
 java.awt.Color getTitleColor()
           
 JRExpression getTitleExpression()
          Gets the expression whose evaluation will form the title.
 JRFont getTitleFont()
           
 byte getTitlePosition()
          Gets the title position relative to the chart.
 boolean isShowLegend()
           
 void setAnchorNameExpression(JRExpression anchorNameExpression)
           
 void setBookmarkLevel(int bookmarkLevel)
          Sets the boomark level for the anchor associated with this chart.
 void setBox(JRBox box)
           
 void setChartType(byte chartType)
           
 void setCustomizerClass(java.lang.String customizerClass)
          Sets a user specified chart customizer class name.
 void setDataset(JRChartDataset ds)
           
 void setEvaluationGroup(JRGroup group)
           
 void setEvaluationTime(byte evaluationTime)
           
 void setHyperlinkAnchorExpression(JRExpression hyperlinkAnchorExpression)
           
 void setHyperlinkPageExpression(JRExpression hyperlinkPageExpression)
           
 void setHyperlinkReferenceExpression(JRExpression hyperlinkReferenceExpression)
           
 void setHyperlinkTarget(byte hyperlinkTarget)
           
 void setHyperlinkType(byte hyperlinkType)
           
 void setShowLegend(boolean isShowLegend)
           
 void setSubtitleColor(java.awt.Color subtitleColor)
           
 void setSubtitleExpression(JRExpression expression)
           
 void setSubtitleFont(JRFont font)
           
 void setTitleColor(java.awt.Color titleColor)
           
 void setTitleExpression(JRExpression expression)
           
 void setTitleFont(JRFont font)
           
 void setTitlePosition(byte titlePosition)
          Sets the title position relative to the chart.
 void writeXml(JRXmlWriter xmlWriter)
           
 
Methods inherited from class net.sf.jasperreports.engine.design.JRDesignElement
setElementGroup, setHeight, setKey, setPrintWhenExpression, setPrintWhenGroupChanges, setY
 
Methods inherited from class net.sf.jasperreports.engine.base.JRBaseElement
getBackcolor, getElementGroup, getForecolor, getHeight, getKey, getMode, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getStretchType, getWidth, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jasperreports.engine.JRElement
getBackcolor, getElementGroup, getForecolor, getHeight, getKey, getMode, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getStretchType, getWidth, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
 

Field Detail

chartType

protected byte chartType

isShowLegend

protected boolean isShowLegend

evaluationTime

protected byte evaluationTime

hyperlinkType

protected byte hyperlinkType

hyperlinkTarget

protected byte hyperlinkTarget

titlePosition

protected byte titlePosition

titleColor

protected java.awt.Color titleColor

subtitleColor

protected java.awt.Color subtitleColor

box

protected JRBox box

titleFont

protected JRFont titleFont

subtitleFont

protected JRFont subtitleFont

customizerClass

protected java.lang.String customizerClass

evaluationGroup

protected JRGroup evaluationGroup

titleExpression

protected JRExpression titleExpression

subtitleExpression

protected JRExpression subtitleExpression

anchorNameExpression

protected JRExpression anchorNameExpression

hyperlinkReferenceExpression

protected JRExpression hyperlinkReferenceExpression

hyperlinkAnchorExpression

protected JRExpression hyperlinkAnchorExpression

hyperlinkPageExpression

protected JRExpression hyperlinkPageExpression

dataset

protected JRChartDataset dataset

plot

protected JRChartPlot plot

bookmarkLevel

protected int bookmarkLevel
The bookmark level for the anchor associated with this chart.

See Also:
JRAnchor.getBookmarkLevel()
Constructor Detail

JRDesignChart

public JRDesignChart(byte chartType)
Method Detail

isShowLegend

public boolean isShowLegend()
Specified by:
isShowLegend in interface JRChart

setShowLegend

public void setShowLegend(boolean isShowLegend)
Specified by:
setShowLegend in interface JRChart

getEvaluationTime

public byte getEvaluationTime()
Description copied from interface: JRChart
Returns the evaluation time for this chart.

Specified by:
getEvaluationTime in interface JRChart

setEvaluationTime

public void setEvaluationTime(byte evaluationTime)

getEvaluationGroup

public JRGroup getEvaluationGroup()
Description copied from interface: JRChart
Gets the evaluation group for this chart (only applies when evaluation time is group).

Specified by:
getEvaluationGroup in interface JRChart

setEvaluationGroup

public void setEvaluationGroup(JRGroup group)

getBox

public JRBox getBox()
Description copied from interface: JRChart
Gets the box around the element.

Specified by:
getBox in interface JRChart

setBox

public void setBox(JRBox box)

getTitleFont

public JRFont getTitleFont()
Specified by:
getTitleFont in interface JRChart

setTitleFont

public void setTitleFont(JRFont font)

getTitlePosition

public byte getTitlePosition()
Description copied from interface: JRChart
Gets the title position relative to the chart.

Specified by:
getTitlePosition in interface JRChart

setTitlePosition

public void setTitlePosition(byte titlePosition)
Description copied from interface: JRChart
Sets the title position relative to the chart.

Specified by:
setTitlePosition in interface JRChart

getTitleColor

public java.awt.Color getTitleColor()
Specified by:
getTitleColor in interface JRChart

setTitleColor

public void setTitleColor(java.awt.Color titleColor)
Specified by:
setTitleColor in interface JRChart

getSubtitleFont

public JRFont getSubtitleFont()
Specified by:
getSubtitleFont in interface JRChart

setSubtitleFont

public void setSubtitleFont(JRFont font)

getSubtitleColor

public java.awt.Color getSubtitleColor()
Specified by:
getSubtitleColor in interface JRChart

setSubtitleColor

public void setSubtitleColor(java.awt.Color subtitleColor)
Specified by:
setSubtitleColor in interface JRChart

getHyperlinkType

public byte getHyperlinkType()
Description copied from interface: JRHyperlink
Retrieves the hyperlink type for the element.

Specified by:
getHyperlinkType in interface JRHyperlink
Returns:
one of the hyperlink type constants

setHyperlinkType

public void setHyperlinkType(byte hyperlinkType)

getHyperlinkTarget

public byte getHyperlinkTarget()
Description copied from interface: JRHyperlink
Retrieves the hyperlink target for the element.

Specified by:
getHyperlinkTarget in interface JRHyperlink
Returns:
one of the hyperlink target constants

setHyperlinkTarget

public void setHyperlinkTarget(byte hyperlinkTarget)

getTitleExpression

public JRExpression getTitleExpression()
Description copied from interface: JRChart
Gets the expression whose evaluation will form the title.

Specified by:
getTitleExpression in interface JRChart

setTitleExpression

public void setTitleExpression(JRExpression expression)

getSubtitleExpression

public JRExpression getSubtitleExpression()
Description copied from interface: JRChart
Gets the expression whose evaluation will form the subtitle.

Specified by:
getSubtitleExpression in interface JRChart

setSubtitleExpression

public void setSubtitleExpression(JRExpression expression)

getAnchorNameExpression

public JRExpression getAnchorNameExpression()
Description copied from interface: JRAnchor
Returns an expression whose value represents the anchor name.

Specified by:
getAnchorNameExpression in interface JRAnchor

setAnchorNameExpression

public void setAnchorNameExpression(JRExpression anchorNameExpression)

getHyperlinkReferenceExpression

public JRExpression 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 interface JRHyperlink

setHyperlinkReferenceExpression

public void setHyperlinkReferenceExpression(JRExpression hyperlinkReferenceExpression)

getHyperlinkAnchorExpression

public JRExpression 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 interface JRHyperlink

setHyperlinkAnchorExpression

public void setHyperlinkAnchorExpression(JRExpression hyperlinkAnchorExpression)

getHyperlinkPageExpression

public JRExpression 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 interface JRHyperlink

setHyperlinkPageExpression

public void setHyperlinkPageExpression(JRExpression hyperlinkPageExpression)

getDataset

public JRChartDataset 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 interface JRChart

getPlot

public JRChartPlot getPlot()
Description copied from interface: JRChart
Gets the chart plot. Plots are used to define various chart visual properties, such as colors and transparency.

Specified by:
getPlot in interface JRChart

getChartType

public byte 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 interface JRChart

setChartType

public void setChartType(byte chartType)

setDataset

public void setDataset(JRChartDataset ds)

getCopy

public JRChild getCopy(JRAbstractObjectFactory factory)
Specified by:
getCopy in interface JRChild

collectExpressions

public void collectExpressions(JRExpressionCollector collector)
Specified by:
collectExpressions in interface JRElement

writeXml

public void writeXml(JRXmlWriter xmlWriter)
Specified by:
writeXml in interface JRChild

getBookmarkLevel

public int getBookmarkLevel()
Description copied from interface: JRAnchor
Returns the level of the bookmark corresponding to the anchor.

Specified by:
getBookmarkLevel in interface JRAnchor
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) or NO_BOOKMARK if no bookmark should be created

getCustomizerClass

public java.lang.String getCustomizerClass()
Description copied from interface: JRChart
Gets a user specified chart customizer class name.

Specified by:
getCustomizerClass in interface JRChart
See Also:
JRChartCustomizer

setCustomizerClass

public void setCustomizerClass(java.lang.String customizerClass)
Sets a user specified chart customizer class name.

See Also:
JRChartCustomizer


© 2001-2005 JasperSoft Corporation www.jaspersoft.com