java.awt
Class Dimension

java.awt.Dimension

public class Dimension

Encapsulates the width and height of a component (in integer precision) in a single object. The class is associated with certain properties of components. Several methods defined by the Component class and the LayoutManager interface return a Dimension object.

Normally, the values of width and height are non-negative integers. The constructors that allow you to create a dimension do not prevent you from setting a negative value for these properties. If the value of width or height is negative, the behavior of some methods defined by other objects is undefined.

CSS example:

dimension {
    class : "java.awt.Dimension(width,height)";
    height : "2";
    width : "2";
}


Property Summary
 java.lang.String class
          
Creates an instance of a Dimension.
 int height
          
The dimension height, negative values can be used.
 int width
          
The dimension width, negative values can be used.
 

Property Detail

class

public java.lang.String class

Creates an instance of a Dimension.

CSS example:     class : "java.awt.Dimension(width,height)";


height

public int height

The dimension height, negative values can be used.

CSS example:     height : "2";


width

public int width

The dimension width, negative values can be used.

CSS example:     width : "2";



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.