net.sf.jasperreports.engine.fill
Class JRFillChart

java.lang.Object
  extended by net.sf.jasperreports.engine.fill.JRFillElement
      extended by net.sf.jasperreports.engine.fill.JRFillChart
All Implemented Interfaces:
JRCloneable, JRAnchor, JRBox, JRChart, JRChild, JRElement, JRHyperlink, JRStyleContainer

public class JRFillChart
extends JRFillElement
implements JRChart

Version:
$Id: JRFillChart.java 1507 2006-11-27 17:12:17 +0200 (Mon, 27 Nov 2006) teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net), Some enhancements by Barry Klawans (bklawans@users.sourceforge.net)

Field Summary
protected  JRChartCustomizer chartCustomizer
           
protected  byte chartType
           
protected  java.lang.String customizerClass
           
protected  JRFillChartDataset dataset
           
protected  JRGroup evaluationGroup
           
protected  JRFont legendFont
           
protected  JRChartPlot plot
           
protected  JRRenderable renderer
           
protected  JRFont subtitleFont
           
protected  JRFont titleFont
           
 
Fields inherited from class net.sf.jasperreports.engine.fill.JRFillElement
band, conditionalStylesContainer, currentEvaluation, delayedEvaluationsMap, elementGroup, expressionEvaluator, filler, initStyle, parent, printWhenGroupChanges, templates
 
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_METER, CHART_TYPE_MULTI_AXIS, CHART_TYPE_PIE, CHART_TYPE_PIE3D, CHART_TYPE_SCATTER, CHART_TYPE_STACKEDBAR, CHART_TYPE_STACKEDBAR3D, CHART_TYPE_THERMOMETER, 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_CUSTOM, HYPERLINK_TYPE_LOCAL_ANCHOR, HYPERLINK_TYPE_LOCAL_PAGE, HYPERLINK_TYPE_NONE, HYPERLINK_TYPE_NULL, HYPERLINK_TYPE_REFERENCE, HYPERLINK_TYPE_REMOTE_ANCHOR, HYPERLINK_TYPE_REMOTE_PAGE
 
Constructor Summary
protected JRFillChart(JRBaseFiller filler, JRChart chart, JRFillObjectFactory factory)
           
 
Method Summary
 void collectExpressions(JRExpressionCollector collector)
           
protected  org.jfree.chart.plot.MeterInterval convertInterval(JRMeterInterval interval, byte evaluation)
          Converts a JasperReports meter interval to one that JFreeChart understands.
protected  org.jfree.data.Range convertRange(JRDataRange dataRange, byte evaluation)
          Converts a JasperReport data range into one understood by JFreeChart.
protected  void copy(JRPrintImage printImage)
           
 JRCloneable createClone(JRFillCloneFactory factory)
          Creates a working clone of itself.
protected  void evaluate(byte evaluation)
           
protected  JFreeChartRenderer evaluateAreaImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateBar3DImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateBarImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateBubbleImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateCandlestickImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateHighLowImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateLineImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateMeterImage(byte evaluation)
          Build and configure a meter chart.
protected  JFreeChartRenderer evaluateMultiAxisImage(byte evaluation)
          Build and configure a multiple axis chart.
protected  JFreeChartRenderer evaluatePie3DImage(byte evaluation)
           
protected  JFreeChartRenderer evaluatePieImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateScatterImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateStackedBar3DImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateStackedBarImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateThermometerImage(byte evaluation)
          Build and run a thermometer chart.
protected  JFreeChartRenderer evaluateTimeSeriesImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateXyAreaImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateXYBarImage(byte evaluation)
           
protected  JFreeChartRenderer evaluateXyLineImage(byte evaluation)
           
protected  JRPrintElement fill()
           
protected  java.lang.String getAnchorName()
           
 JRExpression getAnchorNameExpression()
          Returns an expression whose value represents the anchor name.
 int getBookmarkLevel()
          Returns the level of the bookmark corresponding to the anchor.
 byte getBorder()
          Gets the default border pen size (can be overwritten by individual settings).
 java.awt.Color getBorderColor()
          Gets the default border color (can be overwritten by individual settings).
 byte getBottomBorder()
           
 java.awt.Color getBottomBorderColor()
           
 int getBottomPadding()
           
 JRBox getBox()
          Deprecated.  
protected  JFreeChartRenderer getCategoryRenderer(org.jfree.chart.JFreeChart chart)
           
 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.
protected  JFreeChartRenderer getHighLowRenderer(org.jfree.chart.JFreeChart chart)
           
protected  java.lang.String getHyperlinkAnchor()
           
 JRExpression getHyperlinkAnchorExpression()
          Returns the expression whose value represents the anchor.
protected  java.lang.Integer getHyperlinkPage()
           
 JRExpression getHyperlinkPageExpression()
          Returns an integer representing the page index of the link.
 JRHyperlinkParameter[] getHyperlinkParameters()
          Returns the list of hyperlink parameters.
protected  java.lang.String getHyperlinkReference()
           
 JRExpression getHyperlinkReferenceExpression()
          Returns the expression whose value represents the hyperlink reference.
 byte getHyperlinkTarget()
          Retrieves the hyperlink target for the element.
protected  java.lang.String getHyperlinkTooltip()
           
 JRExpression getHyperlinkTooltipExpression()
          Returns the expression which will generate the hyperlink tooltip.
 byte getHyperlinkType()
          Retrieves the hyperlink type for the element.
protected  JRTemplateImage getJRTemplateImage()
           
 byte getLeftBorder()
           
 java.awt.Color getLeftBorderColor()
           
 int getLeftPadding()
           
 java.awt.Color getLegendBackgroundColor()
          Returns the color to use as the background of the legend.
 java.awt.Color getLegendColor()
          Returns the color to use for text in the legend.
 JRFont getLegendFont()
          Returns the font to use in the legend.
 java.lang.String getLinkType()
          Returns the hyperlink type.
 byte getMode()
          Returns the element transparency mode.
 java.lang.Byte getOwnBorder()
           
 java.awt.Color getOwnBorderColor()
           
 java.lang.Byte getOwnBottomBorder()
           
 java.awt.Color getOwnBottomBorderColor()
           
 java.lang.Integer getOwnBottomPadding()
           
 java.lang.Byte getOwnLeftBorder()
           
 java.awt.Color getOwnLeftBorderColor()
           
 java.lang.Integer getOwnLeftPadding()
           
 java.lang.Integer getOwnPadding()
           
 java.lang.Byte getOwnRightBorder()
           
 java.awt.Color getOwnRightBorderColor()
           
 java.lang.Integer getOwnRightPadding()
           
 java.lang.Byte getOwnTopBorder()
          Gets the top border pen size (if the default value was overwritten).
 java.awt.Color getOwnTopBorderColor()
          Gets the top border color (if the default value was overwritten).
 java.lang.Integer getOwnTopPadding()
           
 int getPadding()
          Gets the default padding in pixels (can be overwritten by individual settings).
protected  JFreeChartRenderer getPieRenderer(org.jfree.chart.JFreeChart chart)
           
 JRChartPlot getPlot()
          Gets the chart plot.
protected  JRRenderable getRenderer()
           
 byte getRightBorder()
           
 java.awt.Color getRightBorderColor()
           
 int getRightPadding()
           
 java.awt.Color getSubtitleColor()
           
 JRExpression getSubtitleExpression()
          Gets the expression whose evaluation will form the subtitle.
 JRFont getSubtitleFont()
           
protected  JFreeChartRenderer getTimePeriodRenderer(org.jfree.chart.JFreeChart chart)
           
protected  JFreeChartRenderer getTimeSeriesRenderer(org.jfree.chart.JFreeChart chart)
           
 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.
 byte getTopBorder()
          Gets the top border pen size.
 java.awt.Color getTopBorderColor()
          Gets the top border color.
 int getTopPadding()
           
protected  JFreeChartRenderer getXYBarRenderer(org.jfree.chart.JFreeChart chart)
           
protected  JFreeChartRenderer getXYRenderer(org.jfree.chart.JFreeChart chart)
           
protected  JFreeChartRenderer getXYZRenderer(org.jfree.chart.JFreeChart chart)
           
 boolean isShowLegend()
           
protected  boolean prepare(int availableStretchHeight, boolean isOverflow)
           
protected  void resolveElement(JRPrintElement element, byte evaluation)
          Resolves an element.
protected  void rewind()
           
 void setBorder(byte border)
          Sets the default border pen size (can be overwritten by individual settings).
 void setBorder(java.lang.Byte border)
           
 void setBorderColor(java.awt.Color borderColor)
          Sets the default border color (can be overwritten by individual settings).
 void setBottomBorder(byte bottomBorder)
           
 void setBottomBorder(java.lang.Byte bottomBorder)
           
 void setBottomBorderColor(java.awt.Color bottomBorderColor)
           
 void setBottomPadding(int bottomPadding)
           
 void setBottomPadding(java.lang.Integer bottomPadding)
           
 void setDataset(JRFillChartDataset dataset)
           
 void setLeftBorder(byte leftBorder)
           
 void setLeftBorder(java.lang.Byte leftBorder)
           
 void setLeftBorderColor(java.awt.Color leftBorderColor)
           
 void setLeftPadding(int leftPadding)
           
 void setLeftPadding(java.lang.Integer leftPadding)
           
 void setLegendBackgroundColor(java.awt.Color legendBackgroundColor)
          Sets the color to use for the background of the legend.
 void setLegendColor(java.awt.Color legendColor)
          Sets the color to use for text in the legend.
 void setPadding(int padding)
          Sets the default padding in pixels (can be overwritten by individual settings).
 void setPadding(java.lang.Integer padding)
           
 void setRightBorder(byte rightBorder)
           
 void setRightBorder(java.lang.Byte rightBorder)
           
 void setRightBorderColor(java.awt.Color rightBorderColor)
           
 void setRightPadding(int rightPadding)
           
 void setRightPadding(java.lang.Integer rightPadding)
           
 void setShowLegend(boolean isShowLegend)
           
 void setSubtitleColor(java.awt.Color subtitleColor)
           
 void setTitleColor(java.awt.Color titleColor)
           
 void setTitlePosition(byte titlePosition)
          Sets the title position relative to the chart.
 void setTopBorder(byte topBorder)
          Sets the top border pen size.
 void setTopBorder(java.lang.Byte topBorder)
           
 void setTopBorderColor(java.awt.Color topBorderColor)
          Sets the top border color.
 void setTopPadding(int topPadding)
           
 void setTopPadding(java.lang.Integer topPadding)
           
 void writeXml(JRXmlWriter writer)
          The method is never called for fill charts
 
Methods inherited from class net.sf.jasperreports.engine.fill.JRFillElement
addDependantElement, collectDelayedEvaluations, collectDelayedEvaluations, delayedEvaluate, evaluateExpression, evaluatePrintWhenExpression, getBackcolor, getBand, getBandBottomY, getDefaultStyleProvider, getDependantElements, getElementGroup, getField, getForecolor, getGroupElements, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnMode, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getRelativeY, getStretchHeight, getStretchType, getStyle, getTemplate, getVariable, getWidth, getX, getY, initDelayedEvaluationPrint, initDelayedEvaluations, isAlreadyPrinted, isAutoEvaluateNow, isEvaluateAuto, isEvaluateNow, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isPrintWhenExpressionNull, isPrintWhenTrue, isRemoveLineWhenBlank, isReprinted, isToPrint, isValueRepeating, moveDependantElements, registerTemplate, reset, resolveElement, setAlreadyPrinted, setBackcolor, setBand, setBandBottomY, setConditionalStylesContainer, setCurrentEvaluation, setForecolor, setHeight, setMode, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setPrintWhenExpressionNull, setPrintWhenTrue, setRelativeY, setRemoveLineWhenBlank, setReprinted, setShrinkable, setStretchHeight, setStretchType, setToPrint, setValueRepeating, setWidth, setX, setY, stretchElement, stretchHeightFinal
 
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, getOwnBackcolor, getOwnForecolor, getOwnMode, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getStretchType, getWidth, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle
 

Field Detail

chartType

protected byte chartType

titleFont

protected JRFont titleFont

subtitleFont

protected JRFont subtitleFont

legendFont

protected JRFont legendFont

evaluationGroup

protected JRGroup evaluationGroup

dataset

protected JRFillChartDataset dataset

plot

protected JRChartPlot plot

renderer

protected JRRenderable renderer

customizerClass

protected java.lang.String customizerClass

chartCustomizer

protected JRChartCustomizer chartCustomizer
Constructor Detail

JRFillChart

protected JRFillChart(JRBaseFiller filler,
                      JRChart chart,
                      JRFillObjectFactory factory)
Method Detail

getMode

public byte getMode()
Description copied from interface: JRElement
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 interface JRElement
Overrides:
getMode in class JRFillElement
Returns:
MODE_OPAQUE or MODE_TRANSPARENT

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
Overrides:
getEvaluationTime in class JRFillElement

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

getBox

public JRBox getBox()
Deprecated. 

Description copied from interface: JRChart
Gets the box around the element.

Specified by:
getBox in interface JRChart

getTitleFont

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

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

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

getLegendColor

public java.awt.Color getLegendColor()
Returns the color to use for text in the legend.

Specified by:
getLegendColor in interface JRChart
Returns:
the color to use for text in the legend

setLegendColor

public void setLegendColor(java.awt.Color legendColor)
Sets the color to use for text in the legend.

Specified by:
setLegendColor in interface JRChart
Parameters:
legendColor - the color to use for text in the legend

getLegendBackgroundColor

public java.awt.Color getLegendBackgroundColor()
Returns the color to use as the background of the legend.

Specified by:
getLegendBackgroundColor in interface JRChart
Returns:
the color to use as the background of the legend

setLegendBackgroundColor

public void setLegendBackgroundColor(java.awt.Color legendBackgroundColor)
Sets the color to use for the background of the legend.

Specified by:
setLegendBackgroundColor in interface JRChart
Parameters:
legendBackgroundColor - the color to use for the background of the legend

getLegendFont

public JRFont getLegendFont()
Returns the font to use in the legend.

Specified by:
getLegendFont in interface JRChart
Returns:
the font to use in the legend

getTitleExpression

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

Specified by:
getTitleExpression in interface JRChart

getSubtitleExpression

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

Specified by:
getSubtitleExpression in interface JRChart

getHyperlinkType

public byte 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, HYPERLINK_TYPE_CUSTOM is returned.

Specified by:
getHyperlinkType in interface JRHyperlink
Returns:
one of the hyperlink type constants
See Also:
JRHyperlink.getLinkType()

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

getAnchorNameExpression

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

Specified by:
getAnchorNameExpression in interface JRAnchor

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

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

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

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

setDataset

public void setDataset(JRFillChartDataset dataset)

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

getRenderer

protected JRRenderable getRenderer()

getAnchorName

protected java.lang.String getAnchorName()

getHyperlinkReference

protected java.lang.String getHyperlinkReference()

getHyperlinkAnchor

protected java.lang.String getHyperlinkAnchor()

getHyperlinkPage

protected java.lang.Integer getHyperlinkPage()

getHyperlinkTooltip

protected java.lang.String getHyperlinkTooltip()

getJRTemplateImage

protected JRTemplateImage getJRTemplateImage()

rewind

protected void rewind()
Specified by:
rewind in class JRFillElement

evaluate

protected void evaluate(byte evaluation)
                 throws JRException
Specified by:
evaluate in class JRFillElement
Throws:
JRException

evaluateImage

protected JFreeChartRenderer evaluateImage(byte evaluation)
                                    throws JRException
Throws:
JRException

prepare

protected boolean prepare(int availableStretchHeight,
                          boolean isOverflow)
Overrides:
prepare in class JRFillElement

fill

protected JRPrintElement fill()
Specified by:
fill in class JRFillElement

copy

protected void copy(JRPrintImage printImage)

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

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 writer)
The method is never called for fill charts

Specified by:
writeXml in interface JRChild
Parameters:
writer -

evaluateAreaImage

protected JFreeChartRenderer evaluateAreaImage(byte evaluation)
                                        throws JRException
Throws:
JRException

evaluateBar3DImage

protected JFreeChartRenderer evaluateBar3DImage(byte evaluation)
                                         throws JRException
Throws:
JRException

evaluateBarImage

protected JFreeChartRenderer evaluateBarImage(byte evaluation)
                                       throws JRException
Throws:
JRException

evaluateBubbleImage

protected JFreeChartRenderer evaluateBubbleImage(byte evaluation)
                                          throws JRException
Throws:
JRException

evaluateCandlestickImage

protected JFreeChartRenderer evaluateCandlestickImage(byte evaluation)
                                               throws JRException
Parameters:
evaluation -
Throws:
JRException

evaluateHighLowImage

protected JFreeChartRenderer evaluateHighLowImage(byte evaluation)
                                           throws JRException
Parameters:
evaluation -
Throws:
JRException

evaluateLineImage

protected JFreeChartRenderer evaluateLineImage(byte evaluation)
                                        throws JRException
Throws:
JRException

evaluatePie3DImage

protected JFreeChartRenderer evaluatePie3DImage(byte evaluation)
                                         throws JRException
Throws:
JRException

evaluatePieImage

protected JFreeChartRenderer evaluatePieImage(byte evaluation)
                                       throws JRException
Throws:
JRException

evaluateScatterImage

protected JFreeChartRenderer evaluateScatterImage(byte evaluation)
                                           throws JRException
Throws:
JRException

evaluateStackedBar3DImage

protected JFreeChartRenderer evaluateStackedBar3DImage(byte evaluation)
                                                throws JRException
Throws:
JRException

evaluateStackedBarImage

protected JFreeChartRenderer evaluateStackedBarImage(byte evaluation)
                                              throws JRException
Throws:
JRException

evaluateXyAreaImage

protected JFreeChartRenderer evaluateXyAreaImage(byte evaluation)
                                          throws JRException
Throws:
JRException

evaluateXYBarImage

protected JFreeChartRenderer evaluateXYBarImage(byte evaluation)
                                         throws JRException
Throws:
JRException

evaluateXyLineImage

protected JFreeChartRenderer evaluateXyLineImage(byte evaluation)
                                          throws JRException
Throws:
JRException

evaluateTimeSeriesImage

protected JFreeChartRenderer evaluateTimeSeriesImage(byte evaluation)
                                              throws JRException
Throws:
JRException

convertRange

protected org.jfree.data.Range convertRange(JRDataRange dataRange,
                                            byte evaluation)
                                     throws JRException
Converts a JasperReport data range into one understood by JFreeChart.

Parameters:
dataRange - the JasperReport version of the range
evaluation - current expression evaluation phase
Returns:
the JFreeChart version of the range
Throws:
JRException - thrown when the low value of the range is greater than the high value

convertInterval

protected org.jfree.chart.plot.MeterInterval convertInterval(JRMeterInterval interval,
                                                             byte evaluation)
                                                      throws JRException
Converts a JasperReports meter interval to one that JFreeChart understands.

Parameters:
interval - the JasperReports definition of an interval
evaluation - current evaluation time
Returns:
the JFreeChart version of the same interval
Throws:
JRException - thrown when the interval contains an invalid range

evaluateMeterImage

protected JFreeChartRenderer evaluateMeterImage(byte evaluation)
                                         throws JRException
Build and configure a meter chart.

Parameters:
evaluation - current expression evaluation phase
Returns:
the JFreeChart meter chart
Throws:
JRException

evaluateThermometerImage

protected JFreeChartRenderer evaluateThermometerImage(byte evaluation)
                                               throws JRException
Build and run a thermometer chart. JFreeChart thermometer charts have some limitations. They always have a maximum of three ranges, and the colors of those ranges seems to be fixed.

Parameters:
evaluation - current expression evaluation phase
Returns:
the JFreeChart thermometer chart
Throws:
JRException

evaluateMultiAxisImage

protected JFreeChartRenderer evaluateMultiAxisImage(byte evaluation)
                                             throws JRException
Build and configure a multiple axis chart. A multiple axis chart support more than one range axis. Multiple datasets using different ranges can be displayed as long as they share a common domain axis. Each dataset can be rendered differently, so one chart can contain (for example) two line charts, a bar chart and an area chart.

Multiple axis charts are handled differently than the other chart types. They do not have a dataset, as each chart that is added to the multiple axis chart has its own dataset. For simplicity, each dataset is treated as its own chart, and in fact we reuse the design of all the chart types and let JFreeChart actually run them. Then we pull out the bits we need and add it to the common chart. All the plot and chart options on the nested charts is ignored, and all formatting is controlled by the plot attached to the multiAxisChart. The one exception is seriesColor, which can be used in a nested report to specify a color for a specific series in that report.

Parameters:
evaluation - current expression evaluation phase
Returns:
the JFreeChart chart
Throws:
JRException

resolveElement

protected void resolveElement(JRPrintElement element,
                              byte evaluation)
                       throws JRException
Description copied from class: JRFillElement
Resolves an element.

Specified by:
resolveElement in class JRFillElement
Parameters:
element - the element
evaluation - the evaluation type
Throws:
JRException

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

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

getBorder

public byte getBorder()
Description copied from interface: JRBox
Gets the default border pen size (can be overwritten by individual settings).

Specified by:
getBorder in interface JRBox

getOwnBorder

public java.lang.Byte getOwnBorder()
Specified by:
getOwnBorder in interface JRBox

setBorder

public void setBorder(byte border)
Description copied from interface: JRBox
Sets the default border pen size (can be overwritten by individual settings).

Specified by:
setBorder in interface JRBox

setBorder

public void setBorder(java.lang.Byte border)
Specified by:
setBorder in interface JRBox

getBorderColor

public java.awt.Color getBorderColor()
Description copied from interface: JRBox
Gets the default border color (can be overwritten by individual settings).

Specified by:
getBorderColor in interface JRBox

getOwnBorderColor

public java.awt.Color getOwnBorderColor()
Specified by:
getOwnBorderColor in interface JRBox

setBorderColor

public void setBorderColor(java.awt.Color borderColor)
Description copied from interface: JRBox
Sets the default border color (can be overwritten by individual settings).

Specified by:
setBorderColor in interface JRBox

getPadding

public int getPadding()
Description copied from interface: JRBox
Gets the default padding in pixels (can be overwritten by individual settings).

Specified by:
getPadding in interface JRBox

getOwnPadding

public java.lang.Integer getOwnPadding()
Specified by:
getOwnPadding in interface JRBox

setPadding

public void setPadding(int padding)
Description copied from interface: JRBox
Sets the default padding in pixels (can be overwritten by individual settings).

Specified by:
setPadding in interface JRBox

setPadding

public void setPadding(java.lang.Integer padding)
Specified by:
setPadding in interface JRBox

getTopBorder

public byte getTopBorder()
Description copied from interface: JRBox
Gets the top border pen size.

Specified by:
getTopBorder in interface JRBox

getOwnTopBorder

public java.lang.Byte getOwnTopBorder()
Description copied from interface: JRBox
Gets the top border pen size (if the default value was overwritten).

Specified by:
getOwnTopBorder in interface JRBox

setTopBorder

public void setTopBorder(byte topBorder)
Description copied from interface: JRBox
Sets the top border pen size.

Specified by:
setTopBorder in interface JRBox

setTopBorder

public void setTopBorder(java.lang.Byte topBorder)
Specified by:
setTopBorder in interface JRBox

getTopBorderColor

public java.awt.Color getTopBorderColor()
Description copied from interface: JRBox
Gets the top border color.

Specified by:
getTopBorderColor in interface JRBox

getOwnTopBorderColor

public java.awt.Color getOwnTopBorderColor()
Description copied from interface: JRBox
Gets the top border color (if the default value was overwritten).

Specified by:
getOwnTopBorderColor in interface JRBox

setTopBorderColor

public void setTopBorderColor(java.awt.Color topBorderColor)
Description copied from interface: JRBox
Sets the top border color.

Specified by:
setTopBorderColor in interface JRBox

getTopPadding

public int getTopPadding()
Specified by:
getTopPadding in interface JRBox

getOwnTopPadding

public java.lang.Integer getOwnTopPadding()
Specified by:
getOwnTopPadding in interface JRBox

setTopPadding

public void setTopPadding(int topPadding)
Specified by:
setTopPadding in interface JRBox

setTopPadding

public void setTopPadding(java.lang.Integer topPadding)
Specified by:
setTopPadding in interface JRBox

getLeftBorder

public byte getLeftBorder()
Specified by:
getLeftBorder in interface JRBox

getOwnLeftBorder

public java.lang.Byte getOwnLeftBorder()
Specified by:
getOwnLeftBorder in interface JRBox

setLeftBorder

public void setLeftBorder(byte leftBorder)
Specified by:
setLeftBorder in interface JRBox

setLeftBorder

public void setLeftBorder(java.lang.Byte leftBorder)
Specified by:
setLeftBorder in interface JRBox

getLeftBorderColor

public java.awt.Color getLeftBorderColor()
Specified by:
getLeftBorderColor in interface JRBox

getOwnLeftBorderColor

public java.awt.Color getOwnLeftBorderColor()
Specified by:
getOwnLeftBorderColor in interface JRBox

setLeftBorderColor

public void setLeftBorderColor(java.awt.Color leftBorderColor)
Specified by:
setLeftBorderColor in interface JRBox

getLeftPadding

public int getLeftPadding()
Specified by:
getLeftPadding in interface JRBox

getOwnLeftPadding

public java.lang.Integer getOwnLeftPadding()
Specified by:
getOwnLeftPadding in interface JRBox

setLeftPadding

public void setLeftPadding(int leftPadding)
Specified by:
setLeftPadding in interface JRBox

setLeftPadding

public void setLeftPadding(java.lang.Integer leftPadding)
Specified by:
setLeftPadding in interface JRBox

getBottomBorder

public byte getBottomBorder()
Specified by:
getBottomBorder in interface JRBox

getOwnBottomBorder

public java.lang.Byte getOwnBottomBorder()
Specified by:
getOwnBottomBorder in interface JRBox

setBottomBorder

public void setBottomBorder(byte bottomBorder)
Specified by:
setBottomBorder in interface JRBox

setBottomBorder

public void setBottomBorder(java.lang.Byte bottomBorder)
Specified by:
setBottomBorder in interface JRBox

getBottomBorderColor

public java.awt.Color getBottomBorderColor()
Specified by:
getBottomBorderColor in interface JRBox

getOwnBottomBorderColor

public java.awt.Color getOwnBottomBorderColor()
Specified by:
getOwnBottomBorderColor in interface JRBox

setBottomBorderColor

public void setBottomBorderColor(java.awt.Color bottomBorderColor)
Specified by:
setBottomBorderColor in interface JRBox

getBottomPadding

public int getBottomPadding()
Specified by:
getBottomPadding in interface JRBox

getOwnBottomPadding

public java.lang.Integer getOwnBottomPadding()
Specified by:
getOwnBottomPadding in interface JRBox

setBottomPadding

public void setBottomPadding(int bottomPadding)
Specified by:
setBottomPadding in interface JRBox

setBottomPadding

public void setBottomPadding(java.lang.Integer bottomPadding)
Specified by:
setBottomPadding in interface JRBox

getRightBorder

public byte getRightBorder()
Specified by:
getRightBorder in interface JRBox

getOwnRightBorder

public java.lang.Byte getOwnRightBorder()
Specified by:
getOwnRightBorder in interface JRBox

setRightBorder

public void setRightBorder(byte rightBorder)
Specified by:
setRightBorder in interface JRBox

setRightBorder

public void setRightBorder(java.lang.Byte rightBorder)
Specified by:
setRightBorder in interface JRBox

getRightBorderColor

public java.awt.Color getRightBorderColor()
Specified by:
getRightBorderColor in interface JRBox

getOwnRightBorderColor

public java.awt.Color getOwnRightBorderColor()
Specified by:
getOwnRightBorderColor in interface JRBox

setRightBorderColor

public void setRightBorderColor(java.awt.Color rightBorderColor)
Specified by:
setRightBorderColor in interface JRBox

getRightPadding

public int getRightPadding()
Specified by:
getRightPadding in interface JRBox

getOwnRightPadding

public java.lang.Integer getOwnRightPadding()
Specified by:
getOwnRightPadding in interface JRBox

setRightPadding

public void setRightPadding(int rightPadding)
Specified by:
setRightPadding in interface JRBox

setRightPadding

public void setRightPadding(java.lang.Integer rightPadding)
Specified by:
setRightPadding in interface JRBox

createClone

public JRCloneable createClone(JRFillCloneFactory factory)
Description copied from interface: JRCloneable
Creates a working clone of itself.

Specified by:
createClone in interface JRCloneable
Parameters:
factory - the clone factory to use while creating the clone
Returns:
a working clone of itself

getHyperlinkParameters

public JRHyperlinkParameter[] 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 interface JRHyperlink
Returns:
the list of hyperlink parameters

getLinkType

public java.lang.String 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 interface JRHyperlink
Returns:
the hyperlink type

getHyperlinkTooltipExpression

public JRExpression getHyperlinkTooltipExpression()
Description copied from interface: JRHyperlink
Returns the expression which will generate the hyperlink tooltip.

Specified by:
getHyperlinkTooltipExpression in interface JRHyperlink
Returns:
the expression which will generate the hyperlink tooltip

getCategoryRenderer

protected JFreeChartRenderer getCategoryRenderer(org.jfree.chart.JFreeChart chart)

getPieRenderer

protected JFreeChartRenderer getPieRenderer(org.jfree.chart.JFreeChart chart)

getXYRenderer

protected JFreeChartRenderer getXYRenderer(org.jfree.chart.JFreeChart chart)

getXYBarRenderer

protected JFreeChartRenderer getXYBarRenderer(org.jfree.chart.JFreeChart chart)

getXYZRenderer

protected JFreeChartRenderer getXYZRenderer(org.jfree.chart.JFreeChart chart)

getHighLowRenderer

protected JFreeChartRenderer getHighLowRenderer(org.jfree.chart.JFreeChart chart)

getTimeSeriesRenderer

protected JFreeChartRenderer getTimeSeriesRenderer(org.jfree.chart.JFreeChart chart)

getTimePeriodRenderer

protected JFreeChartRenderer getTimePeriodRenderer(org.jfree.chart.JFreeChart chart)


© 2001-2006 JasperSoft Corporation www.jaspersoft.com