public interface IChartPanel
Modifier and Type | Method and Description |
---|---|
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,
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,
Object[] optParams,
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(String chartObjectKey)
Returns
IChartObject instance by key if any exist on this panel. |
List<IChartObject> |
getAll()
Returns all graphical objects on this panel.
|
List<IIndicatorAppearanceInfo> |
getIndicatorApperanceInfos()
Returns indicator appearance information on the chart panel
|
List<IIndicator> |
getIndicators()
Returns all indicators on the chart panel.
|
double |
getMaxPrice()
Returns maximal value of price scale
|
double |
getMinPrice()
Returns minimal value of price scale
|
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(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.
|
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.IllegalArgumentException
- - if object
is already present on chart.IChartPanel add(IIndicator indicator)
indicator
- as IIndicator
IllegalStateException
- trying to apply to main panel indicator designed for sub panel.IChartPanel add(IIndicator indicator, Object[] optParams)
indicator
- as IIndicator
optParams
- as Object[]
IllegalStateException
- trying to apply indicator designed for main panel to sub panel and vice versa.IChartPanel add(IIndicator indicator, Object[] optParams, Color[] outputColors, OutputParameterInfo.DrawingStyle[] outputDrawingStyles, int[] outputWidths)
indicator
- as IIndicator
optParams
- as Object[]
outputColors
- as Color[]
outputDrawingStyles
- as DrawingStyle[]
outputWidths
- as int[]
IllegalStateException
- trying to apply indicator designed for main panel to sub panel and vice versa.List<IIndicator> getIndicators()
List<IIndicatorAppearanceInfo> getIndicatorApperanceInfos()
IChartObject get(String chartObjectKey)
IChartObject
instance by key if any exist on this panel.chartObjectKey
- unique idList<IChartObject> getAll()
double getMinPrice()
double getMaxPrice()
void removeIndicator(IIndicator indicator)
indicator
- instance of IIndicator
interfaceIChartObject remove(String chartObjectKey)
chartObjectKey
- key of object to removevoid remove(IChartObject chartObject)
chartObject
- object to removeNullPointerException
- if chartObject is nullvoid 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()
List<IChartPanelMouseListener> getMouseListeners()
MouseListener
s
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)
Copyright © 2016. All rights reserved.