API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. Dimension View Source
Author(s)
Sami Shaio
Arthur van Hoff
Since
1.0
Version
1.34, 02/24/06
Serial
Hierarchy
 Object
      Dimension2D
          Dimension
Implements
 Serializable
Subclasses
Description
public class Dimension
  The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
See also:    Component LayoutManager
Constructors
public Dimension ()
Creates an instance of Dimension with a width of zero and a height of zero.
public Dimension (Dimension d)
  Creates an instance of Dimension whose width and height are the same as for the specified dimension.
public Dimension (int width, int height)
  Constructs a Dimension and initializes it to the specified width and specified height.
Methods
Hide/Show inherited methods
public Object clone () [Inherited From Dimension2D]
  Creates a new object of the same class as this object.
public boolean equals (Object obj)
Checks whether two dimension objects have equal values.
public double getHeight () [Specified in Dimension2D]
  Returns the height of this Dimension in double precision.
public Dimension getSize ()
  Gets the size of this Dimension object.
public double getWidth () [Specified in Dimension2D]
  Returns the width of this Dimension in double precision.
public int hashCode ()
  Returns the hash code for this Dimension.
public void setSize (Dimension d)
  Sets the size of this Dimension object to the specified size.
public void setSize (Dimension2D d) [Inherited From Dimension2D]
  Sets the size of this Dimension2D object to match the specified size.
public void setSize (double width, double height) [Specified in Dimension2D]
  Sets the size of this Dimension object to the specified width and height in double precision.
public void setSize (int width, int height)
  Sets the size of this Dimension object to the specified width and height.
public String toString ()
  Returns a string representation of the values of this Dimension object's height and width fields.
Fields
Hide/Show inherited fields
public int height
  The height dimension; negative values can be used.
public int width
  The width dimension; negative values can be used.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar