Package adams.gui.visualization.sequence
Class AbstractXYSequencePointHitDetector
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.core.plot.AbstractHitDetector<H,P>
-
- adams.gui.visualization.core.plot.AbstractDistanceBasedHitDetector<List<XYSequencePoint>,String>
-
- adams.gui.visualization.sequence.AbstractXYSequencePointHitDetector
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,ContainerHitDetector<List<XYSequencePoint>,String,XYSequenceContainer>
,HitDetector<List<XYSequencePoint>,String>
,Serializable
- Direct Known Subclasses:
BarHitDetector
,CircleHitDetector
,CrossHitDetector
,DotHitDetector
,ErrorCircleHitDetector
,ErrorCrossHitDetector
,LineHitDetector
,StickHitDetector
public abstract class AbstractXYSequencePointHitDetector extends AbstractDistanceBasedHitDetector<List<XYSequencePoint>,String> implements ContainerHitDetector<List<XYSequencePoint>,String,XYSequenceContainer>
Ancestor for XY sequence point hit detectors.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected XYSequencePaintlet
m_Owner
the owner of this detector.-
Fields inherited from class adams.gui.visualization.core.plot.AbstractDistanceBasedHitDetector
m_MinimumPixelDifference
-
Fields inherited from class adams.gui.visualization.core.plot.AbstractHitDetector
m_Debug, m_Enabled
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractXYSequencePointHitDetector()
Initializes the hit detector (constructor only for GOE) with no owner.AbstractXYSequencePointHitDetector(XYSequencePaintlet owner)
Initializes the hit detector.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.XYSequenceContainer[]
containers(MouseEvent e)
Detects hits and associates them with the containers.XYSequencePaintlet
getOwner()
Returns the owner.protected abstract List<XYSequencePoint>
isHit(MouseEvent e)
Checks for a hit.protected String
processHit(MouseEvent e, List<XYSequencePoint> hit)
Performs the action when a hit is detected.void
setOwner(XYSequencePaintlet value)
Sets the owner.-
Methods inherited from class adams.gui.visualization.core.plot.AbstractDistanceBasedHitDetector
defineOptions, distance, getDefaultMinimumPixelDifference, getMinimumPixelDifference, minimumPixelDifferenceTipText, setMinimumPixelDifference
-
Methods inherited from class adams.gui.visualization.core.plot.AbstractHitDetector
detect, getDebug, isEnabled, locate, setDebug, setEnabled
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.gui.visualization.core.plot.HitDetector
detect, getDebug, isEnabled, locate, setDebug, setEnabled
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Owner
protected XYSequencePaintlet m_Owner
the owner of this detector.
-
-
Constructor Detail
-
AbstractXYSequencePointHitDetector
public AbstractXYSequencePointHitDetector()
Initializes the hit detector (constructor only for GOE) with no owner.
-
AbstractXYSequencePointHitDetector
public AbstractXYSequencePointHitDetector(XYSequencePaintlet owner)
Initializes the hit detector.- Parameters:
owner
- the paintlet that uses this detector
-
-
Method Detail
-
setOwner
public void setOwner(XYSequencePaintlet value)
Sets the owner.- Parameters:
value
- the owning panel
-
getOwner
public XYSequencePaintlet getOwner()
Returns the owner.- Returns:
- the owning paintlet
-
isHit
protected abstract List<XYSequencePoint> isHit(MouseEvent e)
Checks for a hit.- Specified by:
isHit
in classAbstractHitDetector<List<XYSequencePoint>,String>
- Parameters:
e
- the MouseEvent (for coordinates)- Returns:
- the associated object with the hit, otherwise null
-
processHit
protected String processHit(MouseEvent e, List<XYSequencePoint> hit)
Performs the action when a hit is detected.- Specified by:
processHit
in classAbstractHitDetector<List<XYSequencePoint>,String>
- Parameters:
e
- the MouseEvent (for coordinates)hit
- the object that got determined by the hit- Returns:
- the generated appendix for the tiptext
-
containers
public XYSequenceContainer[] containers(MouseEvent e)
Detects hits and associates them with the containers.- Specified by:
containers
in interfaceContainerHitDetector<List<XYSequencePoint>,String,XYSequenceContainer>
- Parameters:
e
- the mouse event to analyze for a hit- Returns:
- optional result of processing the event
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceCleanUpHandler
- Overrides:
cleanUp
in classAbstractHitDetector<List<XYSequencePoint>,String>
-
-