com.sencha.gxt.core.client.util
Class Rectangle

java.lang.Object
  extended by com.sencha.gxt.core.client.util.Rectangle

public class Rectangle
extends Object

Represents an area in a coordinate system.

See Also:
Point

Constructor Summary
Rectangle()
          Create a new rectangle instance.
Rectangle(int x, int y, int width, int height)
          Creates a new rectangle instance.
 
Method Summary
 boolean contains(int x, int y)
          Returns true if the point is within the rectangle's region.
 boolean contains(Point p)
          Returns true if the point is within the rectangle.
 int getHeight()
           
 int getWidth()
           
 int getX()
           
 int getY()
           
 void setHeight(int height)
           
 void setWidth(int width)
           
 void setX(int x)
           
 void setY(int y)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rectangle

public Rectangle()
Create a new rectangle instance.


Rectangle

public Rectangle(int x,
                 int y,
                 int width,
                 int height)
Creates a new rectangle instance.

Parameters:
x - the x value
y - the y value
width - the rectangle's width
height - the rectangle's height
Method Detail

contains

public boolean contains(int x,
                        int y)
Returns true if the point is within the rectangle's region.

Parameters:
x - the x coordinate value
y - the y coordinate value
Returns:
true if xy is contained within the rectangle

contains

public boolean contains(Point p)
Returns true if the point is within the rectangle.

Parameters:
p - the point
Returns:
true if the point is contained within the rectangle

getHeight

public int getHeight()

getWidth

public int getWidth()

getX

public int getX()

getY

public int getY()

setHeight

public void setHeight(int height)

setWidth

public void setWidth(int width)

setX

public void setX(int x)

setY

public void setY(int y)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.