|
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.AdvanceDeclineGraph
public class AdvanceDeclineGraph
Advance/Decline graph. This graphs the Advance/Decline market indicator. This graph is used to indicate whether trends in the market are short or long lived. If the market is going up and the advance/decline line is going down, there is something wrong.
Field Summary |
---|
Fields inherited from interface org.mov.chart.graph.Graph |
---|
TOOL_TIP_BUFFER |
Constructor Summary | |
---|---|
AdvanceDeclineGraph()
Create a new Advance/Decline graph. |
Method Summary | |
---|---|
static Graphable |
createAdvanceDecline()
Create Advance/Decline graphable. |
double[] |
getAcceptableMajorDeltas()
Return an array of acceptable major deltas for the vertical axis. |
double[] |
getAcceptableMinorDeltas()
Return an array of acceptable minor deltas for the vertical axis. |
java.util.HashMap |
getAnnotations()
Return the annotations for this graph or null if it
does not have any. |
java.lang.Comparable |
getEndX()
Get the last X value that this graph will draw. |
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. |
java.util.HashMap |
getSettings()
Return the graph's current settings. |
java.lang.String |
getSourceName()
Return the name of the source data that we are graphing, e.g. |
java.lang.Comparable |
getStartX()
Get the first X value that this graph will draw. |
java.lang.String |
getToolTipText(java.lang.Comparable x,
int y,
int yoffset,
double verticalScale,
double bottomLineValue)
Get the tool tip text for the given X value and y coordinate. |
GraphUI |
getUI(java.util.HashMap settings)
Return the graph's user interface to allow the user to modify its settings. |
java.util.Set |
getXRange()
Get all X values that this graph will draw. |
java.lang.Double |
getY(java.lang.Comparable x)
Return the Y value for the given X value. |
java.lang.String |
getYLabel(double value)
Convert the Y value to a label to be displayed in the vertical axis. |
boolean |
hasAnnotations()
Return if this graph has any annotations. |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdvanceDeclineGraph()
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
render
in interface 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 java.lang.String getToolTipText(java.lang.Comparable x, int y, int yoffset, double verticalScale, double bottomLineValue)
Graph
getToolTipText
in interface Graph
x
- the X valuey
- the y coordinateyoffset
- y offset from top of graphverticalScale
- vertical scale factorbottomLineValue
- the Y value of the lowest line in the graph
public java.lang.Comparable getStartX()
getStartX
in interface Graph
GraphSource
's Graphable
public java.lang.Comparable getEndX()
getEndX
in interface Graph
GraphSource
's Graphable
public java.util.Set getXRange()
getXRange
in interface Graph
GraphSource
's
Graphable
public java.lang.String getYLabel(double value)
getYLabel
in interface Graph
value
- y value
GraphSource
would displaypublic java.lang.Double getY(java.lang.Comparable x)
getY
in interface Graph
x
- value
GraphSource
public double getHighestY(java.util.List x)
getHighestY
in interface Graph
x
- range of X values
GraphSource
public double getLowestY(java.util.List x)
getLowestY
in interface Graph
x
- range of X values
GraphSource
public double[] getAcceptableMajorDeltas()
getAcceptableMajorDeltas
in interface Graph
GraphSource
public double[] getAcceptableMinorDeltas()
getAcceptableMinorDeltas
in interface Graph
GraphSource
Graph.getAcceptableMajorDeltas()
public java.util.HashMap getAnnotations()
null
if it
does not have any. The annotations should be in a map of X values
to String
values.
public boolean hasAnnotations()
true
if this graph has annotations;
false
otherwisepublic static Graphable createAdvanceDecline()
public java.util.HashMap getSettings()
Graph
getSettings
in interface Graph
public void setSettings(java.util.HashMap settings)
Graph
setSettings
in interface Graph
settings
- the new settingspublic GraphUI getUI(java.util.HashMap settings)
Graph
null
here.
getUI
in interface Graph
settings
- initial settings
null
public java.lang.String getName()
getName
in interface Graph
Advance/Decline
public java.lang.String getSourceName()
Graph
CBA
.
getSourceName
in interface Graph
public boolean isPrimary()
Graph
isPrimary
in interface 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 |