public class PolygonDrawingListener extends Object implements MouseListener
MouseListener
that allows users to click
a series of points in an image representing the vertices
of a Polygon
.Constructor and Description |
---|
PolygonDrawingListener()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
drawPoints(MBFImage image)
Draw the polygon onto an image.
|
Polygon |
getPolygon() |
void |
mouseClicked(MouseEvent arg0) |
void |
mouseEntered(MouseEvent arg0) |
void |
mouseExited(MouseEvent arg0) |
void |
mousePressed(MouseEvent arg0) |
void |
mouseReleased(MouseEvent arg0) |
void |
reset()
Reset the polygon.
|
public PolygonDrawingListener()
public void reset()
public void mouseClicked(MouseEvent arg0)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent arg0)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent arg0)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent arg0)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent arg0)
mouseReleased
in interface MouseListener
public Polygon getPolygon()
public void drawPoints(MBFImage image)
image
- the image to draw on.