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 classAbstractMouseClickProcessor.MouseButtonThe mouse buttons.
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_AltDownwhether alt needs to be down.protected AbstractMouseClickProcessor.MouseButtonm_Buttonthe mouse button to react to.protected intm_ClickCountthe required click count (< 1 if irrelevant).protected booleanm_CtrlDownwhether ctrl needs to be down.protected booleanm_Enabledwhether the overlay is enabled.protected booleanm_MetaDownwhether meta needs to be down.protected booleanm_ShiftDownwhether 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 StringaltDownTipText()Returns the tip text for this property.StringbuttonTipText()Returns the tip text for this property.StringclickCountTipText()Returns the tip text for this property.StringctrlDownTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected LocatedObjectsdetermineHits(ObjectAnnotationPanel panel, MouseEvent e)Determines the object hits for the mouse location.protected abstract voiddoProcess(ObjectAnnotationPanel panel, MouseEvent e)Processes the mouse event.StringenabledTipText()Returns the tip text for this property.booleangetAltDown()Returns whether the alt key needs to be down.AbstractMouseClickProcessor.MouseButtongetButton()Returns the mouse button to react to.intgetClickCount()Returns the number of mouse clicks; use 0 for turning check off; use 2 for double click.booleangetCtrlDown()Returns whether the ctrl key needs to be down.booleangetEnabled()Returns whether the click processor is enabled.booleangetMetaDown()Returns whether the meta key needs to be down.booleangetShiftDown()Returns whether the shift key needs to be down.StringmetaDownTipText()Returns the tip text for this property.voidprocess(ObjectAnnotationPanel panel, MouseEvent e)Processes the mouse event.voidsetAltDown(boolean value)Sets whether the alt key needs to be down.voidsetButton(AbstractMouseClickProcessor.MouseButton value)Sets the mouse button to react to.voidsetClickCount(int value)Sets the number of mouse clicks; use 0 for turning check off; use 2 for double click.voidsetCtrlDown(boolean value)Sets whether the ctrl key needs to be down.voidsetEnabled(boolean value)Sets whether the click processor is enabled.voidsetMetaDown(boolean value)Sets whether the meta key needs to be down.voidsetShiftDown(boolean value)Sets whether the shift key needs to be down.StringshiftDownTipText()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:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin 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
-
-