All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.Dimension

java.lang.Object
   |
   +----java.awt.Dimension

public class Dimension
extends Object
implements Serializable
A class to encapsulate a width and a height Dimension.


Variable Index

 o height
The height dimension.
 o width
The width dimension.

Constructor Index

 o Dimension()
Constructs a Dimension object with 0 width and 0 height.
 o Dimension(Dimension)
Constructs a Dimension and initializes it to the specified value.
 o Dimension(int, int)
Constructs a Dimension and initializes it to the specified width and specified height.

Method Index

 o equals(Object)
Checks whether two dimension objects have equal values.
 o getSize()
Returns the size of this Dimension object.
 o setSize(Dimension)
Set the size of this Dimension object to match the specified size.
 o setSize(int, int)
Set the size of this Dimension object to the specified width and height.
 o toString()
Returns the String representation of this Dimension's values.

Variables

 o width
Properties Public 
   width=int 
The width dimension.

 o height
Properties Public 
   height=int 
The height dimension.

Constructors

 o Dimension
    method Dimension() public 
Constructs a Dimension object with 0 width and 0 height.

 o Dimension
    method Dimension(d=Dimension) public 
Constructs a Dimension and initializes it to the specified value.

Parameters:
d - the specified dimension for the width and height values
 o Dimension
    method Dimension(width=int, -
                     height=int) public 
Constructs a Dimension and initializes it to the specified width and specified height.

Parameters:
width - the specified width dimension
height - the specified height dimension

Methods

 o getSize
    method getSize() returns Dimension public     
Returns the size of this Dimension object. This method is included for completeness, to parallel the getSize method of Component.

 o setSize
    method setSize(d=Dimension)  public     
Set the size of this Dimension object to match the specified size. This method is included for completeness, to parallel the getSize method of Component.

Parameters:
d - the new size for the Dimension object
 o setSize
    method setSize(width=int, -
                   height=int)  public     
Set the size of this Dimension object to the specified width and height. This method is included for completeness, to parallel the getSize method of Component.

Parameters:
width - the new width for the Dimension object
height - the new height for the Dimension object
 o equals
    method equals(obj=Object) returns boolean public     
Checks whether two dimension objects have equal values.

Overrides:
equals in class Object
 o toString
    method toString() returns String public     
Returns the String representation of this Dimension's values.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index