edu.northwestern.at.utils.swing
Class LocationRectangle

java.lang.Object
  extended by edu.northwestern.at.utils.swing.LocationRectangle

public class LocationRectangle
extends java.lang.Object

Defines a rectangle in terms of its coordinates.


Field Summary
 int x1
          (x,y) coordinates of upper left-hand corner.
 int x2
          (x,y) coordinates of lower right-hand corner.
 int y1
           
 int y2
           
 
Constructor Summary
LocationRectangle()
          Create an empty location rectangle.
LocationRectangle(int x1, int y1, int x2, int y2)
          Create a location rectangle from specified coordinates.
LocationRectangle(LocationRectangle locationRectangle)
          Create a location rectangle from another location rectangle.
 
Method Summary
 boolean equals(LocationRectangle locationRectangle)
          Check if another LocationRectangle is equal to this.
 java.lang.String toString()
          Display form of location rectangle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x1

public int x1
(x,y) coordinates of upper left-hand corner.


y1

public int y1

x2

public int x2
(x,y) coordinates of lower right-hand corner.


y2

public int y2
Constructor Detail

LocationRectangle

public LocationRectangle()
Create an empty location rectangle.


LocationRectangle

public LocationRectangle(int x1,
                         int y1,
                         int x2,
                         int y2)
Create a location rectangle from specified coordinates.

Parameters:
x1 - Upper left x coordinate.
y1 - Upper left y coordinate.
x2 - Lower right x coordinate.
y2 - Lower right y coordinate.

LocationRectangle

public LocationRectangle(LocationRectangle locationRectangle)
Create a location rectangle from another location rectangle.

Parameters:
locationRectangle - Location rectangle from which to copy settings.
Method Detail

equals

public boolean equals(LocationRectangle locationRectangle)
Check if another LocationRectangle is equal to this.

Parameters:
locationRectangle - The other location rectangle.

toString

public java.lang.String toString()
Display form of location rectangle.

Overrides:
toString in class java.lang.Object
Returns:
Displayable string with location coordinates.