public class Line
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.awt.Color |
color |
private int |
thickness |
private int |
x1 |
private int |
x2 |
private int |
y1 |
private int |
y2 |
Constructor and Description |
---|
Line(int x1,
int y1,
int x2,
int y2,
int thickness,
java.awt.Color color) |
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor() |
int |
getThickness() |
int |
getX1() |
int |
getX2() |
int |
getY1() |
int |
getY2() |
private int x1
private int x2
private int y1
private int y2
private int thickness
private java.awt.Color color
public Line(int x1, int y1, int x2, int y2, int thickness, java.awt.Color color)
x1
- the x1 coordinatey1
- the y1 coordinatex2
- the x2 coordinatey2
- the y2 coordinatethickness
- the line's thicknesscolor
- the color of the linepublic int getX1()
public int getX2()
public int getY1()
public int getY2()
public int getThickness()
public java.awt.Color getColor()