Package adams.gui.visualization.sequence
Class CrossHitDetector
- 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
-
- adams.gui.visualization.sequence.CrossHitDetector
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,ContainerHitDetector<List<XYSequencePoint>,String,XYSequenceContainer>
,HitDetector<List<XYSequencePoint>,String>
,Serializable
public class CrossHitDetector extends AbstractXYSequencePointHitDetector
Detects selections of crosses.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Diameter
the default diameter to use.-
Fields inherited from class adams.gui.visualization.sequence.AbstractXYSequencePointHitDetector
m_Owner
-
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 CrossHitDetector()
Initializes the hit detector (constructor only for GOE) with no owner.CrossHitDetector(XYSequencePaintlet owner)
Initializes the hit detector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.String
diameterTipText()
Returns the tip text for this property.protected int
getDefaultMinimumPixelDifference()
Returns the default minimum pixel difference.int
getDiameter()
Returns the diameter of the cross.String
globalInfo()
Returns a string describing the object.protected List<XYSequencePoint>
isHit(MouseEvent e)
Checks for a hit.void
setDiameter(int value)
Sets the cross diameter.-
Methods inherited from class adams.gui.visualization.sequence.AbstractXYSequencePointHitDetector
cleanUp, containers, getOwner, processHit, setOwner
-
Methods inherited from class adams.gui.visualization.core.plot.AbstractDistanceBasedHitDetector
distance, 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, 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
-
-
-
-
Constructor Detail
-
CrossHitDetector
public CrossHitDetector()
Initializes the hit detector (constructor only for GOE) with no owner.
-
CrossHitDetector
public CrossHitDetector(XYSequencePaintlet owner)
Initializes the hit detector.- Parameters:
owner
- the paintlet that uses this detector
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractDistanceBasedHitDetector<List<XYSequencePoint>,String>
-
getDefaultMinimumPixelDifference
protected int getDefaultMinimumPixelDifference()
Returns the default minimum pixel difference.- Overrides:
getDefaultMinimumPixelDifference
in classAbstractDistanceBasedHitDetector<List<XYSequencePoint>,String>
- Returns:
- the minimum
-
setDiameter
public void setDiameter(int value)
Sets the cross diameter.- Parameters:
value
- the diameter
-
getDiameter
public int getDiameter()
Returns the diameter of the cross.- Returns:
- the diameter
-
diameterTipText
public String diameterTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
isHit
protected List<XYSequencePoint> isHit(MouseEvent e)
Checks for a hit.- Specified by:
isHit
in classAbstractXYSequencePointHitDetector
- Parameters:
e
- the MouseEvent (for coordinates)- Returns:
- the associated object with the hit, otherwise null
-
-