Interface HitDetector<H,P>
-
- Type Parameters:
H
- type of hit resultsP
- type of processed hits
- All Known Subinterfaces:
ContainerHitDetector<H,P,C>
- All Known Implementing Classes:
AbstractDistanceBasedHitDetector
,AbstractHitDetector
,AbstractScatterPlotHitDetector
,AbstractXYSequencePointHitDetector
,BarHitDetector
,CircleHitDetector
,CrossHitDetector
,DotHitDetector
,ErrorCircleHitDetector
,ErrorCrossHitDetector
,InstancePointHitDetector
,LineHitDetector
,ScatterPlotCircleHitDetector
,SpreadSheetRowPointHitDetector
,StickHitDetector
,TimeseriesPointHitDetector
,ZScoreHitDetector
public interface HitDetector<H,P>
Interface for classes that detect hits in a plot.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description P
detect(MouseEvent e)
Detects hits and processes them.boolean
getDebug()
Returns whether debug mode is on or not.boolean
isEnabled()
Returns whether the detector is currently enabled.H
locate(MouseEvent e)
Detects hits and returns them without processing them.void
setDebug(boolean value)
Turns the debug mode on or off.void
setEnabled(boolean value)
Sets whether the detector is enabled or not.
-
-
-
Method Detail
-
setDebug
void setDebug(boolean value)
Turns the debug mode on or off.- Parameters:
value
- if true then the debug mode is turned on
-
getDebug
boolean getDebug()
Returns whether debug mode is on or not.- Returns:
- true if debug mode is on
-
setEnabled
void setEnabled(boolean value)
Sets whether the detector is enabled or not.- Parameters:
value
- if true then the detector is enabled
-
isEnabled
boolean isEnabled()
Returns whether the detector is currently enabled.- Returns:
- true if the detector is enabled.
-
detect
P detect(MouseEvent e)
Detects hits and processes them.- Parameters:
e
- the mouse event to analyze for a hit- Returns:
- optional result of processing the event
-
locate
H locate(MouseEvent e)
Detects hits and returns them without processing them.- Parameters:
e
- the mouse event to analyze for a hit- Returns:
- the hits if any, null otherwise
-
-