com.sun.lwuit.geom
Class Dimension

java.lang.Object
  extended by com.sun.lwuit.geom.Dimension

public class Dimension
extends java.lang.Object

Utility class that holds a width and height that represents a dimension of a component or element


Constructor Summary
Dimension()
          Creates a new instance of Dimension
Dimension(Dimension d)
          Creates a new instance of Dimension with a predefine dimension
Dimension(int width, int height)
          CCreates a new instance of Dimension with width and height
 
Method Summary
 boolean equals(java.lang.Object arg0)
           
 int getHeight()
          Return the height of the dimension
 int getWidth()
          Returns the width of the dimension
 int hashCode()
           
 void setHeight(int height)
          Set the height of the dimension
 void setWidth(int width)
          Set the width of the dimension
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dimension

public Dimension()
Creates a new instance of Dimension


Dimension

public Dimension(Dimension d)
Creates a new instance of Dimension with a predefine dimension

Parameters:
d - Dimension to copy

Dimension

public Dimension(int width,
                 int height)
CCreates a new instance of Dimension with width and height

Parameters:
width - the dimention width
height - the dimention height
Method Detail

setWidth

public void setWidth(int width)
Set the width of the dimension

Parameters:
width - the dimention width

setHeight

public void setHeight(int height)
Set the height of the dimension

Parameters:
height - the dimention height

getWidth

public int getWidth()
Returns the width of the dimension

Returns:
width of the dimension

getHeight

public int getHeight()
Return the height of the dimension

Returns:
height of the dimension

toString

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

hashCode

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

equals

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