The LEADTOOLS JavaScript libraries use an object module similar to the Microsoft .NET or Java object class library.
The following members are available in each LEADTOOLS type In addition to the other properties and methods described in the members page.
Type refers to the LEADTOOLS type, such as lt.Controls.ImageViewer. All the functions listed below are "static" methods that must be called directly on the type itself and not an instance of the type.
Type.prototype
Registers a new LEADTOOLS namespace
name: String containing the fully qualified name of the namespace. Must not be omitted or null
Refer to the sample source code at the end of this document.
Registers a new LEADTOOLS class type
name: String containing the fully qualified type name (namespace.name). Must not be omitted or null
baseType: Base type. Can be omitted or null if the class does not derive from a LEADTOOLS base class.
interfaceType: Interface type implemented by the class. Can be omitted or null if the class does not implement a LEADTOOLS interface
Refer to the sample source code at the end of this document.
Registers a new LEADTOOLS class type
name: String containing the fully qualified namespace name. Must not be omitted or null
Registers a new LEADTOOLS enumeration
name: String containing the fully qualified enumeration name. Must not be omitted or null
flags: true if the members of this enumuration can be OR'ed together, otherwise; false. Treated as false if omitted or null
Initializes the base class of a LEADTOOLS derived class from the constructor
instance: The derived class instance. In almost all cases, this can be set to 'this'. Must not be omitted or null
args: An array containing the arguments to pass to the base class. Can be mitted or null if the base class constructor does not required other arguments.
If you derive a new class from a LEADTOOLS class, then you must call this method in your constructor to initialize the base class.
Refer to the sample source code at the end of this document.
Calls a function from the base class of a LEADTOOLS derived class
instance: The derived class instance. In almost all cases, this can be set to 'this'. Must not be omitted or null
name: String containing the name of the function to call. Must not be omitted or null
args: An array containing the arguments to pass to the base class method. Can be omitted or null if the base class constructor does not have arguments.
The return value from the base method (if any)
Refer to the sample source code at the end of this document.
Gets the base type of this type
None
The base type.
// This will show 'lt.Controls.ImageViewerInteractiveMode' since ImageViewerPanZoomInteractiveMode // derives from ImageViewerInteractiveMode
alert(lt.Controls.ImageViewerPanZoomInteractiveMode.get_baseType().get_fullName());
Returns the full name (namespace.name) of this type
None
The fully qualified name of the type
// This will show 'lt.Controls.ImageViewerPanZoomInteractiveMode'
alert(lt.Controls.ImageViewerPanZoomInteractiveMode.get_fullName());
Returns the name of this type
None
The fully qualified name of the type
// This will show 'ImageViewerPanZoomInteractiveMode'
alert(lt.Controls.ImageViewerPanZoomInteractiveMode.get_name());
Determines if the specified object is an instance of this class or one of its derived classes
Instance: object instance to check.
True if the specified object is an instance of this class or one of its derived classes, otherwise; false.
var instance = new lt.Controls.ImageViewerPanZoomInteractiveMode();
// This will show true, same type
alert(lt.Controls.ImageViewerPanZoomInteractiveMode.isInstanceOfType(instance));
// This will show true, derived type
alert(lt.Controls.ImageViewerInteractiveMode.isInstanceOfType(instance));
instance = new lt.LeadPointD();
// This will show false