Enum Class Chart2D.PointFinder

java.lang.Object
java.lang.Enum<Chart2D.PointFinder>
info.monitorenter.gui.chart.Chart2D.PointFinder
All Implemented Interfaces:
IPointFinder, Serializable, Comparable<Chart2D.PointFinder>, Constable
Enclosing class:
Chart2D

public static enum Chart2D.PointFinder extends Enum<Chart2D.PointFinder> implements IPointFinder
Types of tool tip.

Version:
$Revision: 1.142.2.1 $
Author:
Achim Westermann
  • Enum Constant Details

    • EUCLID

      public static final Chart2D.PointFinder EUCLID
      Uses the Manhattan distance to find the nearest point.

      This implementation is slower than MANHATTAN but has a search field in form of a circle which is more natural for human eyes.

      See Also:
    • MANHATTAN

      public static final Chart2D.PointFinder MANHATTAN
      Uses the Manhattan distance to find the nearest point.

      This implementation is faster than EUCLID (only subtractions/additions/abs) but has a search field in form of a rhombus which may confuse human eyes.

      See Also:
  • Method Details

    • values

      public static Chart2D.PointFinder[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Chart2D.PointFinder valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getNearestPoint

      public ITracePoint2D getNearestPoint(MouseEvent me, Chart2D chart)
      Default implementation always returns null.

      Specified by:
      getNearestPoint in interface IPointFinder
      Parameters:
      me - the mouse event over the chart.
      chart - to search points within.
      Returns:
      e nearest MouseEvent to the given mouse event's screen coordinates or null if no point was found / service is not implemented.
      See Also: