com.jrefinery.chart
Class HighLow

java.lang.Object
  extended by com.jrefinery.chart.HighLow

public class HighLow
extends java.lang.Object

Represents one point in the high/low/open/close plot.

All the coordinates in this class are in Java2D space.


Field Summary
static int CLOSE
          Useful constant for open/close value types.
static int OPEN
          Useful constant for open/close value types.
 
Constructor Summary
HighLow(double x, double high, double low)
          Constructs a high-low item, with default values for the open/close and colors.
HighLow(double x, double high, double low, double open, double close)
          Constructs a high-low item, with default values for the colors.
HighLow(double x, double high, double low, double open, double close, java.awt.Stroke stroke, java.awt.Paint paint)
          Constructs a high-low item.
 
Method Summary
 java.awt.geom.Rectangle2D getBounds()
           
 java.awt.geom.Line2D getCloseTickLine()
          Returns the line.
 java.awt.geom.Line2D getLine()
          Returns the line.
 java.awt.geom.Line2D getOpenTickLine()
          Returns the line for open tick.
 java.awt.Paint getPaint()
          Returns the Paint object used to color the line.
 java.awt.Stroke getStroke()
          Returns the Stroke object used to draw the line.
 double getTickSize()
          Returns the width of the open/close tick.
 double getValue(int valueType)
          Returns either OPEN or Close value depending on the valueType.
 void setTickSize(double newSize)
          Sets the width of the open/close tick.
 void setValue(int valueType, double newValue)
          Sets either OPEN or Close value depending on the valueType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPEN

public static final int OPEN
Useful constant for open/close value types.

See Also:
Constant Field Values

CLOSE

public static final int CLOSE
Useful constant for open/close value types.

See Also:
Constant Field Values
Constructor Detail

HighLow

public HighLow(double x,
               double high,
               double low)
Constructs a high-low item, with default values for the open/close and colors.

Parameters:
x -
high -
low -

HighLow

public HighLow(double x,
               double high,
               double low,
               double open,
               double close)
Constructs a high-low item, with default values for the colors.

Parameters:
x -
high -
low -
open -
close -

HighLow

public HighLow(double x,
               double high,
               double low,
               double open,
               double close,
               java.awt.Stroke stroke,
               java.awt.Paint paint)
Constructs a high-low item.

Parameters:
x -
high -
low -
open -
close -
stroke -
paint -
Method Detail

setTickSize

public void setTickSize(double newSize)
Sets the width of the open/close tick.

Parameters:
newSize -

getTickSize

public double getTickSize()
Returns the width of the open/close tick.


getLine

public java.awt.geom.Line2D getLine()
Returns the line.


getBounds

public java.awt.geom.Rectangle2D getBounds()

getValue

public double getValue(int valueType)
Returns either OPEN or Close value depending on the valueType.

Parameters:
valueType -

setValue

public void setValue(int valueType,
                     double newValue)
Sets either OPEN or Close value depending on the valueType.

Parameters:
valueType -
newValue -

getOpenTickLine

public java.awt.geom.Line2D getOpenTickLine()
Returns the line for open tick.


getCloseTickLine

public java.awt.geom.Line2D getCloseTickLine()
Returns the line. for close tick


getStroke

public java.awt.Stroke getStroke()
Returns the Stroke object used to draw the line.


getPaint

public java.awt.Paint getPaint()
Returns the Paint object used to color the line.



Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.