com.jmex.bui.util
Class Rectangle

java.lang.Object
  extended by com.jmex.bui.util.Rectangle

public class Rectangle
extends java.lang.Object

Represents the bounds of a component.


Field Summary
 int height
          The height of the entity in question.
 int width
          The width of the entity in question.
 int x
          The x position of the entity in question.
 int y
          The y position of the entity in question.
 
Constructor Summary
Rectangle()
           
Rectangle(int x, int y, int width, int height)
           
Rectangle(Rectangle other)
           
 
Method Summary
 void add(int x, int y, int width, int height)
          Adds the specified rectangle to this rectangle, causing this rectangle to become the union of itself and the specified rectangle.
 boolean equals(java.lang.Object other)
           
 int hashCode()
           
 void set(int x, int y, int width, int height)
          Sets the fields of this rectangle.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public int x
The x position of the entity in question.


y

public int y
The y position of the entity in question.


width

public int width
The width of the entity in question.


height

public int height
The height of the entity in question.

Constructor Detail

Rectangle

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

Rectangle

public Rectangle(Rectangle other)

Rectangle

public Rectangle()
Method Detail

set

public void set(int x,
                int y,
                int width,
                int height)
Sets the fields of this rectangle.


add

public void add(int x,
                int y,
                int width,
                int height)
Adds the specified rectangle to this rectangle, causing this rectangle to become the union of itself and the specified rectangle.


equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011 Michael Bayne. All Rights Reserved.