Class AbstractMouseClickProcessor
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.object.mouseclick.AbstractMouseClickProcessor
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
AddMetaData
,DeleteObjects
,MultiProcessor
,NullProcessor
,SetLabel
,ViewObjects
public abstract class AbstractMouseClickProcessor extends AbstractOptionHandler
Ancestor for schemes that react to mouse clicks.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractMouseClickProcessor.MouseButton
The mouse buttons.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_AltDown
whether alt needs to be down.protected AbstractMouseClickProcessor.MouseButton
m_Button
the mouse button to react to.protected int
m_ClickCount
the required click count (< 1 if irrelevant).protected boolean
m_CtrlDown
whether ctrl needs to be down.protected boolean
m_Enabled
whether the overlay is enabled.protected boolean
m_MetaDown
whether meta needs to be down.protected boolean
m_ShiftDown
whether shift needs to be down.-
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 AbstractMouseClickProcessor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
altDownTipText()
Returns the tip text for this property.String
buttonTipText()
Returns the tip text for this property.String
clickCountTipText()
Returns the tip text for this property.String
ctrlDownTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected LocatedObjects
determineHits(ObjectAnnotationPanel panel, MouseEvent e)
Determines the object hits for the mouse location.protected abstract void
doProcess(ObjectAnnotationPanel panel, MouseEvent e)
Processes the mouse event.String
enabledTipText()
Returns the tip text for this property.boolean
getAltDown()
Returns whether the alt key needs to be down.AbstractMouseClickProcessor.MouseButton
getButton()
Returns the mouse button to react to.int
getClickCount()
Returns the number of mouse clicks; use 0 for turning check off; use 2 for double click.boolean
getCtrlDown()
Returns whether the ctrl key needs to be down.boolean
getEnabled()
Returns whether the click processor is enabled.boolean
getMetaDown()
Returns whether the meta key needs to be down.boolean
getShiftDown()
Returns whether the shift key needs to be down.String
metaDownTipText()
Returns the tip text for this property.void
process(ObjectAnnotationPanel panel, MouseEvent e)
Processes the mouse event.void
setAltDown(boolean value)
Sets whether the alt key needs to be down.void
setButton(AbstractMouseClickProcessor.MouseButton value)
Sets the mouse button to react to.void
setClickCount(int value)
Sets the number of mouse clicks; use 0 for turning check off; use 2 for double click.void
setCtrlDown(boolean value)
Sets whether the ctrl key needs to be down.void
setEnabled(boolean value)
Sets whether the click processor is enabled.void
setMetaDown(boolean value)
Sets whether the meta key needs to be down.void
setShiftDown(boolean value)
Sets whether the shift key needs to be down.String
shiftDownTipText()
Returns the tip text for this property.-
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.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Enabled
protected boolean m_Enabled
whether the overlay is enabled.
-
m_Button
protected AbstractMouseClickProcessor.MouseButton m_Button
the mouse button to react to.
-
m_ClickCount
protected int m_ClickCount
the required click count (< 1 if irrelevant).
-
m_ShiftDown
protected boolean m_ShiftDown
whether shift needs to be down.
-
m_AltDown
protected boolean m_AltDown
whether alt needs to be down.
-
m_CtrlDown
protected boolean m_CtrlDown
whether ctrl needs to be down.
-
m_MetaDown
protected boolean m_MetaDown
whether meta needs to be down.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setEnabled
public void setEnabled(boolean value)
Sets whether the click processor is enabled.- Parameters:
value
- true if enabled
-
getEnabled
public boolean getEnabled()
Returns whether the click processor is enabled.- Returns:
- true if enabled
-
enabledTipText
public String enabledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setButton
public void setButton(AbstractMouseClickProcessor.MouseButton value)
Sets the mouse button to react to.- Parameters:
value
- the button
-
getButton
public AbstractMouseClickProcessor.MouseButton getButton()
Returns the mouse button to react to.- Returns:
- the button
-
buttonTipText
public String buttonTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setClickCount
public void setClickCount(int value)
Sets the number of mouse clicks; use 0 for turning check off; use 2 for double click.- Parameters:
value
- the count
-
getClickCount
public int getClickCount()
Returns the number of mouse clicks; use 0 for turning check off; use 2 for double click.- Returns:
- the count
-
clickCountTipText
public String clickCountTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setShiftDown
public void setShiftDown(boolean value)
Sets whether the shift key needs to be down.- Parameters:
value
- true if needs to be down
-
getShiftDown
public boolean getShiftDown()
Returns whether the shift key needs to be down.- Returns:
- true if needs to be down
-
shiftDownTipText
public String shiftDownTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAltDown
public void setAltDown(boolean value)
Sets whether the alt key needs to be down.- Parameters:
value
- true if needs to be down
-
getAltDown
public boolean getAltDown()
Returns whether the alt key needs to be down.- Returns:
- true if needs to be down
-
altDownTipText
public String altDownTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setCtrlDown
public void setCtrlDown(boolean value)
Sets whether the ctrl key needs to be down.- Parameters:
value
- true if needs to be down
-
getCtrlDown
public boolean getCtrlDown()
Returns whether the ctrl key needs to be down.- Returns:
- true if needs to be down
-
ctrlDownTipText
public String ctrlDownTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMetaDown
public void setMetaDown(boolean value)
Sets whether the meta key needs to be down.- Parameters:
value
- true if needs to be down
-
getMetaDown
public boolean getMetaDown()
Returns whether the meta key needs to be down.- Returns:
- true if needs to be down
-
metaDownTipText
public String metaDownTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
determineHits
protected LocatedObjects determineHits(ObjectAnnotationPanel panel, MouseEvent e)
Determines the object hits for the mouse location.- Parameters:
panel
- the owning panele
- the mouse event/location- Returns:
- the hits
-
doProcess
protected abstract void doProcess(ObjectAnnotationPanel panel, MouseEvent e)
Processes the mouse event.- Parameters:
panel
- the owning panele
- the event
-
process
public void process(ObjectAnnotationPanel panel, MouseEvent e)
Processes the mouse event.- Parameters:
panel
- the owning panele
- the event
-
-