|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jCharts.Chart
Base class of all charts.
Field Summary | |
private java.awt.image.BufferedImage |
bufferedImage
|
private ChartProperties |
chartProperties
|
private boolean |
generateImageMap
|
private java.awt.Graphics2D |
graphics2D
|
private int |
height
|
private ImageMap |
imageMap
|
private Legend |
legend
|
private int |
width
|
Constructor Summary | |
Chart(LegendProperties legendProperties,
ChartProperties chartProperties,
int pixelWidth,
int pixelHeight)
Constructor |
Method Summary | |
java.awt.image.BufferedImage |
getBufferedImage()
Returns the BufferedImage used to generate the ImageMap. |
ChartProperties |
getChartProperties()
Returns the general properties Object. |
boolean |
getGenerateImageMapFlag()
Returns flag indicating whether to generate an ImageMap |
java.awt.Graphics2D |
getGraphics2D()
Shortcut method to get Graphics2D. |
int |
getImageHeight()
Returns the BufferedImage height |
ImageMap |
getImageMap()
|
int |
getImageWidth()
Returns the BufferedImage width |
protected Legend |
getLegend()
Returns the Legend. |
boolean |
hasLegend()
Returns flag indicating if there is a Legend. |
void |
render()
Call this to kick off rendering of the chart |
protected abstract void |
renderChart()
|
protected float |
renderChartTitle(java.lang.String chartTitle,
java.awt.font.FontRenderContext fontRenderContext)
Displays the chart title and returns the height of the title PLUS title padding. |
void |
renderWithImageMap()
Renders the chart into a BufferedImage so that we can calculate all the Image Map coordinates. |
void |
setGraphics2D(java.awt.Graphics2D graphics2D)
Sets the graphics object to render the chart on by the encoder. |
void |
setImageMap(ImageMap imageMap)
To optimze performance of the ImageMap Object, we create it once we know how many data elements are in the chart which is dependent on the AxisChart or PieChart2D |
void |
toHTML(HTMLGenerator htmlGenerator,
java.lang.String imageFileName,
ImageMap imageMap)
Enables the testing routines to display the contents of this Object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.awt.Graphics2D graphics2D
private int width
private int height
private Legend legend
private ChartProperties chartProperties
private boolean generateImageMap
private ImageMap imageMap
private java.awt.image.BufferedImage bufferedImage
Constructor Detail |
public Chart(LegendProperties legendProperties, ChartProperties chartProperties, int pixelWidth, int pixelHeight)
legendProperties
- chartProperties
- pixelWidth
- pixelHeight
- Method Detail |
public boolean getGenerateImageMapFlag()
public java.awt.image.BufferedImage getBufferedImage()
public void renderWithImageMap() throws ChartDataException, PropertyException
ChartDataException
PropertyException
public void render() throws ChartDataException, PropertyException
ChartDataException
PropertyException
protected float renderChartTitle(java.lang.String chartTitle, java.awt.font.FontRenderContext fontRenderContext)
chartTitle
- fontRenderContext
-
protected abstract void renderChart() throws ChartDataException, PropertyException
ChartDataException
PropertyException
public final int getImageWidth()
public final int getImageHeight()
public final ChartProperties getChartProperties()
protected final Legend getLegend()
public final boolean hasLegend()
public final void setGraphics2D(java.awt.Graphics2D graphics2D)
graphics2D
- public final java.awt.Graphics2D getGraphics2D()
public final void setImageMap(ImageMap imageMap)
imageMap
- public final ImageMap getImageMap()
public void toHTML(HTMLGenerator htmlGenerator, java.lang.String imageFileName, ImageMap imageMap)
htmlGenerator
- imageFileName
- imageMap
- if this is NULL we are not creating image map data in html
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |