public interface IChart extends Iterable<IChartObject>, IChartPanel
Modifier and Type | Interface and Description |
---|---|
static class |
IChart.Type
Type of the graphical object
|
Modifier and Type | Method and Description |
---|---|
void |
addIndicator(IIndicator indicator)
Deprecated.
please use
IChartPanel.add(IIndicator) method |
void |
addIndicator(IIndicator indicator,
Object[] optParams)
Deprecated.
Please use
IChartPanel.add(IIndicator, Object[]) method |
void |
addIndicator(IIndicator indicator,
Object[] optParams,
Color[] outputColors,
OutputParameterInfo.DrawingStyle[] outputDrawingStyles,
int[] outputWidths)
|
void |
addSubIndicator(IIndicator indicator)
Deprecated.
|
void |
addSubIndicator(Integer subChartId,
IIndicator indicator)
Deprecated.
use
getIndicatorPanels() and IChartPanel.add(IIndicator) methods. |
void |
addSubIndicatorByPanelIndex(Integer subPanelIndex,
IIndicator indicator)
Deprecated.
use
getIndicatorPanels() and IChartPanel.add(IIndicator) methods |
void |
addToMainChart(IChartObject object)
Deprecated.
Please use
IChartPanel.add(IChartObject) method |
void |
addToMainChartUnlocked(IChartObject object)
Deprecated.
Please, use method @link
addToMainChart(IChartObject) There is no objects division onto locked and unlocked anymore |
void |
addToSubChart(Integer subChartId,
int indicatorId,
IChartObject object)
Deprecated.
use
getIndicatorPanels() and IIndicatorPanel.add(IChartObject) methods |
void |
addToSubChart(int subPanelIndex,
IChartObject chartObject)
Deprecated.
use
getIndicatorPanels() and IIndicatorPanel.add(IChartObject) methods |
void |
comment(String comment)
Writes a comment in the upper left corner.
|
IChartObject |
draw(String key,
IChart.Type type,
long time1,
double price1)
Deprecated.
- this method is deprecated. please use
IChartObjectFactory create() method() instead. |
IChartObject |
draw(String key,
IChart.Type type,
long time1,
double price1,
long time2,
double price2)
Deprecated.
- this method is deprecated. please use
IChartObjectFactory create() method() instead. |
IChartObject |
draw(String key,
IChart.Type type,
long time1,
double price1,
long time2,
double price2,
long time3,
double price3)
Deprecated.
- this method is deprecated. please use
IChartObjectFactory create() method() instead. |
IChartObject |
drawUnlocked(String key,
IChart.Type type,
long time1,
double price1)
Deprecated.
- this method is deprecated. please use
addToMainChartUnlocked() method instead. |
IChartObject |
drawUnlocked(String key,
IChart.Type type,
long time1,
double price1,
long time2,
double price2)
Deprecated.
- this method is deprecated. please use
addToMainChartUnlocked() method instead.
Draws graphical object that requires up to 2 points. Object can be selected, moved and changed by the user |
IChartObject |
drawUnlocked(String key,
IChart.Type type,
long time1,
double price1,
long time2,
double price2,
long time3,
double price3)
Deprecated.
- this method is deprecated. please use
addToMainChartUnlocked() method instead.
Draws graphical object that requires up to 3 points. Object can be selected, moved and changed by the user |
IChartObject |
get(String key)
Returns
IChartObject instance by key if any exist on this panel. |
List<IChartObject> |
getAll()
Returns all graphical objects on this panel.
|
int |
getBarsCount()
Returns amount of bars visible on the screen
|
IChartObjectFactory |
getChartObjectFactory()
Returns
IChartObjectFactory instance. |
Color |
getCommentColor()
Gets the foreground color of comment.
|
Font |
getCommentFont()
Gets the comment's font.
|
int |
getCommentHorizontalPosition()
Returns the horizontal position of the comment's text.
|
int |
getCommentVerticalPosition()
Returns the vertical position of the comment's text.
|
DataType.DataPresentationType |
getDataPresentationType()
Returns charts' current
DataType.DataPresentationType . |
DataType |
getDataType()
Returns selected Data Type
|
IFeedDescriptor |
getFeedDescriptor()
Returns chart state described by bean
IFeedDescriptor |
Filter |
getFilter()
Returns current filter
|
BufferedImage |
getImage()
Creates a
BufferedImage snapshot of this chart at the given moment. |
List<IIndicatorAppearanceInfo> |
getIndicatorApperanceInfos()
Returns indicator appearance information on the chart panel
|
List<IIndicatorPanel> |
getIndicatorPanels()
Returns current chart active sub panels.
|
List<IIndicator> |
getIndicators()
Returns all indicators on the chart panel.
|
Instrument |
getInstrument()
Returns instrument of the chart
|
Map<IIndicator,Object[]> |
getLastCalculatedIndicatorOutputs()
Returns outputs of the indicators that are plotted on the chart at the given moment.
|
ITimedData[] |
getLastRequestedData()
Returns data feed objects that are plotted on the chart at the given moment.
|
LineBreakLookback |
getLineBreakLookback()
The method returns currently selected LineBreakLoockback on chart
|
long |
getMaxTime()
Returns the maximal time axis value.
|
long |
getMinTime()
Returns the minimal time axis value.
|
PriceRange |
getPriceRange()
The method returns currently selected Price Range on chart
|
ReversalAmount |
getReversalAmount()
The method returns currently selected Reversal Amount on the Point And Figure chart
For non P&F charts null will be returned
|
OfferSide |
getSelectedOfferSide()
Returns selected offer side
|
Period |
getSelectedPeriod()
Returns selected period
|
List<IChartObject> |
getStrategyChartObjects()
Deprecated.
|
IChartTheme |
getTheme()
Returns current chart theme.
|
TickBarSize |
getTickBarSize()
The method returns currently selected Trade Bar Size on Tick Bar chart
For non Tick Bar charts null might be returned
|
Boolean |
isChartObjectUnlocked(IChartObject chartObject)
Deprecated.
There is no objects division onto locked and unlocked anymore, so this method will always return false
|
boolean |
isHistoricalTesterChart()
Returns true if the chart is opened by Historical Tester or from a strategy while back-testing
|
void |
move(IChartObject objectToMove,
long newTime,
double newPrice)
Moves graphical object to new coordinates.
|
void |
move(String chartObjectKey,
long newTime,
double newPrice)
Moves graphical object to new coordinates.
|
void |
navigateAndSelectDrawing(IChartObject chartObject)
Navigates to and selects specified drawing.
|
void |
navigateAndSelectDrawing(String key)
Navigates to and selects specified drawing by key.
|
double |
priceMax(int index)
Deprecated.
|
double |
priceMin(int index)
Deprecated.
|
void |
remove(IChartObject chartObject)
Deletes specified graphical object from this panel.
|
List<IChartObject> |
remove(List<IChartObject> chartObjects)
Deletes graphical objects
|
IChartObject |
remove(String key)
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 |
repaint()
Refresh and repaint chart
|
void |
selectDrawing(IChartObject chartObject)
Select specified drawing.
|
void |
selectDrawing(String key)
Select specified drawing by key.
|
void |
setCommentColor(Color color)
Sets the foreground color of comment.
|
void |
setCommentFont(Font font)
Sets the comment's font.
|
void |
setCommentHorizontalPosition(int position)
Sets the horizontal position of the comment's text.
|
void |
setCommentVerticalPosition(int position)
Sets the vertical position of the comment's text.
|
void |
setDataPresentationType(DataType.DataPresentationType presentationType)
Applies DataPresentationType to current chart.
|
void |
setFeedDescriptor(IFeedDescriptor feedDescriptor)
Sets current chart feed.
|
void |
setFocus()
Focuses JForex platform to this chart
|
void |
setInstrument(Instrument instrument)
Deprecated.
|
void |
setVerticalAutoscale(boolean autoscale)
Switches on/off chart vertical autoscale mode.
|
void |
setVerticalAxisScale(double minPriceValue,
double maxPriceValue)
Sets minimal and maximal value of the vertical scale of
the current chart when it is maximally expanded.
|
int |
size()
Returns number of the graphical objects on the chart
|
int |
windowsTotal()
Returns count of indicator windows on the chart (including main chart).
|
add, add, add, add, addMouseListener, getMaxPrice, getMinPrice, getMouseListeners, removeMouseListener
@Deprecated IChartObject draw(String key, IChart.Type type, long time1, double price1, long time2, double price2, long time3, double price3)
IChartObjectFactory
create() method() instead.key
- unique id of the objecttype
- type of the objecttime1
- time of first pointprice1
- price of first pointtime2
- time of second pointprice2
- price of second pointtime3
- time of third pointprice3
- price of third point@Deprecated IChartObject draw(String key, IChart.Type type, long time1, double price1, long time2, double price2)
IChartObjectFactory
create() method() instead.key
- unique id of the objecttype
- type of the objecttime1
- time of first pointprice1
- price of first pointtime2
- time of second pointprice2
- price of second point@Deprecated IChartObject draw(String key, IChart.Type type, long time1, double price1)
IChartObjectFactory
create() method() instead.key
- unique id of the objecttype
- type of the objecttime1
- time of the pointprice1
- price of the point@Deprecated IChartObject drawUnlocked(String key, IChart.Type type, long time1, double price1, long time2, double price2, long time3, double price3)
addToMainChartUnlocked()
method instead.
Draws graphical object that requires up to 3 points. Object can be selected, moved and changed by the userkey
- unique id of the objecttype
- type of the objecttime1
- time of first pointprice1
- price of first pointtime2
- time of second pointprice2
- price of second pointtime3
- time of third pointprice3
- price of third point@Deprecated IChartObject drawUnlocked(String key, IChart.Type type, long time1, double price1, long time2, double price2)
addToMainChartUnlocked()
method instead.
Draws graphical object that requires up to 2 points. Object can be selected, moved and changed by the userkey
- unique id of the objecttype
- type of the objecttime1
- time of first pointprice1
- price of first pointtime2
- time of second pointprice2
- price of second point@Deprecated IChartObject drawUnlocked(String key, IChart.Type type, long time1, double price1)
addToMainChartUnlocked()
method instead.key
- unique id of the objecttype
- type of the objecttime1
- time of the pointprice1
- price of the pointvoid move(IChartObject objectToMove, long newTime, double newPrice)
objectToMove
- chart object to movenewTime
- new time coordinatenewPrice
- new price coordinatevoid move(String chartObjectKey, long newTime, double newPrice)
chartObjectKey
- key of the chart object to movenewTime
- new time coordinatenewPrice
- new price coordinatevoid comment(String comment)
comment
- string to displayvoid setCommentHorizontalPosition(int position)
position
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
IllegalArgumentException
getCommentHorizontalPosition()
,
SwingConstants
int getCommentHorizontalPosition()
SwingConstants
:
LEFT
,
CENTER
,
RIGHT
.setCommentHorizontalPosition(int)
void setCommentVerticalPosition(int position)
position
- One of the following constants
defined in SwingConstants
:
TOP
,
CENTER
,
BOTTOM
IllegalArgumentException
getCommentVerticalPosition()
,
SwingConstants
int getCommentVerticalPosition()
SwingConstants
:
TOP
,
CENTER
,
BOTTOM
.setCommentVerticalPosition(int)
void setCommentFont(Font font)
font
- the desired Font
for commentComponent.getFont()
Font getCommentFont()
setCommentFont(Font)
void setCommentColor(Color color)
color
- the color to become comment's foreground color
if this parameter is null
, then used default text font defined in chart's themegetCommentColor()
Color getCommentColor()
setCommentColor(Color)
IChartObject get(String key)
IChartObject
instance by key if any exist on this panel.get
in interface IChartPanel
key
- unique idIChartObject remove(String key)
remove
in interface IChartPanel
key
- key of object to removevoid remove(IChartObject chartObject)
remove
in interface IChartPanel
chartObject
- object to removeList<IChartObject> remove(List<IChartObject> chartObjects)
chartObjects
- list of graphical objects to removeList<IChartObject> getAll()
getAll
in interface IChartPanel
void removeAll()
removeAll
in interface IChartPanel
int size()
@Deprecated double priceMin(int index)
IChartPanel.getMinPrice()
index
- of the (sub-)window@Deprecated double priceMax(int index)
IChartPanel.getMaxPrice()
index
- of the (sub-)windowvoid setVerticalAxisScale(double minPriceValue, double maxPriceValue)
minPriceValue
- minimal value of the vertical scalemaxPriceValue
- maximal value of the vertical scalevoid setVerticalAutoscale(boolean autoscale)
autoscale
- vertical autoscaleint getBarsCount()
int windowsTotal()
Instrument getInstrument()
getFeedDescriptor()
@Deprecated void setInstrument(Instrument instrument)
instrument
- instrument to setPeriod getSelectedPeriod()
getFeedDescriptor()
OfferSide getSelectedOfferSide()
getFeedDescriptor()
@Deprecated void addIndicator(IIndicator indicator)
IChartPanel.add(IIndicator)
methodindicator
- as IIndicator
@Deprecated void addIndicator(IIndicator indicator, Object[] optParams)
IChartPanel.add(IIndicator, Object[])
methodindicator
- as IIndicator
optParams
- as Object[]
@Deprecated void addIndicator(IIndicator indicator, Object[] optParams, Color[] outputColors, OutputParameterInfo.DrawingStyle[] outputDrawingStyles, int[] outputWidths)
IChartPanel.add(com.dukascopy.api.indicators.IIndicator, Object[], java.awt.Color[], com.dukascopy.api.indicators.OutputParameterInfo.DrawingStyle[], int[])
methodindicator
- as IIndicator
optParams
- as Object[]
outputColors
- as Color[]
outputDrawingStyles
- as DrawingStyle[]
outputWidths
- as int[]
@Deprecated void addSubIndicator(Integer subChartId, IIndicator indicator)
subChartId
- id of sub chartindicator
- as IIndicator
void removeIndicator(IIndicator indicator)
removeIndicator
in interface IChartPanel
indicator
- instance of IIndicator
interfaceList<IIndicator> getIndicators()
getIndicators
in interface IChartPanel
List<IIndicatorAppearanceInfo> getIndicatorApperanceInfos()
getIndicatorApperanceInfos
in interface IChartPanel
DataType getDataType()
getFeedDescriptor()
PriceRange getPriceRange()
getFeedDescriptor()
LineBreakLookback getLineBreakLookback()
getFeedDescriptor()
ReversalAmount getReversalAmount()
getFeedDescriptor()
Filter getFilter()
getFeedDescriptor()
IFeedDescriptor getFeedDescriptor()
IFeedDescriptor
IFeedDescriptor
void repaint()
IChartObjectFactory getChartObjectFactory()
IChartObjectFactory
instance. This factory provides convenience methods to create
various graphics objects.IChartObjectFactory
instance.@Deprecated void addToMainChart(IChartObject object)
IChartPanel.add(IChartObject)
methodIChartObject
super type to main chart window.
Please note that only one instance of object can be added per main chart window.object
- - instance of IChartObject
super type.IllegalArgumentException
- - if object
is already present on any of main charts.@Deprecated void addToSubChart(Integer subChartId, int indicatorId, IChartObject object)
IChartObject
super type to sub chart window with specified subChartId
and indicatorId
.
Please note that only one instance of object can be added per sub chart window.subChartId
- - sub chart id.indicatorId
- - indicator function id.object
- - instance of IChartObject
super type.IllegalArgumentException
- - if object
is already present on any of sub charts.@Deprecated void addToMainChartUnlocked(IChartObject object)
addToMainChart(IChartObject)
There is no objects division onto locked and unlocked anymoreIChartObject
super type to unlocked objects pool of main chart window.
Please note that only one instance of object can be added to unlocked objects pool per main chart window.object
- - instance of IChartObject
super type.IllegalArgumentException
- - if object
is already present on any of main charts unlocked objects pool.@Deprecated Boolean isChartObjectUnlocked(IChartObject chartObject)
chartObject
is unlocked or not. Returns null
if chart does not contain specified chartObject
chartObject
- object to checktrue
- chartObject
is unlocked, false
- if not, null
- chartObject
does not belong to this
chart.TickBarSize getTickBarSize()
getFeedDescriptor()
@Deprecated List<IChartObject> getStrategyChartObjects()
BufferedImage getImage()
BufferedImage
snapshot of this chart at the given moment.BufferedImage
snapshot of current chart at the method invocation moment.void setDataPresentationType(DataType.DataPresentationType presentationType)
getDataType()
.getSupportedPresentationTypes() to get all allowed values.
Use getDataType()
.isPresentationTypeSupported(DataPresentationType presentationType)
to check whether current DataType supports presentationType or not.presentationType
- one of DataPresentationType constants, supported by current DataTypeIllegalArgumentException
- if DataPresentationType is not supported by current DataTypegetDataType()
DataType.DataPresentationType getDataPresentationType()
DataType.DataPresentationType
.
Depends on current DataType
valuegetDataType()
void selectDrawing(String key)
key
- IChartObject's keyIChartObject.isLocked()
,
IChartObject.setLocked(boolean)
void selectDrawing(IChartObject chartObject)
chartObject
- object to selectIChartObject.isLocked()
,
IChartObject.setLocked(boolean)
void navigateAndSelectDrawing(String key)
key
- IChartObject's keyIChartObject.isLocked()
,
IChartObject.setLocked(boolean)
void navigateAndSelectDrawing(IChartObject chartObject)
chartObject
- object to selectIChartObject.isLocked()
,
IChartObject.setLocked(boolean)
List<IIndicatorPanel> getIndicatorPanels()
@Deprecated void addSubIndicator(IIndicator indicator)
IChartPanel.add(IIndicator)
indicator
- indicator to add@Deprecated void addSubIndicatorByPanelIndex(Integer subPanelIndex, IIndicator indicator)
subPanelIndex
- panel's indexindicator
- indicator to addIllegalStateException
- in case of incorrect subPanelIndex or indicator is not designed for sub panel.@Deprecated void addToSubChart(int subPanelIndex, IChartObject chartObject)
IChartObject
type to sub chart panel with specified index
.
Please note that only one instance of object can be added on chart.subPanelIndex
- panel's indexchartObject
- object to addIllegalArgumentException
- in case of incorrect indexITimedData[] getLastRequestedData()
Object
type depends on getDataType()
Map<IIndicator,Object[]> getLastCalculatedIndicatorOutputs()
Object
in Object[] stands for an output array of an indicator.
In each output array that is represented by an Object (of Object[]),
the 0th element stands for the first visible data feed object on the chart,
and the last element - for the data feed object element on the chart.long getMinTime()
long getMaxTime()
DataType
other than DataType.TICKS
or DataType.TIME_PERIOD_AGGREGATION
,
the maximal time value is the one of the last feed data element.boolean isHistoricalTesterChart()
IChartTheme getTheme()
void setFeedDescriptor(IFeedDescriptor feedDescriptor)
feedDescriptor
- void setFocus()
Copyright © 2016. All rights reserved.