public interface IChartObject
| Modifier and Type | Interface and Description |
|---|---|
static class |
IChartObject.ATTR_BOOLEAN
Deprecated.
|
static class |
IChartObject.ATTR_COLOR
Deprecated.
|
static class |
IChartObject.ATTR_DOUBLE
Deprecated.
|
static class |
IChartObject.ATTR_INT
Deprecated.
|
static class |
IChartObject.ATTR_LONG
Deprecated.
|
static class |
IChartObject.ATTR_TEXT
Deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_FONT
String constant to be used in PropertyChangeListener.
|
static String |
PROPERTY_FOREGROUND_ALPHA
String constant to be used in PropertyChangeListener.
|
static String |
PROPERTY_FOREGROUND_COLOR
String constant to be used in PropertyChangeListener.
|
static String |
PROPERTY_POINT_PRICE
String constant to be used in PropertyChangeListener.
|
static String |
PROPERTY_POINT_TIME
String constant to be used in PropertyChangeListener.
|
static String |
PROPERTY_STICKY
String constant to be used in PropertyChangeListener.
|
static String |
PROPERTY_STROKE
String constant to be used in PropertyChangeListener.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a
PropertyChangeListener to the listener list. |
IChartObject |
clone()
Clones the chart object with a random key
|
boolean |
getAttrBoolean(IChartObject.ATTR_BOOLEAN field)
Deprecated.
|
Color |
getAttrColor(IChartObject.ATTR_COLOR field)
Deprecated.
|
double |
getAttrDouble(IChartObject.ATTR_DOUBLE field)
Deprecated.
|
int |
getAttrInt(IChartObject.ATTR_INT field)
Deprecated.
|
long |
getAttrLong(IChartObject.ATTR_LONG field)
Deprecated.
|
String |
getAttrText(IChartObject.ATTR_TEXT field)
Deprecated.
|
Color |
getColor()
Returns color of the object
|
Instrument |
getInstrument()
Returns instrument used for drawing chart object or
null for using primary chart instrument. |
String |
getKey() |
int |
getLineStyle()
Gets stroke style
|
float |
getLineWidth()
Returns stroke width
|
float |
getOpacity()
Returns opacity alpha of the object
|
int |
getPointsCount() |
double |
getPrice(int pointIndex) |
PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all the
PropertyChangeListeners added
to this ChartObject with addPropertyChangeListener(). |
Stroke |
getStroke()
Returns stroke that is used for object rendering
|
String |
getText()
Returns object's text
|
int |
getTextTruncation()
Returns object text's maximum displayable character count.
|
long |
getTime(int pointIndex) |
IChart.Type |
getType()
Returns type of the graphical object
|
boolean |
isLabelEnabled()
If false then text value is never shown on chart for this drawing, if true - the label can be added/updated for this drawing object
|
boolean |
isLocked()
Returns chart object lock state.
|
boolean |
isMenuEnabled()
If false then the menu is never shown on chart for this drawing, if true - menu will be shown on right button click
|
boolean |
isSticky()
If true then drawing will adjust itself to closest high/low value for candle under cursor
|
boolean |
isVisibleInWorkspaceTree()
Returns chart object whether is visible or hidden in Workspace Tree.
|
void |
move(long time,
double price)
Moves first point of the object to the new position dragging whole object with all other points.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a
PropertyChangeListener from the listener list. |
void |
setAttrBoolean(IChartObject.ATTR_BOOLEAN field,
boolean value)
Deprecated.
|
void |
setAttrColor(IChartObject.ATTR_COLOR field,
Color value)
Deprecated.
|
void |
setAttrDouble(IChartObject.ATTR_DOUBLE field,
double value)
Deprecated.
|
void |
setAttrInt(IChartObject.ATTR_INT field,
int value)
Deprecated.
|
void |
setAttrLong(IChartObject.ATTR_LONG field,
long value)
Deprecated.
|
void |
setAttrText(IChartObject.ATTR_TEXT field,
String value)
Deprecated.
|
void |
setChartObjectListener(ChartObjectListener listener)
Adds listener to receive events about user changes on the object.
|
void |
setColor(Color color)
Sets color of the object
|
void |
setInstrument(Instrument instrument)
Sets instrument used for drawing chart object or
null for using primary chart instrument. |
void |
setLineStyle(int lineStyle)
Sets stroke style
|
void |
setLineWidth(float width)
Sets stroke width
|
void |
setLocked(boolean locked)
Sets chart object lock state.
|
void |
setMenuEnabled(boolean menuEnabled) |
void |
setOpacity(float alpha)
Sets alpha of the object
|
void |
setSticky(boolean sticky)
Controls drawing stickiness.
|
void |
setStroke(Stroke stroke)
Sets stroke for object rendering
|
void |
setText(String text)
Sets text to show with the object.
|
void |
setText(String text,
Font font)
Sets text to show with the object.
|
void |
setText(String text,
Font font,
int horizontalAlignment)
Sets text to show with the object.
|
void |
setText(String text,
int horizontalAlignment)
Sets text to show with the object.
|
void |
setTextTruncation(int charCount)
Sets object text's maximum displayable character count.
|
void |
setTooltip(String tooltip)
Sets popup tooltip which shows when mouse over the figure.
|
void |
setVisibleInWorkspaceTree(boolean visible)
Make chart object visible or hidden in Workspace Tree.
|
static final String PROPERTY_FOREGROUND_COLOR
static final String PROPERTY_FOREGROUND_ALPHA
static final String PROPERTY_STROKE
static final String PROPERTY_FONT
static final String PROPERTY_STICKY
static final String PROPERTY_POINT_TIME
PropertyChangeListener fires IndexedPropertyChangeEvent with index of modified pointstatic final String PROPERTY_POINT_PRICE
PropertyChangeListener fires IndexedPropertyChangeEvent with index of modified pointvoid setChartObjectListener(ChartObjectListener listener)
listener - listener for eventsvoid addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener to the listener list.
The listener is registered for all properties.
A PropertyChangeEvent will get fired in response to setting
a bound property, e.g. setColor, setOpacity,
or setStroke.
Note that if the current component is inheriting its property
from its container, then no event will be
fired in response to a change in the inherited property.
listener - The PropertyChangeListener to be addedremovePropertyChangeListener(java.beans.PropertyChangeListener),
getPropertyChangeListeners()void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener from the listener list.
This removes a PropertyChangeListener that was registered
for all properties.listener - the PropertyChangeListener to be removedaddPropertyChangeListener(java.beans.PropertyChangeListener)PropertyChangeListener[] getPropertyChangeListeners()
PropertyChangeListeners added
to this ChartObject with addPropertyChangeListener().PropertyChangeListeners added or an empty
array if no listeners have been addedaddPropertyChangeListener(java.beans.PropertyChangeListener),
removePropertyChangeListener(java.beans.PropertyChangeListener)@Deprecated void setAttrLong(IChartObject.ATTR_LONG field, long value)
long to fieldfield - chart object fieldvalue - to be assigned@Deprecated long getAttrLong(IChartObject.ATTR_LONG field)
field - chart object field@Deprecated void setAttrDouble(IChartObject.ATTR_DOUBLE field, double value)
double to fieldfield - chart object fieldvalue - to be assigned@Deprecated double getAttrDouble(IChartObject.ATTR_DOUBLE field)
field - chart object field@Deprecated void setAttrInt(IChartObject.ATTR_INT field, int value)
int to fieldfield - chart object fieldvalue - to be assigned@Deprecated int getAttrInt(IChartObject.ATTR_INT field)
field - chart object field@Deprecated void setAttrBoolean(IChartObject.ATTR_BOOLEAN field, boolean value)
boolean to fieldfield - chart object fieldvalue - to be assigned@Deprecated boolean getAttrBoolean(IChartObject.ATTR_BOOLEAN field)
field - chart object field@Deprecated void setAttrColor(IChartObject.ATTR_COLOR field, Color value)
Color to fieldfield - chart object fieldvalue - to be assigned@Deprecated Color getAttrColor(IChartObject.ATTR_COLOR field)
field - chart object field@Deprecated void setAttrText(IChartObject.ATTR_TEXT field, String value)
String to fieldfield - chart object fieldvalue - to be assigned@Deprecated String getAttrText(IChartObject.ATTR_TEXT field)
field - chart object fieldvoid move(long time,
double price)
time - new time of the first pointprice - new price of the first pointString getText()
void setText(String text)
text - text to showvoid setText(String text, Font font)
text - text to showfont - font to use for text renderingvoid setText(String text, int horizontalAlignment)
text - text to showhorizontalAlignment - text horizontal position according to specified time.
Available options for horizontalAlignment = {SwingConstants.CENTER, SwingConstants.LEFT, SwingConstants.RIGHT}
Default value is SwingConstants.LEFTvoid setText(String text, Font font, int horizontalAlignment)
text - text to showfont - font to use for text renderinghorizontalAlignment - text horizontal position according to specified time.
Available options for horizontalAlignment = {SwingConstants.CENTER, SwingConstants.LEFT, SwingConstants.RIGHT}
Default value is SwingConstants.LEFTint getTextTruncation()
For ISignalDownChartObject, ISignalUpChartObject and all IHorizontalLineChartObject implementations the default is 30, for the rest it is -1. The parameter does not apply to ITextChartObject.
void setTextTruncation(int charCount)
charCount - maximum displayable character countColor getColor()
void setColor(Color color)
color - color to use for object renderingfloat getOpacity()
void setOpacity(float alpha)
alpha - values: 0-1 (0: transparent; 1: opaque)Stroke getStroke()
void setStroke(Stroke stroke)
stroke - stroke to use for object renderingint getLineStyle()
LineStylevoid setLineStyle(int lineStyle)
lineStyle - one of LineStyle constantLineStylefloat getLineWidth()
void setLineWidth(float width)
width - width of stroke lineIChart.Type getType()
String getKey()
Instrument getInstrument()
null for using primary chart instrument.void setInstrument(Instrument instrument)
null for using primary chart instrument.instrument - instrument for drawing chart objectlong getTime(int pointIndex)
pointIndex - which determines which coordinate should be used to obtain timedouble getPrice(int pointIndex)
pointIndex - which determines which coordinate should be used to obtain priceint getPointsCount()
void setSticky(boolean sticky)
sticky - if true then drawing will adjust itself to closest high/low value for candle under cursorboolean isSticky()
boolean isMenuEnabled()
void setMenuEnabled(boolean menuEnabled)
menuEnabled - which determines show or not show the menu for the drawingboolean isLabelEnabled()
void setTooltip(String tooltip)
boolean isVisibleInWorkspaceTree()
isLocked(),
setLocked(boolean)void setVisibleInWorkspaceTree(boolean visible)
visible - is visibleisLocked(),
setLocked(boolean)boolean isLocked()
void setLocked(boolean locked)
IChartObject clone()
Copyright © 2016. All rights reserved.