public class Marker extends SinglePointFigure
| Constructor and Description |
|---|
Marker(Coordinate loc,
Enums.MarkerType type)
Constructor.
|
Marker(Coordinate loc,
Enums.MarkerType type,
Enums.Size size,
Enums.Position position,
java.awt.Color fillColor,
java.awt.Color outlineColor)
Constructor.
|
Marker(Coordinate loc,
Enums.Position position,
MarkerInfo info)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics2D gc,
DrawContext ctx)
Draws the marker (and optional text).
|
java.awt.Color |
getFillColor()
Gets the color used to fill the marker.
|
java.awt.Color |
getOutlineColor()
Gets the color used on the marker outline.
|
Enums.Size |
getSize()
Gets the size of the marker.
|
protected java.awt.Stroke |
getStroke() |
Text |
getText()
Gets the text label that is to be displayed with the marker.
|
Enums.Position |
getTextPosition()
Gets the position of the text label that is displayed with the marker.
|
Enums.MarkerType |
getType()
Gets the type of marker to display.
|
void |
layout(DrawContext ctx)
Lays out the marker by converting time and price coordinates into displayable x and y coordinates.
|
void |
setFillColor(java.awt.Color color)
Sets the color used to fill the marker.
|
void |
setOutlineColor(java.awt.Color color)
Sets the color used on the marker outline.
|
void |
setSize(Enums.Size size)
Sets the size of the marker.
|
void |
setTextPosition(Enums.Position position)
Sets the position of the text label that is displayed with the marker.
|
void |
setTextValue(java.lang.String text)
Sets the value of the text label to be displayed with the marker.
|
void |
setType(Enums.MarkerType type)
Sets the type of marker to display.
|
java.lang.String |
toString() |
contains, getGraphLocation, getLocation, getOffsetPixels, getPosition, getStackPolicy, getTime, getValue, isVisible, setGraphLocation, setLocation, setLocation, setOffsetPixels, setPosition, setStackPolicypublic Marker(Coordinate loc, Enums.MarkerType type)
loc - location to display the markertype - type of marker to displaypublic Marker(Coordinate loc, Enums.Position position, MarkerInfo info)
loc - location to display the markerposition - relative position to display the marker around the locationinfo - information used to display the markerpublic Marker(Coordinate loc, Enums.MarkerType type, Enums.Size size, Enums.Position position, java.awt.Color fillColor, java.awt.Color outlineColor)
loc - location to display the markertype - type of marker to displaysize - size of the markerposition - relative position to display the marker around the locationfillColor - color used to fill the markeroutlineColor - color used on the marker outlinepublic Enums.MarkerType getType()
public void setType(Enums.MarkerType type)
type - type of the markerpublic java.awt.Color getOutlineColor()
public void setOutlineColor(java.awt.Color color)
color - outline colorpublic java.awt.Color getFillColor()
public void setFillColor(java.awt.Color color)
color - fill colorpublic Enums.Size getSize()
public void setSize(Enums.Size size)
size - size of the markerpublic void setTextValue(java.lang.String text)
text - text value to display with the markerpublic Text getText()
public Enums.Position getTextPosition()
public void setTextPosition(Enums.Position position)
position - location to display textpublic void draw(java.awt.Graphics2D gc,
DrawContext ctx)
public void layout(DrawContext ctx)
protected java.awt.Stroke getStroke()
public java.lang.String toString()
toString in class java.lang.Object