Class AbstractSelectionShapePainter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.image.selectionshape.AbstractSelectionShapePainter
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,SelectionShapePainter
,Serializable
- Direct Known Subclasses:
AbstractStrokeSelectionShapePainter
public abstract class AbstractSelectionShapePainter extends AbstractOptionHandler implements SelectionShapePainter
Ancestor for shape painters.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
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 AbstractSelectionShapePainter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
canPaint(ImagePanel.PaintPanel owner, Graphics g, Point topLeft, Point bottomRight, List<Point> trace)
Checks whether painting is possible.protected abstract void
doPaintSelectionShape(ImagePanel.PaintPanel owner, Graphics g, Point topLeft, Point bottomRight, List<Point> trace)
Paints the selection shape.void
paintSelectionShape(ImagePanel.PaintPanel owner, Graphics g, Point topLeft, Point bottomRight, List<Point> trace)
Paints the selection shape.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, 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, defineOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.gui.visualization.image.selectionshape.SelectionShapePainter
canAddTracePoint
-
-
-
-
Method Detail
-
canPaint
protected abstract boolean canPaint(ImagePanel.PaintPanel owner, Graphics g, Point topLeft, Point bottomRight, List<Point> trace)
Checks whether painting is possible.- Parameters:
owner
- the panel this shape is used withg
- the graphics contexttopLeft
- the top-left cornerbottomRight
- the bottom-right cornertrace
- the mouse movement trace- Returns:
- true if painting is possible
-
doPaintSelectionShape
protected abstract void doPaintSelectionShape(ImagePanel.PaintPanel owner, Graphics g, Point topLeft, Point bottomRight, List<Point> trace)
Paints the selection shape.- Parameters:
owner
- the panel this shape is used withg
- the graphics contexttopLeft
- the top-left cornerbottomRight
- the bottom-right cornertrace
- the mouse movement trace
-
paintSelectionShape
public void paintSelectionShape(ImagePanel.PaintPanel owner, Graphics g, Point topLeft, Point bottomRight, List<Point> trace)
Paints the selection shape.- Specified by:
paintSelectionShape
in interfaceSelectionShapePainter
- Parameters:
owner
- the panel this shape is used withg
- the graphics contexttopLeft
- the top-left cornerbottomRight
- the bottom-right cornertrace
- the mouse movement trace
-
-