Package com.motivewave.platform.sdk.draw
Class Marker
java.lang.Object
com.motivewave.platform.sdk.draw.Figure
com.motivewave.platform.sdk.draw.SinglePointFigure
com.motivewave.platform.sdk.draw.Marker
Draws a marker of the given type and size on the graph.
-
Constructor Summary
ConstructorDescriptionMarker
(Coordinate loc, Enums.MarkerType type) Constructor.Marker
(Coordinate loc, Enums.MarkerType type, Enums.Size size, Enums.Position position, Color fillColor, Color outlineColor) Constructor.Marker
(Coordinate loc, Enums.Position position, MarkerInfo info) Constructor.Marker
(Coordinate loc, Enums.Position position, MarkerInfo info, String popupMessage) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D gc, DrawContext ctx) Draws the marker (and optional text).boolean
Gets the color used to fill the marker.Gets the color used on the marker outline.getSize()
Gets the size of the marker.protected Stroke
getText()
Gets the text label that is to be displayed with the marker.Gets the position of the text label that is displayed with the marker.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
(Color color) Sets the color used to fill the marker.void
setOutlineColor
(Color color) Sets the color used on the marker outline.void
setPosition
(Enums.Position position) Sets the relative position of the marker to its location.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
(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.toString()
Methods inherited from class com.motivewave.platform.sdk.draw.SinglePointFigure
contains, getGraphLocation, getLocation, getOffsetPixels, getPosition, getStackPolicy, getTime, getValue, isVisible, setGraphLocation, setLocation, setLocation, setOffsetPixels, setStackPolicy
Methods inherited from class com.motivewave.platform.sdk.draw.Figure
getBounds, getPopupMessage, isUnderlay, setBounds, setPopupMessage, setUnderlay
-
Constructor Details
-
Marker
Constructor. Creates a marker using absolute positioning.- Parameters:
loc
- location to display the markertype
- type of marker to display
-
Marker
Constructor. Creates a marker using absolute positioning.- Parameters:
loc
- location to display the markerposition
- relative position to display the marker around the locationinfo
- information used to display the marker
-
Marker
Constructor. Creates a marker using absolute positioning.- Parameters:
loc
- location to display the markerposition
- relative position to display the marker around the locationinfo
- information used to display the markerpopupMessage
- message to display when the mouse cursor is above the marker
-
Marker
public Marker(Coordinate loc, Enums.MarkerType type, Enums.Size size, Enums.Position position, Color fillColor, Color outlineColor) Constructor.- Parameters:
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 outline
-
-
Method Details
-
getType
Gets the type of marker to display.- Returns:
- type of marker to display
-
setType
Sets the type of marker to display.- Parameters:
type
- type of the marker
-
getOutlineColor
Gets the color used on the marker outline.- Returns:
- outline color for this marker
-
setOutlineColor
Sets the color used on the marker outline.- Parameters:
color
- outline color
-
getFillColor
Gets the color used to fill the marker.- Returns:
- fill color
-
setFillColor
Sets the color used to fill the marker.- Parameters:
color
- fill color
-
getSize
Gets the size of the marker.- Returns:
- size of the marker
-
setSize
Sets the size of the marker.- Parameters:
size
- size of the marker
-
setPosition
Sets the relative position of the marker to its location.- Overrides:
setPosition
in classSinglePointFigure
- Parameters:
position
- position of the marker
-
setTextValue
Sets the value of the text label to be displayed with the marker.- Parameters:
text
- text value to display with the marker
-
getText
Gets the text label that is to be displayed with the marker.- Returns:
- text label to display with the marker.
-
getTextPosition
Gets the position of the text label that is displayed with the marker.- Returns:
- position of the text label
-
setTextPosition
Sets the position of the text label that is displayed with the marker.- Parameters:
position
- location to display text
-
draw
Draws the marker (and optional text). -
layout
Lays out the marker by converting time and price coordinates into displayable x and y coordinates. -
getStroke
-
toString
-
equals
-