Interface SelectionShapePainter
-
- All Superinterfaces:
Destroyable
,OptionHandler
- All Known Subinterfaces:
ColorSelectionShapePainter
,StrokeSelectionShapePainter
- All Known Implementing Classes:
AbstractSelectionShapePainter
,AbstractStrokeSelectionShapePainter
,PolygonPainter
,RectanglePainter
public interface SelectionShapePainter extends OptionHandler
Interface for classes that can paint the selection.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canAddTracePoint(ImagePanel.PaintPanel owner, List<Point> trace, Point p)
Returns whether the current point is at leats the specified distance away from the last one.void
paintSelectionShape(ImagePanel.PaintPanel owner, Graphics g, Point topLeft, Point bottomRight, List<Point> trace)
Paints the selection shape.-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
canAddTracePoint
boolean canAddTracePoint(ImagePanel.PaintPanel owner, List<Point> trace, Point p)
Returns whether the current point is at leats the specified distance away from the last one.- Parameters:
owner
- the panel this shape is used withtrace
- the trace so farp
- the point to check- Returns:
- true if can be added
-
paintSelectionShape
void paintSelectionShape(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
-
-