com.powerml.structures.basic
Class Rect

java.lang.Object
  extended bycom.powerml.structures.basic.Rect
All Implemented Interfaces:
java.io.Serializable

public class Rect
extends java.lang.Object
implements java.io.Serializable

Represents a rectangle.

See Also:
Serialized Form

Constructor Summary
Rect()
          Creates a new Rect instance.
Rect(int left, int top, int right, int bottom)
          Creates a new Rect instance.
 
Method Summary
 int getBottom()
          Returns the y coordinate of the bottom side.
 int getLeft()
          Returns the x coordinate of the left side.
 int getRight()
          Returns the x coordinate of the right side.
 int getTop()
          Returns the y coordinate of the top side.
 java.lang.String toString()
          Returns a string representation of the current instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rect

public Rect()
Creates a new Rect instance.


Rect

public Rect(int left,
            int top,
            int right,
            int bottom)
Creates a new Rect instance.

Parameters:
left - x coordinate of left side
top - y coordinate of top side
right - x coordinate of right side
bottom - y coordinate of bottom side
Method Detail

getBottom

public int getBottom()
Returns the y coordinate of the bottom side.

Returns:
y coordinate of bottom side

getLeft

public int getLeft()
Returns the x coordinate of the left side.

Returns:
x coordinate of left side

getRight

public int getRight()
Returns the x coordinate of the right side.

Returns:
x coordinate of right side

getTop

public int getTop()
Returns the y coordinate of the top side.

Returns:
y coordinate of top side.

toString

public java.lang.String toString()
Returns a string representation of the current instance.

Returns:
string describing the rectangle


© 2004-2005 Ralf Terdic. All rights reserved.
www.powerml.com