com.dukascopy.api.drawings
Interface ILeveledChartObject

All Superinterfaces:
IChartDependentChartObject, IChartObject
All Known Subinterfaces:
IAndrewsPitchforkChartObject, IFiboExpansionChartObject, IFiboFanChartObject, IFiboRetracementChartObject, IFiboTimeZonesChartObject, IPercentChartObject

public interface ILeveledChartObject
extends IChartDependentChartObject


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.dukascopy.api.IChartObject
IChartObject.ATTR_BOOLEAN, IChartObject.ATTR_COLOR, IChartObject.ATTR_DOUBLE, IChartObject.ATTR_INT, IChartObject.ATTR_LONG, IChartObject.ATTR_TEXT
 
Field Summary
 
Fields inherited from interface com.dukascopy.api.IChartObject
PROPERTY_FONT, PROPERTY_FOREGROUND_ALPHA, PROPERTY_FOREGROUND_COLOR, PROPERTY_POINT_PRICE, PROPERTY_POINT_TIME, PROPERTY_STICKY, PROPERTY_STROKE
 
Method Summary
 void addLevel(String label, Double value, Color color)
          Adds new level to object levels.
 Color getLevelColor(int index)
          Returns level color by specified index.
 String getLevelLabel(int index)
          Returns level label text by specified index.
 int getLevelsCount()
          Returns number of levels
 Double getLevelValue(int index)
          Returns level value by specified index.
 void removeLevel(int index)
          Removes level by specified index.
 void setLevelColor(int index, Color color)
          Sets color to level, specified by index.
 void setLevelLabel(int index, String label)
          Sets label text to level, specified by index.
 void setLevelValue(int index, Double value)
          Sets value to level, specified by index.
 
Methods inherited from interface com.dukascopy.api.drawings.IChartDependentChartObject
move, setPrice, setTime
 
Methods inherited from interface com.dukascopy.api.IChartObject
addPropertyChangeListener, getAttrBoolean, getAttrColor, getAttrDouble, getAttrInt, getAttrLong, getAttrText, getColor, getKey, getOpacity, getPointsCount, getPrice, getPropertyChangeListeners, getStroke, getText, getTime, getType, isMenuEnabled, isSticky, removePropertyChangeListener, setAttrBoolean, setAttrColor, setAttrDouble, setAttrInt, setAttrLong, setAttrText, setChartObjectListener, setColor, setMenuEnabled, setOpacity, setSticky, setStroke, setText, setText, setText, setText
 

Method Detail

getLevelLabel

String getLevelLabel(int index)
Returns level label text by specified index.

Parameters:
index - - level index.
Returns:
level label text.
Throws:
IllegalArgumentException - - if level index is out of bounds.

setLevelLabel

void setLevelLabel(int index,
                   String label)
Sets label text to level, specified by index.

Parameters:
index - - level index.
label - - text to set.
Throws:
IllegalArgumentException - - if level index is out of bounds.

getLevelValue

Double getLevelValue(int index)
Returns level value by specified index.

Parameters:
index - - level index.
Returns:
level value.
Throws:
IllegalArgumentException - - if level index is out of bounds.

setLevelValue

void setLevelValue(int index,
                   Double value)
Sets value to level, specified by index.

Parameters:
index - - level index.
value - - value to set.
Throws:
IllegalArgumentException - - if level index is out of bounds.

getLevelColor

Color getLevelColor(int index)
Returns level color by specified index.

Parameters:
index - - level index.
Returns:
level color.
Throws:
IllegalArgumentException - - if level index is out of bounds.

setLevelColor

void setLevelColor(int index,
                   Color color)
Sets color to level, specified by index.

Parameters:
index - - level index.
color - - color to set.
Throws:
IllegalArgumentException - - if level index is out of bounds.

addLevel

void addLevel(String label,
              Double value,
              Color color)
Adds new level to object levels.

Parameters:
label - - level label text.
color - - level color.
value - - level value.

removeLevel

void removeLevel(int index)
Removes level by specified index.

Parameters:
index - - index of level to remove.
Throws:
IllegalArgumentException - - if index is out of bounds.

getLevelsCount

int getLevelsCount()
Returns number of levels

Returns:
number of levels


Copyright © 2011. All Rights Reserved.