org.sonar.api.charts
Class AbstractChart
java.lang.Object
org.sonar.api.charts.AbstractChart
- All Implemented Interfaces:
- Chart, Extension, ServerExtension
public abstract class AbstractChart
- extends java.lang.Object
- implements Chart
An extension point to generate JFreeChart charts
- Since:
- 1.10
Method Summary |
protected void |
configureColors(org.jfree.data.Values2D dataset,
org.jfree.chart.plot.CategoryPlot plot,
java.lang.String[] colorsHex)
Helper to set color of series. |
java.awt.image.BufferedImage |
generateImage(ChartParameters params)
Generates a JFreeChart chart using a set of parameters |
protected abstract org.jfree.chart.plot.Plot |
getPlot(ChartParameters params)
|
protected boolean |
hasLegend()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.sonar.api.charts.Chart |
getKey |
FONT_SIZE
public static final int FONT_SIZE
- See Also:
- Constant Field Values
OUTLINE_COLOR
public static final java.awt.Color OUTLINE_COLOR
GRID_COLOR
public static final java.awt.Color GRID_COLOR
COLORS
public static final java.awt.Color[] COLORS
AbstractChart
public AbstractChart()
getPlot
protected abstract org.jfree.chart.plot.Plot getPlot(ChartParameters params)
hasLegend
protected boolean hasLegend()
generateImage
public java.awt.image.BufferedImage generateImage(ChartParameters params)
- Generates a JFreeChart chart using a set of parameters
- Specified by:
generateImage
in interface Chart
- Parameters:
params
- the chart parameters
- Returns:
- the generated chart
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
configureColors
protected void configureColors(org.jfree.data.Values2D dataset,
org.jfree.chart.plot.CategoryPlot plot,
java.lang.String[] colorsHex)
- Helper to set color of series. If the parameter colorsHex is null, then default Sonar colors are used.
Copyright © 2009-2010 SonarSource SA. All Rights Reserved.