hudson.plugins.findbugs.util
Class CategoryBuildResultGraph

java.lang.Object
  extended by hudson.plugins.findbugs.util.BuildResultGraph
      extended by hudson.plugins.findbugs.util.CategoryBuildResultGraph
Direct Known Subclasses:
HealthGraph, NewVersusFixedGraph, PriorityGraph

public abstract class CategoryBuildResultGraph
extends BuildResultGraph

A build result graph using a CategoryPlot. Uses a template method to create a graph based on a series of build results.

Author:
Ulli Hafner

Constructor Summary
CategoryBuildResultGraph()
           
 
Method Summary
protected abstract  java.util.List<java.lang.Integer> computeSeries(BuildResult current)
          Returns the series to plot for the specified build result.
 org.jfree.chart.JFreeChart create(GraphConfiguration configuration, ResultAction<? extends BuildResult> resultAction, java.lang.String pluginName)
          Creates a PNG image trend graph with clickable map.
 org.jfree.chart.JFreeChart createAreaChart(org.jfree.data.category.CategoryDataset dataset)
          Creates a stacked area graph from the specified data set.
 org.jfree.chart.JFreeChart createBlockChart(org.jfree.data.category.CategoryDataset dataset)
          Creates a stacked block graph from the specified data set.
protected abstract  org.jfree.chart.JFreeChart createChart(org.jfree.data.category.CategoryDataset dataSet)
          Creates the chart for the specified data set.
protected  org.jfree.chart.JFreeChart createChart(GraphConfiguration configuration, ResultAction<? extends BuildResult> resultAction)
          Creates the chart by iterating through all available actions.
protected abstract  org.jfree.chart.renderer.category.CategoryItemRenderer createRenderer(java.lang.String pluginName, ToolTipProvider toolTipProvider)
          Creates the renderer for this graph.
protected abstract  java.awt.Color[] getColors()
          Returns the colors for this graph.
protected  void setCategoryPlotProperties(org.jfree.chart.plot.CategoryPlot plot)
          Sets properties common to all category graphs of this plug-in.
protected  void setColors(org.jfree.chart.JFreeChart chart, java.awt.Color[] colors)
          Sets the series colors for the specified chart.
 
Methods inherited from class hudson.plugins.findbugs.util.BuildResultGraph
computeDayDelta, createXYChart, getRootUrl, setPlotProperties, setRootUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategoryBuildResultGraph

public CategoryBuildResultGraph()
Method Detail

create

public org.jfree.chart.JFreeChart create(GraphConfiguration configuration,
                                         ResultAction<? extends BuildResult> resultAction,
                                         java.lang.String pluginName)
Creates a PNG image trend graph with clickable map.

Specified by:
create in class BuildResultGraph
Parameters:
configuration - the configuration parameters
resultAction - the result action to start the graph computation from
pluginName - the name of the plug-in
Returns:
the graph

createChart

protected org.jfree.chart.JFreeChart createChart(GraphConfiguration configuration,
                                                 ResultAction<? extends BuildResult> resultAction)
Creates the chart by iterating through all available actions.

Parameters:
configuration - the configuration parameters
resultAction - the action to start with
Returns:
the created chart

computeSeries

protected abstract java.util.List<java.lang.Integer> computeSeries(BuildResult current)
Returns the series to plot for the specified build result.

Parameters:
current - the current build result
Returns:
the series to plot

createChart

protected abstract org.jfree.chart.JFreeChart createChart(org.jfree.data.category.CategoryDataset dataSet)
Creates the chart for the specified data set.

Parameters:
dataSet - the data set to show in the graph
Returns:
the created graph

createRenderer

protected abstract org.jfree.chart.renderer.category.CategoryItemRenderer createRenderer(java.lang.String pluginName,
                                                                                         ToolTipProvider toolTipProvider)
Creates the renderer for this graph.

Parameters:
pluginName - the name of the plug-in
toolTipProvider - the tooltip provider
Returns:
the renderer

getColors

protected abstract java.awt.Color[] getColors()
Returns the colors for this graph. The first color is used for the first series value, etc.

Returns:
the colors

setColors

protected void setColors(org.jfree.chart.JFreeChart chart,
                         java.awt.Color[] colors)
Sets the series colors for the specified chart.

Parameters:
chart - the chart
colors - the colors to set

setCategoryPlotProperties

protected void setCategoryPlotProperties(org.jfree.chart.plot.CategoryPlot plot)
Sets properties common to all category graphs of this plug-in.

Parameters:
plot - the chart to set the properties for

createAreaChart

public org.jfree.chart.JFreeChart createAreaChart(org.jfree.data.category.CategoryDataset dataset)
Creates a stacked area graph from the specified data set.

Parameters:
dataset - the values to display
Returns:
the created graph

createBlockChart

public org.jfree.chart.JFreeChart createBlockChart(org.jfree.data.category.CategoryDataset dataset)
Creates a stacked block graph from the specified data set.

Parameters:
dataset - the values to display
Returns:
the created graph


Copyright © 2009. All Rights Reserved.