Class AbstractSelectionRectangleBasedLeftClickProcessor
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.image.leftclick.AbstractLeftClickProcessor
-
- adams.gui.visualization.image.leftclick.AbstractSelectionRectangleBasedLeftClickProcessor
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractLeftClickProcessor>
,SizeOfHandler
,ObjectPrefixHandler
,ImagePanelLeftClickListener
,Serializable
,EventListener
- Direct Known Subclasses:
FixedBoundingBox
,RandomBoundingBox
public abstract class AbstractSelectionRectangleBasedLeftClickProcessor extends AbstractLeftClickProcessor implements ObjectPrefixHandler
Ancestor for left-click processors that make use ofSelectionRectangle
.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<SelectionRectangle>
m_Locations
the current rectangles.protected int
m_NumDigits
the number of digits to use for left-padding the index.protected String
m_Prefix
the prefix for the objects.-
Fields inherited from class adams.gui.visualization.image.leftclick.AbstractLeftClickProcessor
m_AltDown, m_CtrlDown, m_MetaDown, m_ShiftDown
-
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 AbstractSelectionRectangleBasedLeftClickProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected void
doImageChanged(ImagePanel.PaintPanel panel)
Notifies the overlay that the image has changed.protected int
findLastIndex(Report report)
Determines the last index used with the given prefix.protected int
getDefaultNumDigits()
Returns the default number of digits to use.protected String
getDefaultPrefix()
Returns the default prefix to use for the objects.protected List<SelectionRectangle>
getLocations(Report report)
Returns all currently stored locations.int
getNumDigits()
Returns the number of digits to use for the left-padded index.String
getPrefix()
Returns the prefix to use for the objects.String
numDigitsTipText()
Returns the tip text for this property.String
prefixTipText()
Returns the tip text for this property.protected void
reset()
Resets the scheme.void
setNumDigits(int value)
Sets the number of digits to use for the left-padded index.void
setPrefix(String value)
Sets the prefix to use for the objects.-
Methods inherited from class adams.gui.visualization.image.leftclick.AbstractLeftClickProcessor
altDownTipText, check, clicked, ctrlDownTipText, doProcessClick, getAltDown, getCtrlDown, getMetaDown, getShiftDown, imageChanged, metaDownTipText, processClick, setAltDown, setCtrlDown, setMetaDown, setShiftDown, shallowCopy, shallowCopy, shiftDownTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, 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_Prefix
protected String m_Prefix
the prefix for the objects.
-
m_NumDigits
protected int m_NumDigits
the number of digits to use for left-padding the index.
-
m_Locations
protected List<SelectionRectangle> m_Locations
the current rectangles.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractLeftClickProcessor
-
reset
protected void reset()
Resets the scheme.- Overrides:
reset
in classAbstractOptionHandler
-
getDefaultPrefix
protected String getDefaultPrefix()
Returns the default prefix to use for the objects.- Returns:
- the default
-
setPrefix
public void setPrefix(String value)
Sets the prefix to use for the objects.- Specified by:
setPrefix
in interfaceObjectPrefixHandler
- Parameters:
value
- the prefix
-
getPrefix
public String getPrefix()
Returns the prefix to use for the objects.- Specified by:
getPrefix
in interfaceObjectPrefixHandler
- Returns:
- the prefix
-
prefixTipText
public String prefixTipText()
Returns the tip text for this property.- Specified by:
prefixTipText
in interfaceObjectPrefixHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultNumDigits
protected int getDefaultNumDigits()
Returns the default number of digits to use.- Returns:
- the default
-
setNumDigits
public void setNumDigits(int value)
Sets the number of digits to use for the left-padded index.- Parameters:
value
- the number of digits
-
getNumDigits
public int getNumDigits()
Returns the number of digits to use for the left-padded index.- Returns:
- the number of digits
-
numDigitsTipText
public String numDigitsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
findLastIndex
protected int findLastIndex(Report report)
Determines the last index used with the given prefix.
-
getLocations
protected List<SelectionRectangle> getLocations(Report report)
Returns all currently stored locations.- Parameters:
report
- the report to get the locations from- Returns:
- the locations
-
doImageChanged
protected void doImageChanged(ImagePanel.PaintPanel panel)
Notifies the overlay that the image has changed.- Overrides:
doImageChanged
in classAbstractLeftClickProcessor
- Parameters:
panel
- the panel this overlay belongs to
-
-