public class ZoomPolygon extends ZoomShape
Constructor and Description |
---|
ZoomPolygon(Zoomer zoomer,
java.awt.Point startPoint,
int coordinateType,
double xStart,
double yStart) |
Modifier and Type | Method and Description |
---|---|
void |
closeShape()
Shape is complete for whatever reason.
|
boolean |
containsPoint(java.awt.Component component,
java.awt.Point pt)
Shape contains the point pt.
|
java.awt.Rectangle |
drawShape(java.awt.Graphics g,
java.awt.Component component,
boolean beforeOther)
Draw the shape using the given graphics handle on the
given component.
|
java.awt.Rectangle |
drawShapeOutline(java.awt.Graphics g,
java.awt.Component component) |
java.awt.Rectangle |
drawShapeSolid(java.awt.Graphics g,
java.awt.Component component) |
java.awt.Rectangle |
getBounds(java.awt.Component component) |
int |
getNumPoints() |
java.awt.Point |
getStartPoint() |
double |
getXLength() |
double[] |
getxPoints() |
double |
getXStart() |
double |
getYLength() |
double[] |
getyPoints() |
double |
getYStart() |
void |
newPoint(double x,
double y)
New point to add to the shape - or update old point if it's a
rectangle.
|
boolean |
removeOnZoom() |
void |
setCurrentMousePoint(java.awt.Point currentMousePoint) |
getCoordinateType, getZoomer, isClosed, setZoomShapeFill, setZoomShapeOutline
public ZoomPolygon(Zoomer zoomer, java.awt.Point startPoint, int coordinateType, double xStart, double yStart)
public java.awt.Rectangle drawShape(java.awt.Graphics g, java.awt.Component component, boolean beforeOther)
ZoomShape
public java.awt.Rectangle drawShapeOutline(java.awt.Graphics g, java.awt.Component component)
public java.awt.Rectangle drawShapeSolid(java.awt.Graphics g, java.awt.Component component)
public java.awt.Rectangle getBounds(java.awt.Component component)
public boolean containsPoint(java.awt.Component component, java.awt.Point pt)
ZoomShape
Note that these are in screen pixel coordinates.
containsPoint
in class ZoomShape
pt
- pointpublic void newPoint(double x, double y)
ZoomShape
public void closeShape()
ZoomShape
closeShape
in class ZoomShape
public boolean removeOnZoom()
removeOnZoom
in class ZoomShape
Basically true for rectangles, false for polygons.
public void setCurrentMousePoint(java.awt.Point currentMousePoint)
currentMousePoint
- the currentMousePoint to setpublic java.awt.Point getStartPoint()
public int getNumPoints()
public double getXLength()
getXLength
in class ZoomShape
public double getXStart()
public double getYLength()
getYLength
in class ZoomShape
public double getYStart()
public double[] getxPoints()
public double[] getyPoints()