Chart Builder API (beta)

oracle.ord.media.chart.types
Class CandlestickDesc

java.lang.Object
  |
  +--oracle.ord.media.chart.types.CandlestickDesc

public class CandlestickDesc
extends java.lang.Object

CandlestickDesc objects are used to customize the graphic drawn for candlesticks in stock charts, and are normally supplied as arguments to setYSeriesGraphic(). Users have control of the width and colors of the candlestick's Real Body and Shadow. The Real Body is the rectangle demarcating the open and close values. The Shadow is the line that demarcates the high and low value.

By default, the Real Body is white for "up" days (when the close exceeds the open), and is black for "down" days. The colors can be changed by invoking the multiple argument CandlestickDesc constructor, or by using the setRealBodyColorDown() or the setRealBodyColorUp() functions.

The default color for the Shadow is black. This can be changed with the multiple argument CandlestickDesc constructor, or by using the setShadowColor() function.

By default, the width of the Real Body is 90% of the space available within an interval. This metric can be changed with the setRealBodyWidthFraction() function, or by using the multiple argument CandlestickDesc constructor. It is also possible to specify the width of the Real Body in absolute terms (pixels) with setRealBodyWidth() or with the appropriate multiple argument CandlestickDesc constructor.


Constructor Summary
CandlestickDesc()
           
 
Method Summary
 java.awt.Color getRealBodyColorDown()
          Get the color of the Real Body associated with down days.
 java.awt.Color getRealBodyColorUp()
          Get the color of the Real Body associated with up days.
 int getRealBodyWidth()
          Get the width of the Real Body.
 double getRealBodyWidthFraction()
          Get the fractional width of the Real Body.
 java.awt.Color getShadowColor()
          Get the color of the Shadow.
 int getShadowWidth()
          Get the width of the Shadow.
 void setRealBodyColorDown(java.awt.Color realBodyColorDown)
          Set the color of the Real Body for "down" days.
 void setRealBodyColorUp(java.awt.Color realBodyColorUp)
          Set the color of the Real Body for "up" days.
 void setRealBodyWidth(int realBodyWidth)
          Set the Real Body width, in pixels.
 void setRealBodyWidthFraction(double RealBodyWidthFraction)
          Set the Real Body fraction, a value between 0 and 1.
 void setShadowColor(java.awt.Color shadowColor)
          Set the Shadow color.
 void setShadowWidth(int shadowWidth)
          Set the Shadow width (in pixels).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CandlestickDesc

public CandlestickDesc()
Method Detail

setRealBodyColorUp

public void setRealBodyColorUp(java.awt.Color realBodyColorUp)
Set the color of the Real Body for "up" days.
Parameters:
- realBodyColorUp Color of the Real Body when close is higher than open.

setRealBodyColorDown

public void setRealBodyColorDown(java.awt.Color realBodyColorDown)
Set the color of the Real Body for "down" days.
Parameters:
- realBodyColorDown Color of the Real Body when close is lower than open.

setShadowColor

public void setShadowColor(java.awt.Color shadowColor)
Set the Shadow color.
Parameters:
- shadowColor Color of the Shadow.

setShadowWidth

public void setShadowWidth(int shadowWidth)
Set the Shadow width (in pixels).
Parameters:
- shadowWidth Width of the Shadow.

setRealBodyWidth

public void setRealBodyWidth(int realBodyWidth)
Set the Real Body width, in pixels.
Parameters:
- realBodyWidth Width of the real body (in pixels).

setRealBodyWidthFraction

public void setRealBodyWidthFraction(double RealBodyWidthFraction)
Set the Real Body fraction, a value between 0 and 1.
Parameters:
- realBodyWidthFraction Fraction (between 0.0 and 1.0) denoting the width of the real body as a fraction of the interval width.

getRealBodyColorUp

public java.awt.Color getRealBodyColorUp()
Get the color of the Real Body associated with up days.

getRealBodyColorDown

public java.awt.Color getRealBodyColorDown()
Get the color of the Real Body associated with down days.

getShadowColor

public java.awt.Color getShadowColor()
Get the color of the Shadow.

getRealBodyWidth

public int getRealBodyWidth()
Get the width of the Real Body.

getShadowWidth

public int getShadowWidth()
Get the width of the Shadow.

getRealBodyWidthFraction

public double getRealBodyWidthFraction()
Get the fractional width of the Real Body.

Chart Builder API (beta)