com.dukascopy.api
Interface IIndicatorPanel

All Superinterfaces:
IChartPanel

public interface IIndicatorPanel
extends IChartPanel


Method Summary
 void add(IChartObject chartObject)
          Adds object of IChartObject type to current panel.
 IChartPanel add(IIndicator indicator)
          Adds indicator to the current panel.
 IChartPanel add(IIndicator indicator, java.lang.Object[] optParams)
          Adds indicator to the current panel by specifying initial optional parameters values If optParams equals to null - default ones will be taken instead
 IChartPanel add(IIndicator indicator, java.lang.Object[] optParams, java.awt.Color[] outputColors, OutputParameterInfo.DrawingStyle[] outputDrawingStyles, int[] outputWidths)
          Adds indicator to the current panel by specifying initial optional parameters values, curves colors, drawing styles and line widths If output params are nulls - default ones will be taken instead
 IChartObject get(java.lang.String chartObjectKey)
          Returns IChartObject instance by key if any exist on this panel.
 java.util.List<IChartObject> getAll()
          Returns all graphical objects on this panel.
 java.util.List<IIndicator> getIndicators()
          Returns only indicators applied to current panel.
 double getMaxPrice()
          Returns maximal value of base indicator placed on this panel
 double getMinPrice()
          Returns minimal value of base indicator placed on this panel
 boolean isActive()
          If true indicates that this panel is still visible on chart.
 void remove(IChartObject chartObject)
          Deletes specified graphical object from this panel.
 IChartObject remove(java.lang.String chartObjectKey)
          Deletes graphical object from this panel by key.
 void removeAll()
          Removes all graphical objects from this panel.
 void removeIndicator(IIndicator indicator)
          {@inheritDoc
 
Methods inherited from interface com.dukascopy.api.IChartPanel
addMouseListener, getMouseListeners, removeMouseListener
 

Method Detail

add

IChartPanel add(IIndicator indicator)
Adds indicator to the current panel.

Specified by:
add in interface IChartPanel
Parameters:
indicator - as IIndicator
Returns:
IChartPanel instance where indicator is put on.
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

add

IChartPanel add(IIndicator indicator,
                java.lang.Object[] optParams)
Adds indicator to the current panel by specifying initial optional parameters values If optParams equals to null - default ones will be taken instead

Specified by:
add in interface IChartPanel
Parameters:
indicator - as IIndicator
optParams - as Object[]
Returns:
IChartPanel instance where indicator is put on.
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

add

IChartPanel add(IIndicator indicator,
                java.lang.Object[] optParams,
                java.awt.Color[] outputColors,
                OutputParameterInfo.DrawingStyle[] outputDrawingStyles,
                int[] outputWidths)
Adds indicator to the current panel by specifying initial optional parameters values, curves colors, drawing styles and line widths If output params are nulls - default ones will be taken instead

Specified by:
add in interface IChartPanel
Parameters:
indicator - as IIndicator
optParams - as Object[]
outputColors - as Color[]
outputDrawingStyles - as DrawingStyle[]
outputWidths - as int[]
Returns:
IChartPanel instance where indicator is put on.
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

getIndicators

java.util.List<IIndicator> getIndicators()
Returns only indicators applied to current panel.

Specified by:
getIndicators in interface IChartPanel
Returns:
List
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

add

void add(IChartObject chartObject)
Adds object of IChartObject type to current panel. Please note that only one instance of object can be added per chart.
Note: global chart objects (e.g. Time Marker) are not allowed on IIndicatorPanel and will cause IllegalArgumentException

Specified by:
add in interface IChartPanel
Parameters:
chartObject - - instance of IChartObject super type.
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

get

IChartObject get(java.lang.String chartObjectKey)
Returns IChartObject instance by key if any exist on this panel.

Specified by:
get in interface IChartPanel
Parameters:
chartObjectKey - unique id
Returns:
IChartObject or null if no object was found by specified key
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

getAll

java.util.List<IChartObject> getAll()
Returns all graphical objects on this panel.

Specified by:
getAll in interface IChartPanel
Returns:
list of all graphical objects on the chart
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

getMinPrice

double getMinPrice()
Returns minimal value of base indicator placed on this panel

Specified by:
getMinPrice in interface IChartPanel
Returns:
minimal value of the vertical scale
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

getMaxPrice

double getMaxPrice()
Returns maximal value of base indicator placed on this panel

Specified by:
getMaxPrice in interface IChartPanel
Returns:
maximal value of the vertical scale
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

removeIndicator

void removeIndicator(IIndicator indicator)
{@inheritDoc

Specified by:
removeIndicator in interface IChartPanel
Parameters:
indicator - instance of IIndicator interface
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

remove

IChartObject remove(java.lang.String chartObjectKey)
Deletes graphical object from this panel by key.

Specified by:
remove in interface IChartPanel
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

remove

void remove(IChartObject chartObject)
Deletes specified graphical object from this panel.

Specified by:
remove in interface IChartPanel
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

removeAll

void removeAll()
Removes all graphical objects from this panel.

Specified by:
removeAll in interface IChartPanel
Throws:
java.lang.IllegalStateException - if this panel is not visible isActive()

isActive

boolean isActive()
If true indicates that this panel is still visible on chart.

Note:
- working with removed/invisible panel is not allowed.
- panel could be automatically removed with last indicator on it.

Returns: