Class Pencil
-
- All Implemented Interfaces:
CleanUpHandler,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,SizeOfHandler,CustomizableTool,Tool,Serializable
public class Pencil extends AbstractShapeTool
For coloring in pixels.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_SIZEthe default size.protected JRadioButtonm_RadioRoundthe radio button for round shape.protected JRadioButtonm_RadioSquarethe radio button for square shape.protected booleanm_Roundwhether the shape is currently round.protected intm_Sizethe current size.protected NumberTextFieldm_TextSizethe text field for the size.-
Fields inherited from class adams.gui.visualization.segmentation.tool.AbstractShapeTool
m_LastPoint
-
Fields inherited from class adams.gui.visualization.segmentation.tool.AbstractToolWithParameterPanel
m_ButtonApply, m_ButtonFavorites, m_IgnoreOptionsUpdate, m_InitialOptions, m_ParameterPanel
-
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 Pencil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddOptions(ParameterPanel paramPanel)Fills the parameter panel with the options.protected CursorcreateCursor()Returns the mouse cursor to use.protected voiddoApply()Applies the settings.protected voiddoDrawShape(List<Point> points)Draws the currently selected shape at the specified locations.IcongetIcon()The icon of the tool.StringgetName()The name of the tool.StringglobalInfo()Returns a string describing the object.protected voidinitialize()Initializes the members.-
Methods inherited from class adams.gui.visualization.segmentation.tool.AbstractShapeTool
createMouseListener, createMouseMotionListener, doDrawShape, drawShape, drawShape
-
Methods inherited from class adams.gui.visualization.segmentation.tool.AbstractToolWithParameterPanel
apply, applyOptions, applyOptionsQuietly, createOptionPanel, getCurrentOptions, getFavoritesOptions, getOption, getOptionPanel, postProcessCurrentOptions, retrieveCurrentOptions, setFavoritesOptions, setInitialOptions, setOption, showFavoritesMenu, updateOptions
-
Methods inherited from class adams.gui.visualization.segmentation.tool.AbstractTool
activate, annotationsChanged, checkBeforeApply, cleanUp, createApplyButton, createKeyListener, createPaintOperation, deactivate, getActiveColor, getActiveCombinedSubLayer, getActiveImage, getActiveOverlay, getCanvas, getCursor, getKeyListener, getLayerManager, getModifiedIcon, getMouseListener, getMouseMotionListener, getPaintOperation, getUnmodifiedIcon, getZoom, hasActiveCombinedSubLayer, hasActiveOverlay, hasAnyActive, 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, annotationsChanged, deactivate, getActiveColor, getActiveCombinedSubLayer, getActiveImage, getActiveOverlay, getCanvas, getCursor, getKeyListener, getLayerManager, getMouseListener, getMouseMotionListener, getPaintOperation, getZoom, hasActiveCombinedSubLayer, hasActiveOverlay, hasAnyActive, isAutomaticUndoEnabled, setCanvas
-
-
-
-
Field Detail
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE
the default size.- See Also:
- Constant Field Values
-
m_RadioRound
protected JRadioButton m_RadioRound
the radio button for round shape.
-
m_RadioSquare
protected JRadioButton m_RadioSquare
the radio button for square shape.
-
m_TextSize
protected NumberTextField m_TextSize
the text field for the size.
-
m_Round
protected boolean m_Round
whether the shape is currently round.
-
m_Size
protected int m_Size
the current size.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Returns:
- a description suitable for displaying in the gui
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classAbstractToolWithParameterPanel
-
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:
createCursorin classAbstractTool- Returns:
- the cursor
-
doDrawShape
protected void doDrawShape(List<Point> points)
Draws the currently selected shape at the specified locations.- Specified by:
doDrawShapein classAbstractShapeTool- Parameters:
points- the locations
-
doApply
protected void doApply()
Applies the settings.- Specified by:
doApplyin classAbstractTool
-
addOptions
protected void addOptions(ParameterPanel paramPanel)
Fills the parameter panel with the options.- Specified by:
addOptionsin classAbstractToolWithParameterPanel- Parameters:
paramPanel- for adding the options to
-
-