Package info.monitorenter.gui.chart
Interface IPointFinder
-
- All Known Implementing Classes:
Chart2D.PointFinder
public interface IPointFinderInterface for finding aof aITracePoint2Dcorresponding to a mouse event.Chart2DThis is used to allow a pluggable strategy for this task which is needed by point highlighting and/or tool tips.
- Author:
- Achim Westermann
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ITracePoint2DgetNearestPoint(int mouseEventX, int mouseEventY, Chart2D chart)Returns the nearestto the given mouse event's screen coordinates.ITracePoint2DITracePoint2DgetNearestPoint(java.awt.event.MouseEvent me, Chart2D chart)Returns the nearestto the given mouse event's screen coordinates orMouseEventnullif no point was found / service is not implemented.
-
-
-
Method Detail
-
getNearestPoint
ITracePoint2D getNearestPoint(int mouseEventX, int mouseEventY, Chart2D chart)
Returns the nearestto the given mouse event's screen coordinates.ITracePoint2D- Parameters:
mouseEventX- the x pixel value relative to the chart (e.g.:).MouseEvent.getY()mouseEventY- the y pixel value relative to the chart (e.g.:).MouseEvent.getY()chart- to search points within.- Returns:
- the nearest
to the given mouse event's screen coordinates.ITracePoint2D
-
getNearestPoint
ITracePoint2D getNearestPoint(java.awt.event.MouseEvent me, Chart2D chart)
Returns the nearestto the given mouse event's screen coordinates orMouseEventnullif no point was found / service is not implemented.Simple implementations could use Manhattan distance or Euclid distance.
- Parameters:
me- the mouse event over the chart.chart- to search points within.- Returns:
- e nearest
to the given mouse event's screen coordinates orMouseEventnullif no point was found / service is not implemented.
-
-