net.sourceforge.eclipsetrader.charts
Class PlotLine

java.lang.Object
  extended bynet.sourceforge.eclipsetrader.charts.PlotLine

public class PlotLine
extends java.lang.Object


Field Summary
static int BAR
           
static int CANDLE
           
static int DASH
           
static int DOT
           
static int HISTOGRAM
           
static int HISTOGRAM_BAR
           
static int HORIZONTAL
           
static int INVISIBLE
           
static int LINE
           
 
Constructor Summary
PlotLine()
           
PlotLine(BarData barData, int field)
           
PlotLine(java.lang.String label)
           
PlotLine(java.lang.String label, BarData barData, int field)
           
 
Method Summary
 void append(Bar bar)
           
 void append(org.eclipse.swt.graphics.Color color, Bar bar)
           
 void append(org.eclipse.swt.graphics.Color color, double open, double high, double low, double close)
           
 void append(double value)
          Add a value to the line.
 void append(java.lang.Double value)
          Add a value to the line.
 void append(double value, org.eclipse.swt.graphics.Color color)
          Add a value and it's color to the line.
 void append(java.lang.Double value, org.eclipse.swt.graphics.Color color)
          Add a value and it's color to the line.
 void append(double open, double high, double low, double close)
           
 void appendColorBar(org.eclipse.swt.graphics.Color color)
           
 void dispose()
          Disposes the operating system resources associated with this object.
 Bar getBar(int index)
           
 Bar getBarData(int index)
           
 org.eclipse.swt.graphics.Color getColor()
          Get the color used to draw this line.
 org.eclipse.swt.graphics.Color getColor(int index)
          Get the color used to draw the line value at the specificed position.
 java.lang.Object getData()
           
 double getData(int index)
          Get the line value at the specified position.
 java.lang.Object getData(java.lang.String key)
           
 java.lang.Double getDouble(int index)
           
 double getDoubleValue(int index)
           
 double getHigh()
           
 java.lang.String getLabel()
          Return the descriptive label of this line.
 int getLineWidth()
           
 double getLow()
           
 boolean getScaleFlag()
           
 int getSize()
          Get the number of values in the list.
 int getType()
           
 java.util.Iterator iterator()
           
 void prepend(Bar bar)
           
 void prepend(org.eclipse.swt.graphics.Color color, Bar bar)
           
 void prepend(org.eclipse.swt.graphics.Color color, double open, double high, double low, double close)
           
 void prepend(double value)
          Add a value to the beginning of the line.
 void prepend(java.lang.Double value)
          Add a value to the beginning of the line.
 void prepend(double value, org.eclipse.swt.graphics.Color color)
          Add a value and it's color to the beginning of the line.
 void prepend(java.lang.Double value, org.eclipse.swt.graphics.Color color)
          Add a value and it's color to the beginning of the line.
 void prepend(double open, double high, double low, double close)
           
 void prependColorBar(org.eclipse.swt.graphics.Color color)
           
 void setColor(org.eclipse.swt.graphics.Color color)
          Set the color used to draw this line.
 void setData(int index, double value)
           
 void setData(java.lang.Object data)
           
 void setData(java.lang.String key, java.lang.Object data)
           
 void setHigh(double high)
           
 void setLabel(java.lang.String label)
          Set the descriptive label for this line.
 void setLineWidth(int lineWidth)
           
 void setLow(double low)
           
 void setScaleFlag(boolean scaleFlag)
           
 void setType(int lineStyle)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOT

public static final int DOT
See Also:
Constant Field Values

DASH

public static final int DASH
See Also:
Constant Field Values

HISTOGRAM

public static final int HISTOGRAM
See Also:
Constant Field Values

HISTOGRAM_BAR

public static final int HISTOGRAM_BAR
See Also:
Constant Field Values

LINE

public static final int LINE
See Also:
Constant Field Values

INVISIBLE

public static final int INVISIBLE
See Also:
Constant Field Values

HORIZONTAL

public static final int HORIZONTAL
See Also:
Constant Field Values

BAR

public static final int BAR
See Also:
Constant Field Values

CANDLE

public static final int CANDLE
See Also:
Constant Field Values
Constructor Detail

PlotLine

public PlotLine()

PlotLine

public PlotLine(BarData barData,
                int field)

PlotLine

public PlotLine(java.lang.String label)

PlotLine

public PlotLine(java.lang.String label,
                BarData barData,
                int field)
Method Detail

dispose

public void dispose()
Disposes the operating system resources associated with this object.


getLabel

public java.lang.String getLabel()
Return the descriptive label of this line.

Returns:
the line label

setLabel

public void setLabel(java.lang.String label)
Set the descriptive label for this line.

Parameters:
label - - the line label

getColor

public org.eclipse.swt.graphics.Color getColor()
Get the color used to draw this line.

Returns:
the color to use

setColor

public void setColor(org.eclipse.swt.graphics.Color color)
Set the color used to draw this line.

Parameters:
color - - the color

getColor

public org.eclipse.swt.graphics.Color getColor(int index)
Get the color used to draw the line value at the specificed position.

Parameters:
index - - the value position
Returns:
- the color to use

getType

public int getType()

setType

public void setType(int lineStyle)

getLineWidth

public int getLineWidth()

setLineWidth

public void setLineWidth(int lineWidth)

append

public void append(java.lang.Double value)
Add a value to the line.

Parameters:
value - - the value to add

append

public void append(java.lang.Double value,
                   org.eclipse.swt.graphics.Color color)
Add a value and it's color to the line.

Parameters:
value - - the value to add
color - - the color

append

public void append(double value)
Add a value to the line.

Parameters:
value - - the value to add

append

public void append(double value,
                   org.eclipse.swt.graphics.Color color)
Add a value and it's color to the line.

Parameters:
value - - the value to add
color - - the color

append

public void append(double open,
                   double high,
                   double low,
                   double close)

append

public void append(org.eclipse.swt.graphics.Color color,
                   double open,
                   double high,
                   double low,
                   double close)

append

public void append(Bar bar)

append

public void append(org.eclipse.swt.graphics.Color color,
                   Bar bar)

appendColorBar

public void appendColorBar(org.eclipse.swt.graphics.Color color)

prepend

public void prepend(java.lang.Double value)
Add a value to the beginning of the line.

Parameters:
value - - the value to add

prepend

public void prepend(java.lang.Double value,
                    org.eclipse.swt.graphics.Color color)
Add a value and it's color to the beginning of the line.

Parameters:
value - - the value to add
color - - the color

prepend

public void prepend(double value)
Add a value to the beginning of the line.

Parameters:
value - - the value to add

prepend

public void prepend(double value,
                    org.eclipse.swt.graphics.Color color)
Add a value and it's color to the beginning of the line.

Parameters:
value - - the value to add
color - - the color

prepend

public void prepend(double open,
                    double high,
                    double low,
                    double close)

prepend

public void prepend(org.eclipse.swt.graphics.Color color,
                    double open,
                    double high,
                    double low,
                    double close)

prepend

public void prepend(Bar bar)

prepend

public void prepend(org.eclipse.swt.graphics.Color color,
                    Bar bar)

prependColorBar

public void prependColorBar(org.eclipse.swt.graphics.Color color)

getDouble

public java.lang.Double getDouble(int index)

getDoubleValue

public double getDoubleValue(int index)

getBar

public Bar getBar(int index)

getSize

public int getSize()
Get the number of values in the list.

Returns:
the number of values

iterator

public java.util.Iterator iterator()

getData

public double getData(int index)
Get the line value at the specified position.

Parameters:
index - - the position of the value
Returns:
the value

setData

public void setData(int index,
                    double value)

getBarData

public Bar getBarData(int index)

getScaleFlag

public boolean getScaleFlag()

setScaleFlag

public void setScaleFlag(boolean scaleFlag)

getHigh

public double getHigh()

setHigh

public void setHigh(double high)

getLow

public double getLow()

setLow

public void setLow(double low)

getData

public java.lang.Object getData()

getData

public java.lang.Object getData(java.lang.String key)

setData

public void setData(java.lang.Object data)

setData

public void setData(java.lang.String key,
                    java.lang.Object data)