Packagecom.yworks.util
Classpublic final class Util
InheritanceUtil Inheritance Object

Provides static utility functions.



Public Methods
 MethodDefined By
  
classIsAssignableFrom(cls:Class, cls2:Class):Boolean
[static]
Util
  
deepCopy(obj:Object):*
[static]
Util
  
formatNumber(number:Object, radix:uint = 10, minChars:uint = 0):String
[static] Format a number as a string using the given radix.
Util
  
registerLicense(license:XML):Boolean
[static] Register a license xml file with the application.
Util
Property Detail
_viewSourceURLproperty
yworks_internal static var _viewSourceURL:String = viewSource/index.html

Method Detail
classIsAssignableFrom()method
public static function classIsAssignableFrom(cls:Class, cls2:Class):Boolean

Parameters

cls:Class
 
cls2:Class

Returns
Boolean
configureViewSource()method 
yworks_internal static function configureViewSource(app:InteractiveObject, canvas:GraphCanvasComponent):void

Parameters

app:InteractiveObject
 
canvas:GraphCanvasComponent

deepCopy()method 
public static function deepCopy(obj:Object):*

Parameters

obj:Object

Returns
*
formatNumber()method 
public static function formatNumber(number:Object, radix:uint = 10, minChars:uint = 0):String

Format a number as a string using the given radix.

Parameters

number:Object — The Number to be converted to string. The given number object can be of type Number, uint, int or String.
 
radix:uint (default = 10) — The radix to use when converting the number.
 
minChars:uint (default = 0) — If the resulting string is shorter that minChars, it will be filled with leading zeros.

Returns
String — A string representation of the given number
millisToDays()method 
yworks_internal static function millisToDays(millis:Number):Number

Parameters

millis:Number

Returns
Number
registerLicense()method 
public static function registerLicense(license:XML):Boolean

Register a license xml file with the application. If the license file can not be validated, the application will not work.

Parameters

license:XML — A XML object containing license information.

Returns
Boolean