|
Venice 0.7beta | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mov.chart.graph.AbstractGraph
org.mov.chart.graph.LineGraph
public class LineGraph
Simple line graph. This graph is used to draw any kind of line such as day close, day open, day high, day low etc.
| Field Summary |
|---|
| Fields inherited from interface org.mov.chart.graph.Graph |
|---|
TOOL_TIP_BUFFER |
| Constructor Summary | |
|---|---|
LineGraph(GraphSource source,
java.lang.String name,
boolean isPrimary)
Create a new simple line graph. |
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
Return the name of this graph. |
java.lang.String |
getToolTipText(java.lang.Comparable x,
int yCoordinate,
int yoffset,
double verticalScale,
double bottomLineValue)
Get the tool tip text for the given X value and y coordinate. |
boolean |
isPrimary()
Return whether the graph is a primary graph. |
void |
render(java.awt.Graphics g,
java.awt.Color colour,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double bottomLineValue,
java.util.List xRange)
Draw the graph. |
| Methods inherited from class org.mov.chart.graph.AbstractGraph |
|---|
getAcceptableMajorDeltas, getAcceptableMinorDeltas, getEndX, getHighestY, getLowestY, getSettings, getSource, getSourceName, getStartX, getUI, getXRange, getY, getYLabel, setSettings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LineGraph(GraphSource source,
java.lang.String name,
boolean isPrimary)
source - the source to rendername - the graph nameisPrimary - is this a primary graph?| Method Detail |
|---|
public void render(java.awt.Graphics g,
java.awt.Color colour,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double bottomLineValue,
java.util.List xRange)
Graph
g - the Graphics object to render tocolour - the colour the graph should be rendered in; override
this if the graph should be drawn in
a certain colour - such as a Moving Average graphxoffset - the x offset in the graphics object where the graph
startsyoffset - the y offset in the graphics object where the graph
startshorizontalScale - horizontal scale factor; use this to convert
between X value in the xRange to a
cartesian coordinate xverticalScale - vertical scale factor; use this to convert
between Y value to a cartesian coordinate ybottomLineValue - the Y value of the lowest line in the graphxRange - a List of Comparable
that contain the X values to plot
public java.lang.String getToolTipText(java.lang.Comparable x,
int yCoordinate,
int yoffset,
double verticalScale,
double bottomLineValue)
AbstractGraph
getToolTipText in interface GraphgetToolTipText in class AbstractGraphx - the X valueyCoordinate - the y coordinateyoffset - y offset from top of graphverticalScale - vertical scale factorbottomLineValue - the Y value of the lowest line in the graph
GraphSourcepublic java.lang.String getName()
public boolean isPrimary()
Graph
true if the graph is a primary graph
|
Venice 0.7beta | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||