public class ZoomRectangle extends ZoomShape
Constructor and Description |
---|
ZoomRectangle(Zoomer zoomer,
int coordindateType,
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 r) |
java.awt.Rectangle |
drawShapeSolid(java.awt.Graphics g,
java.awt.Component component,
java.awt.Rectangle r) |
java.awt.Rectangle |
getBounds(java.awt.Component component) |
double |
getXLength() |
double |
getXStart() |
double |
getYLength() |
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() |
getCoordinateType, getZoomer, isClosed, setZoomShapeFill, setZoomShapeOutline
public ZoomRectangle(Zoomer zoomer, int coordindateType, 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, java.awt.Rectangle r)
public java.awt.Rectangle drawShapeSolid(java.awt.Graphics g, java.awt.Component component, java.awt.Rectangle r)
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 closeShape()
ZoomShape
closeShape
in class ZoomShape
public boolean removeOnZoom()
removeOnZoom
in class ZoomShape
Basically true for rectangles, false for polygons.
public void newPoint(double x, double y)
ZoomShape
public java.awt.Rectangle getBounds(java.awt.Component component)
public double getXLength()
getXLength
in class ZoomShape
public double getXStart()
public double getYLength()
getYLength
in class ZoomShape