Class SwitchLabel
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.gui.visualization.segmentation.tool.AbstractTool
-
- adams.gui.visualization.segmentation.tool.AbstractToolWithParameterPanel
-
- adams.gui.visualization.segmentation.tool.SwitchLabel
-
- All Implemented Interfaces:
CleanUpHandler
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,SizeOfHandler
,CustomizableTool
,Tool
,Serializable
public class SwitchLabel extends AbstractToolWithParameterPanel
Switch label, for changing one label to another.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseComboBox<String>
m_ComboBoxNewLabel
the text field for the new label.protected BaseComboBox<String>
m_ComboBoxOldLabel
the text field for the old label.protected DefaultComboBoxModel<String>
m_LabelsNew
the available labels.protected DefaultComboBoxModel<String>
m_LabelsOld
the available labels.-
Fields inherited from class adams.gui.visualization.segmentation.tool.AbstractToolWithParameterPanel
m_ButtonApply
-
Fields inherited from class adams.gui.visualization.segmentation.tool.AbstractTool
m_KeyListener, m_Listener, m_MotionListener, m_PaintOperation, m_PanelCanvas, m_PanelFullOptions, m_PanelOptions
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description SwitchLabel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addOptions(ParameterPanel paramPanel)
Fills the parameter panel with the options.void
annotationsChanged()
Hook method for when new annotations have been set.protected Cursor
createCursor()
Returns the mouse cursor to use.protected ToolMouseAdapter
createMouseListener()
Creates the mouse listener to use.protected ToolMouseMotionAdapter
createMouseMotionListener()
Creates the mouse motion listener to use.protected void
doApply()
Applies the settings.Icon
getIcon()
The icon of the tool.String
getName()
The name of the tool.String
globalInfo()
Returns a string describing the object.-
Methods inherited from class adams.gui.visualization.segmentation.tool.AbstractToolWithParameterPanel
applyOptions, createOptionPanel
-
Methods inherited from class adams.gui.visualization.segmentation.tool.AbstractTool
activate, apply, checkBeforeApply, cleanUp, createApplyButton, createKeyListener, createPaintOperation, deactivate, getActiveColor, getActiveCombinedSubLayer, getActiveImage, getActiveOverlay, getCanvas, getCursor, getKeyListener, getLayerManager, getMouseListener, getMouseMotionListener, getOptionPanel, getPaintOperation, getZoom, hasActiveCombinedSubLayer, hasActiveOverlay, hasAnyActive, initialize, isAutomaticUndoEnabled, setApplyButtonState, setCanvas
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
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, toString, wait, wait, wait
-
Methods inherited from interface adams.core.CleanUpHandler
cleanUp
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.gui.visualization.segmentation.tool.Tool
activate, deactivate, getActiveColor, getActiveCombinedSubLayer, getActiveImage, getActiveOverlay, getCanvas, getCursor, getKeyListener, getLayerManager, getMouseListener, getMouseMotionListener, getOptionPanel, getPaintOperation, getZoom, hasActiveCombinedSubLayer, hasActiveOverlay, hasAnyActive, isAutomaticUndoEnabled, setCanvas
-
-
-
-
Field Detail
-
m_ComboBoxOldLabel
protected BaseComboBox<String> m_ComboBoxOldLabel
the text field for the old label.
-
m_ComboBoxNewLabel
protected BaseComboBox<String> m_ComboBoxNewLabel
the text field for the new label.
-
m_LabelsOld
protected DefaultComboBoxModel<String> m_LabelsOld
the available labels.
-
m_LabelsNew
protected DefaultComboBoxModel<String> m_LabelsNew
the available labels.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Returns:
- a description suitable for displaying in the gui
-
getName
public String getName()
The name of the tool.- Returns:
- the name
-
getIcon
public Icon getIcon()
The icon of the tool.- Returns:
- the icon
-
createCursor
protected Cursor createCursor()
Returns the mouse cursor to use.- Specified by:
createCursor
in classAbstractTool
- Returns:
- the cursor
-
createMouseListener
protected ToolMouseAdapter createMouseListener()
Creates the mouse listener to use.- Specified by:
createMouseListener
in classAbstractTool
- Returns:
- the listener, null if not applicable
-
createMouseMotionListener
protected ToolMouseMotionAdapter createMouseMotionListener()
Creates the mouse motion listener to use.- Specified by:
createMouseMotionListener
in classAbstractTool
- Returns:
- the listener, null if not applicable
-
doApply
protected void doApply()
Applies the settings.- Specified by:
doApply
in classAbstractTool
-
addOptions
protected void addOptions(ParameterPanel paramPanel)
Fills the parameter panel with the options.- Specified by:
addOptions
in classAbstractToolWithParameterPanel
- Parameters:
paramPanel
- for adding the options to
-
annotationsChanged
public void annotationsChanged()
Hook method for when new annotations have been set.- Specified by:
annotationsChanged
in interfaceTool
- Overrides:
annotationsChanged
in classAbstractTool
-
-