Class AbstractPaintOperation
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.segmentation.paintoperation.AbstractPaintOperation
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,PaintOperation
,Serializable
- Direct Known Subclasses:
NullOperation
,PolygonOverlay
public abstract class AbstractPaintOperation extends AbstractOptionHandler implements PaintOperation
Ancestor for additional paint operations in the segmentation panel.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_Enabled
whether the overlay is enabled.protected Tool
m_Owner
the owner.-
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 AbstractPaintOperation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected abstract void
doPerformPaint(Graphics2D g)
Performs a paint operation.String
enabledTipText()
Returns the tip text for this property.boolean
getEnabled()
Returns whether the overlay is enabled.Tool
getOwner()
Returns the owning tool.void
performPaint(Graphics2D g)
Performs a paint operation.void
setEnabled(boolean value)
Sets whether the overlay is enabled.void
setOwner(Tool value)
Sets the owning tool.-
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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Owner
protected Tool m_Owner
the owner.
-
m_Enabled
protected boolean m_Enabled
whether the overlay is enabled.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setOwner
public void setOwner(Tool value)
Sets the owning tool.- Specified by:
setOwner
in interfacePaintOperation
- Parameters:
value
- the owner
-
getOwner
public Tool getOwner()
Returns the owning tool.- Specified by:
getOwner
in interfacePaintOperation
- Returns:
- the owner
-
setEnabled
public void setEnabled(boolean value)
Sets whether the overlay is enabled.- Specified by:
setEnabled
in interfacePaintOperation
- Parameters:
value
- true if enabled
-
getEnabled
public boolean getEnabled()
Returns whether the overlay is enabled.- Specified by:
getEnabled
in interfacePaintOperation
- Returns:
- true if enabled
-
enabledTipText
public String enabledTipText()
Returns the tip text for this property.- Specified by:
enabledTipText
in interfacePaintOperation
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doPerformPaint
protected abstract void doPerformPaint(Graphics2D g)
Performs a paint operation.- Parameters:
g
- the graphics context
-
performPaint
public void performPaint(Graphics2D g)
Performs a paint operation.- Specified by:
performPaint
in interfacePaintOperation
- Parameters:
g
- the graphics context
-
-