org.jdesktop.swingx.util
Class Spatial

java.lang.Object
  extended by org.jdesktop.swingx.util.Spatial

public final class Spatial
extends java.lang.Object

Represents a location, and a size (magnitude).
In general, the Spatial class is intended to track the size and position of windows in space. Hence the term.

NOTE: This is an immutable object

Author:
Richard Bair

Constructor Summary
Spatial(int top, int left, int width, int height)
          Create a new Spatial object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 int getHeight()
          Get the height of the spatial object
 int getLeft()
          Get the distance from the left of the space for the spatial object
 int getTop()
          Get the distance from the top of the space for the spatial object
 int getWidth()
          Get the width of the spatial object
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Spatial

public Spatial(int top,
               int left,
               int width,
               int height)
Create a new Spatial object.

Parameters:
top - @see top
left - @see left
width - @see width
height - @see height
Method Detail

getHeight

public int getHeight()
Get the height of the spatial object

Returns:
the height

getLeft

public int getLeft()
Get the distance from the left of the space for the spatial object

Returns:
the left distance

getTop

public int getTop()
Get the distance from the top of the space for the spatial object

Returns:
the top distance

getWidth

public int getWidth()
Get the width of the spatial object

Returns:
the width

equals

public boolean equals(java.lang.Object obj)

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 © 2005 Sun Microsystems All Rights Reserved.