public class SinglePointFigure extends Figure
Constructor and Description |
---|
SinglePointFigure() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y,
DrawContext ctx)
This method is called by the study framework to determine if the figure contains the x and y coordinates.
|
java.awt.geom.Point2D |
getGraphLocation()
Gets the location where this figure will be drawn on the graph.
|
Coordinate |
getLocation()
Gets the location of this marker.
|
int |
getOffsetPixels()
Gets the offset in pixels to display the figure from the location.
|
Enums.Position |
getPosition()
Gets the relative position of the figure to its location.
|
Enums.StackPolicy |
getStackPolicy()
Sets the policy for stacking figures that share the same coordinates (above or below).
|
long |
getTime()
Gets the time location (x coordinate).
|
double |
getValue()
Gets the real value location (y coordinate).
|
boolean |
isVisible(DrawContext ctx)
This method is called by the study framework and is used to
improve the performance of the study by only working figures that are currently visible.
|
void |
setGraphLocation(java.awt.geom.Point2D location)
Sets the location where this figure will be drawn on the graph.
|
void |
setLocation(Coordinate coord)
Sets the location of the marker.
|
void |
setLocation(long time,
double value)
Sets the absolute location of this figure.
|
void |
setOffsetPixels(int pixels)
Sets the offset in pixels to display the figure from the location.
|
void |
setPosition(Enums.Position position)
Sets the relative position of the marker to its location.
|
void |
setStackPolicy(Enums.StackPolicy stackPolicy)
Sets the policy for stacking figures that share the same coordinates (above or below).
|
public boolean contains(double x, double y, DrawContext ctx)
public boolean isVisible(DrawContext ctx)
public Coordinate getLocation()
public void setLocation(Coordinate coord)
coord
- coordinate for the location of the markerpublic void setLocation(long time, double value)
time
- time value (in milliseconds)value
- y axis valuepublic long getTime()
public double getValue()
public Enums.Position getPosition()
public void setPosition(Enums.Position position)
position
- position of the markerpublic void setStackPolicy(Enums.StackPolicy stackPolicy)
stackPolicy
- public Enums.StackPolicy getStackPolicy()
public void setGraphLocation(java.awt.geom.Point2D location)
location
- public java.awt.geom.Point2D getGraphLocation()
public void setOffsetPixels(int pixels)
pixels
- offset in pixelspublic int getOffsetPixels()