ar.com.fdvs.dj.domain.chart.builder
Class DJTimeSeriesChartBuilder

java.lang.Object
  extended by ar.com.fdvs.dj.domain.chart.builder.AbstractChartBuilder
      extended by ar.com.fdvs.dj.domain.chart.builder.DJTimeSeriesChartBuilder

public class DJTimeSeriesChartBuilder
extends AbstractChartBuilder


Field Summary
 
Fields inherited from class ar.com.fdvs.dj.domain.chart.builder.AbstractChartBuilder
chart
 
Constructor Summary
DJTimeSeriesChartBuilder()
           
 
Method Summary
 DJTimeSeriesChartBuilder addSerie(AbstractColumn column)
          Adds the specified serie column to the dataset.
 DJTimeSeriesChartBuilder addSerie(AbstractColumn column, java.lang.String label)
          Adds the specified serie column to the dataset with custom label.
 DJTimeSeriesChartBuilder addSerie(AbstractColumn column, StringExpression labelExpression)
          Adds the specified serie column to the dataset with custom label.
 DJTimeSeriesChartBuilder addSeriesColor(java.awt.Color color)
          Adds the specified series color to the plot.
protected  byte getChartType()
           
protected  TimeSeriesDataset getDataset()
           
protected  TimeSeriesPlot getPlot()
           
 DJTimeSeriesChartBuilder setBackColor(java.awt.Color backColor)
          Sets the background color.
protected  DJTimeSeriesChartBuilder setCategory(PropertyColumn timePeriod)
          Allows AbstractChartBuilder to set the key column
 DJTimeSeriesChartBuilder setCentered(boolean centered)
          Sets the centered.
 DJTimeSeriesChartBuilder setCustomizerClass(java.lang.String customizerClass)
          Sets a user specified chart customizer class name.
 DJTimeSeriesChartBuilder setHeight(int height)
          Sets the chart height.
 DJTimeSeriesChartBuilder setLabelRotation(double labelRotation)
          Sets the angle in degrees to rotate the data axis labels.
 DJTimeSeriesChartBuilder setLegendBackgroundColor(java.awt.Color legendBackgroundColor)
          Sets the legend background color.
 DJTimeSeriesChartBuilder setLegendColor(java.awt.Color legendColor)
          Sets the legend color.
 DJTimeSeriesChartBuilder setLegendFont(Font legendFont)
          Sets the legend font.
 DJTimeSeriesChartBuilder setLegendPosition(byte legendPosition)
          Sets the legend position (DJChartOptions.EDGE_TOP, DJChartOptions.EDGE_BOTTOM, DJChartOptions.EDGE_LEFT, DJChartOptions.EDGE_RIGHT).
 DJTimeSeriesChartBuilder setLineColor(java.awt.Color lineColor)
          Sets the line color.
 DJTimeSeriesChartBuilder setLineStyle(byte lineStyle)
          Sets the line style (DJChartOptions.LINE_STYLE_SOLID, DJChartOptions.LINE_STYLE_DASHED, DJChartOptions.LINE_STYLE_DOTTED, DJChartOptions.LINE_STYLE_DOUBLE).
 DJTimeSeriesChartBuilder setLineWidth(float lineWidth)
          Sets the line width.
 DJTimeSeriesChartBuilder setLink(DJHyperLink link)
          Sets the hyperlink.
 DJTimeSeriesChartBuilder setOperation(byte operation)
          Sets the chart data operation (DJChart.CALCULATION_COUNT or DJChart.CALCULATION_SUM).
 DJTimeSeriesChartBuilder setOrientation(org.jfree.chart.plot.PlotOrientation orientation)
          Sets the plot orientation (PlotOrientation.HORIZONTAL or PlotOrientation.VERTICAL).
 DJTimeSeriesChartBuilder setPadding(int padding)
          Sets the padding.
 DJTimeSeriesChartBuilder setPosition(byte position)
          Sets the position (DJChartOptions.POSITION_FOOTER or DJChartOptions.POSITION_HEADER).
 DJTimeSeriesChartBuilder setSeriesColors(java.util.List seriesColors)
          Set the specified series colors to the plot.
 DJTimeSeriesChartBuilder setShowLegend(boolean showLegend)
          Sets the legend visibility.
 DJTimeSeriesChartBuilder setShowLines(boolean showLines)
          Sets the lines visibility.
 DJTimeSeriesChartBuilder setShowShapes(boolean showShapes)
          Sets the shapes visibility.
 DJTimeSeriesChartBuilder setSubtitle(java.lang.String subtitle)
          Sets the subtitle.
 DJTimeSeriesChartBuilder setSubtitle(StringExpression subtitleExpression)
          Sets the subtitle expression.
 DJTimeSeriesChartBuilder setSubtitleColor(java.awt.Color subtitleColor)
          Sets the subtitle color.
 DJTimeSeriesChartBuilder setSubtitleFont(Font subtitleFont)
          Sets the subtitle font.
 DJTimeSeriesChartBuilder setTheme(java.lang.String theme)
          Sets the theme.
 DJTimeSeriesChartBuilder setTimeAxisFormat(DJAxisFormat timeAxisFormat)
          Sets the time axis format.
 DJTimeSeriesChartBuilder setTimePeriod(PropertyColumn timePeriod)
          Sets the time period column.
 DJTimeSeriesChartBuilder setTimePeriodClass(java.lang.Class timePeriodClass)
          Sets the time period class (YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND, MILLISECOND).
 DJTimeSeriesChartBuilder setTitle(java.lang.String title)
          Sets the title.
 DJTimeSeriesChartBuilder setTitle(StringExpression titleExpression)
          Sets the title expression.
 DJTimeSeriesChartBuilder setTitleColor(java.awt.Color titleColor)
          Sets the title color.
 DJTimeSeriesChartBuilder setTitleFont(Font titleFont)
          Sets the title font.
 DJTimeSeriesChartBuilder setTitlePosition(byte titlePosition)
          Sets the title position (DJChartOptions.EDGE_TOP, DJChartOptions.EDGE_BOTTOM, DJChartOptions.EDGE_LEFT, DJChartOptions.EDGE_RIGHT).
 DJTimeSeriesChartBuilder setValueAxisFormat(DJAxisFormat valueAxisFormat)
          Sets the value axis format.
 DJTimeSeriesChartBuilder setWidth(int width)
          Sets the chart width.
 DJTimeSeriesChartBuilder setX(int x)
          Sets the x position.
 DJTimeSeriesChartBuilder setY(int y)
          Sets the y position.
 
Methods inherited from class ar.com.fdvs.dj.domain.chart.builder.AbstractChartBuilder
build, setChartOptions, setColumnGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DJTimeSeriesChartBuilder

public DJTimeSeriesChartBuilder()
Method Detail

setOperation

public DJTimeSeriesChartBuilder setOperation(byte operation)
Sets the chart data operation (DJChart.CALCULATION_COUNT or DJChart.CALCULATION_SUM).

Specified by:
setOperation in class AbstractChartBuilder
Parameters:
operation - the chart data operation

setLink

public DJTimeSeriesChartBuilder setLink(DJHyperLink link)
Sets the hyperlink.

Specified by:
setLink in class AbstractChartBuilder
Parameters:
link - the hyperlink

setBackColor

public DJTimeSeriesChartBuilder setBackColor(java.awt.Color backColor)
Sets the background color.

Specified by:
setBackColor in class AbstractChartBuilder
Parameters:
backColor - the background color

setHeight

public DJTimeSeriesChartBuilder setHeight(int height)
Sets the chart height.

Specified by:
setHeight in class AbstractChartBuilder
Parameters:
height - the chart height

setWidth

public DJTimeSeriesChartBuilder setWidth(int width)
Sets the chart width.

Specified by:
setWidth in class AbstractChartBuilder
Parameters:
width - the chart width

setCentered

public DJTimeSeriesChartBuilder setCentered(boolean centered)
Sets the centered.

Specified by:
setCentered in class AbstractChartBuilder
Parameters:
centered - the centered

setPosition

public DJTimeSeriesChartBuilder setPosition(byte position)
Sets the position (DJChartOptions.POSITION_FOOTER or DJChartOptions.POSITION_HEADER).

Specified by:
setPosition in class AbstractChartBuilder
Parameters:
position - the position

setY

public DJTimeSeriesChartBuilder setY(int y)
Sets the y position.

Specified by:
setY in class AbstractChartBuilder
Parameters:
y - the y position

setX

public DJTimeSeriesChartBuilder setX(int x)
Sets the x position.

Specified by:
setX in class AbstractChartBuilder
Parameters:
y - the x position

setShowLegend

public DJTimeSeriesChartBuilder setShowLegend(boolean showLegend)
Sets the legend visibility.

Specified by:
setShowLegend in class AbstractChartBuilder
Parameters:
showLegend - the legend visibility

setTitleColor

public DJTimeSeriesChartBuilder setTitleColor(java.awt.Color titleColor)
Sets the title color.

Specified by:
setTitleColor in class AbstractChartBuilder
Parameters:
titleColor - the title color

setSubtitleColor

public DJTimeSeriesChartBuilder setSubtitleColor(java.awt.Color subtitleColor)
Sets the subtitle color.

Specified by:
setSubtitleColor in class AbstractChartBuilder
Parameters:
subtitleColor - the subtitle color

setLegendColor

public DJTimeSeriesChartBuilder setLegendColor(java.awt.Color legendColor)
Sets the legend color.

Specified by:
setLegendColor in class AbstractChartBuilder
Parameters:
legendColor - the legend color

setLegendBackgroundColor

public DJTimeSeriesChartBuilder setLegendBackgroundColor(java.awt.Color legendBackgroundColor)
Sets the legend background color.

Specified by:
setLegendBackgroundColor in class AbstractChartBuilder
Parameters:
legendBackgroundColor - the legend background color

setTheme

public DJTimeSeriesChartBuilder setTheme(java.lang.String theme)
Sets the theme. Chart themes support to allow changing the overall appearance of charts generated with the build-in chart element

Specified by:
setTheme in class AbstractChartBuilder
Parameters:
theme - the theme

setTitleFont

public DJTimeSeriesChartBuilder setTitleFont(Font titleFont)
Sets the title font.

Specified by:
setTitleFont in class AbstractChartBuilder
Parameters:
titleFont - the title font

setSubtitleFont

public DJTimeSeriesChartBuilder setSubtitleFont(Font subtitleFont)
Sets the subtitle font.

Specified by:
setSubtitleFont in class AbstractChartBuilder
Parameters:
subtitleFont - the subtitle font

setLegendFont

public DJTimeSeriesChartBuilder setLegendFont(Font legendFont)
Sets the legend font.

Specified by:
setLegendFont in class AbstractChartBuilder
Parameters:
legendFont - the legend font

setLegendPosition

public DJTimeSeriesChartBuilder setLegendPosition(byte legendPosition)
Sets the legend position (DJChartOptions.EDGE_TOP, DJChartOptions.EDGE_BOTTOM, DJChartOptions.EDGE_LEFT, DJChartOptions.EDGE_RIGHT).

Specified by:
setLegendPosition in class AbstractChartBuilder
Parameters:
legendPosition - the legend position

setTitlePosition

public DJTimeSeriesChartBuilder setTitlePosition(byte titlePosition)
Sets the title position (DJChartOptions.EDGE_TOP, DJChartOptions.EDGE_BOTTOM, DJChartOptions.EDGE_LEFT, DJChartOptions.EDGE_RIGHT).

Specified by:
setTitlePosition in class AbstractChartBuilder
Parameters:
titlePosition - the title position

setTitle

public DJTimeSeriesChartBuilder setTitle(java.lang.String title)
Sets the title.

Specified by:
setTitle in class AbstractChartBuilder
Parameters:
title - the title

setTitle

public DJTimeSeriesChartBuilder setTitle(StringExpression titleExpression)
Sets the title expression.

Specified by:
setTitle in class AbstractChartBuilder
Parameters:
titleExpression - the title expression

setSubtitle

public DJTimeSeriesChartBuilder setSubtitle(java.lang.String subtitle)
Sets the subtitle.

Specified by:
setSubtitle in class AbstractChartBuilder
Parameters:
subtitle - the subtitle

setSubtitle

public DJTimeSeriesChartBuilder setSubtitle(StringExpression subtitleExpression)
Sets the subtitle expression.

Specified by:
setSubtitle in class AbstractChartBuilder
Parameters:
subtitleExpression - the subtitle expression

setLineStyle

public DJTimeSeriesChartBuilder setLineStyle(byte lineStyle)
Sets the line style (DJChartOptions.LINE_STYLE_SOLID, DJChartOptions.LINE_STYLE_DASHED, DJChartOptions.LINE_STYLE_DOTTED, DJChartOptions.LINE_STYLE_DOUBLE).

Specified by:
setLineStyle in class AbstractChartBuilder
Parameters:
lineStyle - one of the line style constants in DJChartOptions class

setLineWidth

public DJTimeSeriesChartBuilder setLineWidth(float lineWidth)
Sets the line width.

Specified by:
setLineWidth in class AbstractChartBuilder
Parameters:
lineWidth - the line width

setLineColor

public DJTimeSeriesChartBuilder setLineColor(java.awt.Color lineColor)
Sets the line color.

Specified by:
setLineColor in class AbstractChartBuilder
Parameters:
lineColor - the line color

setPadding

public DJTimeSeriesChartBuilder setPadding(int padding)
Sets the padding.

Specified by:
setPadding in class AbstractChartBuilder
Parameters:
padding - the padding

setCustomizerClass

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

Specified by:
setCustomizerClass in class AbstractChartBuilder
See Also:
JRChartCustomizer

setCategory

protected DJTimeSeriesChartBuilder setCategory(PropertyColumn timePeriod)
Allows AbstractChartBuilder to set the key column

Specified by:
setCategory in class AbstractChartBuilder

setTimePeriod

public DJTimeSeriesChartBuilder setTimePeriod(PropertyColumn timePeriod)
Sets the time period column.

Parameters:
timePeriod - the time period column

addSerie

public DJTimeSeriesChartBuilder addSerie(AbstractColumn column)
Adds the specified serie column to the dataset.

Specified by:
addSerie in class AbstractChartBuilder
Parameters:
column - the serie column

addSerie

public DJTimeSeriesChartBuilder addSerie(AbstractColumn column,
                                         java.lang.String label)
Adds the specified serie column to the dataset with custom label.

Parameters:
column - the serie column
label - column the custom label

addSerie

public DJTimeSeriesChartBuilder addSerie(AbstractColumn column,
                                         StringExpression labelExpression)
Adds the specified serie column to the dataset with custom label.

Parameters:
column - the serie column
label - column the custom label

setTimePeriodClass

public DJTimeSeriesChartBuilder setTimePeriodClass(java.lang.Class timePeriodClass)
Sets the time period class (YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND, MILLISECOND). Default DAY

Parameters:
timePeriodClass - one of the time period class constants in TimeSeriesDataset class

setLabelRotation

public DJTimeSeriesChartBuilder setLabelRotation(double labelRotation)
Sets the angle in degrees to rotate the data axis labels. The range is -360 to 360. A positive value angles the label so it reads downwards wile a negative value angles the label so it reads upwards. Only charts that use a category based axis (such as line or bar charts) support label rotation.

Parameters:
labelRotation - the label rotation

setOrientation

public DJTimeSeriesChartBuilder setOrientation(org.jfree.chart.plot.PlotOrientation orientation)
Sets the plot orientation (PlotOrientation.HORIZONTAL or PlotOrientation.VERTICAL).

Parameters:
orientation - the plot orientation

addSeriesColor

public DJTimeSeriesChartBuilder addSeriesColor(java.awt.Color color)
Adds the specified series color to the plot.

Specified by:
addSeriesColor in class AbstractChartBuilder
Parameters:
color - the series color

setSeriesColors

public DJTimeSeriesChartBuilder setSeriesColors(java.util.List seriesColors)
Set the specified series colors to the plot.

Specified by:
setSeriesColors in class AbstractChartBuilder
Parameters:
seriesColors - the series colors

setTimeAxisFormat

public DJTimeSeriesChartBuilder setTimeAxisFormat(DJAxisFormat timeAxisFormat)
Sets the time axis format.

Parameters:
timeAxisFormat - the time axis format

setValueAxisFormat

public DJTimeSeriesChartBuilder setValueAxisFormat(DJAxisFormat valueAxisFormat)
Sets the value axis format.

Parameters:
valueAxisFormat - the value axis format

setShowShapes

public DJTimeSeriesChartBuilder setShowShapes(boolean showShapes)
Sets the shapes visibility.

Parameters:
showShapes - the shapes visibility

setShowLines

public DJTimeSeriesChartBuilder setShowLines(boolean showLines)
Sets the lines visibility.

Parameters:
showLines - the lines visibility

getDataset

protected TimeSeriesDataset getDataset()
Specified by:
getDataset in class AbstractChartBuilder

getPlot

protected TimeSeriesPlot getPlot()
Specified by:
getPlot in class AbstractChartBuilder

getChartType

protected byte getChartType()
Specified by:
getChartType in class AbstractChartBuilder


Copyright © 2006-2011 FDV Solutions. All Rights Reserved.