X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..f562e4c6e5fac7bcb445985b99acbea4d706e6f0:/docs/output/Ext.draw.Sprite.js diff --git a/docs/output/Ext.draw.Sprite.js b/docs/output/Ext.draw.Sprite.js index 517f7e1c..f52932bd 100644 --- a/docs/output/Ext.draw.Sprite.js +++ b/docs/output/Ext.draw.Sprite.js @@ -1,574 +1 @@ -Ext.data.JsonP.Ext_draw_Sprite({ - "allMixins": [ - - ], - "deprecated": null, - "docauthor": null, - "members": { - "cfg": [ - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-fill", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "fill", - "owner": "Ext.draw.Sprite", - "doc": "

The fill color

\n", - "linenr": 165, - "html_filename": "Sprite2.html" - }, - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-font", - "shortDoc": "Used with text type sprites. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "font", - "owner": "Ext.draw.Sprite", - "doc": "

Used with text type sprites. The full font description. Uses the same syntax as the CSS font parameter

\n", - "linenr": 177, - "html_filename": "Sprite2.html" - }, - { - "type": "String/Array", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-group", - "shortDoc": "The group that this sprite belongs to, or an array of groups. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "group", - "owner": "Ext.draw.Sprite", - "doc": "

The group that this sprite belongs to, or an array of groups. Only relevant when added to a\nExt.draw.Surface

\n", - "linenr": 185, - "html_filename": "Sprite2.html" - }, - { - "type": "Number", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-height", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "height", - "owner": "Ext.draw.Sprite", - "doc": "

Used in rectangle sprites, the height of the rectangle

\n", - "linenr": 137, - "html_filename": "Sprite2.html" - }, - { - "type": "Number", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-opacity", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "opacity", - "owner": "Ext.draw.Sprite", - "doc": "

The opacity of the sprite

\n", - "linenr": 161, - "html_filename": "Sprite2.html" - }, - { - "type": "Array", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-path", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "path", - "owner": "Ext.draw.Sprite", - "doc": "

Used in path sprites, the path of the sprite written in SVG-like path syntax

\n", - "linenr": 157, - "html_filename": "Sprite2.html" - }, - { - "type": "Number", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-radius", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "radius", - "owner": "Ext.draw.Sprite", - "doc": "

Used in circle sprites, the radius of the circle

\n", - "linenr": 145, - "html_filename": "Sprite2.html" - }, - { - "type": "Number", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-size", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "size", - "owner": "Ext.draw.Sprite", - "doc": "

Used in square sprites, the dimension of the square

\n", - "linenr": 141, - "html_filename": "Sprite2.html" - }, - { - "type": "Number", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-stroke", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "stroke", - "owner": "Ext.draw.Sprite", - "doc": "

-width The width of the stroke

\n", - "linenr": 173, - "html_filename": "Sprite2.html" - }, - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-text", - "shortDoc": "Used with text type sprites. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "text", - "owner": "Ext.draw.Sprite", - "doc": "

Used with text type sprites. The text itself

\n", - "linenr": 181, - "html_filename": "Sprite2.html" - }, - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-type", - "shortDoc": "The type of the sprite. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "type", - "owner": "Ext.draw.Sprite", - "doc": "

The type of the sprite. Possible options are 'circle', 'path', 'rect', 'text', 'square', 'image'

\n", - "linenr": 129, - "html_filename": "Sprite2.html" - }, - { - "type": "Number", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-width", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "width", - "owner": "Ext.draw.Sprite", - "doc": "

Used in rectangle sprites, the width of the rectangle

\n", - "linenr": 133, - "html_filename": "Sprite2.html" - }, - { - "type": "Number", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-x", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "x", - "owner": "Ext.draw.Sprite", - "doc": "

The position along the x-axis

\n", - "linenr": 149, - "html_filename": "Sprite2.html" - }, - { - "type": "Number", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Sprite2.html#Ext-draw-Sprite-cfg-y", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "y", - "owner": "Ext.draw.Sprite", - "doc": "

The position along the y-axis

\n", - "linenr": 153, - "html_filename": "Sprite2.html" - } - ], - "method": [ - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Sprite2.html#Ext-draw-Sprite-method-addCls", - "shortDoc": "Adds one or more CSS classes to the element. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "params": [ - { - "type": "String/Array", - "optional": false, - "doc": "

The CSS class to add, or an array of classes

\n", - "name": "className" - } - ], - "name": "addCls", - "owner": "Ext.draw.Sprite", - "doc": "

Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out. Note this method\nis severly limited in VML.

\n", - "linenr": 478, - "return": { - "type": "Ext.draw.Sprite", - "doc": "

this

\n" - }, - "html_filename": "Sprite2.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Sprite2.html#Ext-draw-Sprite-method-destroy", - "shortDoc": "Removes the sprite and clears all listeners. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "params": [ - - ], - "name": "destroy", - "owner": "Ext.draw.Sprite", - "doc": "

Removes the sprite and clears all listeners.

\n", - "linenr": 445, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Sprite2.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Sprite2.html#Ext-draw-Sprite-method-getBBox", - "shortDoc": "Retrieve the bounding box of the sprite. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "params": [ - - ], - "name": "getBBox", - "owner": "Ext.draw.Sprite", - "doc": "

Retrieve the bounding box of the sprite. This will be returned as an object with x, y, width, and height properties.

\n", - "linenr": 394, - "return": { - "type": "Object", - "doc": "

bbox

\n" - }, - "html_filename": "Sprite2.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Sprite2.html#Ext-draw-Sprite-method-hide", - "shortDoc": "Hide the sprite. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "params": [ - { - "type": "Boolean", - "optional": false, - "doc": "

Flag to immediatly draw the change.

\n", - "name": "redraw" - } - ], - "name": "hide", - "owner": "Ext.draw.Sprite", - "doc": "

Hide the sprite.

\n", - "linenr": 406, - "return": { - "type": "Ext.draw.Sprite", - "doc": "

this

\n" - }, - "html_filename": "Sprite2.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Sprite2.html#Ext-draw-Sprite-method-redraw", - "shortDoc": "Redraw the sprite. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "params": [ - - ], - "name": "redraw", - "owner": "Ext.draw.Sprite", - "doc": "

Redraw the sprite.

\n", - "linenr": 458, - "return": { - "type": "Ext.draw.Sprite", - "doc": "

this

\n" - }, - "html_filename": "Sprite2.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Sprite2.html#Ext-draw-Sprite-method-remove", - "shortDoc": "Remove the sprite. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "params": [ - - ], - "name": "remove", - "owner": "Ext.draw.Sprite", - "doc": "

Remove the sprite.

\n", - "linenr": 430, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Sprite2.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Sprite2.html#Ext-draw-Sprite-method-removeCls", - "shortDoc": "Removes one or more CSS classes from the element. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "params": [ - { - "type": "String/Array", - "optional": false, - "doc": "

The CSS class to remove, or an array of classes. Note this method\nis severly limited in VML.

\n", - "name": "className" - } - ], - "name": "removeCls", - "owner": "Ext.draw.Sprite", - "doc": "

Removes one or more CSS classes from the element.

\n", - "linenr": 489, - "return": { - "type": "Ext.draw.Sprite", - "doc": "

this

\n" - }, - "html_filename": "Sprite2.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Sprite2.html#Ext-draw-Sprite-method-setAttributes", - "shortDoc": "Change the attributes of the sprite. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "params": [ - { - "type": "Object", - "optional": false, - "doc": "

attributes to be changed on the sprite.

\n", - "name": "attrs" - }, - { - "type": "Boolean", - "optional": false, - "doc": "

Flag to immediatly draw the change.

\n", - "name": "redraw" - } - ], - "name": "setAttributes", - "owner": "Ext.draw.Sprite", - "doc": "

Change the attributes of the sprite.

\n", - "linenr": 297, - "return": { - "type": "Ext.draw.Sprite", - "doc": "

this

\n" - }, - "html_filename": "Sprite2.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Sprite2.html#Ext-draw-Sprite-method-setStyle", - "shortDoc": "Wrapper for setting style properties, also takes single object parameter of multiple styles. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "params": [ - { - "type": "String/Object", - "optional": false, - "doc": "

The style property to be set, or an object of multiple styles.

\n", - "name": "property" - }, - { - "type": "String", - "optional": true, - "doc": "

(optional) The value to apply to the given property, or null if an object was passed.

\n", - "name": "value" - } - ], - "name": "setStyle", - "owner": "Ext.draw.Sprite", - "doc": "

Wrapper for setting style properties, also takes single object parameter of multiple styles.

\n", - "linenr": 467, - "return": { - "type": "Ext.draw.Sprite", - "doc": "

this

\n" - }, - "html_filename": "Sprite2.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Sprite2.html#Ext-draw-Sprite-method-show", - "shortDoc": "Show the sprite. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "params": [ - { - "type": "Boolean", - "optional": false, - "doc": "

Flag to immediatly draw the change.

\n", - "name": "redraw" - } - ], - "name": "show", - "owner": "Ext.draw.Sprite", - "doc": "

Show the sprite.

\n", - "linenr": 418, - "return": { - "type": "Ext.draw.Sprite", - "doc": "

this

\n" - }, - "html_filename": "Sprite2.html" - } - ], - "property": [ - { - "type": "Ext.dd.DragSource.", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "property", - "href": "Sprite2.html#Ext-draw-Sprite-property-dd", - "shortDoc": "If this Sprite is configured draggable, this property will contain\nan instance of Ext.dd.DragSource which handles dra...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "name": "dd", - "owner": "Ext.draw.Sprite", - "doc": "

If this Sprite is configured draggable, this property will contain\nan instance of Ext.dd.DragSource which handles dragging the Sprite.

\n\n\n

The developer must provide implementations of the abstract methods of Ext.dd.DragSource\nin order to supply behaviour for each stage of the drag/drop process. See draggable.

\n", - "linenr": 278, - "html_filename": "Sprite2.html" - } - ], - "cssVar": [ - - ], - "cssMixin": [ - - ], - "event": [ - - ] - }, - "singleton": false, - "alias": null, - "superclasses": [ - - ], - "protected": false, - "tagname": "class", - "mixins": [ - - ], - "href": "Sprite2.html#Ext-draw-Sprite", - "subclasses": [ - - ], - "static": false, - "author": null, - "component": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js", - "private": false, - "alternateClassNames": [ - - ], - "name": "Ext.draw.Sprite", - "doc": "

A Sprite is an object rendered in a Drawing surface. There are different options and types of sprites.\nThe configuration of a Sprite is an object with the following properties:

\n\n\n\n\n

Translation

\n\n

For translate, the configuration object contains x and y attributes that indicate where to\ntranslate the object. For example:

\n\n
sprite.setAttributes({\n  translate: {\n   x: 10,\n   y: 10\n  }\n}, true);\n
\n\n

Rotation

\n\n

For rotation, the configuration object contains x and y attributes for the center of the rotation (which are optional),\nand a degrees attribute that specifies the rotation in degrees. For example:

\n\n
sprite.setAttributes({\n  rotate: {\n   degrees: 90\n  }\n}, true);\n
\n\n

That example will create a 90 degrees rotation using the centroid of the Sprite as center of rotation, whereas:

\n\n
sprite.setAttributes({\n  rotate: {\n   x: 0,\n   y: 0,\n   degrees: 90\n  }\n}, true);\n
\n\n

will create a rotation around the (0, 0) axis.

\n\n

Scaling

\n\n

For scaling, the configuration object contains x and y attributes for the x-axis and y-axis scaling. For example:

\n\n
sprite.setAttributes({\n  scale: {\n   x: 10,\n   y: 3\n  }\n}, true);\n
\n\n

You can also specify the center of scaling by adding cx and cy as properties:

\n\n
sprite.setAttributes({\n  scale: {\n   cx: 0,\n   cy: 0,\n   x: 10,\n   y: 3\n  }\n}, true);\n
\n\n

That last example will scale a sprite taking as centers of scaling the (0, 0) coordinate.

\n\n

Creating and adding a Sprite to a Surface

\n\n

Sprites can be created with a reference to a Ext.draw.Surface

\n\n
 var drawComponent = Ext.create('Ext.draw.Component', options here...);\n\n var sprite = Ext.create('Ext.draw.Sprite', {\n     type: 'circle',\n     fill: '#ff0',\n     surface: drawComponent.surface,\n     radius: 5\n });\n
\n\n

Sprites can also be added to the surface as a configuration object:

\n\n
 var sprite = drawComponent.surface.add({\n     type: 'circle',\n     fill: '#ff0',\n     radius: 5\n });\n
\n\n

In order to properly apply properties and render the sprite we have to\nshow the sprite setting the option redraw to true:

\n\n
 sprite.show(true);\n
\n\n

The constructor configuration object of the Sprite can also be used and passed into the Ext.draw.Surface\nadd method to append a new sprite to the canvas. For example:

\n\n
drawComponent.surface.add({\n    type: 'circle',\n    fill: '#ffc',\n    radius: 100,\n    x: 100,\n    y: 100\n});\n
\n", - "mixedInto": [ - - ], - "linenr": 1, - "xtypes": [ - - ], - "html_filename": "Sprite2.html", - "extends": "Object" -}); \ No newline at end of file +Ext.data.JsonP.Ext_draw_Sprite({"tagname":"class","html":"

Hierarchy

Ext.Base
Ext.draw.Sprite

Mixins

Requires

Files

A Sprite is an object rendered in a Drawing surface.

\n\n

Translation

\n\n

For translate, the configuration object contains x and y attributes that indicate where to\ntranslate the object. For example:

\n\n
sprite.setAttributes({\n  translate: {\n   x: 10,\n   y: 10\n  }\n}, true);\n
\n\n

Rotation

\n\n

For rotation, the configuration object contains x and y attributes for the center of the rotation (which are optional),\nand a degrees attribute that specifies the rotation in degrees. For example:

\n\n
sprite.setAttributes({\n  rotate: {\n   degrees: 90\n  }\n}, true);\n
\n\n

That example will create a 90 degrees rotation using the centroid of the Sprite as center of rotation, whereas:

\n\n
sprite.setAttributes({\n  rotate: {\n   x: 0,\n   y: 0,\n   degrees: 90\n  }\n}, true);\n
\n\n

will create a rotation around the (0, 0) axis.

\n\n

Scaling

\n\n

For scaling, the configuration object contains x and y attributes for the x-axis and y-axis scaling. For example:

\n\n
sprite.setAttributes({\n  scale: {\n   x: 10,\n   y: 3\n  }\n}, true);\n
\n\n

You can also specify the center of scaling by adding cx and cy as properties:

\n\n
sprite.setAttributes({\n  scale: {\n   cx: 0,\n   cy: 0,\n   x: 10,\n   y: 3\n  }\n}, true);\n
\n\n

That last example will scale a sprite taking as centers of scaling the (0, 0) coordinate.

\n\n

Creating and adding a Sprite to a Surface

\n\n

Sprites can be created with a reference to a Ext.draw.Surface

\n\n
var drawComponent = Ext.create('Ext.draw.Component', options here...);\n\nvar sprite = Ext.create('Ext.draw.Sprite', {\n    type: 'circle',\n    fill: '#ff0',\n    surface: drawComponent.surface,\n    radius: 5\n});\n
\n\n

Sprites can also be added to the surface as a configuration object:

\n\n
var sprite = drawComponent.surface.add({\n    type: 'circle',\n    fill: '#ff0',\n    radius: 5\n});\n
\n\n

In order to properly apply properties and render the sprite we have to\nshow the sprite setting the option redraw to true:

\n\n
sprite.show(true);\n
\n\n

The constructor configuration object of the Sprite can also be used and passed into the Ext.draw.Surface\nadd method to append a new sprite to the canvas. For example:

\n\n
drawComponent.surface.add({\n    type: 'circle',\n    fill: '#ffc',\n    radius: 100,\n    x: 100,\n    y: 100\n});\n
\n
Defined By

Config options

 

True to make the sprite draggable.

\n

True to make the sprite draggable.

\n
 

The fill color

\n

The fill color

\n
Used with text type sprites. ...

Used with text type sprites. The full font description. Uses the same syntax as the CSS font parameter

\n
The group that this sprite belongs to, or an array of groups. ...

The group that this sprite belongs to, or an array of groups. Only relevant when added to a\nExt.draw.Surface

\n
 

Used in rectangle sprites, the height of the rectangle

\n

Used in rectangle sprites, the height of the rectangle

\n
A config object containing one or more event handlers to be added to this object during initialization. ...

A config object containing one or more event handlers to be added to this object during initialization. This\nshould be a valid listeners config object as specified in the addListener example for attaching multiple\nhandlers at once.

\n\n

DOM events from Ext JS Components

\n\n

While some Ext JS Component classes export selected DOM events (e.g. \"click\", \"mouseover\" etc), this is usually\nonly done when extra value can be added. For example the DataView's itemclick event passing the node clicked on. To access DOM events directly from a\nchild element of a Component, we need to specify the element option to identify the Component property to add a\nDOM listener to:

\n\n
new Ext.panel.Panel({\n    width: 400,\n    height: 200,\n    dockedItems: [{\n        xtype: 'toolbar'\n    }],\n    listeners: {\n        click: {\n            element: 'el', //bind to the underlying el property on the panel\n            fn: function(){ console.log('click el'); }\n        },\n        dblclick: {\n            element: 'body', //bind to the underlying body property on the panel\n            fn: function(){ console.log('dblclick body'); }\n        }\n    }\n});\n
\n
 

The opacity of the sprite

\n

The opacity of the sprite

\n
 

Used in path sprites, the path of the sprite written in SVG-like path syntax

\n

Used in path sprites, the path of the sprite written in SVG-like path syntax

\n
 

Used in circle sprites, the radius of the circle

\n

Used in circle sprites, the radius of the circle

\n
 

Used in square sprites, the dimension of the square

\n

Used in square sprites, the dimension of the square

\n
 

-width The width of the stroke

\n

-width The width of the stroke

\n
Used with text type sprites. ...

Used with text type sprites. The text itself

\n
The type of the sprite. ...

The type of the sprite. Possible options are 'circle', 'path', 'rect', 'text', 'square', 'image'

\n
 

Used in rectangle sprites, the width of the rectangle

\n

Used in rectangle sprites, the width of the rectangle

\n
 

The position along the x-axis

\n

The position along the x-axis

\n
 

The position along the y-axis

\n

The position along the y-axis

\n
Defined By

Properties

If this Sprite is configured draggable, this property will contain\nan instance of Ext.dd.DragSource which handles dra...

If this Sprite is configured draggable, this property will contain\nan instance of Ext.dd.DragSource which handles dragging the Sprite.

\n\n

The developer must provide implementations of the abstract methods of Ext.dd.DragSource\nin order to supply behaviour for each stage of the drag/drop process. See draggable.

\n
Get the reference to the current class from which this object was instantiated. ...

Get the reference to the current class from which this object was instantiated. Unlike statics,\nthis.self is scope-dependent and it's meant to be used for dynamic inheritance. See statics\nfor a detailed comparison

\n\n
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
\n

Methods

Defined By

Instance Methods

Adds one or more CSS classes to the element. ...

Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out. Note this method\nis severly limited in VML.

\n

Parameters

  • className : String/String[]

    The CSS class to add, or an array of classes

    \n

Returns

Adds the specified events to the list of events which this Observable may fire. ...

Adds the specified events to the list of events which this Observable may fire.

\n

Parameters

  • o : Object/String

    Either an object with event names as properties with a value of true or the first\nevent name string if multiple event names are being passed as separate parameters. Usage:

    \n\n
    this.addEvents({\n    storeloaded: true,\n    storecleared: true\n});\n
    \n
  • more : String... (optional)

    Additional event names if multiple event names are being passed as separate\nparameters. Usage:

    \n\n
    this.addEvents('storeloaded', 'storecleared');\n
    \n
Appends an event handler to this object. ...

Appends an event handler to this object.

\n

Parameters

  • eventName : String

    The name of the event to listen for. May also be an object who's property names are\nevent names.

    \n\n
  • fn : Function

    The method the event invokes. Will be called with arguments given to\nfireEvent plus the options parameter described below.

    \n\n
  • scope : Object (optional)

    The scope (this reference) in which the handler function is executed. If\nomitted, defaults to the object which fired the event.

    \n\n
  • options : Object (optional)

    An object containing handler configuration.

    \n\n\n\n\n

    Note: Unlike in ExtJS 3.x, the options object will also be passed as the last argument to every event handler.

    \n\n\n\n\n

    This object may contain any of the following properties:

    \n\n\n\n\n
      \n
    • scope : Object

      \n\n

      The scope (this reference) in which the handler function is executed. If omitted, defaults to the object\nwhich fired the event.

    • \n
    • delay : Number

      \n\n

      The number of milliseconds to delay the invocation of the handler after the event fires.

    • \n
    • single : Boolean

      \n\n

      True to add a handler to handle just the next firing of the event, and then remove itself.

    • \n
    • buffer : Number

      \n\n

      Causes the handler to be scheduled to run in an Ext.util.DelayedTask delayed by the specified number of\nmilliseconds. If the event fires again within that time, the original handler is not invoked, but the new\nhandler is scheduled in its place.

    • \n
    • target : Observable

      \n\n

      Only call the handler if the event was fired on the target Observable, not if the event was bubbled up from a\nchild Observable.

    • \n
    • element : String

      \n\n

      This option is only valid for listeners bound to Components. The name of a Component\nproperty which references an element to add a listener to.

      \n\n

      This option is useful during Component construction to add DOM event listeners to elements of\nComponents which will exist only after the Component is rendered.\nFor example, to add a click listener to a Panel's body:

      \n\n
      new Ext.panel.Panel({\n    title: 'The title',\n    listeners: {\n        click: this.handlePanelClick,\n        element: 'body'\n    }\n});\n
    • \n
    \n\n\n\n\n

    Combining Options

    \n\n\n\n\n

    Using the options argument, it is possible to combine different types of listeners:

    \n\n\n\n\n

    A delayed, one-time listener.

    \n\n\n\n\n
    myPanel.on('hide', this.handleClick, this, {\n    single: true,\n    delay: 100\n});\n
    \n\n\n\n\n

    Attaching multiple handlers in 1 call

    \n\n\n\n\n

    The method also allows for a single argument to be passed which is a config object containing properties which\nspecify multiple events. For example:

    \n\n\n\n\n
    myGridPanel.on({\n    cellClick: this.onCellClick,\n    mouseover: this.onMouseOver,\n    mouseout: this.onMouseOut,\n    scope: this // Important. Ensure \"this\" is correct during handler execution\n});\n
    \n\n\n\n\n

    One can also specify options for each event handler separately:

    \n\n\n\n\n
    myGridPanel.on({\n    cellClick: {fn: this.onCellClick, scope: this, single: true},\n    mouseover: {fn: panel.onMouseOver, scope: panel}\n});\n
    \n\n
Adds listeners to any Observable object (or Ext.Element) which are automatically removed when this Component is\ndestr...

Adds listeners to any Observable object (or Ext.Element) which are automatically removed when this Component is\ndestroyed.

\n

Parameters

  • item : Ext.util.Observable/Ext.Element

    The item to which to add a listener/listeners.

    \n\n
  • ename : Object/String

    The event name, or an object containing event name properties.

    \n\n
  • fn : Function (optional)

    If the ename parameter was an event name, this is the handler function.

    \n\n
  • scope : Object (optional)

    If the ename parameter was an event name, this is the scope (this reference)\nin which the handler function is executed.

    \n\n
  • opt : Object (optional)

    If the ename parameter was an event name, this is the\naddListener options.

    \n\n
Perform custom animation on this object. ...

Perform custom animation on this object.

\n

This method is applicable to both the Component class and the Element class.\nIt performs animated transitions of certain properties of this object over a specified timeline.

\n

The sole parameter is an object which specifies start property values, end property values, and properties which\ndescribe the timeline. Of the properties listed below, only to is mandatory.

\n

Properties include

    \n
  • from
    An object which specifies start values for the properties being animated.\nIf not supplied, properties are animated from current settings. The actual properties which may be animated depend upon\nths object being animated. See the sections below on Element and Component animation.
  • \n
  • to
    An object which specifies end values for the properties being animated.
  • \n
  • duration
    The duration in milliseconds for which the animation will run.
  • \n
  • easing
    A string value describing an easing type to modify the rate of change from the default linear to non-linear. Values may be one of:
      \n
    • ease
    • \n
    • easeIn
    • \n
    • easeOut
    • \n
    • easeInOut
    • \n
    • backIn
    • \n
    • backOut
    • \n
    • elasticIn
    • \n
    • elasticOut
    • \n
    • bounceIn
    • \n
    • bounceOut
    • \n
  • \n
  • keyframes
    This is an object which describes the state of animated properties at certain points along the timeline.\nit is an object containing properties who's names are the percentage along the timeline being described and who's values specify the animation state at that point.
  • \n
  • listeners
    This is a standard listeners configuration object which may be used\nto inject behaviour at either the beforeanimate event or the afteranimate event.
  • \n

\n

Animating an Element

\nWhen animating an Element, the following properties may be specified in from, to, and keyframe objects:
    \n
  • x
    The page X position in pixels.
  • \n
  • y
    The page Y position in pixels
  • \n
  • left
    The element's CSS left value. Units must be supplied.
  • \n
  • top
    The element's CSS top value. Units must be supplied.
  • \n
  • width
    The element's CSS width value. Units must be supplied.
  • \n
  • height
    The element's CSS height value. Units must be supplied.
  • \n
  • scrollLeft
    The element's scrollLeft value.
  • \n
  • scrollTop
    The element's scrollLeft value.
  • \n
  • opacity
    The element's opacity value. This must be a value between 0 and 1.
  • \n
\n

Be aware than animating an Element which is being used by an Ext Component without in some way informing the Component about the changed element state\nwill result in incorrect Component behaviour. This is because the Component will be using the old state of the element. To avoid this problem, it is now possible to\ndirectly animate certain properties of Components.

\n

Animating a Component

\nWhen animating an Element, the following properties may be specified in from, to, and keyframe objects:
    \n
  • x
    The Component's page X position in pixels.
  • \n
  • y
    The Component's page Y position in pixels
  • \n
  • left
    The Component's left value in pixels.
  • \n
  • top
    The Component's top value in pixels.
  • \n
  • width
    The Component's width value in pixels.
  • \n
  • width
    The Component's width value in pixels.
  • \n
  • dynamic
    Specify as true to update the Component's layout (if it is a Container) at every frame\nof the animation. Use sparingly as laying out on every intermediate size change is an expensive operation.
  • \n
\n

For example, to animate a Window to a new size, ensuring that its internal layout, and any shadow is correct:

\n
myWindow = Ext.create('Ext.window.Window', {\n    title: 'Test Component animation',\n    width: 500,\n    height: 300,\n    layout: {\n        type: 'hbox',\n        align: 'stretch'\n    },\n    items: [{\n        title: 'Left: 33%',\n        margins: '5 0 5 5',\n        flex: 1\n    }, {\n        title: 'Left: 66%',\n        margins: '5 5 5 5',\n        flex: 2\n    }]\n});\nmyWindow.show();\nmyWindow.header.el.on('click', function() {\n    myWindow.animate({\n        to: {\n            width: (myWindow.getWidth() == 500) ? 700 : 500,\n            height: (myWindow.getHeight() == 300) ? 400 : 300,\n        }\n    });\n});\n
\n

For performance reasons, by default, the internal layout is only updated when the Window reaches its final \"to\" size. If dynamic updating of the Window's child\nComponents is required, then configure the animation with dynamic: true and the two child items will maintain their proportions during the animation.

\n\n

Parameters

  • config : Object

    An object containing properties which describe the animation's start and end states, and the timeline of the animation.

    \n

Returns

( Array/Arguments args ) : Objectprotected
Call the original method that was previously overridden with override\n\nExt.define('My.Cat', {\n constructor: functi...

Call the original method that was previously overridden with override

\n\n
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
\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object

    \n

Returns

  • Object

    Returns the result after calling the overridden method

    \n
( Array/Arguments args ) : Objectprotected
Call the parent's overridden method. ...

Call the parent's overridden method. For example:

\n\n
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
\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object\nfrom the current method, for example: this.callParent(arguments)

    \n

Returns

  • Object

    Returns the result from the superclass' method

    \n
Removes all listeners for this object including the managed listeners ...

Removes all listeners for this object including the managed listeners

\n
Removes all managed listeners for this object. ...

Removes all managed listeners for this object.

\n
Removes the sprite and clears all listeners. ...

Removes the sprite and clears all listeners.

\n
Enables events fired by this Observable to bubble up an owner hierarchy by calling this.getBubbleTarget() if\npresent. ...

Enables events fired by this Observable to bubble up an owner hierarchy by calling this.getBubbleTarget() if\npresent. There is no implementation in the Observable base class.

\n\n

This is commonly used by Ext.Components to bubble events to owner Containers.\nSee Ext.Component.getBubbleTarget. The default implementation in Ext.Component returns the\nComponent's immediate owner. But if a known target is required, this can be overridden to access the\nrequired target more quickly.

\n\n

Example:

\n\n
Ext.override(Ext.form.field.Base, {\n    //  Add functionality to Field's initComponent to enable the change event to bubble\n    initComponent : Ext.Function.createSequence(Ext.form.field.Base.prototype.initComponent, function() {\n        this.enableBubble('change');\n    }),\n\n    //  We know that we want Field's events to bubble directly to the FormPanel.\n    getBubbleTarget : function() {\n        if (!this.formPanel) {\n            this.formPanel = this.findParentByType('form');\n        }\n        return this.formPanel;\n    }\n});\n\nvar myForm = new Ext.formPanel({\n    title: 'User Details',\n    items: [{\n        ...\n    }],\n    listeners: {\n        change: function() {\n            // Title goes red if form has been modified.\n            myForm.header.setStyle('color', 'red');\n        }\n    }\n});\n
\n

Parameters

  • events : String/String[]

    The event name to bubble, or an Array of event names.

    \n
Fires the specified event with the passed parameters (minus the event name, plus the options object passed\nto addList...

Fires the specified event with the passed parameters (minus the event name, plus the options object passed\nto addListener).

\n\n

An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget) by\ncalling enableBubble.

\n

Parameters

  • eventName : String

    The name of the event to fire.

    \n
  • args : Object...

    Variable number of parameters are passed to handlers.

    \n

Returns

  • Boolean

    returns false if any of the handlers return false otherwise it returns true.

    \n
Returns the current animation if this object has any effects actively running or queued, else returns false. ...

Returns the current animation if this object has any effects actively running or queued, else returns false.

\n

Returns

Retrieves the bounding box of the sprite. ...

Retrieves the bounding box of the sprite.\nThis will be returned as an object with x, y, width, and height properties.

\n

Returns

Returns the current animation if this object has any effects actively running or queued, else returns false. ...

Returns the current animation if this object has any effects actively running or queued, else returns false.

\n

This method has been deprecated since 4.0

Replaced by getActiveAnimation

\n

Returns

Checks to see if this object has any listeners for a specified event ...

Checks to see if this object has any listeners for a specified event

\n

Parameters

  • eventName : String

    The name of the event to check for

    \n

Returns

  • Boolean

    True if the event is being listened for, else false

    \n
Hides the sprite. ...

Hides the sprite.

\n

Parameters

  • redraw : Boolean

    Flag to immediatly draw the change.

    \n

Returns

Initialize configuration for this class. ...

Initialize configuration for this class. a typical example:

\n\n
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
\n

Parameters

Returns

  • Object

    mixins The mixin prototypes as key - value pairs

    \n
Shorthand for addManagedListener. ...

Shorthand for addManagedListener.

\n\n

Adds listeners to any Observable object (or Ext.Element) which are automatically removed when this Component is\ndestroyed.

\n

Parameters

  • item : Ext.util.Observable/Ext.Element

    The item to which to add a listener/listeners.

    \n\n
  • ename : Object/String

    The event name, or an object containing event name properties.

    \n\n
  • fn : Function (optional)

    If the ename parameter was an event name, this is the handler function.

    \n\n
  • scope : Object (optional)

    If the ename parameter was an event name, this is the scope (this reference)\nin which the handler function is executed.

    \n\n
  • opt : Object (optional)

    If the ename parameter was an event name, this is the\naddListener options.

    \n\n
Shorthand for removeManagedListener. ...

Shorthand for removeManagedListener.

\n\n

Removes listeners that were added by the mon method.

\n

Parameters

  • item : Ext.util.Observable/Ext.Element

    The item from which to remove a listener/listeners.

    \n\n
  • ename : Object/String

    The event name, or an object containing event name properties.

    \n\n
  • fn : Function (optional)

    If the ename parameter was an event name, this is the handler function.

    \n\n
  • scope : Object (optional)

    If the ename parameter was an event name, this is the scope (this reference)\nin which the handler function is executed.

    \n\n
( String eventName, Function fn, [Object scope], [Object options] )
Shorthand for addListener. ...

Shorthand for addListener.

\n\n

Appends an event handler to this object.

\n

Parameters

  • eventName : String

    The name of the event to listen for. May also be an object who's property names are\nevent names.

    \n\n
  • fn : Function

    The method the event invokes. Will be called with arguments given to\nfireEvent plus the options parameter described below.

    \n\n
  • scope : Object (optional)

    The scope (this reference) in which the handler function is executed. If\nomitted, defaults to the object which fired the event.

    \n\n
  • options : Object (optional)

    An object containing handler configuration.

    \n\n\n\n\n

    Note: Unlike in ExtJS 3.x, the options object will also be passed as the last argument to every event handler.

    \n\n\n\n\n

    This object may contain any of the following properties:

    \n\n\n\n\n
      \n
    • scope : Object

      \n\n

      The scope (this reference) in which the handler function is executed. If omitted, defaults to the object\nwhich fired the event.

    • \n
    • delay : Number

      \n\n

      The number of milliseconds to delay the invocation of the handler after the event fires.

    • \n
    • single : Boolean

      \n\n

      True to add a handler to handle just the next firing of the event, and then remove itself.

    • \n
    • buffer : Number

      \n\n

      Causes the handler to be scheduled to run in an Ext.util.DelayedTask delayed by the specified number of\nmilliseconds. If the event fires again within that time, the original handler is not invoked, but the new\nhandler is scheduled in its place.

    • \n
    • target : Observable

      \n\n

      Only call the handler if the event was fired on the target Observable, not if the event was bubbled up from a\nchild Observable.

    • \n
    • element : String

      \n\n

      This option is only valid for listeners bound to Components. The name of a Component\nproperty which references an element to add a listener to.

      \n\n

      This option is useful during Component construction to add DOM event listeners to elements of\nComponents which will exist only after the Component is rendered.\nFor example, to add a click listener to a Panel's body:

      \n\n
      new Ext.panel.Panel({\n    title: 'The title',\n    listeners: {\n        click: this.handlePanelClick,\n        element: 'body'\n    }\n});\n
    • \n
    \n\n\n\n\n

    Combining Options

    \n\n\n\n\n

    Using the options argument, it is possible to combine different types of listeners:

    \n\n\n\n\n

    A delayed, one-time listener.

    \n\n\n\n\n
    myPanel.on('hide', this.handleClick, this, {\n    single: true,\n    delay: 100\n});\n
    \n\n\n\n\n

    Attaching multiple handlers in 1 call

    \n\n\n\n\n

    The method also allows for a single argument to be passed which is a config object containing properties which\nspecify multiple events. For example:

    \n\n\n\n\n
    myGridPanel.on({\n    cellClick: this.onCellClick,\n    mouseover: this.onMouseOver,\n    mouseout: this.onMouseOut,\n    scope: this // Important. Ensure \"this\" is correct during handler execution\n});\n
    \n\n\n\n\n

    One can also specify options for each event handler separately:

    \n\n\n\n\n
    myGridPanel.on({\n    cellClick: {fn: this.onCellClick, scope: this, single: true},\n    mouseover: {fn: panel.onMouseOver, scope: panel}\n});\n
    \n\n
Redraws the sprite. ...

Redraws the sprite.

\n

Returns

Relays selected events from the specified Observable as if the events were fired by this. ...

Relays selected events from the specified Observable as if the events were fired by this.

\n

Parameters

  • origin : Object

    The Observable whose events this object is to relay.

    \n
  • events : String[]

    Array of event names to relay.

    \n
  • prefix : String
    \n
Removes the sprite. ...

Removes the sprite.

\n
Removes one or more CSS classes from the element. ...

Removes one or more CSS classes from the element.

\n

Parameters

  • className : String/String[]

    The CSS class to remove, or an array of classes. Note this method\nis severly limited in VML.

    \n

Returns

Removes an event handler. ...

Removes an event handler.

\n

Parameters

  • eventName : String

    The type of event the handler was associated with.

    \n\n
  • fn : Function

    The handler to remove. This must be a reference to the function passed into the\naddListener call.

    \n\n
  • scope : Object (optional)

    The scope originally specified for the handler. It must be the same as the\nscope argument specified in the original call to addListener or the listener will not be removed.

    \n\n
Removes listeners that were added by the mon method. ...

Removes listeners that were added by the mon method.

\n

Parameters

  • item : Ext.util.Observable/Ext.Element

    The item from which to remove a listener/listeners.

    \n\n
  • ename : Object/String

    The event name, or an object containing event name properties.

    \n\n
  • fn : Function (optional)

    If the ename parameter was an event name, this is the handler function.

    \n\n
  • scope : Object (optional)

    If the ename parameter was an event name, this is the scope (this reference)\nin which the handler function is executed.

    \n\n
Resumes firing events (see suspendEvents). ...

Resumes firing events (see suspendEvents).

\n\n

If events were suspended using the queueSuspended parameter, then all events fired\nduring event suspension will be sent to any listeners now.

\n
Ensures that all effects queued after sequenceFx is called on this object are\nrun in sequence. ...

Ensures that all effects queued after sequenceFx is called on this object are\nrun in sequence. This is the opposite of syncFx.

\n

Returns

Change the attributes of the sprite. ...

Change the attributes of the sprite.

\n

Parameters

  • attrs : Object

    attributes to be changed on the sprite.

    \n
  • redraw : Boolean

    Flag to immediatly draw the change.

    \n

Returns

Wrapper for setting style properties, also takes single object parameter of multiple styles. ...

Wrapper for setting style properties, also takes single object parameter of multiple styles.

\n

Parameters

  • property : String/Object

    The style property to be set, or an object of multiple styles.

    \n
  • value : String (optional)

    The value to apply to the given property, or null if an object was passed.

    \n

Returns

Shows the sprite. ...

Shows the sprite.

\n

Parameters

  • redraw : Boolean

    Flag to immediatly draw the change.

    \n

Returns

Get the reference to the class from which this object was instantiated. ...

Get the reference to the class from which this object was instantiated. Note that unlike self,\nthis.statics() is scope-independent and it always returns the class from which it was called, regardless of what\nthis points to during run-time

\n\n
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
\n

Returns

Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that ...

Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that haven't started yet.

\n

Returns

Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that ...

Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that haven't started yet.

\n

This method has been deprecated since 4.0

Replaced by stopAnimation

\n

Returns

Suspends the firing of all events. ...

Suspends the firing of all events. (see resumeEvents)

\n

Parameters

  • queueSuspended : Boolean

    Pass as true to queue up suspended events to be fired\nafter the resumeEvents call instead of discarding all suspended events.

    \n
Ensures that all effects queued after syncFx is called on this object are\nrun concurrently. ...

Ensures that all effects queued after syncFx is called on this object are\nrun concurrently. This is the opposite of sequenceFx.

\n

Returns

Shorthand for removeListener. ...

Shorthand for removeListener.

\n\n

Removes an event handler.

\n

Parameters

  • eventName : String

    The type of event the handler was associated with.

    \n\n
  • fn : Function

    The handler to remove. This must be a reference to the function passed into the\naddListener call.

    \n\n
  • scope : Object (optional)

    The scope originally specified for the handler. It must be the same as the\nscope argument specified in the original call to addListener or the listener will not be removed.

    \n\n
Defined By

Static Methods

Add / override static properties of this class. ...

Add / override static properties of this class.

\n\n
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
\n

Parameters

Returns

( Ext.Base fromClass, String/String[] members ) : Ext.Basestatic
Borrow another class' members to the prototype of this class. ...

Borrow another class' members to the prototype of this class.

\n\n
Ext.define('Bank', {\n    money: '$$$',\n    printMoney: function() {\n        alert('$$$$$$$');\n    }\n});\n\nExt.define('Thief', {\n    ...\n});\n\nThief.borrow(Bank, ['money', 'printMoney']);\n\nvar steve = new Thief();\n\nalert(steve.money); // alerts '$$$'\nsteve.printMoney(); // alerts '$$$$$$$'\n
\n

Parameters

  • fromClass : Ext.Base

    The class to borrow members from

    \n
  • members : String/String[]

    The names of the members to borrow

    \n

Returns

Create a new instance of this Class. ...

Create a new instance of this Class.

\n\n
Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.create({\n    someConfig: true\n});\n
\n\n

All parameters are passed to the constructor of the class.

\n

Returns

Create aliases for existing prototype methods. ...

Create aliases for existing prototype methods. Example:

\n\n
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
\n

Parameters

Get the current class' name in string format. ...

Get the current class' name in string format.

\n\n
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
\n

Returns

Add methods / properties to the prototype of this class. ...

Add methods / properties to the prototype of this class.

\n\n
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
\n

Parameters

Override prototype members of this class. ...

Override prototype members of this class. Overridden methods can be invoked via\ncallOverridden

\n\n
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
\n

Parameters

Returns

","allMixins":["Ext.util.Observable","Ext.util.Animate"],"meta":{},"requires":["Ext.draw.SpriteDD"],"deprecated":null,"extends":"Ext.Base","inheritable":false,"static":false,"superclasses":["Ext.Base","Ext.draw.Sprite"],"singleton":false,"code_type":"ext_define","alias":null,"statics":{"property":[],"css_var":[],"css_mixin":[],"cfg":[],"method":[{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"addStatics","id":"static-method-addStatics"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"borrow","id":"static-method-borrow"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"create","id":"static-method-create"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"createAlias","id":"static-method-createAlias"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"getName","id":"static-method-getName"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"implement","id":"static-method-implement"},{"tagname":"method","deprecated":null,"static":true,"owner":"Ext.Base","template":false,"required":null,"protected":false,"name":"override","id":"static-method-override"}],"event":[]},"subclasses":[],"uses":[],"protected":false,"mixins":["Ext.util.Observable","Ext.util.Animate"],"members":{"property":[{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":null,"protected":false,"name":"dd","id":"property-dd"},{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.Base","template":null,"required":null,"protected":true,"name":"self","id":"property-self"}],"css_var":[],"css_mixin":[],"cfg":[{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"draggable","id":"cfg-draggable"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"fill","id":"cfg-fill"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"font","id":"cfg-font"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"group","id":"cfg-group"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"height","id":"cfg-height"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":null,"required":false,"protected":false,"name":"listeners","id":"cfg-listeners"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"opacity","id":"cfg-opacity"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"path","id":"cfg-path"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"radius","id":"cfg-radius"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"size","id":"cfg-size"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"stroke","id":"cfg-stroke"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"text","id":"cfg-text"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"type","id":"cfg-type"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"width","id":"cfg-width"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"x","id":"cfg-x"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":null,"required":false,"protected":false,"name":"y","id":"cfg-y"}],"method":[{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":false,"required":null,"protected":false,"name":"addCls","id":"method-addCls"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"addEvents","id":"method-addEvents"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"addListener","id":"method-addListener"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"addManagedListener","id":"method-addManagedListener"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Animate","template":false,"required":null,"protected":false,"name":"animate","id":"method-animate"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"callOverridden","id":"method-callOverridden"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"callParent","id":"method-callParent"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"clearListeners","id":"method-clearListeners"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"clearManagedListeners","id":"method-clearManagedListeners"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":false,"required":null,"protected":false,"name":"destroy","id":"method-destroy"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"enableBubble","id":"method-enableBubble"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"fireEvent","id":"method-fireEvent"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Animate","template":false,"required":null,"protected":false,"name":"getActiveAnimation","id":"method-getActiveAnimation"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":false,"required":null,"protected":false,"name":"getBBox","id":"method-getBBox"},{"tagname":"method","deprecated":{"doc":null,"tagname":"deprecated","text":"

Replaced by getActiveAnimation

\n","version":"4.0"},"static":false,"owner":"Ext.util.Animate","template":false,"required":null,"protected":false,"name":"hasActiveFx","id":"method-hasActiveFx"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"hasListener","id":"method-hasListener"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":false,"required":null,"protected":false,"name":"hide","id":"method-hide"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"initConfig","id":"method-initConfig"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"mon","id":"method-mon"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"mun","id":"method-mun"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"on","id":"method-on"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":false,"required":null,"protected":false,"name":"redraw","id":"method-redraw"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"relayEvents","id":"method-relayEvents"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":false,"required":null,"protected":false,"name":"remove","id":"method-remove"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":false,"required":null,"protected":false,"name":"removeCls","id":"method-removeCls"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"removeListener","id":"method-removeListener"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"removeManagedListener","id":"method-removeManagedListener"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"resumeEvents","id":"method-resumeEvents"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Animate","template":false,"required":null,"protected":false,"name":"sequenceFx","id":"method-sequenceFx"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":false,"required":null,"protected":false,"name":"setAttributes","id":"method-setAttributes"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":false,"required":null,"protected":false,"name":"setStyle","id":"method-setStyle"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.draw.Sprite","template":false,"required":null,"protected":false,"name":"show","id":"method-show"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Base","template":false,"required":null,"protected":true,"name":"statics","id":"method-statics"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Animate","template":false,"required":null,"protected":false,"name":"stopAnimation","id":"method-stopAnimation"},{"tagname":"method","deprecated":{"doc":"Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that haven't started yet.","tagname":"deprecated","text":"

Replaced by stopAnimation

\n","version":"4.0"},"static":false,"owner":"Ext.util.Animate","template":false,"required":null,"protected":false,"name":"stopFx","id":"method-stopFx"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"suspendEvents","id":"method-suspendEvents"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Animate","template":false,"required":null,"protected":false,"name":"syncFx","id":"method-syncFx"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.util.Observable","template":false,"required":null,"protected":false,"name":"un","id":"method-un"}],"event":[]},"private":false,"component":false,"name":"Ext.draw.Sprite","alternateClassNames":[],"id":"class-Ext.draw.Sprite","mixedInto":[],"xtypes":{},"files":[{"href":"Sprite.html#Ext-draw-Sprite","filename":"Sprite.js"}]}); \ No newline at end of file