|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.utils.laf.Line
public class Line
This class represents a simple line data.
Field Summary | |
---|---|
int |
x1
First X coordinate. |
int |
x2
Second X coordinate. |
int |
y1
First Y coordinate. |
int |
y2
Second Y coordinate. |
Constructor Summary | |
---|---|
Line()
Conscturcts a line using empty coordinates. |
|
Line(int x1,
int y1,
int x2,
int y2)
Constructs a line using the specifed coordinates. |
|
Line(Line line)
Constructs a line using coordinates from the specified line. |
|
Line(java.awt.Point p1,
java.awt.Point p2)
Constructs a line using the specifed points. |
Method Summary | |
---|---|
double |
getX1()
Returns first X coordinate. |
double |
getX2()
Returns second X coordinate. |
double |
getY1()
Returns first Y coordinate. |
double |
getY2()
Returns second Y coordinate. |
void |
setPoint1(java.awt.Point p1)
Sets first point. |
void |
setPoint2(java.awt.Point p2)
Sets second point. |
void |
setX1(int x1)
Sets first X coordinate. |
void |
setX2(int x2)
Sets second X coordinate. |
void |
setY1(int y1)
Sets first Y coordinate. |
void |
setY2(int y2)
Sets second Y coordinate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@XStreamAsAttribute public int x1
@XStreamAsAttribute public int y1
@XStreamAsAttribute public int x2
@XStreamAsAttribute public int y2
Constructor Detail |
---|
public Line()
public Line(int x1, int y1, int x2, int y2)
x1
- first X coordinatey1
- first Y coordinatex2
- second X coordinatey2
- second Y coordinatepublic Line(java.awt.Point p1, java.awt.Point p2)
p1
- first pointp2
- second pointpublic Line(Line line)
line
- line to processMethod Detail |
---|
public double getX1()
public void setX1(int x1)
x1
- first X coordinatepublic double getY1()
public void setY1(int y1)
y1
- first Y coordinatepublic double getX2()
public void setX2(int x2)
x2
- second X coordinatepublic double getY2()
public void setY2(int y2)
y2
- second Y coordinatepublic void setPoint1(java.awt.Point p1)
p1
- first pointpublic void setPoint2(java.awt.Point p2)
p2
- second point
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |