com.imagero.gui.flowin.util
Class ComponentRect

java.lang.Object
  extended bycom.imagero.gui.flowin.util.ComponentRect
All Implemented Interfaces:
Rect

public class ComponentRect
extends java.lang.Object
implements Rect

ComponentRect. Implementation of Rect for Component


Constructor Summary
ComponentRect(java.awt.Component comp)
          create new ComponentRect
ComponentRect(java.awt.Component comp, java.awt.Insets insets)
          create new ComponentRect
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 java.awt.Rectangle getBounds()
           
 int getHeight()
           
 java.awt.Insets getInsets()
           
 java.awt.Point getLocation()
           
 java.awt.Dimension getSize()
           
 int getWidth()
           
 int getX()
           
 int getY()
           
 int hashCode()
          Returns a hash code value for the object.
 void setInsets(java.awt.Insets insets)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentRect

public ComponentRect(java.awt.Component comp)
create new ComponentRect

Parameters:
comp - Component

ComponentRect

public ComponentRect(java.awt.Component comp,
                     java.awt.Insets insets)
create new ComponentRect

Parameters:
comp - Component
insets - Insets
Method Detail

equals

public boolean equals(java.lang.Object obj)
Description copied from class: java.lang.Object
Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any non-null reference values x and y, this method returns true if and only if x and y refer to the same object (x == y has the value true).

Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.

Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.hashCode(), Hashtable

getBounds

public java.awt.Rectangle getBounds()
Specified by:
getBounds in interface Rect

getHeight

public int getHeight()
Specified by:
getHeight in interface Rect

getInsets

public java.awt.Insets getInsets()
Specified by:
getInsets in interface Rect

getLocation

public java.awt.Point getLocation()
Specified by:
getLocation in interface Rect

getSize

public java.awt.Dimension getSize()
Specified by:
getSize in interface Rect

getWidth

public int getWidth()
Specified by:
getWidth in interface Rect

getX

public int getX()
Specified by:
getX in interface Rect

getY

public int getY()
Specified by:
getY in interface Rect

hashCode

public int hashCode()
Description copied from class: java.lang.Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

setInsets

public void setInsets(java.awt.Insets insets)
Specified by:
setInsets in interface Rect