Main Page | Packages | Class Tree | Index | Help

xp.system

class Dimension

Object
  |
  +--xp.system.Dimension

Implemented Interfaces: ICloneable

class Dimension
extends Object

The Dimension class encapsulates the width and height of a component (in integer precision) in a single object. The class is associated with certain properties of components. 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.


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
height: Number
The height of this dimension

public
width: Number
The width of this dimension

Constructor

public
Dimension ( width: Number, height: Number)
Constructs a Dimension and initializes it to the specified width and specified height.

Method Summary

public
clone ( ): Object
Make a copy of this dimension object

public
equals ( d: Dimension ): Boolean
Check whether two Dimension obects are equal

public
toString ( ): String
converts the specified object to a string and returns it.



Field Documentation

height

public var height: Number
The height of this dimension

width

public var width: Number
The width of this dimension


Constructor Documentation

Dimension

public function Dimension(width: Number,
 height: Number)
Constructs a Dimension and initializes it to the specified width and specified height.


Method Documentation

clone

public function clone(): Object
Make a copy of this dimension object

Specified by:
clone in interface ICloneable

Returns:
A new Dimension object

equals

public function equals(d: Dimension): Boolean
Check whether two Dimension obects are equal

Check whether two Dimension objects have the same width and height properties

Parameters:
d
The Dimension object with which to compare

toString

public function toString(): String
converts the specified object to a string and returns it.


The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc