|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.colorado.cs.ns2.graphics.CoordinatePair
public class CoordinatePair
This class stores a pair of coordinate pairs as two Points. @see Point
Field Summary | |
---|---|
private java.awt.Point |
c1
Point (x1, y1). |
private java.awt.Point |
c2
Point (x2, y2). |
private static long |
serialVersionUID
Generated serial version UID. |
Constructor Summary | |
---|---|
CoordinatePair()
Default constructor. |
|
CoordinatePair(java.awt.Point p)
One-argument constructor sets Point 1 (x1, y1). |
|
CoordinatePair(java.awt.Point p1,
java.awt.Point p2)
Two-argument constructor sets both Points 1 and 2 ((x1, y2), (x2, y2)). |
Method Summary | |
---|---|
int |
getX1()
Get x-coordinate of first Point. |
int |
getX2()
Get x-coordinate of second Point. |
int |
getY1()
Get y-coordinate of first Point. |
int |
getY2()
Get y-coordinate of second Point. |
void |
setCoordinates(java.awt.Point p,
int point)
Sets the Coordinates of any of the Points in the Coordinate Pair. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private java.awt.Point c1
private java.awt.Point c2
Constructor Detail |
---|
public CoordinatePair()
public CoordinatePair(java.awt.Point p)
p
- A new Point.public CoordinatePair(java.awt.Point p1, java.awt.Point p2)
p1
- A new Point 1.p2
- A new Point 2.Method Detail |
---|
public int getX1()
public int getX2()
public int getY1()
public int getY2()
public void setCoordinates(java.awt.Point p, int point)
p
- - Point Objectpoint
- - Select the point (1 or 2)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |