Class AbstractPaintingSelectionProcessor
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.image.selection.AbstractSelectionProcessor
-
- adams.gui.visualization.image.selection.AbstractPaintingSelectionProcessor
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<SelectionProcessor>
,SizeOfHandler
,ImagePanelSelectionListener
,SelectionProcessor
,Serializable
,EventListener
- Direct Known Subclasses:
AbstractSelectionRectangleBasedSelectionProcessor
,PaintSelection
public abstract class AbstractPaintingSelectionProcessor extends AbstractSelectionProcessor
Ancestor for processors that paint with a certain color and stroke thickness.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
m_Color
the color to use for painting.protected float
m_StrokeThickness
the thickness of the stroke.-
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 AbstractPaintingSelectionProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected float
applyStroke(Graphics g, float thickness)
Applies the specified stroke thickness.String
colorTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.Color
getColor()
Returns the current color for painting.protected Color
getDefaultColor()
Returns the default color to use.protected float
getDefaultStrokeThickness()
Returns the default stroke thickness.float
getStrokeThickness()
Returns the current stroke thickness.void
setColor(Color value)
Sets the color to use.void
setStrokeThickness(float value)
Sets the stroke thickness to use.String
strokeThicknessTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.image.selection.AbstractSelectionProcessor
check, doImageChanged, doProcessSelection, imageChanged, processSelection, selected, shallowCopy, shallowCopy
-
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_Color
protected Color m_Color
the color to use for painting.
-
m_StrokeThickness
protected float m_StrokeThickness
the thickness of the stroke.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
getDefaultColor
protected Color getDefaultColor()
Returns the default color to use.- Returns:
- the color
-
setColor
public void setColor(Color value)
Sets the color to use.- Parameters:
value
- the color
-
getColor
public Color getColor()
Returns the current color for painting.- Returns:
- the color
-
colorTipText
public String colorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultStrokeThickness
protected float getDefaultStrokeThickness()
Returns the default stroke thickness.- Returns:
- the thickness
-
setStrokeThickness
public void setStrokeThickness(float value)
Sets the stroke thickness to use.- Parameters:
value
- the thickness
-
getStrokeThickness
public float getStrokeThickness()
Returns the current stroke thickness.- Returns:
- the thickness
-
strokeThicknessTipText
public String strokeThicknessTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
applyStroke
protected float applyStroke(Graphics g, float thickness)
Applies the specified stroke thickness.- Parameters:
g
- the graphics contextthickness
- the thickness to set- Returns:
- the previous thickness
-
-