public class DrawingLine extends DrawingObject
| Constructor and Description |
|---|
DrawingLine(int x1,
int y1,
int x2,
int y2)
This constructs a new DrawingLine object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
drawObject(java.awt.Graphics2D g2)
This function draws the line using the given Graphics2D context.
|
java.awt.Rectangle |
getBoundingBox()
This function returns a Bounding Box.
|
void |
resizeObject(int x1,
int y1,
int x2,
int y2)
This resizes a DrawingLine object.
|
boolean |
wasClicked(int px,
int py)
This function determines whether the given point (px, py), where the
user has clicked, hits this line.
|
clickHitEllipse, clickHitLinepublic DrawingLine(int x1,
int y1,
int x2,
int y2)
public void resizeObject(int x1,
int y1,
int x2,
int y2)
resizeObject in class DrawingObjectpublic boolean wasClicked(int px,
int py)
wasClicked in class DrawingObjectpublic java.awt.Rectangle getBoundingBox()
getBoundingBox in class DrawingObjectpublic void drawObject(java.awt.Graphics2D g2)
drawObject in class DrawingObject