Packagecom.yworks.yfiles.geom
Classpublic class YInsets
InheritanceYInsets Inheritance YObject Inheritance Object

Double-precision immutable insets representation.



Public Properties
 PropertyDefined By
  bottom : Number
[read-only] The inset from the bottom.
YInsets
  left : Number
[read-only] The inset from the left.
YInsets
  right : Number
[read-only] The inset from the right.
YInsets
  top : Number
[read-only] The inset from the top.
YInsets
Public Methods
 MethodDefined By
  
YInsets(insets:Insets, init:Boolean = true)
Creates a new double-precision insets object with the specified insets.
YInsets
  
asYInsets(data:Object):YInsets
[static] Returns a YInsets insets representing the specified data.
YInsets
  
equals(o:Object):Boolean
[override]
YInsets
  
getClass():Class
[override]
YInsets
  
hashCode():int
[override]
YInsets
  
[static] Creates a new double-precision insets object with the specified insets.
YInsets
  
newYInsets2(top:Number, left:Number, bottom:Number, right:Number):YInsets
[static] Creates a new double-precision insets object with the specified insets.
YInsets
  
Returns an integer-precision approximation of this insets object.
YInsets
  
toString():String
YInsets
Protected Methods
 MethodDefined By
  
initYInsets1(insets:Insets):void
Initializes this object.
YInsets
  
initYInsets2(top:Number, left:Number, bottom:Number, right:Number):void
Initializes this object.
YInsets
Property Detail
bottomproperty
bottom:Number  [read-only]

The inset from the bottom.


Implementation
    public function get bottom():Number
leftproperty 
left:Number  [read-only]

The inset from the left.


Implementation
    public function get left():Number
rightproperty 
right:Number  [read-only]

The inset from the right.


Implementation
    public function get right():Number
topproperty 
top:Number  [read-only]

The inset from the top.


Implementation
    public function get top():Number
Constructor Detail
YInsets()Constructor
public function YInsets(insets:Insets, init:Boolean = true)

Creates a new double-precision insets object with the specified insets.

Parameters
insets:Insets — the top, left, bottom, and right insets.
 
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.
Method Detail
asYInsets()method
public static function asYInsets(data:Object):YInsets

Returns a YInsets insets representing the specified data. If data is an instance of YInsets, data is returned. If data is an instance of com.yworks.bridge.geom.Insets, a new YInsets instance with the appropriate values is returned. In all other cases, null is returned.

Parameters

data:Object — the data that has to be represented as YInsets.

Returns
YInsets — a YInsets insets representing the specified data.

See also

equals()method 
override public function equals(o:Object):Boolean

Parameters

o:Object

Returns
Boolean
getClass()method 
override public function getClass():Class

Returns
Class
hashCode()method 
override public function hashCode():int

Returns
int
initYInsets1()method 
protected final function initYInsets1(insets:Insets):void

Initializes this object. See the documentation of the corresponding factory method newYInsets1() for details.

Parameters

insets:Insets

See also

initYInsets2()method 
protected final function initYInsets2(top:Number, left:Number, bottom:Number, right:Number):void

Initializes this object. See the documentation of the corresponding factory method newYInsets2() for details.

Parameters

top:Number
 
left:Number
 
bottom:Number
 
right:Number

See also

newYInsets1()method 
public static function newYInsets1(insets:Insets):YInsets

Creates a new double-precision insets object with the specified insets.

Parameters

insets:Insets — the top, left, bottom, and right insets.

Returns
YInsets
newYInsets2()method 
public static function newYInsets2(top:Number, left:Number, bottom:Number, right:Number):YInsets

Creates a new double-precision insets object with the specified insets.

Parameters

top:Number — the inset from the top.
 
left:Number — the inset from the left.
 
bottom:Number — the inset from the bottom.
 
right:Number — the inset from the right.

Returns
YInsets
toInsets()method 
public function toInsets():Insets

Returns an integer-precision approximation of this insets object.

Returns
Insets — an integer-precision approximation of this insets object.
toString()method 
public function toString():String

Returns
String