public interface IChartPanel
Chart panel container for objects of corresponding type.
| 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 |
void |
addMouseListener(boolean asynchronous,
IChartPanelMouseListener chartMouseListener)
Adds the specified mouse listener to receive mouse events from this chart panel. |
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 all indicators on chart (including sub panels) |
double |
getMaxPrice()
Returns maximal value of price scale |
double |
getMinPrice()
Returns minimal value of price scale |
java.util.List<IChartPanelMouseListener> |
getMouseListeners()
Returns an array of all the mouse listeners registered on this component. |
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)
Remove specified indicator from this panel. |
void |
removeMouseListener(IChartPanelMouseListener chartMouseListener)
Removes the specified mouse listener so that it no longer receives mouse events from this component. |
| Method Detail |
|---|
void add(IChartObject chartObject)
IChartObject type to current panel.
Please note that only one instance of object can be added per chart.
chartObject - - instance of IChartObject super type.
java.lang.IllegalArgumentException - - if object is already present on chart.IChartPanel add(IIndicator indicator)
indicator - as IIndicator
java.lang.IllegalStateException - trying to apply to main panel indicator designed for sub panel.
IChartPanel add(IIndicator indicator,
java.lang.Object[] optParams)
indicator - as IIndicatoroptParams - as Object[]
java.lang.IllegalStateException - trying to apply indicator designed for main panel to sub panel and vice versa.
IChartPanel add(IIndicator indicator,
java.lang.Object[] optParams,
java.awt.Color[] outputColors,
OutputParameterInfo.DrawingStyle[] outputDrawingStyles,
int[] outputWidths)
indicator - as IIndicatoroptParams - as Object[]outputColors - as Color[]outputDrawingStyles - as DrawingStyle[]outputWidths - as int[]
java.lang.IllegalStateException - trying to apply indicator designed for main panel to sub panel and vice versa.java.util.List<IIndicator> getIndicators()
IChartObject get(java.lang.String chartObjectKey)
IChartObject instance by key if any exist on this panel.
chartObjectKey - unique id
java.util.List<IChartObject> getAll()
double getMinPrice()
double getMaxPrice()
void removeIndicator(IIndicator indicator)
indicator - instance of IIndicator interfaceIChartObject remove(java.lang.String chartObjectKey)
chartObjectKey - void remove(IChartObject chartObject)
chartObject - void removeAll()
void addMouseListener(boolean asynchronous,
IChartPanelMouseListener chartMouseListener)
chartMouseListener is null,
no exception is thrown and no action is performed.
asynchronous - if true listener will be triggered in AWT thread asynchronously with strategy thread, otherwise will be synchronized. Use false as default if not sure.chartMouseListener - the mouse listenerremoveMouseListener(com.dukascopy.api.chart.mouse.IChartPanelMouseListener),
getMouseListeners()void removeMouseListener(IChartPanelMouseListener chartMouseListener)
chartMouseListener is null,
no exception is thrown and no action is performed.
chartMouseListener - the mouse listeneraddMouseListener(boolean, com.dukascopy.api.chart.mouse.IChartPanelMouseListener),
getMouseListeners()java.util.List<IChartPanelMouseListener> getMouseListeners()
MouseListeners
or an empty array if no mouse
listeners are currently registeredaddMouseListener(boolean, com.dukascopy.api.chart.mouse.IChartPanelMouseListener),
removeMouseListener(com.dukascopy.api.chart.mouse.IChartPanelMouseListener)