|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.dmonix.util.image.imageobjects.BaseImageObject
org.dmonix.util.image.imageobjects.GraphImageObject
The class will paint one or more graphs on a graphics object.
Differenct colors are allowed for each graph.
Copyright: Copyright (c) 2004
Company: dmonix.org
| Field Summary | |
static int |
GRAPH_TYPE_CUBIC
Uses a cubic style algorithm to connect the dots of the graph. |
static int |
GRAPH_TYPE_QUAD
Uses a quadratic style algorithm to connect the dots of the graph. |
| Constructor Summary | |
GraphImageObject(int width,
int height)
Constructor [obviously]. |
|
| Method Summary | |
void |
addData(int graph,
int value)
Add data to a specific graph. |
int |
addGraph(int graphType,
java.awt.Color color)
Add a new graph to the image. |
void |
paint(java.awt.Graphics2D g2)
Paint the image. |
void |
setXAxisHeaders(java.lang.String[] headers)
Sets the text printed on the x-axis. |
| Methods inherited from class org.dmonix.util.image.imageobjects.BaseImageObject |
calculateXAxisNotchDistanceBasedOnObjects, calculateXAxisNotchDistanceBasedOnValue, calculateYAxisNotchDistanceBasedOnObjects, calculateYAxisNotchDistanceBasedOnValue, drawXAxis, drawYAxis, getBounds |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int GRAPH_TYPE_CUBIC
public static final int GRAPH_TYPE_QUAD
| Constructor Detail |
public GraphImageObject(int width,
int height)
width - The width of the imageheight - The height of the image| Method Detail |
public int addGraph(int graphType,
java.awt.Color color)
graphType - The type of the graphcolor - The color of the graph
GRAPH_TYPE_CUBIC,
GRAPH_TYPE_QUAD
public void addData(int graph,
int value)
graph - The graph to add the data tovalue - The valuepublic void setXAxisHeaders(java.lang.String[] headers)
headers - The textpublic void paint(java.awt.Graphics2D g2)
BaseImageObject
paint in interface ImageObjectpaint in class BaseImageObjectg2 - The graphics object.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||