|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mov.chart.graph.AbstractGraph org.mov.chart.graph.CustomGraph
public class CustomGraph
Graph a Gondola expression. This graph allows the user to construct and graph custom indicators.
CustomGraphUI
,
Expression
Field Summary |
---|
Fields inherited from interface org.mov.chart.graph.Graph |
---|
TOOL_TIP_BUFFER |
Constructor Summary | |
---|---|
CustomGraph(GraphSource source,
Symbol symbol,
EODQuoteBundle quoteBundle)
Create a new custom graph. |
Method Summary | |
---|---|
static Graphable |
createCustom(Expression indicator,
Graphable source,
EODQuoteBundle quoteBundle,
Symbol symbol)
Create a new custom graph based on the given graph source and quote bundle. |
double |
getHighestY(java.util.List x)
Return the highest Y value in the given X range. |
double |
getLowestY(java.util.List x)
Return the loweset Y value in the given X range. |
java.lang.String |
getName()
Return the name of this graph. |
GraphUI |
getUI(java.util.HashMap settings)
Return the graph's user interface. |
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. |
void |
setSettings(java.util.HashMap settings)
Set the graph's user definable settings. |
Methods inherited from class org.mov.chart.graph.AbstractGraph |
---|
getAcceptableMajorDeltas, getAcceptableMinorDeltas, getEndX, getSettings, getSource, getSourceName, getStartX, getToolTipText, getXRange, getY, getYLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CustomGraph(GraphSource source, Symbol symbol, EODQuoteBundle quoteBundle)
source
- the source containing the dates to work withsymbol
- the symbol to apply the expressionquoteBundle
- the quote bundle containing the quotesMethod 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 plotpublic double getHighestY(java.util.List x)
AbstractGraph
getHighestY
in interface Graph
getHighestY
in class AbstractGraph
x
- range of X values
GraphSource
public double getLowestY(java.util.List x)
AbstractGraph
getLowestY
in interface Graph
getLowestY
in class AbstractGraph
x
- range of X values
GraphSource
public static Graphable createCustom(Expression indicator, Graphable source, EODQuoteBundle quoteBundle, Symbol symbol)
CustomGraphUI
.
indicator
- the custom indicator expressionsource
- the source containing the dates to work withsymbol
- the symbol to apply the expressionquoteBundle
- the quote bundle containing the quotes
EvaluationException
- if there was an error evaluating the equationpublic void setSettings(java.util.HashMap settings)
AbstractGraph
setSettings
in interface Graph
setSettings
in class AbstractGraph
settings
- the new settingspublic GraphUI getUI(java.util.HashMap settings)
getUI
in interface Graph
getUI
in class AbstractGraph
settings
- the initial settings
public java.lang.String getName()
Custom
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 |