Java DTV API 1.3
18-Nov-2009

com.sun.dtv.lwuit.geom
Class Dimension

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

public class Dimension
extends 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(Dimension d)
          Creates a new instance of Dimension with parameters taken from an instance of java.awt.Dimension.
Dimension(int width, int height)
          Creates a new instance of Dimension with width and height.
 
Method Summary
 int getHeight()
          Returns the height of the dimension.
 int getWidth()
          Returns the width of the dimension.
 void setHeight(int height)
          Set the height of the dimension.
 void setWidth(int width)
          Set the width of the dimension.
 String toString()
          Returns the printable form of this Dimension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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(Dimension d)
Creates a new instance of Dimension with parameters taken from an instance of java.awt.Dimension. This is a convenience constructor for improvement of the AWT integration.

Parameters:
d - java.awt.Dimension instance to take data from.

Dimension

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

Parameters:
width - the dimension width.
height - the dimension height.
Method Detail

setWidth

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

Parameters:
width - the dimension width.
See Also:
getWidth()

setHeight

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

Parameters:
height - the dimension height.
See Also:
getHeight()

getWidth

public int getWidth()
Returns the width of the dimension.

Returns:
width of the dimension.
See Also:
setWidth(int)

getHeight

public int getHeight()
Returns the height of the dimension.

Returns:
height of the dimension.
See Also:
setHeight(int)

toString

public String toString()
Returns the printable form of this Dimension.

Overrides:
toString in class Object
Returns:
a String representation of this Dimension.

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.