1 Ext.data.JsonP.Ext_util_TextMetrics({
15 "href": "TextMetrics.html#Ext-util-TextMetrics-method-constructor",
18 "shortDoc": "Creates new TextMetrics. ...",
24 "doc": "<p>The element to bind to.</p>\n",
30 "doc": "<p>(optional) A fixed width to apply to the measuring element.</p>\n",
35 "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/TextMetrics.js",
36 "doc": "<p>Creates new TextMetrics.</p>\n",
37 "owner": "Ext.util.TextMetrics",
38 "name": "TextMetrics",
39 "html_filename": "TextMetrics.html",
51 "href": "Base3.html#Ext-Base-method-addStatics",
52 "shortDoc": "Add / override static properties of this class. ...",
54 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
66 "doc": "<p>Add / override static properties of this class.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.addStatics({\n someProperty: 'someValue', // My.cool.Class.someProperty = 'someValue'\n method1: function() { ... }, // My.cool.Class.method1 = function() { ... };\n method2: function() { ... } // My.cool.Class.method2 = function() { ... };\n});\n</code></pre>\n",
70 "doc": "<p>this</p>\n"
72 "html_filename": "Base3.html"
79 "href": "TextMetrics.html#Ext-util-TextMetrics-method-bind",
80 "shortDoc": "Binds this TextMetrics instance to a new element ...",
82 "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/TextMetrics.js",
88 "doc": "<p>The element</p>\n",
93 "owner": "Ext.util.TextMetrics",
94 "doc": "<p>Binds this TextMetrics instance to a new element</p>\n",
100 "html_filename": "TextMetrics.html"
107 "href": "Base3.html#Ext-Base-method-callOverridden",
108 "shortDoc": "Call the original method that was previously overridden with Ext.Base.override\n\nExt.define('My.Cat', {\n constructo...",
110 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
114 "type": "Array/Arguments",
116 "doc": "<p>The arguments, either an array or the <code>arguments</code> object</p>\n",
120 "name": "callOverridden",
122 "doc": "<p>Call the original method that was previously overridden with <a href=\"#/api/Ext.Base-method-override\" rel=\"Ext.Base-method-override\" class=\"docClass\">Ext.Base.override</a></p>\n\n<pre><code>Ext.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n\n return this;\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n var instance = this.callOverridden();\n\n alert(\"Meeeeoooowwww\");\n\n return instance;\n }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n // alerts \"I'm a cat!\"\n // alerts \"Meeeeoooowwww\"\n</code></pre>\n",
126 "doc": "<p>Returns the result after calling the overridden method</p>\n"
128 "html_filename": "Base3.html"
135 "href": "Base3.html#Ext-Base-method-callParent",
136 "shortDoc": "Call the parent's overridden method. ...",
138 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
142 "type": "Array/Arguments",
144 "doc": "<p>The arguments, either an array or the <code>arguments</code> object\nfrom the current method, for example: <code>this.callParent(arguments)</code></p>\n",
148 "name": "callParent",
150 "doc": "<p>Call the parent's overridden method. For example:</p>\n\n<pre><code>Ext.define('My.own.A', {\n constructor: function(test) {\n alert(test);\n }\n});\n\nExt.define('My.own.B', {\n extend: 'My.own.A',\n\n constructor: function(test) {\n alert(test);\n\n this.callParent([test + 1]);\n }\n});\n\nExt.define('My.own.C', {\n extend: 'My.own.B',\n\n constructor: function() {\n alert(\"Going to call parent's overriden constructor...\");\n\n this.callParent(arguments);\n }\n});\n\nvar a = new My.own.A(1); // alerts '1'\nvar b = new My.own.B(1); // alerts '1', then alerts '2'\nvar c = new My.own.C(2); // alerts \"Going to call parent's overriden constructor...\"\n // alerts '2', then alerts '3'\n</code></pre>\n",
154 "doc": "<p>Returns the result from the superclass' method</p>\n"
156 "html_filename": "Base3.html"
163 "href": "Base3.html#Ext-Base-method-create",
164 "shortDoc": "Create a new instance of this Class. ...",
166 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
173 "doc": "<p>Create a new instance of this Class.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.create({\n someConfig: true\n});\n</code></pre>\n\n<p>All parameters are passed to the constructor of the class.</p>\n",
177 "doc": "<p>the created instance.</p>\n"
179 "html_filename": "Base3.html"
186 "href": "Base3.html#Ext-Base-method-createAlias",
187 "shortDoc": "Create aliases for existing prototype methods. ...",
189 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
193 "type": "String/Object",
195 "doc": "<p>The new method name, or an object to set multiple aliases. See\n<a href=\"#/api/Ext.Function-method-flexSetter\" rel=\"Ext.Function-method-flexSetter\" class=\"docClass\">flexSetter</a></p>\n",
199 "type": "String/Object",
201 "doc": "<p>The original method name</p>\n",
205 "name": "createAlias",
207 "doc": "<p>Create aliases for existing prototype methods. Example:</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n method1: function() { ... },\n method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n method3: 'method1',\n method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -> test.method1()\n</code></pre>\n",
213 "html_filename": "Base3.html"
220 "href": "TextMetrics.html#Ext-util-TextMetrics-method-destroy",
221 "shortDoc": "Destroy this instance ...",
223 "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/TextMetrics.js",
229 "owner": "Ext.util.TextMetrics",
230 "doc": "<p>Destroy this instance</p>\n",
236 "html_filename": "TextMetrics.html"
243 "href": "TextMetrics.html#Ext-util-TextMetrics-method-getHeight",
244 "shortDoc": "Returns the measured height of the specified text ...",
246 "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/TextMetrics.js",
252 "doc": "<p>The text to measure</p>\n",
257 "owner": "Ext.util.TextMetrics",
258 "doc": "<p>Returns the measured height of the specified text</p>\n",
262 "doc": "<p>height The height in pixels</p>\n"
264 "html_filename": "TextMetrics.html"
271 "href": "Base3.html#Ext-Base-method-getName",
272 "shortDoc": "Get the current class' name in string format. ...",
274 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
281 "doc": "<p>Get the current class' name in string format.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n constructor: function() {\n alert(this.self.getName()); // alerts 'My.cool.Class'\n }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n</code></pre>\n",
285 "doc": "<p>className</p>\n"
287 "html_filename": "Base3.html"
294 "href": "TextMetrics.html#Ext-util-TextMetrics-method-getSize",
295 "shortDoc": "Returns the size of the specified text based on the internal element's style and width properties ...",
297 "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/TextMetrics.js",
303 "doc": "<p>The text to measure</p>\n",
308 "owner": "Ext.util.TextMetrics",
309 "doc": "<p>Returns the size of the specified text based on the internal element's style and width properties</p>\n",
313 "doc": "<p>An object containing the text's size <code>{width: (width), height: (height)}</code></p>\n"
315 "html_filename": "TextMetrics.html"
322 "href": "TextMetrics.html#Ext-util-TextMetrics-method-getWidth",
323 "shortDoc": "Returns the measured width of the specified text ...",
325 "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/TextMetrics.js",
331 "doc": "<p>The text to measure</p>\n",
336 "owner": "Ext.util.TextMetrics",
337 "doc": "<p>Returns the measured width of the specified text</p>\n",
341 "doc": "<p>width The width in pixels</p>\n"
343 "html_filename": "TextMetrics.html"
350 "href": "Base3.html#Ext-Base-method-implement",
351 "shortDoc": "Add methods / properties to the prototype of this class. ...",
353 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
365 "doc": "<p>Add methods / properties to the prototype of this class.</p>\n\n<pre><code>Ext.define('My.awesome.Cat', {\n constructor: function() {\n ...\n }\n});\n\n My.awesome.Cat.implement({\n meow: function() {\n alert('Meowww...');\n }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n</code></pre>\n",
371 "html_filename": "Base3.html"
378 "href": "Base3.html#Ext-Base-method-initConfig",
379 "shortDoc": "Initialize configuration for this class. ...",
381 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
391 "name": "initConfig",
393 "doc": "<p>Initialize configuration for this class. a typical example:</p>\n\n<pre><code>Ext.define('My.awesome.Class', {\n // The default config\n config: {\n name: 'Awesome',\n isAwesome: true\n },\n\n constructor: function(config) {\n this.initConfig(config);\n\n return this;\n }\n});\n\nvar awesome = new My.awesome.Class({\n name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n</code></pre>\n",
397 "doc": "<p>mixins The mixin prototypes as key - value pairs</p>\n"
399 "html_filename": "Base3.html"
406 "href": "TextMetrics.html#Ext-util-TextMetrics-method-measure",
407 "shortDoc": "Measures the size of the specified text ...",
409 "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/TextMetrics.js",
413 "type": "String/HTMLElement",
415 "doc": "<p>The element, dom node or id from which to copy existing CSS styles\nthat can affect the size of the rendered text</p>\n",
421 "doc": "<p>The text to measure</p>\n",
427 "doc": "<p>(optional) If the text will be multiline, you have to set a fixed width\nin order to accurately measure the text height</p>\n",
432 "owner": "Ext.util.TextMetrics",
433 "doc": "<p>Measures the size of the specified text</p>\n",
437 "doc": "<p>An object containing the text's size <code>{width: (width), height: (height)}</code></p>\n"
439 "html_filename": "TextMetrics.html"
446 "href": "Base3.html#Ext-Base-method-override",
447 "shortDoc": "Override prototype members of this class. ...",
449 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
461 "doc": "<p>Override prototype members of this class. Overridden methods can be invoked via\n<a href=\"#/api/Ext.Base-method-callOverridden\" rel=\"Ext.Base-method-callOverridden\" class=\"docClass\">Ext.Base.callOverridden</a></p>\n\n<pre><code>Ext.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n\n return this;\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n var instance = this.callOverridden();\n\n alert(\"Meeeeoooowwww\");\n\n return instance;\n }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n // alerts \"I'm a cat!\"\n // alerts \"Meeeeoooowwww\"\n</code></pre>\n",
465 "doc": "<p>this</p>\n"
467 "html_filename": "Base3.html"
474 "href": "TextMetrics.html#Ext-util-TextMetrics-method-setFixedWidth",
475 "shortDoc": "Sets a fixed width on the internal measurement element. ...",
477 "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/TextMetrics.js",
483 "doc": "<p>The width to set on the element</p>\n",
487 "name": "setFixedWidth",
488 "owner": "Ext.util.TextMetrics",
489 "doc": "<p>Sets a fixed width on the internal measurement element. If the text will be multiline, you have\nto set a fixed width in order to accurately measure the text height.</p>\n",
495 "html_filename": "TextMetrics.html"
502 "href": "Base3.html#Ext-Base-method-statics",
503 "shortDoc": "Get the reference to the class from which this object was instantiated. ...",
505 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
512 "doc": "<p>Get the reference to the class from which this object was instantiated. Note that unlike <a href=\"#/api/Ext.Base-property-self\" rel=\"Ext.Base-property-self\" class=\"docClass\">Ext.Base.self</a>,\n<code>this.statics()</code> is scope-independent and it always returns the class from which it was called, regardless of what\n<code>this</code> points to during run-time</p>\n\n<pre><code>Ext.define('My.Cat', {\n statics: {\n totalCreated: 0,\n speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n },\n\n constructor: function() {\n var statics = this.statics();\n\n alert(statics.speciesName); // always equals to 'Cat' no matter what 'this' refers to\n // equivalent to: My.Cat.speciesName\n\n alert(this.self.speciesName); // dependent on 'this'\n\n statics.totalCreated++;\n\n return this;\n },\n\n clone: function() {\n var cloned = new this.self; // dependent on 'this'\n\n cloned.groupName = this.statics().speciesName; // equivalent to: My.Cat.speciesName\n\n return cloned;\n }\n});\n\n\nExt.define('My.SnowLeopard', {\n extend: 'My.Cat',\n\n statics: {\n speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'\n },\n\n constructor: function() {\n this.callParent();\n }\n});\n\nvar cat = new My.Cat(); // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone)); // alerts 'My.SnowLeopard'\nalert(clone.groupName); // alerts 'Cat'\n\nalert(My.Cat.totalCreated); // alerts 3\n</code></pre>\n",
518 "html_filename": "Base3.html"
527 "tagname": "property",
528 "href": "Base3.html#Ext-Base-property-self",
529 "shortDoc": "Get the reference to the current class from which this object was instantiated. ...",
531 "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
535 "doc": "<p>Get the reference to the current class from which this object was instantiated. Unlike <a href=\"#/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">Ext.Base.statics</a>,\n<code>this.self</code> is scope-dependent and it's meant to be used for dynamic inheritance. See <a href=\"#/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">Ext.Base.statics</a>\nfor a detailed comparison</p>\n\n<pre><code>Ext.define('My.Cat', {\n statics: {\n speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n },\n\n constructor: function() {\n alert(this.self.speciesName); / dependent on 'this'\n\n return this;\n },\n\n clone: function() {\n return new this.self();\n }\n});\n\n\nExt.define('My.SnowLeopard', {\n extend: 'My.Cat',\n statics: {\n speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'\n }\n});\n\nvar cat = new My.Cat(); // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone)); // alerts 'My.SnowLeopard'\n</code></pre>\n",
537 "html_filename": "Base3.html"
560 "href": "TextMetrics.html#Ext-util-TextMetrics",
567 "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/TextMetrics.js",
569 "alternateClassNames": [
572 "name": "Ext.util.TextMetrics",
573 "doc": "<p>Provides precise pixel measurements for blocks of text so that you can determine exactly how high and\nwide, in pixels, a given block of text will be. Note that when measuring text, it should be plain text and\nshould not contain any HTML, otherwise it may not be measured correctly.</p>\n\n<p>The measurement works by copying the relevant CSS styles that can affect the font related display,\nthen checking the size of an element that is auto-sized. Note that if the text is multi-lined, you must\nprovide a <strong>fixed width</strong> when doing the measurement.</p>\n\n<p>If multiple measurements are being done on the same element, you create a new instance to initialize\nto avoid the overhead of copying the styles to the element repeatedly.</p>\n",
581 "html_filename": "TextMetrics.html",
582 "extends": "Ext.Base"