org.pentaho.platform.uifoundation.chart
Class CategoryDatasetChartDefinition

java.lang.Object
  extended by DefaultCategoryDataset
      extended by org.pentaho.platform.uifoundation.chart.CategoryDatasetChartDefinition
All Implemented Interfaces:
ChartDefinition
Direct Known Subclasses:
BarLineChartDefinition

public class CategoryDatasetChartDefinition
extends DefaultCategoryDataset
implements ChartDefinition


Field Summary
 
Fields inherited from interface org.pentaho.platform.uifoundation.chart.ChartDefinition
AREA_CHART_STR, BACKGROUND_ALPHA_NODE_NAME, BACKGROUND_TYPE_ATTRIBUTE_NAME, BAR_CHART_STR, BAR_LINE_CHART_STR, BUBBLE_CHART_STR, CATEGORY_DATASET_STR, CHART_BACKGROUND_NODE_NAME, CHART_BORDER_PAINT_NODE_NAME, CHART_BORDER_VISIBLE_NODE_NAME, COLOR_NODE_NAME, COLOR_TYPE_NAME, DATASET_TYPE_NODE_NAME, DAY_PERIOD_TYPE_STR, DIAL_CHART_STR, DIFFERENCE_CHART_STR, DISPLAY_LABELS_NODE_NAME, DISPLAY_LEGEND_BORDER_NODE_NAME, DOT_CHART_STR, DOT_HEIGHT_NODE_NAME, DOT_WIDTH_NODE_NAME, FIXEDMILLISECOND_PERIOD_TYPE_STR, FOREGROUND_ALPHA_NODE_NAME, GRADIENT_TYPE_NAME, HEIGHT_NODE_NAME, HORIZONTAL_ORIENTATION, HOUR_PERIOD_TYPE_STR, IMAGE_TYPE_NAME, INCLUDE_LEGEND_NODE_NAME, LEGEND_FONT_NODE_NAME, LEGEND_POSITION_NODE_NAME, LINE_CHART_STR, LINE_STYLE_DASH_STR, LINE_STYLE_DASHDOT_STR, LINE_STYLE_DASHDOTDOT_STR, LINE_STYLE_DOT_STR, LINE_STYLE_NODE_NAME, LINE_STYLE_SOLID_STR, LINE_WIDTH_NODE_NAME, MARKER_VISIBLE_NODE_NAME, MILLISECOND_PERIOD_TYPE_STR, MINUTE_PERIOD_TYPE_STR, MONTH_PERIOD_TYPE_STR, PALETTE_NODE_NAME, PIE_CHART_STR, PIE_GRID_CHART_STR, PLOT_BACKGROUND_NODE_NAME, QUARTER_PERIOD_TYPE_STR, SECOND_PERIOD_TYPE_STR, STEP_AREA_CHART_STR, STEP_CHART_STR, SUBTITLE_NODE_NAME, SUBTITLES_NODE_NAME, TEXTURE_TYPE_NAME, THREED_NODE_NAME, TIME_SERIES_COLLECTION_STR, TITLE_FONT_NODE_NAME, TITLE_NODE_NAME, TITLE_POSITION_NODE_NAME, TYPE_NODE_NAME, VERTICAL_ORIENTATION, WEEK_PERIOD_TYPE_STR, WIDTH_NODE_NAME, XY_SERIES_COLLECTION_STR, XYZ_SERIES_COLLECTION_STR, YEAR_PERIOD_TYPE_STR
 
Constructor Summary
CategoryDatasetChartDefinition(int chartType, IPentahoResultSet data, boolean byRow, IPentahoSession session)
           
CategoryDatasetChartDefinition(IPentahoResultSet data, boolean byRow, Node chartAttributes, IPentahoSession session)
           
CategoryDatasetChartDefinition(IPentahoSession session)
           
CategoryDatasetChartDefinition(IPentahoSession session, Node chartAttributes)
           
 
Method Summary
 void addSubTitle(String subTitle)
           
 void addSubTitles(List subTitleNodes)
           
 Float getBackgroundAlpha()
           
 Paint getBorderPaint()
           
 CategoryLabelPositions getCategoryLabelPositions()
           
 Image getChartBackgroundImage()
           
 Paint getChartBackgroundPaint()
           
 int getChartType()
           
static int getChartType(String typeStr)
          Deprecated. use JFreeChartEngine.getChartType(typeStr), which has all of the chart name options for conversion.
 Font getDomainTickFont()
          Return the java.awt.Font to be used to display the range axis tick labels
 String getDomainTitle()
           
 Font getDomainTitleFont()
           
 Float getForegroundAlpha()
           
 int getHeight()
           
 Font getLegendFont()
          Return the java.awt.Font to be used to display the legend items
 RectangleEdge getLegendPosition()
           
 String getLineStyle()
           
 float getLineWidth()
           
static Log getLogger()
           
 Double getMaxBarWidth()
           
 String getNoDataMessage()
           
 PlotOrientation getOrientation()
           
 Paint[] getPaintSequence()
           
 Image getPlotBackgroundImage()
           
 Paint getPlotBackgroundPaint()
           
 double getRangeMaximum()
          Return the range axis' minimum value
 double getRangeMinimum()
          Return the range axis' minimum value
 Font getRangeTickFont()
          Return the java.awt.Font to be used to display the range axis tick labels
 NumberFormat getRangeTickFormat()
           
 Double getRangeTickUnits()
           
 String getRangeTitle()
           
 Font getRangeTitleFont()
           
 IPentahoSession getSession()
           
 List getSubtitles()
           
 String getTitle()
           
 Font getTitleFont()
          Return the java.awt.Font to be used to display the dial title
 RectangleEdge getTitlePosition()
           
 int getWidth()
           
 boolean isBorderVisible()
           
 boolean isDisplayLabels()
           
 boolean isIncludeNullCategories()
          Return the boolen that states if null categories should be included
 boolean isLegendBorderVisible()
          Return the boolen that states if the legend border is visible
 boolean isLegendIncluded()
           
 boolean isMarkersVisible()
           
 boolean isStacked()
           
 boolean isThreeD()
           
 void setBackgroundAlpha(Node backgroundAlphaNode)
           
 void setBorderPaint(Paint borderPaint)
           
 void setBorderVisible(Node borderVisibleNode)
           
 void setCategoryLabelPositions(CategoryLabelPositions categoryLabelPositions)
           
 void setCategoryLabelRotation(Node rotationDirection, Node rotationAngle)
           
 void setChartBackground(Node chartBackgroundNode)
           
 void setChartBackgroundImage(Node chartBackgroundImageNode)
           
 void setChartBackgroundPaint(Paint chartBackgroundPaint)
           
 void setChartType(Node chartTypeNode)
           
 void setDomainTickFont(Font domainTickFont)
           
 void setDomainTickFont(Node rangeTickFontNode)
           
 void setDomainTitle(Node titleNode)
           
 void setDomainTitleFont(Node titleFontNode)
           
 void setForegroundAlpha(Node foregroundAlphaNode)
           
 void setHeight(Node heightNode)
           
 void setIncludeNullCategories(Node includeNullCategoriesNode)
           
 void setLegendBorderVisible(Node legendBorderVisibleNode)
           
 void setLegendFont(Font legendFont)
          Set java.awt.Font to be used to display the legend items
 void setLegendFont(Node legendFontNode)
           
 void setLegendIncluded(Node legendNode)
           
 void setLegendPosition(Node legendPositionNode)
           
 void setLegendPosition(RectangleEdge legendPosition)
           
 void setLineStyle(Node lineStyleNode)
           
 void setLineStyle(String lineStyle)
           
 void setLineWidth(float lineWidth)
           
 void setLineWidth(Node lineWidthNode)
           
 void setMarkersVisible(boolean markersVisible)
           
 void setMarkersVisible(Node markersVisibleNode)
           
 void setMaxBarWidth(Double maxBarWidth)
           
 void setMaxBarWidth(Node maxBarWidthNode)
           
 void setOrientation(Node orientationNode)
           
 void setOrientation(PlotOrientation orientation)
           
 void setPaintSequence(Node paletteNode)
           
 void setPlotBackground(Node plotBackgroundNode)
           
 void setPlotBackgroundImage(Node plotBackgroundImageNode)
           
 void setPlotBackgroundPaint(Paint plotBackgroundPaint)
           
 void setRangeMaximum(Node rangeMaximumNode)
           
 void setRangeMinimum(Node rangeMinimumNode)
           
 void setRangeTickFont(Font rangeTickFont)
           
 void setRangeTickFont(Node rangeTickFontNode)
           
 void setRangeTickFormat(Node tickFormatFontNode)
           
 void setRangeTickFormat(NumberFormat rangeTickFormat)
           
 void setRangeTickUnits(Node rangeTickUnitsNode)
           
 void setRangeTitle(Node titleNode)
           
 void setRangeTitleFont(Node titleFontNode)
           
 void setSession(IPentahoSession session)
           
 void setStacked(Node stackedNode)
           
 void setThreeD(Node threeDNode)
           
 void setTitle(Node chartTitleNode)
           
 void setTitleFont(Font titleFont)
           
 void setTitleFont(Node titleFontNode)
           
 void setTitlePosition(Node titlePositionNode)
           
 void setTitlePosition(RectangleEdge titlePosition)
           
 void setWidth(Node widthNode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategoryDatasetChartDefinition

public CategoryDatasetChartDefinition(IPentahoSession session)

CategoryDatasetChartDefinition

public CategoryDatasetChartDefinition(IPentahoSession session,
                                      Node chartAttributes)

CategoryDatasetChartDefinition

public CategoryDatasetChartDefinition(int chartType,
                                      IPentahoResultSet data,
                                      boolean byRow,
                                      IPentahoSession session)

CategoryDatasetChartDefinition

public CategoryDatasetChartDefinition(IPentahoResultSet data,
                                      boolean byRow,
                                      Node chartAttributes,
                                      IPentahoSession session)
Method Detail

getLogger

public static Log getLogger()

setChartBackgroundPaint

public void setChartBackgroundPaint(Paint chartBackgroundPaint)
Parameters:
chartBackgroundPaint - The backgroundPaint to set.

getTitleFont

public Font getTitleFont()
Return the java.awt.Font to be used to display the dial title

Specified by:
getTitleFont in interface ChartDefinition
Returns:
Font The Font for the title of this Pie

setTitleFont

public void setTitleFont(Font titleFont)

setTitleFont

public void setTitleFont(Node titleFontNode)

getChartBackgroundPaint

public Paint getChartBackgroundPaint()
Specified by:
getChartBackgroundPaint in interface ChartDefinition
Returns:
Returns the backgroundPaint.

getChartType

public int getChartType()
Returns:
Returns the chartType.

getChartType

@Deprecated
public static int getChartType(String typeStr)
Deprecated. use JFreeChartEngine.getChartType(typeStr), which has all of the chart name options for conversion.

Parameters:
typeStr -
Returns:

setChartType

public void setChartType(Node chartTypeNode)

isThreeD

public boolean isThreeD()
Specified by:
isThreeD in interface ChartDefinition
Returns:
Returns the threeD.

setThreeD

public void setThreeD(Node threeDNode)

isStacked

public boolean isStacked()
Returns:
Returns the stacked.

setStacked

public void setStacked(Node stackedNode)

getHeight

public int getHeight()
Specified by:
getHeight in interface ChartDefinition
Returns:
Returns the height.

setHeight

public void setHeight(Node heightNode)

getWidth

public int getWidth()
Specified by:
getWidth in interface ChartDefinition
Returns:
Returns the width.

setWidth

public void setWidth(Node widthNode)

getTitle

public String getTitle()
Specified by:
getTitle in interface ChartDefinition
Returns:
Returns the title.

setTitle

public void setTitle(Node chartTitleNode)

getPaintSequence

public Paint[] getPaintSequence()
Specified by:
getPaintSequence in interface ChartDefinition
Returns:
Returns the paintSequence.

setPaintSequence

public void setPaintSequence(Node paletteNode)

getSubtitles

public List getSubtitles()
Specified by:
getSubtitles in interface ChartDefinition
Returns:
Returns the subTitles.

addSubTitles

public void addSubTitles(List subTitleNodes)

addSubTitle

public void addSubTitle(String subTitle)

getChartBackgroundImage

public Image getChartBackgroundImage()
Specified by:
getChartBackgroundImage in interface ChartDefinition
Returns:
Returns the chartBackgroundImage.

setChartBackgroundImage

public void setChartBackgroundImage(Node chartBackgroundImageNode)

isLegendIncluded

public boolean isLegendIncluded()
Specified by:
isLegendIncluded in interface ChartDefinition
Returns:
Returns the legendIncluded.

setLegendIncluded

public void setLegendIncluded(Node legendNode)

setPlotBackgroundPaint

public void setPlotBackgroundPaint(Paint plotBackgroundPaint)

getPlotBackgroundPaint

public Paint getPlotBackgroundPaint()
Specified by:
getPlotBackgroundPaint in interface ChartDefinition

getPlotBackgroundImage

public Image getPlotBackgroundImage()
Specified by:
getPlotBackgroundImage in interface ChartDefinition
Returns:
Returns the plotBackgroundImage.

setPlotBackgroundImage

public void setPlotBackgroundImage(Node plotBackgroundImageNode)

getOrientation

public PlotOrientation getOrientation()
Returns:
Returns the orientation.

setOrientation

public void setOrientation(Node orientationNode)

setOrientation

public void setOrientation(PlotOrientation orientation)
Parameters:
orientation - The orientation to set.

getCategoryLabelPositions

public CategoryLabelPositions getCategoryLabelPositions()

setCategoryLabelRotation

public void setCategoryLabelRotation(Node rotationDirection,
                                     Node rotationAngle)

setCategoryLabelPositions

public void setCategoryLabelPositions(CategoryLabelPositions categoryLabelPositions)
Parameters:
categoryLabelPositions - The categoryLabelPositions to set.

isBorderVisible

public boolean isBorderVisible()
Specified by:
isBorderVisible in interface ChartDefinition
Returns:
Returns the borderVisible.

setBorderVisible

public void setBorderVisible(Node borderVisibleNode)

getBorderPaint

public Paint getBorderPaint()
Specified by:
getBorderPaint in interface ChartDefinition
Returns:
Returns the borderPaint.

setBorderPaint

public void setBorderPaint(Paint borderPaint)
Parameters:
borderPaint - The borderPaint to set.

setTitlePosition

public void setTitlePosition(Node titlePositionNode)

setLegendPosition

public void setLegendPosition(Node legendPositionNode)

getTitlePosition

public RectangleEdge getTitlePosition()
Specified by:
getTitlePosition in interface ChartDefinition
Returns:
Returns the titlePosition.

setTitlePosition

public void setTitlePosition(RectangleEdge titlePosition)
Parameters:
titlePosition - The titlePosition to set.

getLegendPosition

public RectangleEdge getLegendPosition()
Specified by:
getLegendPosition in interface ChartDefinition

setLegendPosition

public void setLegendPosition(RectangleEdge legendPosition)

setChartBackground

public void setChartBackground(Node chartBackgroundNode)

setPlotBackground

public void setPlotBackground(Node plotBackgroundNode)

setDomainTitle

public void setDomainTitle(Node titleNode)

getDomainTitle

public String getDomainTitle()
Returns:
Returns the domainTitle.

setRangeTitle

public void setRangeTitle(Node titleNode)

getRangeTitle

public String getRangeTitle()
Returns:
Returns the rangeTitle.

setDomainTitleFont

public void setDomainTitleFont(Node titleFontNode)

getDomainTitleFont

public Font getDomainTitleFont()
Returns:
Returns the domainTitleFont.

getDomainTickFont

public Font getDomainTickFont()
Return the java.awt.Font to be used to display the range axis tick labels

Returns:
Font The Font for the range axis tick labels

setDomainTickFont

public void setDomainTickFont(Font domainTickFont)

setDomainTickFont

public void setDomainTickFont(Node rangeTickFontNode)

setRangeTitleFont

public void setRangeTitleFont(Node titleFontNode)

getRangeTitleFont

public Font getRangeTitleFont()
Returns:
Returns the rangeTitleFont.

getRangeTickFormat

public NumberFormat getRangeTickFormat()
Returns:
Returns the rangeTickFormat.

setRangeTickFormat

public void setRangeTickFormat(NumberFormat rangeTickFormat)
Parameters:
rangeTickFormat - The range tick number format to set.

setRangeTickFormat

public void setRangeTickFormat(Node tickFormatFontNode)

getRangeTickFont

public Font getRangeTickFont()
Return the java.awt.Font to be used to display the range axis tick labels

Returns:
Font The Font for the range axis tick labels

setRangeTickFont

public void setRangeTickFont(Font rangeTickFont)

setRangeTickFont

public void setRangeTickFont(Node rangeTickFontNode)

isDisplayLabels

public boolean isDisplayLabels()
Specified by:
isDisplayLabels in interface ChartDefinition

getSession

public IPentahoSession getSession()

setSession

public void setSession(IPentahoSession session)

getLineStyle

public String getLineStyle()
Returns:
returns the style set for the lines
See Also:
ChartDefinition.LINE_STYLE_SOLID_STR, ChartDefinition.LINE_STYLE_DASH_STR, ChartDefinition.LINE_STYLE_DOT_STR, ChartDefinition.LINE_STYLE_DASHDOT_STR, ChartDefinition.LINE_STYLE_DASHDOTDOT_STR

setLineStyle

public void setLineStyle(String lineStyle)
Parameters:
lineStyle - set the style for all line series
See Also:
ChartDefinition.LINE_STYLE_SOLID_STR, ChartDefinition.LINE_STYLE_DASH_STR, ChartDefinition.LINE_STYLE_DOT_STR, ChartDefinition.LINE_STYLE_DASHDOT_STR, ChartDefinition.LINE_STYLE_DASHDOTDOT_STR

setLineStyle

public void setLineStyle(Node lineStyleNode)
Parameters:
lineStyleNode - set the style from an XML node

getLineWidth

public float getLineWidth()
Returns:
the width of all line series Valid values are float numbers zero or greater

setLineWidth

public void setLineWidth(float lineWidth)
Parameters:
lineWidth - set the width of all line series Valid values are float numbers zero or greater

setLineWidth

public void setLineWidth(Node lineWidthNode)
Parameters:
lineWidthNode - set the line width from an XML node

isMarkersVisible

public boolean isMarkersVisible()
Returns:
boolean whether the markers (data points) for all series are displayed

setMarkersVisible

public void setMarkersVisible(boolean markersVisible)
Parameters:
markersVisible - set whether the markers (data points) for all series should be displayed

setMarkersVisible

public void setMarkersVisible(Node markersVisibleNode)
Parameters:
markersVisibleNode - set the markers visibility from an XML node

getMaxBarWidth

public Double getMaxBarWidth()
Returns:
the max width of all bar series Valid values are double numbers zero or greater

setMaxBarWidth

public void setMaxBarWidth(Double maxBarWidth)
Parameters:
maxBarWidth - set the width of all bar series Valid values are double numbers zero or greater

setMaxBarWidth

public void setMaxBarWidth(Node maxBarWidthNode)
Parameters:
maxBarWidthNode - set the maxBarWidth width from an XML node

getLegendFont

public Font getLegendFont()
Return the java.awt.Font to be used to display the legend items

Specified by:
getLegendFont in interface ChartDefinition
Returns:
Font The font for the legend items

setLegendFont

public void setLegendFont(Font legendFont)
Set java.awt.Font to be used to display the legend items

Parameters:
Font - The java.awt.Font for the legend items

setLegendFont

public void setLegendFont(Node legendFontNode)

setLegendBorderVisible

public void setLegendBorderVisible(Node legendBorderVisibleNode)

setIncludeNullCategories

public void setIncludeNullCategories(Node includeNullCategoriesNode)

isIncludeNullCategories

public boolean isIncludeNullCategories()
Return the boolen that states if null categories should be included

Returns:
boolean Is the legend border visible

isLegendBorderVisible

public boolean isLegendBorderVisible()
Return the boolen that states if the legend border is visible

Specified by:
isLegendBorderVisible in interface ChartDefinition
Returns:
boolean Is the legend border visible

getRangeMinimum

public double getRangeMinimum()
Return the range axis' minimum value

Returns:
double Range axis' minimum value

setRangeMinimum

public void setRangeMinimum(Node rangeMinimumNode)

getRangeMaximum

public double getRangeMaximum()
Return the range axis' minimum value

Returns:
double Range axis' minimum value

setRangeMaximum

public void setRangeMaximum(Node rangeMaximumNode)

setRangeTickUnits

public void setRangeTickUnits(Node rangeTickUnitsNode)

getRangeTickUnits

public Double getRangeTickUnits()

getNoDataMessage

public String getNoDataMessage()
Specified by:
getNoDataMessage in interface ChartDefinition

getBackgroundAlpha

public Float getBackgroundAlpha()
Specified by:
getBackgroundAlpha in interface ChartDefinition

setBackgroundAlpha

public void setBackgroundAlpha(Node backgroundAlphaNode)

getForegroundAlpha

public Float getForegroundAlpha()
Specified by:
getForegroundAlpha in interface ChartDefinition

setForegroundAlpha

public void setForegroundAlpha(Node foregroundAlphaNode)