Packagexp.graphics
Classpublic class Thickness
InheritanceThickness Inheritance mx.core.EdgeMetrics

Describes the thickness of the sides of a rectangle. 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.

See also

support


Public Properties
 PropertyDefined by
  hasAllSides : Boolean
[read-only]
Thickness
  horizontal : Number
[read-only]
Thickness
  vertical : Number
[read-only]
Thickness
Public Methods
 MethodDefined by
  
Thickness(... rest)
Thickness
  
clone():EdgeMetrics
Thickness
  
copy(em:EdgeMetrics):void
Thickness
  
deflate(rc:Rectangle, m:EdgeMetrics):Rectangle
[static] Deflates the specified rectangle by the this Thickness
Thickness
  
equals(v:Thickness):Boolean
Thickness
  
inflate(rc:Rectangle, m:EdgeMetrics):Rectangle
Inflates the specified rectangle by the this Thickness
Thickness
  
isEmpty():Boolean
Thickness
  
setEmpty():void
Sets all of the Thickness object's properties to 0.
Thickness
  
setThickness(left:Number = 0, top:Number = 0, right:Number = 0, bottom:Number = 0):void
Thickness
  
toString():String
converts the specified object to a string and returns it.
Thickness
Public Constants
 ConstantDefined by
  Thickness0 : Thickness
[static]
Thickness
  Thickness1 : Thickness
[static]
Thickness
  Thickness2 : Thickness
[static]
Thickness
  Thickness3 : Thickness
[static]
Thickness
Property detail
hasAllSidesproperty
hasAllSides:Boolean  [read-only]Implementation
    public function get hasAllSides():Boolean
horizontalproperty 
horizontal:Number  [read-only]Implementation
    public function get horizontal():Number
verticalproperty 
vertical:Number  [read-only]Implementation
    public function get vertical():Number
Constructor detail
Thickness()constructor
public function Thickness(... rest)Parameters
... rest
Method detail
clone()method
public override function clone():EdgeMetrics

Returns
EdgeMetrics
copy()method 
public function copy(em:EdgeMetrics):voidParameters
em:EdgeMetrics
deflate()method 
public static function deflate(rc:Rectangle, m:EdgeMetrics):Rectangle

Deflates the specified rectangle by the this Thickness

Parameters
rc:Rectangle — The rectangle to deflate
 
m:EdgeMetrics

Returns
Rectangle — A new rectangle
equals()method 
public function equals(v:Thickness):BooleanParameters
v:Thickness

Returns
Boolean
inflate()method 
public function inflate(rc:Rectangle, m:EdgeMetrics):Rectangle

Inflates the specified rectangle by the this Thickness

Parameters
rc:Rectangle — The rectangle to inflate
 
m:EdgeMetrics

Returns
Rectangle — A new rectangle
isEmpty()method 
public function isEmpty():Boolean

Returns
Boolean
setEmpty()method 
public function setEmpty():void

Sets all of the Thickness object's properties to 0. A Thickness object is empty if its left, right, top and bottom are all equal to 0. This method sets the values of the left, right, top, and bottom properties to 0.

setThickness()method 
public function setThickness(left:Number = 0, top:Number = 0, right:Number = 0, bottom:Number = 0):voidParameters
left:Number (default = 0)
 
top:Number (default = 0)
 
right:Number (default = 0)
 
bottom:Number (default = 0)
toString()method 
public function toString():String

converts the specified object to a string and returns it.

Returns
String
Constant detail
Thickness0constant
public static const Thickness0:Thickness
Thickness1constant 
public static const Thickness1:Thickness
Thickness2constant 
public static const Thickness2:Thickness
Thickness3constant 
public static const Thickness3:Thickness