Package info.monitorenter.gui.chart
Enum Class Chart2D.PointFinder
- All Implemented Interfaces:
IPointFinder
,Serializable
,Comparable<Chart2D.PointFinder>
,Constable
- Enclosing class:
Chart2D
Types of tool tip.
- Version:
- $Revision: 1.142.2.1 $
- Author:
- Achim Westermann
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetNearestPoint
(MouseEvent me, Chart2D chart) Default implementation always returns null.static Chart2D.PointFinder
Returns the enum constant of this class with the specified name.static Chart2D.PointFinder[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface info.monitorenter.gui.chart.IPointFinder
getNearestPoint
-
Enum Constant Details
-
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
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
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
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 nameNullPointerException
- if the argument is null
-
getNearestPoint
Default implementation always returns null.- Specified by:
getNearestPoint
in interfaceIPointFinder
- Parameters:
me
- the mouse event over the chart.chart
- to search points within.- Returns:
- e nearest
to the given mouse event's screen coordinates orMouseEvent
null
if no point was found / service is not implemented. - See Also:
-