Class SAM2Markers
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.object.annotator.AbstractAnnotator
-
- adams.gui.visualization.object.annotator.SAM2Markers
-
- All Implemented Interfaces:
adams.core.CleanUpHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.SizeOfHandler,Serializable
public class SAM2Markers extends adams.gui.visualization.object.annotator.AbstractAnnotatorAnnotator plugin that works only in conjunction with the SAM2 tool.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSAM2Markers.ShapeEnum for the marker shape to plot around the marker points.
-
Field Summary
Fields Modifier and Type Field Description protected Colorm_Colorthe color for the markers.protected intm_Extentthe maximum width/height of the shape to plot around the marker points.protected KeyListenerm_KeyListenerthe key listener.protected MouseListenerm_MouseListenerthe mouse listener.protected List<Point>m_Pointsthe points.protected SAM2Markers.Shapem_Shapethe marker shape.protected SAM2m_Toolthe associated tool.
-
Constructor Summary
Constructors Constructor Description SAM2Markers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcolorTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected voiddoInstall()Installs the annotator with the owner.protected voiddoPaintSelection(Graphics g)Paints the markers.protected voiddoUninstall()Uninstalls the annotator with the owner.StringextentTipText()Returns the tip text for this property.ColorgetColor()Returns the color in use for point markers.intgetExtent()Returns the size of the markers.SAM2Markers.ShapegetShape()Returns the shape in use for markers.SAM2getTool()Returns the associated tool.StringglobalInfo()Returns a string describing the object.protected voidinitialize()Initializes the members.voidsetColor(Color value)Sets the color to use for point markers.voidsetExtent(int value)Sets the size of the markers.voidsetShape(SAM2Markers.Shape value)Sets the shape to use for markers.voidsetTool(SAM2 value)Sets the associated tool.StringshapeTipText()Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.object.annotator.AbstractAnnotator
annotationsChanged, applyStroke, cleanUp, getCurrentLabel, getOwner, getStrokeWidth, hasCurrentLabel, install, labelChanged, paintSelection, setOwner, uninstall
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Shape
protected SAM2Markers.Shape m_Shape
the marker shape.
-
m_Color
protected Color m_Color
the color for the markers.
-
m_Extent
protected int m_Extent
the maximum width/height of the shape to plot around the marker points.
-
m_MouseListener
protected MouseListener m_MouseListener
the mouse listener.
-
m_KeyListener
protected KeyListener m_KeyListener
the key listener.
-
m_Tool
protected SAM2 m_Tool
the associated tool.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.core.option.AbstractOptionHandler
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classadams.gui.visualization.object.annotator.AbstractAnnotator
-
setShape
public void setShape(SAM2Markers.Shape value)
Sets the shape to use for markers.- Parameters:
value- the shape
-
getShape
public SAM2Markers.Shape getShape()
Returns the shape in use for markers.- Returns:
- the shape
-
shapeTipText
public String shapeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColor
public void setColor(Color value)
Sets the color to use for point markers.- Parameters:
value- the color
-
getColor
public Color getColor()
Returns the color in use for point markers.- 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.
-
setExtent
public void setExtent(int value)
Sets the size of the markers.- Parameters:
value- the extent
-
getExtent
public int getExtent()
Returns the size of the markers.- Returns:
- the extent
-
extentTipText
public String extentTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTool
public void setTool(SAM2 value)
Sets the associated tool.- Parameters:
value- the tool
-
getTool
public SAM2 getTool()
Returns the associated tool.- Returns:
- the tool
-
doInstall
protected void doInstall()
Installs the annotator with the owner.- Specified by:
doInstallin classadams.gui.visualization.object.annotator.AbstractAnnotator
-
doUninstall
protected void doUninstall()
Uninstalls the annotator with the owner.- Specified by:
doUninstallin classadams.gui.visualization.object.annotator.AbstractAnnotator
-
doPaintSelection
protected void doPaintSelection(Graphics g)
Paints the markers.- Specified by:
doPaintSelectionin classadams.gui.visualization.object.annotator.AbstractAnnotator- Parameters:
g- the graphics context
-
-