gnu.vnc.awt
Class Rectangle

java.lang.Object
  extended by gnu.vnc.awt.Rectangle

public class Rectangle
extends java.lang.Object

Author:
Tal Liron

Field Summary
 int height
           
 int width
           
 int x
           
 int y
           
 
Constructor Summary
Rectangle(int x, int y, int width, int height)
          Constructor.
 
Method Summary
 boolean contains(java.awt.Point p)
           
 boolean contains(Rectangle r)
           
 java.awt.Point getLocation()
          Returns the location of the top left corner of the rectangle (as a point).
 Rectangle intersection(Rectangle r)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public int x

y

public int y

width

public int width

height

public int height
Constructor Detail

Rectangle

public Rectangle(int x,
                 int y,
                 int width,
                 int height)
Constructor.

Parameters:
x - The x-coordinate.
y - The y-coordinate.
width - The width.
height - The height.
Method Detail

getLocation

public java.awt.Point getLocation()
Returns the location of the top left corner of the rectangle (as a point).

Returns:
The point the rectangle is located at.

intersection

public Rectangle intersection(Rectangle r)
Parameters:
r -
Returns:

contains

public boolean contains(java.awt.Point p)
Parameters:
p -
Returns:

contains

public boolean contains(Rectangle r)
Parameters:
r -
Returns: