com.dukascopy.api
Interface IChartObject


public interface IChartObject

Represents graphical object on the chart

Author:
Denis Larka

Method Summary
 Color getColor()
          Returns color of the object
 String getKey()
           
 int getPointsCount()
           
 double getPrice(int pointIndex)
           
 Stroke getStroke()
          Returns stroke that is used for object rendering
 long getTime(int pointIndex)
           
 IChart.Type getType()
          Returns type of the graphical object
 void move(long time, double price)
          Moves first point of the object to the new position dragging whole object with all other points
 void setColor(Color color)
          Sets color of the object
 void setStroke(Stroke stroke)
          Sets stroke for object rendering
 void setText(String text)
          Sets text to show with the object.
 void setText(String text, Font font)
          Sets text to show with the object.
 

Method Detail

move

void move(long time,
          double price)
Moves first point of the object to the new position dragging whole object with all other points

Parameters:
time - new time of the first point
price - new price of the first point

setText

void setText(String text)
Sets text to show with the object. Ignored if object doesn't support text

Parameters:
text - text to show

setText

void setText(String text,
             Font font)
Sets text to show with the object. Ignored if object doesn't support text

Parameters:
text - text to show
font - font to use for text rendering

getColor

Color getColor()
Returns color of the object

Returns:
color

setColor

void setColor(Color color)
Sets color of the object

Parameters:
color - color to use for object rendering

getStroke

Stroke getStroke()
Returns stroke that is used for object rendering

Returns:
stroke

setStroke

void setStroke(Stroke stroke)
Sets stroke for object rendering

Parameters:
stroke - stroke to use for object rendering

getType

IChart.Type getType()
Returns type of the graphical object

Returns:
type of the grphical object

getKey

String getKey()
Returns:
unique key of this object

getTime

long getTime(int pointIndex)
Parameters:
pointIndex - which determines which coordinate should be used to obtain time
Returns:
time of the coordinate

getPrice

double getPrice(int pointIndex)
Parameters:
pointIndex - which determines which coordinate should be used to obtain price
Returns:
price of the coordinate

getPointsCount

int getPointsCount()
Returns:
minimal count of points which are used to set this chart object


Copyright © 2009. All Rights Reserved.