|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IChart
Allows to draw graphical objects on the chart
| Nested Class Summary | |
|---|---|
static class |
IChart.Type
Type of the graphical object |
| Method Summary | ||
|---|---|---|
void |
addIndicator(IIndicator indicator)
Add indicator to the chart |
|
void |
addIndicator(IIndicator indicator,
Object[] optParams)
Add indicator to the chart by specifying initial optional parameters values If optParams equals to null - default ones will be taken instead |
|
void |
addIndicator(IIndicator indicator,
Object[] optParams,
Color[] outputColors,
OutputParameterInfo.DrawingStyle[] outputDrawingStyles,
int[] outputWidths)
Add indicator to the chart 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 |
addSubIndicator(Integer subChartId,
IIndicator indicator)
Add sub indicator |
|
|
addToMainChart(T object)
Adds object of IChartObject super type to main chart window. |
|
|
addToMainChartUnlocked(T object)
Adds object of IChartObject super type to unlocked objects pool of main chart window. |
|
|
addToSubChart(Integer subChartId,
int indicatorId,
T object)
Adds object of IChartObject super type to sub chart window with specified subChartId and indicatorId. |
|
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 graphical object by key |
|
List<IChartObject> |
getAll()
Returns all graphical objects |
|
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 |
getDataType()
Returns selected Data Type |
|
List<IIndicator> |
getIndicators()
Return all chart's indicators |
|
Instrument |
getInstrument()
Returns instrument of the chart |
|
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 |
|
TickBarSize |
getTickBarSize()
The method returns currently selected Trade Bar Size on Tick Bar chart For non Tick Bar charts null might be returned |
|
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. |
|
double |
priceMax(int index)
Returns maximal value of the vertical scale of the specified subwindow of the current chart (0-main chart window, the indicators' subwindows are numbered starting from 1). |
|
double |
priceMin(int index)
Returns minimal value of the vertical scale of the specified subwindow of the current chart (0-main chart window, the indicators' subwindows are numbered starting from 1). |
|
void |
remove(IChartObject chartObject)
Deletes graphical object |
|
IChartObject |
remove(String key)
Deletes and returns graphical object by key |
|
void |
removeAll()
Removes all graphical objects on the chart |
|
void |
removeIndicator(IIndicator indicator)
Remove specified indicator from the chart |
|
void |
repaint()
Refresh and repaint chart |
|
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 |
setInstrument(Instrument instrument)
Sets chart's instrument |
|
int |
size()
Returns number of the graphical objects on the chart |
|
int |
windowsTotal()
Returns count of indicator windows on the chart (including main chart). |
|
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
@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 user
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 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 user
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 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 point
void move(IChartObject objectToMove,
long newTime,
double newPrice)
objectToMove - chart object to movenewTime - new time coordinatenewPrice - new price coordinate
void 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()},
java.swing.SwingConstantsint getCommentHorizontalPosition()
SwingConstants:
LEFT,
CENTER,
RIGHT.setCommentHorizontalPosition(int)void setCommentVerticalPosition(int position)
position - One of the following constants
defined in SwingConstants:
TOP,
CENTER,
BOTTM
IllegalArgumentExceptiongetCommentVerticalPosition(),
SwingConstantsint 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)
key - unique id of the object
IChartObject remove(String key)
key - unique id of the object
void remove(IChartObject chartObject)
chartObject - List<IChartObject> getAll()
void removeAll()
int size()
double priceMin(int index)
index - of the (sub-)window
double priceMax(int index)
index - of the (sub-)window
int getBarsCount()
int windowsTotal()
Instrument getInstrument()
void setInstrument(Instrument instrument)
instrument - Period getSelectedPeriod()
OfferSide getSelectedOfferSide()
void addIndicator(IIndicator indicator)
indicator - as IIndicator
void addIndicator(IIndicator indicator,
Object[] optParams)
indicator - as IIndicatoroptParams - as Object[]
void addIndicator(IIndicator indicator,
Object[] optParams,
Color[] outputColors,
OutputParameterInfo.DrawingStyle[] outputDrawingStyles,
int[] outputWidths)
indicator - as IIndicatoroptParams - as Object[]outputColors - as Color[]outputDrawingStyles - as DrawingStyle[]outputWidths - as int[]
void addSubIndicator(Integer subChartId,
IIndicator indicator)
subChartId - indicator - as IIndicatorvoid removeIndicator(IIndicator indicator)
indicator - as IIndicatorList<IIndicator> getIndicators()
DataType getDataType()
PriceRange getPriceRange()
ReversalAmount getReversalAmount()
void repaint()
IChartObjectFactory getChartObjectFactory()
IChartObjectFactory instance. This factory provides convenience methods to create
various graphics objects.
IChartObjectFactory instance.<T extends IChartObject> void addToMainChart(T object)
IChartObject super type to main chart window.
Please note that only 1 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.
<T extends IChartObject> void addToSubChart(Integer subChartId,
int indicatorId,
T object)
IChartObject super type to sub chart window with specified subChartId and indicatorId.
Please note that only 1 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.<T extends IChartObject> void addToMainChartUnlocked(T object)
IChartObject super type to unlocked objects pool of main chart window.
Please note that only 1 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.TickBarSize getTickBarSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||