Ext.data.JsonP.Ext_Class({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"
Files
Handles class creation throughout the framework. This is a low level factory that is used by Ext.ClassManager and generally\nshould not be used directly. If you choose to use Ext.Class you will lose out on the namespace, aliasing and depency loading\nfeatures made available by Ext.ClassManager. The only time you would use Ext.Class directly is to create an anonymous class.
\n\nIf you wish to create a class you should use Ext.define which aliases\nExt.ClassManager.create to enable namespacing and dynamic dependency resolution.
\n\nExt.Class is the factory and not the superclass of everything. For the base class that all Ext classes inherit\nfrom, see Ext.Base.
\nList of short aliases for class names. Most useful for defining xtypes for widgets:
\n\nExt.define('MyApp.CoolPanel', {\n extend: 'Ext.panel.Panel',\n alias: ['widget.coolpanel'],\n title: 'Yeah!'\n});\n\n// Using Ext.create\nExt.create('widget.coolpanel');\n\n// Using the shorthand for defining widgets by xtype\nExt.widget('panel', {\n items: [\n {xtype: 'coolpanel', html: 'Foo'},\n {xtype: 'coolpanel', html: 'Bar'}\n ]\n});\n
\n\nBesides \"widget\" for xtype there are alias namespaces like \"feature\" for ftype and \"plugin\" for ptype.
\nDefines alternate names for this class. For example:
\n\nExt.define('Developer', {\n alternateClassName: ['Coder', 'Hacker'],\n code: function(msg) {\n alert('Typing... ' + msg);\n }\n});\n\nvar joe = Ext.create('Developer');\njoe.code('stackoverflow');\n\nvar rms = Ext.create('Hacker');\nrms.code('hack hack');\n
\nList of configuration options with their default values, for which automatically\naccessor methods are generated. For example:
\n\nExt.define('SmartPhone', {\n config: {\n hasTouchScreen: false,\n operatingSystem: 'Other',\n price: 500\n },\n constructor: function(cfg) {\n this.initConfig(cfg);\n }\n});\n\nvar iPhone = new SmartPhone({\n hasTouchScreen: true,\n operatingSystem: 'iOS'\n});\n\niPhone.getPrice(); // 500;\niPhone.getOperatingSystem(); // 'iOS'\niPhone.getHasTouchScreen(); // true;\n
\n\nNOTE for when configs are reference types, the getter and setter methods do not make copies.
\n\nFor example, when a config value is set, the reference is stored on the instance. All instances that set\nthe same reference type will share it.
\n\nIn the case of the getter, the value with either come from the prototype if the setter was never called or from\nthe instance as the last value passed to the setter.
\n\nFor some config properties, the value passed to the setter is transformed prior to being stored on the instance.
\nThe parent class that this class extends. For example:
\n\nExt.define('Person', {\n say: function(text) { alert(text); }\n});\n\nExt.define('Developer', {\n extend: 'Person',\n say: function(text) { this.callParent([\"print \"+text]); }\n});\n
\nList of inheritable static methods for this class.\nOtherwise just like statics but subclasses inherit these methods.
\nList of classes to mix into this class. For example:
\n\nExt.define('CanSing', {\n sing: function() {\n alert(\"I'm on the highway to hell...\")\n }\n});\n\nExt.define('Musician', {\n mixins: ['CanSing']\n})\n
\n\nIn this case the Musician class will get a sing
method from CanSing mixin.
But what if the Musician already has a sing
method? Or you want to mix\nin two classes, both of which define sing
? In such a cases it's good\nto define mixins as an object, where you assign a name to each mixin:
Ext.define('Musician', {\n mixins: {\n canSing: 'CanSing'\n },\n\n sing: function() {\n // delegate singing operation to mixin\n this.mixins.canSing.sing.call(this);\n }\n})\n
\n\nIn this case the sing
method of Musician will overwrite the\nmixed in sing
method. But you can access the original mixed in method\nthrough special mixins
property.
List of classes that have to be loaded before instantiating this class.\nFor example:
\n\nExt.define('Mother', {\n requires: ['Child'],\n giveBirth: function() {\n // we can be sure that child class is available.\n return new Child();\n }\n});\n
\nWhen set to true, the class will be instantiated as singleton. For example:
\n\nExt.define('Logger', {\n singleton: true,\n log: function(msg) {\n console.log(msg);\n }\n});\n\nLogger.log('Hello');\n
\nList of static methods for this class. For example:
\n\nExt.define('Computer', {\n statics: {\n factory: function(brand) {\n // 'this' in static methods refer to the class itself\n return new this(brand);\n }\n },\n\n constructor: function() { ... }\n});\n\nvar dellComputer = Computer.factory('Dell');\n
\nList of optional classes to load together with this class. These aren't neccessarily loaded before\nthis class is created, but are guaranteed to be available before Ext.onReady listeners are\ninvoked. For example:
\n\nExt.define('Mother', {\n uses: ['Child'],\n giveBirth: function() {\n // This code might, or might not work:\n // return new Child();\n\n // Instead use Ext.create() to load the class at the spot if not loaded already:\n return Ext.create('Child');\n }\n});\n
\nCreate a new anonymous class.
\nAn object represent the properties of this class
\nOptional, the callback function to be executed when this class is fully created.\nNote that the creation process can be asynchronous depending on the pre-processors used.
\nThe newly created class
\nRegister a new pre-processor to be used during the class creation process
\nThe pre-processor's name
\nThe callback function to be executed. Typical format:
\n\nfunction(cls, data, fn) {\n // Your code here\n\n // Execute this when the processing is finished.\n // Asynchronous processing is perfectly ok\n if (fn) {\n fn.call(this, cls, data);\n }\n});\n
\nthis
\nInsert this pre-processor at a specific position in the stack, optionally relative to\nany existing pre-processor. For example:
\n\nExt.Class.registerPreprocessor('debug', function(cls, data, fn) {\n // Your code here\n\n if (fn) {\n fn.call(this, cls, data);\n }\n}).setDefaultPreprocessorPosition('debug', 'last');\n
\nThe pre-processor name. Note that it needs to be registered with\nregisterPreprocessor before this
\nThe insertion position. Four possible values are:\n'first', 'last', or: 'before', 'after' (relative to the name provided in the third argument)
\nthis
\n