Main Page | Packages | Class Tree | Index | Help

xp.system

class Thickness

Object
  |
  +--xp.system.Thickness

Implemented Interfaces: ICloneable

class Thickness
extends Object

Describes the thickness of a frame around a rectangle. The class is associated with certain properties of components. Normally the values of left, right, top and bottom are non-negative integers. The constructors that allow you to create a thickness do not prevent you from setting a negative value for these properties. If the values are 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


bottom: Number
Gets or sets the width of the bottom side.


left: Number
Gets or sets the width of the left side.


right: Number
Gets or sets the width of the right side.

public static
Thickness0: Thickness
commonly used constants commonly used thickness left/top/right/bottom = 0

public static
Thickness1: Thickness
commonly used thickness left/top/right/bottom = 1

public static
Thickness2: Thickness
commonly used thickness left/top/right/bottom = 2

public static
Thickness3: Thickness
commonly used thickness left/top/right/bottom = 3


top: Number
Gets or sets the width of the top side.

Property Summary

public
horizontal: Number (read-only)
returns the sum of the left and right thicknesses

public
vertical: Number (read-only)
returns the sum of the top and bottom thicknesses

Constructor

public
Thickness ( )
Initializes a new instance of the Thickness structure.

Method Summary

public
clone ( ): Object
Creates a shallow copy of the current Object

public
equals ( v: Thickness ): Boolean
Compares this Thickness structure to another object for exact equality.

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



Field Documentation

bottom

var bottom: Number
Gets or sets the width of the bottom side.

left

var left: Number
Gets or sets the width of the left side.

right

var right: Number
Gets or sets the width of the right side.

Thickness0

public static var Thickness0: Thickness
commonly used constants commonly used thickness left/top/right/bottom = 0

Thickness1

public static var Thickness1: Thickness
commonly used thickness left/top/right/bottom = 1

Thickness2

public static var Thickness2: Thickness
commonly used thickness left/top/right/bottom = 2

Thickness3

public static var Thickness3: Thickness
commonly used thickness left/top/right/bottom = 3

top

var top: Number
Gets or sets the width of the top side.


Property Documentation

horizontal

public horizontal: Number (read-only)
returns the sum of the left and right thicknesses

vertical

public vertical: Number (read-only)
returns the sum of the top and bottom thicknesses


Constructor Documentation

Thickness

public function Thickness()
Initializes a new instance of the Thickness structure.

Create a new instance of a Thickness Accepts either: Thickness(1) Single number, all properties are set to the value Thickness(1,2) Two number, left and right are set to the first value and top and bottom to the second " Thickness(1,2,3,4) Four numbers representing values l,t,r,b " Thickness("1 2 3 4") String with 4 values representing l,t,r,b Thickness({left:1,top:2,right:3,bottom:4}) An object witht he properties left,top,right and bottom


Method Documentation

clone

public function clone(): Object
Creates a shallow copy of the current Object

Specified by:
clone in interface ICloneable

equals

public function equals(v: Thickness): Boolean
Compares this Thickness structure to another object for exact equality.

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