Ext.data.JsonP.Ext_ProgressBar({"alternateClassNames":[],"aliases":{"widget":["progressbar"]},"enum":null,"parentMixins":["Ext.state.Stateful","Ext.util.Animate","Ext.util.ElementContainer","Ext.util.Floating","Ext.util.Observable","Ext.util.Positionable","Ext.util.Renderable"],"tagname":"class","subclasses":[],"extends":"Ext.Component","uses":["Ext.fx.Anim"],"html":"
Hierarchy
Ext.BaseExt.AbstractComponentExt.ComponentExt.ProgressBarInherited mixins
Requires
Uses
Files
An updateable progress bar component. The progress bar supports two different modes: manual and automatic.
\n\nIn manual mode, you are responsible for showing, updating (via updateProgress) and clearing the progress bar\nas needed from your own code. This method is most appropriate when you want to show progress throughout an operation\nthat has predictable points of interest at which you can update the control.
\n\nIn automatic mode, you simply call wait and let the progress bar run indefinitely, only clearing it once the\noperation is complete. You can optionally have the progress bar wait for a specific amount of time and then clear\nitself. Automatic mode is most appropriate for timed operations or asynchronous operations in which you have no need\nfor indicating intermediate progress.
\n\nvar p = Ext.create('Ext.ProgressBar', {\n renderTo: Ext.getBody(),\n width: 300\n});\n\n// Wait for 5 seconds, then update the status el (progress bar will auto-reset)\np.wait({\n interval: 500, //bar will move fast!\n duration: 50000,\n increment: 15,\n text: 'Updating...',\n scope: this,\n fn: function(){\n p.updateText('Done!');\n }\n});\n
\nTrue to animate the progress bar during transitions, or an animation configuration\n(see the animate method for details).
\nDefaults to: false
A tag name or DomHelper spec used to create the Element which will\nencapsulate this Component.
\n\nYou do not normally need to specify this. For the base classes Ext.Component and\nExt.container.Container, this defaults to 'div'. The more complex Sencha classes use a more\ncomplex DOM structure specified by their own renderTpls.
\n\nThis is intended to allow the developer to create application-specific utility Components encapsulated by\ndifferent DOM elements. Example usage:
\n\n{\n xtype: 'component',\n autoEl: {\n tag: 'img',\n src: 'http://www.example.com/example.jpg'\n }\n}, {\n xtype: 'component',\n autoEl: {\n tag: 'blockquote',\n html: 'autoEl is cool!'\n }\n}, {\n xtype: 'container',\n autoEl: 'ul',\n cls: 'ux-unordered-list',\n items: {\n xtype: 'component',\n autoEl: 'li',\n html: 'First list item'\n }\n}\n
\n Available since: 2.3.0
\nAn alias for loader config which also allows to specify just a string which will be\nused as the url that's automatically loaded:
\n\nExt.create('Ext.Component', {\n autoLoad: 'content.html',\n renderTo: Ext.getBody()\n});\n
\n\nThe above is the same as:
\n\nExt.create('Ext.Component', {\n loader: {\n url: 'content.html',\n autoLoad: true\n },\n renderTo: Ext.getBody()\n});\n
\n\nDon't use it together with loader config.
\nThis cfg has been deprecated since 4.1.1
\nUse loader config instead.
\n\nThis config is intended mainly for non-floating Components which may or may not be shown. Instead of using\nrenderTo in the configuration, and rendering upon construction, this allows a Component to render itself\nupon first show. If floating is true
, the value of this config is omitted as if it is true
.
Specify as true
to have this Component render to the document body upon first show.
Specify as an element, or the ID of an element to have this Component render to a specific element upon first\nshow.
\nDefaults to: false
true
to automatically show the component upon creation. This config option may only be used for\nfloating components or components that use autoRender.
Defaults to: false
Available since: 2.3.0
\nThe base CSS class to apply to the progress bar's wrapper element.
\nDefaults to: 'x-progress'
Overrides: Ext.AbstractComponent.baseCls
Specifies the border size for this component. The border can be a single numeric value to apply to all sides or it can\nbe a CSS style specification for each style, for example: '10 5 3 10' (top, right, bottom, left).
\n\nFor components that have no border by default, setting this won't make the border appear by itself.\nYou also need to specify border color and style:
\n\nborder: 5,\nstyle: {\n borderColor: 'red',\n borderStyle: 'solid'\n}\n
\n\nTo turn off the border, use border: false
.
An array describing the child elements of the Component. Each member of the array\nis an object with these properties:
\n\nname
- The property name on the Component for the child element.itemId
- The id to combine with the Component's id that is the id of the child element.id
- The id of the child element.If the array member is a string, it is equivalent to { name: m, itemId: m }
.
For example, a Component which renders a title and body text:
\n\nExt.create('Ext.Component', {\n renderTo: Ext.getBody(),\n renderTpl: [\n '<h1 id=\"{id}-title\">{title}</h1>',\n '<p>{msg}</p>',\n ],\n renderData: {\n title: \"Error\",\n msg: \"Something went wrong\"\n },\n childEls: [\"title\"],\n listeners: {\n afterrender: function(cmp){\n // After rendering the component will have a title property\n cmp.title.setStyle({color: \"red\"});\n }\n }\n});\n
\n\nA more flexible, but somewhat slower, approach is renderSelectors.
\nAn optional extra CSS class that will be added to this component's Element. This can be useful\nfor adding customized styles to the component or any of its children using standard CSS rules.
\nDefaults to: ''
Available since: 1.1.0
\nDefines the column width inside column layout.
\n\nCan be specified as a number or as a percentage.
\nCSS Class to be added to a components root level element to give distinction to it via styling.
\nCSS Class to be added to a components root level element to give distinction to it via styling.
\nThe sizing and positioning of a Component's internal Elements is the responsibility of the Component's layout\nmanager which sizes a Component's internal structure in response to the Component being sized.
\n\nGenerally, developers will not use this configuration as all provided Components which need their internal\nelements sizing (Such as input fields) come with their own componentLayout managers.
\n\nThe default layout manager will be used on instances of the base Ext.Component\nclass which simply sizes the Component's encapsulating element to the height and width specified in the\nsetSize method.
\nDefaults to: 'progressbar'
Overrides: Ext.AbstractComponent.componentLayout
True to constrain this Components within its containing element, false to allow it to fall outside of its containing\nelement. By default this Component will be rendered to document.body
. To render and constrain this Component within\nanother element specify renderTo.
Defaults to: false
A Region (or an element from which a Region measurement will be read) which is used\nto constrain the component. Only applies when the component is floating.
\nAn object or a string (in TRBL order) specifying insets from the configured constrain region\nwithin which this component must be constrained when positioning or sizing.\nexample:
\n\nconstraintInsets: '10 10 10 10' // Constrain with 10px insets from parent
\nSpecify an existing HTML element, or the id
of an existing HTML element to use as the content for this component.
This config option is used to take an existing HTML element and place it in the layout element of a new component\n(it simply moves the specified DOM element after the Component is rendered to use as the content.
\n\nNotes:
\n\nThe specified HTML element is appended to the layout element of the component after any configured\nHTML has been inserted, and so the document will not contain this element at the time\nthe render event is fired.
\n\nThe specified HTML element used will not participate in any layout
\nscheme that the Component may use. It is just HTML. Layouts operate on child\nitems
.
Add either the x-hidden
or the x-hide-display
CSS class to prevent a brief flicker of the content before it\nis rendered to the panel.
Available since: 3.4.0
\nThe default Ext.Element#getAlignToXY anchor position value for this menu\nrelative to its element of origin. Used in conjunction with showBy.
\nDefaults to: "tl-bl?"
true
to disable the component.
Defaults to: false
Available since: 2.3.0
\nCSS class to add when the Component is disabled.
\nDefaults to: 'x-item-disabled'
Specify as true to make a floating Component draggable using the Component's encapsulating element as\nthe drag handle.
\n\nThis may also be specified as a config object for the ComponentDragger which is\ninstantiated to perform dragging.
\n\nFor example to create a Component which may only be dragged around using a certain internal element as the drag\nhandle, use the delegate option:
\n\nnew Ext.Component({\n constrain: true,\n floating: true,\n style: {\n backgroundColor: '#fff',\n border: '1px solid black'\n },\n html: '<h1 style=\"cursor:move\">The title</h1><p>The content</p>',\n draggable: {\n delegate: 'h1'\n }\n}).show();\n
\nDefaults to: false
Overrides: Ext.AbstractComponent.draggable
Configure as true
to have this Component fixed at its X, Y
coordinates in the browser viewport, immune\nto scrolling the document.
Only in browsers that support position:fixed
IE6 and IE7, 8 and 9 quirks do not support position: fixed
Defaults to: false
Specify as true to float the Component outside of the document flow using CSS absolute positioning.
\n\nComponents such as Windows and Menus are floating by default.
\n\nFloating Components that are programatically rendered will register\nthemselves with the global ZIndexManager
\n\nA floating Component may be used as a child item of a Container. This just allows the floating Component to seek\na ZIndexManager by examining the ownerCt chain.
\n\nWhen configured as floating, Components acquire, at render time, a ZIndexManager which\nmanages a stack of related floating Components. The ZIndexManager brings a single floating Component to the top\nof its stack when the Component's toFront method is called.
\n\nThe ZIndexManager is found by traversing up the ownerCt chain to find an ancestor which itself is\nfloating. This is so that descendant floating Components of floating Containers (Such as a ComboBox dropdown\nwithin a Window) can have its zIndex managed relative to any siblings, but always above that floating\nancestor Container.
\n\nIf no floating ancestor is found, a floating Component registers itself with the default ZIndexManager.
\n\nFloating components do not participate in the Container's layout. Because of this, they are not rendered until\nyou explicitly show them.
\n\nAfter rendering, the ownerCt reference is deleted, and the floatParent property is set to the found\nfloating ancestor Container. If no floating ancestor Container was found the floatParent property will\nnot be set.
\nDefaults to: false
Overrides: Ext.AbstractComponent.floating
Specifies whether the floated component should be automatically focused when\nit is brought to the front.
\nDefaults to: true
When inside FormPanel, any component configured with formBind: true
will\nbe enabled/disabled depending on the validity state of the form.\nSee Ext.form.Panel for more information and example.
Defaults to: false
Specify as true
to have the Component inject framing elements within the Component at render time to provide a\ngraphical rounded frame around the Component content.
This is only necessary when running on outdated, or non standard-compliant browsers such as Microsoft's Internet\nExplorer prior to version 9 which do not support rounded corners natively.
\n\nThe extra space taken up by this framing is available from the read only property frameSize.
\nA String which specifies how this Component's encapsulating DOM element will be hidden. Values may be:
\n\n'display'
: The Component will be hidden using the display: none
style.'visibility'
: The Component will be hidden using the visibility: hidden
style.'offsets'
: The Component will be hidden by absolutely positioning it out of the visible area of the document.\nThis is useful when a hidden Component must maintain measurable dimensions. Hiding using display
results in a\nComponent having zero dimensions.Defaults to: 'display'
Available since: 1.1.0
\nAn HTML fragment, or a DomHelper specification to use as the layout element content.\nThe HTML content is added after the component is rendered, so the document will not contain this HTML at the time\nthe render event is fired. This content is inserted into the body before any configured contentEl\nis appended.
\nDefaults to: ''
Available since: 3.4.0
\nThe progress bar element's id (defaults to an auto-generated id)
\nThe progress bar element's id (defaults to an auto-generated id)
\nOverrides: Ext.AbstractComponent.id
An itemId
can be used as an alternative way to get a reference to a component when no object reference is\navailable. Instead of using an id
with Ext.getCmp, use itemId
with\nExt.container.Container.getComponent which will retrieve\nitemId
's or id's. Since itemId
's are an index to the container's internal MixedCollection, the\nitemId
is scoped locally to the container -- avoiding potential conflicts with Ext.ComponentManager\nwhich requires a unique id
.
var c = new Ext.panel.Panel({ //\n height: 300,\n renderTo: document.body,\n layout: 'auto',\n items: [\n {\n itemId: 'p1',\n title: 'Panel 1',\n height: 150\n },\n {\n itemId: 'p2',\n title: 'Panel 2',\n height: 150\n }\n ]\n})\np1 = c.getComponent('p1'); // not the same as Ext.getCmp()\np2 = p1.ownerCt.getComponent('p2'); // reference via a sibling\n
\n\nAlso see id, Ext.container.Container.query
, Ext.container.Container.down
and\nExt.container.Container.child
.
Note: to access the container of an item see ownerCt.
\nAvailable since: 3.4.0
\nA 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\nDOM events from Ext JS Components
\n\nWhile 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:
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
\nA configuration object or an instance of a Ext.ComponentLoader to load remote content\nfor this Component.
\n\nExt.create('Ext.Component', {\n loader: {\n url: 'content.html',\n autoLoad: true\n },\n renderTo: Ext.getBody()\n});\n
\nSpecifies the margin for this component. The margin can be a single numeric value to apply to all sides or it can\nbe a CSS style specification for each style, for example: '10 5 3 10' (top, right, bottom, left).
\nThe maximum value in pixels which this Component will set its height to.
\n\nWarning: This will override any size management applied by layout managers.
\nThe maximum value in pixels which this Component will set its width to.
\n\nWarning: This will override any size management applied by layout managers.
\nThe minimum value in pixels which this Component will set its height to.
\n\nWarning: This will override any size management applied by layout managers.
\nThe minimum value in pixels which this Component will set its width to.
\n\nWarning: This will override any size management applied by layout managers.
\nAn optional extra CSS class that will be added to this component's Element when the mouse moves over the Element,\nand removed when the mouse moves out. This can be useful for adding customized 'active' or 'hover' styles to the\ncomponent or any of its children using standard CSS rules.
\nDefaults to: ''
Available since: 2.3.0
\nPossible values are:\n * 'auto'
to enable automatic horizontal scrollbar (overflow-x: 'auto').\n * 'scroll'
to always enable horizontal scrollbar (overflow-x: 'scroll').\nThe default is overflow-x: 'hidden'. This should not be combined with autoScroll.
Possible values are:\n * 'auto'
to enable automatic vertical scrollbar (overflow-y: 'auto').\n * 'scroll'
to always enable vertical scrollbar (overflow-y: 'scroll').\nThe default is overflow-y: 'hidden'. This should not be combined with autoScroll.
Specifies the padding for this component. The padding can be a single numeric value to apply to all sides or it\ncan be a CSS style specification for each style, for example: '10 5 3 10' (top, right, bottom, left).
\nAn array of plugins to be added to this component. Can also be just a single plugin instead of array.
\n\nPlugins provide custom functionality for a component. The only requirement for\na valid plugin is that it contain an init
method that accepts a reference of type Ext.Component. When a component\nis created, if any plugins are available, the component will call the init method on each plugin, passing a\nreference to itself. Each plugin can then call methods or respond to events on the component as needed to provide\nits functionality.
Plugins can be added to component by either directly referencing the plugin instance:
\n\nplugins: [Ext.create('Ext.grid.plugin.CellEditing', {clicksToEdit: 1})],\n
\n\nBy using config object with ptype:
\n\nplugins: [{ptype: 'cellediting', clicksToEdit: 1}],\n
\n\nOr with just a ptype:
\n\nplugins: ['cellediting', 'gridviewdragdrop'],\n
\n\nSee Ext.enums.Plugin for list of all ptypes.
\nAvailable since: 2.3.0
\nDefines the region inside border layout.
\n\nPossible values:
\n\nregion: \"center\"
in every border layout.The data used by renderTpl in addition to the following property values of the component:
\n\nSee renderSelectors and childEls for usage examples.
\nAn object containing properties specifying DomQuery selectors which identify child elements\ncreated by the render process.
\n\nAfter the Component's internal structure is rendered according to the renderTpl, this object is iterated through,\nand the found Elements are added as properties to the Component using the renderSelector
property name.
For example, a Component which renders a title and description into its element:
\n\nExt.create('Ext.Component', {\n renderTo: Ext.getBody(),\n renderTpl: [\n '<h1 class=\"title\">{title}</h1>',\n '<p>{desc}</p>'\n ],\n renderData: {\n title: \"Error\",\n desc: \"Something went wrong\"\n },\n renderSelectors: {\n titleEl: 'h1.title',\n descEl: 'p'\n },\n listeners: {\n afterrender: function(cmp){\n // After rendering the component will have a titleEl and descEl properties\n cmp.titleEl.setStyle({color: \"red\"});\n }\n }\n});\n
\n\nFor a faster, but less flexible, alternative that achieves the same end result (properties for child elements on the\nComponent after render), see childEls and addChildEls.
\nSpecify the id
of the element, a DOM element or an existing Element that this component will be rendered into.
Notes:
\n\nDo not use this option if the Component is to be a child item of a Container.\nIt is the responsibility of the Container's\nlayout manager to render and manage its child items.
\n\nWhen using this config, a call to render()
is not required.
See also: render.
\nAvailable since: 2.3.0
\nAn XTemplate used to create the internal structure inside this Component's encapsulating\nElement.
\n\nYou do not normally need to specify this. For the base classes Ext.Component and\nExt.container.Container, this defaults to null
which means that they will be initially rendered\nwith no internal structure; they render their Element empty. The more specialized Ext JS and Sencha Touch\nclasses which use a more complex DOM structure, provide their own template definitions.
This is intended to allow the developer to create application-specific utility Components with customized\ninternal structure.
\n\nUpon rendering, any created child elements may be automatically imported into object properties using the\nrenderSelectors and childEls options.
\nDefaults to: ['<tpl if="internalText">', '<div class="{baseCls}-text {baseCls}-text-back">{text}</div>', '</tpl>', '<div id="{id}-bar" class="{baseCls}-bar {baseCls}-bar-{ui}" style="width:{percentage}%">', '<tpl if="internalText">', '<div class="{baseCls}-text">', '<div>{text}</div>', '</div>', '</tpl>', '</div>']
Overrides: Ext.AbstractComponent.renderTpl
Specify as true
to apply a Resizer to this Component after rendering.
May also be specified as a config object to be passed to the constructor of Resizer\nto override any defaults. By default the Component passes its minimum and maximum size, and uses\nExt.resizer.Resizer.dynamic: false
A valid Ext.resizer.Resizer handles config string. Only applies when resizable = true.
\nDefaults to: 'all'
True to layout this component and its descendants in \"rtl\" (right-to-left) mode.\nCan be explicitly set to false to override a true value inherited from an ancestor.
\n\nDefined in override Ext.rtl.AbstractComponent.
\nA buffer to be applied if many state events are fired within a short period.
\nDefaults to: 100
Specifies whether the floating component should be given a shadow. Set to true to automatically create an\nExt.Shadow, or a string indicating the shadow's display Ext.Shadow.mode. Set to false to\ndisable the shadow.
\nDefaults to: 'sides'
If this property is a number, it is interpreted as follows:
\n\nfalse
.true
.In CSS terms, shrink-wrap width is analogous to an inline-block element as opposed\nto a block-level element. Some container layouts always shrink-wrap their children,\neffectively ignoring this property (e.g., Ext.layout.container.HBox,\nExt.layout.container.VBox, Ext.layout.component.Dock).
\nDefaults to: 2
An array of events that, when fired, should trigger this object to\nsave its state. Defaults to none. stateEvents
may be any type\nof event supported by this object, including browser or custom events\n(e.g., ['click', 'customerchange']).
See stateful
for an explanation of saving and\nrestoring object state.
The unique id for this object to use for state management purposes.
\n\nSee stateful for an explanation of saving and restoring state.
\n\nA flag which causes the object to attempt to restore the state of\ninternal properties from a saved state on startup. The object must have\na stateId for state to be managed.
\n\nAuto-generated ids are not guaranteed to be stable across page loads and\ncannot be relied upon to save and restore the same state for a object.
\n\nFor state saving to work, the state manager's provider must have been\nset to an implementation of Ext.state.Provider which overrides the\nset and get\nmethods to save and recall name/value pairs. A built-in implementation,\nExt.state.CookieProvider is available.
\n\nTo set the state provider for the current page:
\n\nExt.state.Manager.setProvider(new Ext.state.CookieProvider({
\n\n expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now\n
\n\n}));
\n\nA stateful object attempts to save state when one of the events\nlisted in the stateEvents configuration fires.
\n\nTo save state, a stateful object first serializes its state by\ncalling getState.
\n\nThe Component base class implements getState to save its width and height within the state\nonly if they were initially configured, and have changed from the configured value.
\n\nThe Panel class saves its collapsed state in addition to that.
\n\nThe Grid class saves its column state in addition to its superclass state.
\n\nIf there is more application state to be save, the developer must provide an implementation which\nfirst calls the superclass method to inherit the above behaviour, and then injects new properties\ninto the returned object.
\n\nThe value yielded by getState is passed to Ext.state.Manager.set\nwhich uses the configured Ext.state.Provider to save the object\nkeyed by the stateId.
\n\nDuring construction, a stateful object attempts to restore its state by calling\nExt.state.Manager.get passing the stateId
\n\nThe resulting object is passed to applyState*. The default implementation of\napplyState simply copies properties into the object, but a developer may\noverride this to support restoration of more complex application state.
\n\nYou can perform extra processing on state save and restore by attaching\nhandlers to the beforestaterestore, staterestore,\nbeforestatesave and statesave events.
\nDefaults to: false
A custom style specification to be applied to this component's Element. Should be a valid argument to\nExt.Element.applyStyles.
\n\nnew Ext.panel.Panel({\n title: 'Some Title',\n renderTo: Ext.getBody(),\n width: 400, height: 300,\n layout: 'form',\n items: [{\n xtype: 'textarea',\n style: {\n width: '95%',\n marginBottom: '10px'\n }\n },\n new Ext.button.Button({\n text: 'Send',\n minWidth: '100',\n style: {\n marginBottom: '10px'\n }\n })\n ]\n});\n
\n Available since: 1.1.0
\nThe element to render the progress text to (defaults to the progress bar's internal text element)
\nThe element to render the progress text to (defaults to the progress bar's internal text element)
\nAn Ext.Template, Ext.XTemplate or an array of strings to form an Ext.XTemplate. Used in\nconjunction with the data
and tplWriteMode
configurations.
Available since: 3.4.0
\nThe Ext.(X)Template method to use when updating the content area of the Component.\nSee Ext.XTemplate.overwrite
for information on default mode.
Defaults to: 'overwrite'
Available since: 3.4.0
\nAn array of of classNames
which are currently applied to this component.
Defaults to: []
A floating point value between 0 and 1 (e.g., .5)
\nDefaults to: 0
This property provides a shorter alternative to creating objects than using a full\nclass name. Using xtype
is the most common way to define component instances,\nespecially in a container. For example, the items in a form containing text fields\ncould be created explicitly like so:
items: [\n Ext.create('Ext.form.field.Text', {\n fieldLabel: 'Foo'\n }),\n Ext.create('Ext.form.field.Text', {\n fieldLabel: 'Bar'\n }),\n Ext.create('Ext.form.field.Number', {\n fieldLabel: 'Num'\n })\n ]\n
\n\nBut by using xtype
, the above becomes:
items: [\n {\n xtype: 'textfield',\n fieldLabel: 'Foo'\n },\n {\n xtype: 'textfield',\n fieldLabel: 'Bar'\n },\n {\n xtype: 'numberfield',\n fieldLabel: 'Num'\n }\n ]\n
\n\nWhen the xtype
is common to many items, Ext.container.AbstractContainer.defaultType\nis another way to specify the xtype
for all items that don't have an explicit xtype
:
defaultType: 'textfield',\n items: [\n { fieldLabel: 'Foo' },\n { fieldLabel: 'Bar' },\n { fieldLabel: 'Num', xtype: 'numberfield' }\n ]\n
\n\nEach member of the items
array is now just a \"configuration object\". These objects\nare used to create and configure component instances. A configuration object can be\nmanually used to instantiate a component using Ext.widget:
var text1 = Ext.create('Ext.form.field.Text', {\n fieldLabel: 'Foo'\n });\n\n // or alternatively:\n\n var text1 = Ext.widget({\n xtype: 'textfield',\n fieldLabel: 'Foo'\n });\n
\n\nThis conversion of configuration objects into instantiated components is done when\na container is created as part of its {Ext.container.AbstractContainer.initComponent}\nprocess. As part of the same process, the items
array is converted from its raw\narray form into a Ext.util.MixedCollection instance.
You can define your own xtype
on a custom component by specifying\nthe xtype
property in Ext.define. For example:
Ext.define('MyApp.PressMeButton', {\n extend: 'Ext.button.Button',\n xtype: 'pressmebutton',\n text: 'Press Me'\n});\n
\n\nCare should be taken when naming an xtype
in a custom component because there is\na single, shared scope for all xtypes. Third part components should consider using\na prefix to avoid collisions.
Ext.define('Foo.form.CoolButton', {\n extend: 'Ext.button.Button',\n xtype: 'ux-coolbutton',\n text: 'Cool!'\n});\n
\n\nSee Ext.enums.Widget for list of all available xtypes.
\nAvailable since: 2.3.0
\nSetting this property to true
causes the isLayoutRoot method to return\ntrue
and stop the search for the top-most component for a layout.
Defaults to: false
true
indicates an id
was auto-generated rather than provided by configuration.
Defaults to: false
The number of component layout calls made on this object.
\nDefaults to: 0
The name of the padding property that is used by the layout to manage\npadding. See managePadding
\nDefaults to: 'padding'
By default this method does nothing but return the position spec passed to it. In\nrtl mode it is overridden to convert \"l\" to \"r\" and vice versa when required.
\nIndicates whether or not the component can be dragged.
\nDefaults to: false
Initial suspended call count. Incremented when suspendEvents is called, decremented when resumeEvents is called.
\nDefaults to: 0
Only present for floating Components which were inserted as child items of Containers.
\n\nThere are other similar relationships such as the button which activates a menu, or the\nmenu item which activated a submenu, or the\ncolumn header which activated the column menu.
\n\nThese differences are abstracted away by the up method.
\n\nFloating Components that are programatically rendered will not have a floatParent
\nproperty.
See floating and zIndexManager
\nDefaults to: ['TL', 'TC', 'TR', 'ML', 'MC', 'MR', 'BL', 'BC', 'BR']
Defaults to: ['tl', 'tc', 'tr', 'ml', 'mc', 'mr', 'bl', 'bc', 'br']
Cache the frame information object so as not to cause style recalculations
\nDefaults to: {}
Indicates the width of any framing elements which were added within the encapsulating\nelement to provide graphical, rounded borders. See the frame config. This\nproperty is null
if the component is not framed.
This is an object containing the frame width in pixels for all four sides of the\nComponent containing the following properties:
\nThe width of the top framing element in pixels.
\nDefaults to: 0
The width of the right framing element in pixels.
\nDefaults to: 0
The width of the bottom framing element in pixels.
\nDefaults to: 0
The width of the left framing element in pixels.
\nDefaults to: 0
The total width of the left and right framing elements in pixels.
\nDefaults to: 0
The total height of the top and right bottom elements in pixels.
\nDefaults to: 0
Defaults to: ['{%this.renderDockedItems(out,values,0);%}', '<tpl if="top">', '<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>{frameElCls}" role="presentation"></tpl>', '<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>{frameElCls}" role="presentation"></tpl>', '<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>{frameElCls}" role="presentation"></div>', '<tpl if="right"></div></tpl>', '<tpl if="left"></div></tpl>', '</tpl>', '<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>{frameElCls}" role="presentation"></tpl>', '<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>{frameElCls}" role="presentation"></tpl>', '<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>{frameElCls}" role="presentation">', '{%this.applyRenderTpl(out, values)%}', '</div>', '<tpl if="right"></div></tpl>', '<tpl if="left"></div></tpl>', '<tpl if="bottom">', '<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>{frameElCls}" role="presentation"></tpl>', '<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>{frameElCls}" role="presentation"></tpl>', '<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>{frameElCls}" role="presentation"></div>', '<tpl if="right"></div></tpl>', '<tpl if="left"></div></tpl>', '</tpl>', '{%this.renderDockedItems(out,values,1);%}']
This object holds a key for any event that has a listener. The listener may be set\ndirectly on the instance, or on its class or a super class (via observe) or\non the MVC EventBus. The values of this object are truthy\n(a non-zero number) and falsy (0 or undefined). They do not represent an exact count\nof listeners. The value for an event is truthy if the event must be fired and is\nfalsy if there is no need to fire the event.
\n\nThe intended use of this property is to avoid the expense of fireEvent calls when\nthere are no listeners. This can be particularly helpful when one would otherwise\nhave to call fireEvent hundreds or thousands of times. It is used like this:
\n\n if (this.hasListeners.foo) {\n this.fireEvent('foo', this, arg1);\n }\n
\ntrue
in this class to identify an object as an instantiated Component, or subclass thereof.
Defaults to: true
true
in this class to identify an object as an instantiated Observable, or subclass thereof.
Defaults to: true
This is an internal flag that you use when creating custom components. By default this is set to true
which means\nthat every component gets a mask when it's disabled. Components like FieldContainer, FieldSet, Field, Button, Tab\noverride this property to false
since they want to implement custom disable logic.
Defaults to: true
This Component's owner Container (is set automatically\nwhen this Component is added to a Container).
\n\nImportant. This is not a universal upwards navigation pointer. It indicates the Container which owns and manages\nthis Component if any. There are other similar relationships such as the button which activates a menu, or the\nmenu item which activated a submenu, or the\ncolumn header which activated the column menu.
\n\nThese differences are abstracted away by the up method.
\n\nNote: to access items within the Container see itemId.
\nAvailable since: 2.3.0
\nIndicates whether or not the component has been rendered.
\nDefaults to: false
Available since: 1.1.0
\nAn object property which provides unified information as to which dimensions are scrollable based upon\nthe autoScroll, overflowX and overflowY settings (And for views of trees and grids, the owning panel's scroll setting).
\n\nNote that if you set overflow styles using the style config or bodyStyle config, this object does not include that information;\nit is best to use autoScroll, overflowX and overflowY if you need to access these flags.
\n\nThis object has the following properties:
\ntrue
if this Component is scrollable horizontally - style setting may be 'auto'
or 'scroll'
.
true
if this Component is scrollable vertically - style setting may be 'auto'
or 'scroll'
.
true
if this Component is scrollable both horizontally and vertically.
The overflow-x
style setting, 'auto'
or 'scroll'
or ''
.
The overflow-y
style setting, 'auto'
or 'scroll'
or ''
.
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
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\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
\nOnly present for floating Components after they have been rendered.
\n\nA reference to the ZIndexManager which is managing this Component's z-index.
\n\nThe ZIndexManager maintains a stack of floating Component z-indices, and also provides\na single modal mask which is insert just beneath the topmost visible modal floating Component.
\n\nFloating Components may be brought to the front or sent to the back of the\nz-index stack.
\n\nThis defaults to the global ZIndexManager for floating Components that are\nprogramatically rendered.
\n\nFor floating Components which are added to a Container, the ZIndexManager is acquired from the first\nancestor Container found which is floating. If no floating ancestor is found, the global ZIndexManager is\nused.
\n\nSee floating and zIndexParent
\nOnly present for floating Components which were inserted as child items of Containers, and which have a floating\nContainer in their containment ancestry.
\n\nFor floating Components which are child items of a Container, the zIndexParent will be a floating\nancestor Container which is responsible for the base z-index value of all its floating descendants. It provides\na ZIndexManager which provides z-indexing services for all its descendant floating\nComponents.
\n\nFloating Components that are programatically rendered will not have a zIndexParent
\nproperty.
For example, the dropdown BoundList of a ComboBox which is in a Window will have the\nWindow as its zIndexParent
, and will always show above that Window, wherever the Window is placed in the z-index stack.
See floating and zIndexManager
\nCreates new Component.
\nThe configuration options may be specified as either:
\n\n\n\n\nOverrides: Ext.AbstractComponent.constructor
Adds each argument passed to this method to the childEls array.
\nAdds a CSS class to the top level element representing this component.
\nThis method has been deprecated since 4.1
\nUse addCls instead.
\n\nAvailable since: 2.3.0
\nReturns the Component to allow method chaining.
\n\nAdds a CSS class to the top level element representing this component.
\nReturns the Component to allow method chaining.
\n\nAdds a cls
to the uiCls
array, which will also call addUIClsToElement and adds to all elements of this\ncomponent.
Adds the specified events to the list of events which this Observable may fire.
\nEither an object with event names as properties with\na value of true
. For example:
this.addEvents({\n storeloaded: true,\n storecleared: true\n});\n
\n\nOr any number of event names as separate parameters. For example:
\n\nthis.addEvents('storeloaded', 'storecleared');\n
\nSets up the focus listener on this Component's focusEl if it has one.
\n\nForm Components which must implicitly participate in tabbing order usually have a naturally focusable\nelement as their focusEl, and it is the DOM event of that receiving focus which drives\nthe Component's onFocus
handling, and the DOM event of it being blurred which drives the onBlur
handling.
If the focusEl is not naturally focusable, then the listeners are only added\nif the FocusManager is enabled.
\nAppends an event handler to this object. For example:
\n\nmyGridPanel.on(\"mouseover\", this.onMouseOver, this);\n
\n\nThe method also allows for a single argument to be passed which is a config object\ncontaining properties which specify multiple events. For example:
\n\nmyGridPanel.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\nOne can also specify options for each event handler separately:
\n\nmyGridPanel.on({\n cellClick: {fn: this.onCellClick, scope: this, single: true},\n mouseover: {fn: panel.onMouseOver, scope: panel}\n});\n
\n\nNames of methods in a specified scope may also be used. Note that\nscope
MUST be specified to use this option:
myGridPanel.on({\n cellClick: {fn: 'onCellClick', scope: this, single: true},\n mouseover: {fn: 'onMouseOver', scope: panel}\n});\n
\nThe name of the event to listen for.\nMay also be an object who's property names are event names.
\nThe method the event invokes, or if scope
is specified, the name* of the method within\nthe specified scope
. Will be called with arguments\ngiven to Ext.util.Observable.fireEvent plus the options
parameter described below.
The scope (this
reference) in which the handler function is\nexecuted. If omitted, defaults to the object which fired the event.
An object containing handler configuration.
\n\nNote: Unlike in ExtJS 3.x, the options object will also be passed as the last\nargument to every event handler.
\n\nThis object may contain any of the following properties:
\nThe scope (this
reference) in which the handler function is executed. If omitted,\n defaults to the object which fired the event.
The number of milliseconds to delay the invocation of the handler after the event fires.
\nTrue to add a handler to handle just the next firing of the event, and then remove itself.
\nCauses the handler to be scheduled to run in an Ext.util.DelayedTask delayed\n by the specified number of milliseconds. If the event fires again within that time,\n the original handler is not invoked, but the new handler is scheduled in its place.
\nOnly call the handler if the event was fired on the target Observable, not if the event\n was bubbled up from a child Observable.
\nThis option is only valid for listeners bound to Components.\n The name of a Component property which references an element to add a listener to.
\n\nThis option is useful during Component construction to add DOM event listeners to elements of\n Components which will exist only after the Component is rendered.\n For 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
\nWhen specified as true
, the function returns A Destroyable
object. An object which implements the destroy
method which removes all listeners added in this call.
Defaults to: false
An optional numeric priority that determines the order in which event handlers\n are run. Event handlers with no priority will be run as if they had a priority\n of 0. Handlers with a higher priority will be prioritized to run sooner than\n those with a lower priority. Negative numbers can be used to set a priority\n lower than the default. Internally, the framework uses a range of 1000 or\n greater, and -1000 or lesser for handers that are intended to run before or\n after all others, so it is recommended to stay within the range of -999 to 999\n when setting the priority of event handlers in application-level code.
\n\nCombining Options
\n\nUsing the options argument, it is possible to combine different types of listeners:
\n\nA delayed, one-time listener.
\n\nmyPanel.on('hide', this.handleClick, this, {\n single: true,\n delay: 100\n});\n
\nOnly when the destroyable
option is specified.
A Destroyable
object. An object which implements the destroy
method which removes all listeners added in this call. For example:
this.btnListeners = = myButton.on({\n destroyable: true\n mouseover: function() { console.log('mouseover'); },\n mouseout: function() { console.log('mouseout'); },\n click: function() { console.log('click'); }\n});\n
\n\nAnd when those listeners need to be removed:
\n\nExt.destroy(this.btnListeners);\n
\n\nor
\n\nthis.btnListeners.destroy();\n
\nOverrides: Ext.util.Observable.addListener
Adds listeners to any Observable object (or Ext.Element) which are automatically removed when this Component is\ndestroyed.
\nThe item to which to add a listener/listeners.
\n\nThe event name, or an object containing event name properties.
\n\nIf the ename
parameter was an event name, this is the handler function.
If the ename
parameter was an event name, this is the scope (this
reference)\nin which the handler function is executed.
If the ename
parameter was an event name, this is the\naddListener options.
Only when the destroyable
option is specified.
A Destroyable
object. An object which implements the destroy
method which removes all listeners added in this call. For example:
this.btnListeners = = myButton.mon({\n destroyable: true\n mouseover: function() { console.log('mouseover'); },\n mouseout: function() { console.log('mouseout'); },\n click: function() { console.log('click'); }\n});\n
\n\n\n\n\nAnd when those listeners need to be removed:
\n\n\n\n\nExt.destroy(this.btnListeners);\n
\n\n\n\n\nor
\n\n\n\n\nthis.btnListeners.destroy();\n
\n\nSave a property to the given state object if it is not its default or configured\nvalue.
\nThe state object.
\nThe name of the property on this object to save.
\nThe value of the state property (defaults to this[propName]
).
The state object or a new object if state was null
and the property\nwas saved.
Add events that will trigger the state to be saved. If the first argument is an\narray, each element of that array is the name of a state event. Otherwise, each\nargument passed to this method is the name of a state event.
\nMethod which adds a specified UI + uiCls
to the components element. Can be overridden to remove the UI from more\nthan just the components element.
The UI to remove from the element.
\nMethod which adds a specified UI to the components element.
\nCalled by the layout system after the Component has been laid out.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nThe width that was set
\n\nThe height that was set
\n\nThe old width, or undefined
if this was the initial layout.
The old height, or undefined
if this was the initial layout.
Overrides: Ext.AbstractComponent.afterComponentLayout
Invoked after the Component has been hidden.
\n\nGets passed the same callback
and scope
parameters that onHide received.
This is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nAllows addition of behavior after rendering is complete. At this stage the Component’s Element\nwill have been styled according to the configuration, will have had any configured CSS class\nnames added, and will be in the configured visibility and the configured enable state.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nOverrides: Ext.util.Renderable.afterRender
Template method called after a Component has been positioned.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nOverrides: Ext.AbstractComponent.afterSetPosition
Invoked after the Component is shown (after onShow is called).
\n\nGets passed the same parameters as show.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nAligns the element with another element relative to the specified anchor points. If\nthe other element is the document it aligns it to the viewport. The position\nparameter is optional, and can be specified in any one of the following formats:
\n\nIn addition to the anchor points, the position parameter also supports the \"?\"\ncharacter. If \"?\" is passed at the end of the position string, the element will\nattempt to align as specified, but the position will be adjusted to constrain to\nthe viewport if necessary. Note that the element being aligned might be swapped to\nalign to a different position than that specified in order to enforce the viewport\nconstraints. Following are all of the supported anchor positions:
\n\nValue Description\n----- -----------------------------\ntl The top left corner (default)\nt The center of the top edge\ntr The top right corner\nl The center of the left edge\nc In the center of the element\nr The center of the right edge\nbl The bottom left corner\nb The center of the bottom edge\nbr The bottom right corner\n\n\n\n
Example Usage:
\n\n// align el to other-el using the default positioning\n// (\"tl-bl\", non-constrained)\nel.alignTo(\"other-el\");\n\n// align the top left corner of el with the top right corner of other-el\n// (constrained to viewport)\nel.alignTo(\"other-el\", \"tr?\");\n\n// align the bottom right corner of el with the center left edge of other-el\nel.alignTo(\"other-el\", \"br-l?\");\n\n// align the center of el with the bottom left corner of other-el and\n// adjust the x position by -6 pixels (and the y position by 0)\nel.alignTo(\"other-el\", \"c-bl\", [-6, 0]);\n
\nThe Positionable,\nHTMLElement, or id of the element to align to.
\nThe position to align to
\nDefaults to: "tl-bl?"
Offset the positioning by [x, y]
\ntrue for the default animation or a standard\nElement animation config object
\nthis
\nAnchors an element to another element and realigns it when the window is resized.
\nThe Positionable,\nHTMLElement, or id of the element to align to.
\nThe position to align to
\nDefaults to: "tl-bl?"
Offset the positioning by [x, y]
\ntrue for the default animation or a standard\nElement animation config object
\nTrue to monitor body scroll and\nreposition. If this parameter is a number, it is used as the buffer delay in\nmilliseconds.
\nDefaults to: 50
The function to call after the animation finishes
\nthis
\nPerforms custom animation on this object.
\n\nThis method is applicable to both the Component class and the Sprite\nclass. It performs animated transitions of certain properties of this object over a specified timeline.
\n\nWhen animating a Component, the following properties may be specified in from
, to
, and keyframe
objects:
x
- The Component's page X position in pixels.
y
- The Component's page Y position in pixels
left
- The Component's left
value in pixels.
top
- The Component's top
value in pixels.
width
- The Component's width
value in pixels.
height
- The Component's height
value in pixels.
dynamic
- Specify as true to update the Component's layout (if it is a Container) at every frame of the animation.\nUse sparingly as laying out on every intermediate size change is an expensive operation.
For example, to animate a Window to a new size, ensuring that its internal layout and any shadow is correct:
\n\nmyWindow = 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\nFor performance reasons, by default, the internal layout is only updated when the Window reaches its final \"to\"
\nsize. If dynamic updating of the Window's child Components is required, then configure the animation with\ndynamic: true
and the two child items will maintain their proportions during the animation.
Configuration for Ext.fx.Anim.\nNote that the to config is required.
\nthis
\nOverrides: Ext.util.Animate.animate
Sets references to elements inside the component. This applies renderSelectors\nas well as childEls.
\nApplies the state to the object. This should be overridden in subclasses to do\nmore complex state operations. By default it applies the state properties onto\nthe current object.
\nThe state
\nOccurs before componentLayout
is run. Returning false
from this method will prevent the componentLayout
from\nbeing executed.
This is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nInvoked before the Component is destroyed.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nOccurs before componentLayout is run. In previous releases, this method could\nreturn false
to prevent its layout but that is not supported in Ext JS 4.1 or\nhigher. This method is simply a notification of the impending layout to give the\ncomponent a chance to adjust the DOM. Ideally, DOM reads should be avoided at this\ntime to reduce expensive document reflows.
This is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nOverrides: Ext.AbstractComponent.beforeLayout
Template method called before a Component is positioned.
\n\nEnsures that the position is adjusted so that the Component is constrained if so configured.
\nOverrides: Ext.AbstractComponent.beforeSetPosition
Invoked before the Component is shown.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nBubbles up the component/container heirarchy, calling the specified function with each component. The scope\n(this) of function call will be the scope provided or the current component. The arguments to the function will\nbe the args provided or the current component. If the function returns false at any point, the bubble is stopped.
\nThe function to call
\nThe scope of the function. Defaults to current node.
\nThe args to call the function with. Defaults to passing the current component.
\nthis
\nCalculates x,y coordinates specified by the anchor position on the element, adding\nextraX and extraY values.
\nThe specified anchor position.\nSee alignTo for details on supported anchor positions.
\nDefaults to: 'tl'
value to be added to the x coordinate
\nvalue to be added to the y coordinate
\nAn object containing the size to use for calculating anchor\nposition {width: (target width), height: (target height)} (defaults to the\nelement's current size)
\n[x, y] An array containing the element's x and y coordinates
\nCalculates the new [x,y] position to move this Positionable into a constrain region.
\n\nBy default, this Positionable is constrained to be within the container it was added to, or the element it was\nrendered to.
\n\nPriority is given to constraining the top and left within the constraint.
\n\nAn alternative constraint may be passed.
\nThe Element or Region\ninto which this Component is to be constrained. Defaults to the element into which this Positionable\nwas rendered, or this Component's {@link Ext.Component.constrainTo.
\nA proposed [X, Y]
position to test for validity\nand to coerce into constraints instead of using this Positionable's current position.
The proposedPosition is local (relative to floatParent if a floating Component)
\nA proposed [width, height]
size to use when calculating\nconstraints instead of using this Positionable's current size.
If the element needs to be translated, the new [X, Y]
position within\nconstraints if possible, giving priority to keeping the top and left edge in the constrain region.\nOtherwise, false
.
Call the original method that was previously overridden with override
\n\nExt.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n this.callOverridden();\n\n alert(\"Meeeeoooowwww\");\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 This method has been deprecated
\nas of 4.1. Use callParent instead.
\n\nThe arguments, either an array or the arguments
object\nfrom the current method, for example: this.callOverridden(arguments)
Returns the result of calling the overridden method
\nCall the \"parent\" method of the current method. That is the method previously\noverridden by derivation or by an override (see Ext.define).
\n\n Ext.define('My.Base', {\n constructor: function (x) {\n this.x = x;\n },\n\n statics: {\n method: function (x) {\n return x;\n }\n }\n });\n\n Ext.define('My.Derived', {\n extend: 'My.Base',\n\n constructor: function () {\n this.callParent([21]);\n }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x); // alerts 21\n
\n\nThis can be used with an override as follows:
\n\n Ext.define('My.DerivedOverride', {\n override: 'My.Derived',\n\n constructor: function (x) {\n this.callParent([x*2]); // calls original My.Derived constructor\n }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x); // now alerts 42\n
\n\nThis also works with static methods.
\n\n Ext.define('My.Derived2', {\n extend: 'My.Base',\n\n statics: {\n method: function (x) {\n return this.callParent([x*2]); // calls My.Base.method\n }\n }\n });\n\n alert(My.Base.method(10); // alerts 10\n alert(My.Derived2.method(10); // alerts 20\n
\n\nLastly, it also works with overridden static methods.
\n\n Ext.define('My.Derived2Override', {\n override: 'My.Derived2',\n\n statics: {\n method: function (x) {\n return this.callParent([x*2]); // calls My.Derived2.method\n }\n }\n });\n\n alert(My.Derived2.method(10); // now alerts 40\n
\n\nTo override a method and replace it and also call the superclass method, use\ncallSuper. This is often done to patch a method to fix a bug.
\nThe arguments, either an array or the arguments
object\nfrom the current method, for example: this.callParent(arguments)
Returns the result of calling the parent method
\nThis method is used by an override to call the superclass method but bypass any\noverridden method. This is often done to \"patch\" a method that contains a bug\nbut for whatever reason cannot be fixed directly.
\n\nConsider:
\n\n Ext.define('Ext.some.Class', {\n method: function () {\n console.log('Good');\n }\n });\n\n Ext.define('Ext.some.DerivedClass', {\n method: function () {\n console.log('Bad');\n\n // ... logic but with a bug ...\n\n this.callParent();\n }\n });\n
\n\nTo patch the bug in DerivedClass.method
, the typical solution is to create an\noverride:
Ext.define('App.paches.DerivedClass', {\n override: 'Ext.some.DerivedClass',\n\n method: function () {\n console.log('Fixed');\n\n // ... logic but with bug fixed ...\n\n this.callSuper();\n }\n });\n
\n\nThe patch method cannot use callParent
to call the superclass method
since\nthat would call the overridden method containing the bug. In other words, the\nabove patch would only produce \"Fixed\" then \"Good\" in the console log, whereas,\nusing callParent
would produce \"Fixed\" then \"Bad\" then \"Good\".
The arguments, either an array or the arguments
object\nfrom the current method, for example: this.callSuper(arguments)
Returns the result of calling the superclass method
\nCancel any deferred focus on this component
\nRemoves all listeners for this object including the managed listeners
\nClone the current component using the original config values passed into this instance by default.
\nA new config containing any properties to override in the cloned version.\nAn id property can be passed on this object, otherwise one will be generated to avoid duplicates.
\nclone The cloned copy of this component
\nstring or config object containing a ptype property.
\n\nConstructs a plugin according to the passed config object/ptype string.
\n\nEnsures that the constructed plugin always has a cmp
reference back to this component.\nThe setting up of this is done in PluginManager. The PluginManager ensures that a reference to this\ncomponent is passed to the constructor. It also ensures that the plugin's setCmp
method (if any) is called.
Returns an array of fully constructed plugin instances. This converts any configs into their\nappropriate instances.
\n\nIt does not mutate the plugins array. It creates a new array.
\nDisable the component.
\nAvailable since: 1.1.0
\nPassing true
will suppress the disable
event from being fired.
Defaults to: false
Called from the selected frame generation template to insert this Component's inner structure inside the framing structure.
\n\nWhen framing is used, a selected frame generation template is used as the primary template of the getElConfig instead\nof the configured renderTpl. The renderTpl is invoked by this method which is injected into the framing template.
\nHandles autoRender.\nFloating Components may have an ownerCt. If they are asking to be constrained, constrain them within that\nownerCt, and have their z-index managed locally. Floating Components are always rendered to document.body
\nThis method needs to be called whenever you change something on this component that requires the Component's\nlayout to be recalculated.
\nthis
\nMoves this floating Component into a constrain region.
\n\nBy default, this Component is constrained to be within the container it was added to, or the element it was\nrendered to.
\n\nAn alternative constraint may be passed.
\nThe Element or Region\ninto which this Component is to be constrained. Defaults to the element into which this floating Component\nwas rendered.
\nEnable the component
\nAvailable since: 1.1.0
\nPassing true
will suppress the enable
event from being fired.
Defaults to: false
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.
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\nExample:
\n\nExt.define('Ext.overrides.form.field.Base', {\n override: 'Ext.form.field.Base',\n\n // Add functionality to Field's initComponent to enable the change event to bubble\n initComponent: function () {\n this.callParent();\n this.enableBubble('change');\n }\n});\n\nvar myForm = Ext.create('Ext.form.Panel', {\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
\nEnsures that this component is attached to document.body
. If the component was\nrendered to Ext.getDetachedBody, then it will be appended to document.body
.\nAny configured position is also restored.
True to run the component's layout.
\nDefaults to: false
Find a container above this component at any level by a custom function. If the passed function returns true, the\ncontainer will be returned.
\n\nSee also the up method.
\nThe custom function to call with the arguments (container, this component).
\nThe first Container for which the custom function returns true
\nFind a container above this component at any level by xtype or class
\n\nSee also the up method.
\nThe first Container which matches the given xtype or class
\nRetrieves plugin from this component's collection by its ptype
.
The Plugin's ptype as specified by the class's alias
configuration.
plugin instance.
\nFires the specified event with the passed parameters (minus the event name, plus the options
object passed\nto addListener).
An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget) by\ncalling enableBubble.
\nThe name of the event to fire.
\nVariable number of parameters are passed to handlers.
\nreturns false if any of the handlers return false otherwise it returns true.
\nFires the specified event with the passed parameter list.
\n\nAn event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget) by\ncalling enableBubble.
\nThe name of the event to fire.
\nAn array of parameters which are passed to handlers.
\nreturns false if any of the handlers return false otherwise it returns true.
\nFor more information on the hierarchy events, see the note for the\nhierarchyEventSource observer defined in the onClassCreated callback.
\n\nThis functionality is contained in Component (as opposed to Container)\nbecause a Component can be the ownerCt for a floating component (loadmask),\nand the loadmask needs to know when its owner is shown/hidden via the\nhierarchyEventSource so that its hidden state can be synchronized.
\n\nTODO: merge this functionality with Ext.globalEvents
\nTry to focus this component.
\nIf applicable, true to also select the text in this component
\nDelay the focus this number of milliseconds (true for 10 milliseconds).
\nOnly needed if the delay
parameter is used. A function to call upon focus.
Only needed if the delay
parameter is used. The scope (this
reference) in which to execute the callback.
The focused Component. Usually this
Component. Some Containers may\ndelegate focus to a descendant Component (Windows can do this through their\ndefaultFocus config option.
Forces this component to redo its componentLayout.
\nThis method has been deprecated since 4.1.0
\nUse updateLayout instead.
\n\nReturns the current animation if this object has any effects actively running or queued, else returns false.
\nAnim if element has active effects, else false
\n\nGets the x,y coordinates to align this element with another element. See\nalignTo for more info on the supported position values.
\nThe Positionable,\nHTMLElement, or id of the element to align to.
\nThe position to align to
\nDefaults to: "tl-bl?"
Offset the positioning by [x, y]
\n[x, y]
\nBegin Positionable methods
\n\nOverridden in Ext.rtl.AbstractComponent.
\n\nGets the x,y coordinates of an element specified by the anchor position on the\nelement.
\nThe element
\nThe specified anchor position.\nSee alignTo for details on supported anchor positions.
\nDefaults to: 'tl'
True to get the local (element top/left-relative) anchor\nposition instead of page coordinates
\nAn object containing the size to use for calculating anchor\nposition {width: (target width), height: (target height)} (defaults to the\nelement's current size)
\n[x, y] An array containing the element's x and y coordinates
\nOverrides: Ext.util.Positionable.getAnchorToXY
Gets the x,y coordinates specified by the anchor position on the element.
\nThe specified anchor position.\nSee alignTo for details on supported anchor positions.
\nDefaults to: 'tl'
True to get the local (element top/left-relative) anchor\nposition instead of page coordinates
\nAn object containing the size to use for calculating anchor\nposition {width: (target width), height: (target height)} (defaults to the\nelement's current size)
\n[x, y] An array containing the element's x and y coordinates
\nOverridden in Ext.rtl.AbstractComponent.
\n\nReturns the size of the element's borders and padding.
\nan object with the following numeric properties\n- beforeX\n- afterX\n- beforeY\n- afterY
\nOverrides: Ext.util.Positionable.getBorderPadding
Return an object defining the area of this Element which can be passed to\nsetBox to set another Element's size/location to match this element.
\nIf true a box for the content of the element is\nreturned.
\nIf true the element's left and top relative to its\noffsetParent
are returned instead of page x/y.
box An object in the format:
\n\n{\n x: <Element's X position>,\n y: <Element's Y position>,\n left: <Element's X position (an alias for x)>,\n top: <Element's Y position (an alias for y)>,\n width: <Element's width>,\n height: <Element's height>,\n bottom: <Element's lower bound>,\n right: <Element's rightmost bound>\n}\n
\n\nThe returned object may also be addressed as an Array where index 0 contains the X\nposition and index 1 contains the Y position. The result may also be used for\nsetXY
\nGets the bubbling parent for an Observable
\nThe bubble parent. null is returned if no bubble target exists
\nImplements an upward event bubbling policy. By default a Component bubbles events up to its reference owner.
\n\nComponent subclasses may implement a different bubbling strategy by overriding this method.
\nOverrides: Ext.AbstractComponent.getBubbleTarget
Returns the [X, Y]
vector by which this Positionable's element must be translated to make a best\nattempt to constrain within the passed constraint. Returns false
if the element\ndoes not need to be moved.
Priority is given to constraining the top and left within the constraint.
\n\nThe constraint may either be an existing element into which the element is to be\nconstrained, or a Region into which this element is to be\nconstrained.
\n\nBy default, any extra shadow around the element is not included in the constrain calculations - the edges\nof the element are used as the element bounds. To constrain the shadow within the constrain region, set the\nconstrainShadow
property on this element to true
.
The\nPositionable, HTMLElement, element id, or Region into which the element is to be\nconstrained.
\nA proposed [X, Y]
position to test for validity\nand to produce a vector for instead of using the element's current position
A proposed [width, height]
size to constrain\ninstead of using the element's current size
Retrieves the top level element representing this component.
\nAvailable since: 1.1.0
\nOverrides: Ext.AbstractComponent.getEl
Returns the focus holder element associated with this Component. At the Component base class level, this function returns undefined
.
Subclasses which use embedded focusable elements (such as Window, Field and Button) should override this\nfor use by the focus method.
\n\nContainers which need to participate in the FocusManager's navigation and Container focusing scheme also\nneed to return a focusEl
, although focus is only listened for in this case if the FocusManager is enabled.
On render, reads an encoded style attribute, \"filter\" from the style of this Component's element.\nThis information is memoized based upon the CSS class name of this Component's element.\nBecause child Components are rendered as textual HTML as part of the topmost Container, a dummy div is inserted\ninto the document to receive the document element's CSS class name, and therefore style attributes.
\nA component's hierarchyState is used to keep track of aspects of a component's\nstate that affect its descendants hierarchically like \"collapsed\" and \"hidden\".\nFor example, if this.hierarchyState.hidden == true, it means that either this\ncomponent, or one of its ancestors is hidden.
\n\nHierarchical state management is implemented by chaining each component's\nhierarchyState property to its parent container's hierarchyState property via the\nprototype. The result is such that if a component's hierarchyState does not have\nit's own property, it inherits the property from the nearest ancestor that does.
\n\nTo set a hierarchical \"hidden\" value:
\n\nthis.getHierarchyState().hidden = true;\n
\n\nIt is important to remember when unsetting hierarchyState properties to delete\nthem instead of just setting them to a falsy value. This ensures that the\nhierarchyState returns to a state of inheriting the value instead of overriding it\nTo unset the hierarchical \"hidden\" value:
\n\ndelete this.getHierarchyState().hidden;\n
\n\nIMPORTANT! ALWAYS access hierarchyState using this method, not by accessing\nthis.hierarchyState directly. The hierarchyState property does not exist until\nthe first time getHierarchyState() is called. At that point getHierarchyState()\nwalks up the component tree to establish the hierarchyState prototype chain.\nAdditionally the hierarchyState property should NOT be relied upon even after\nthe initial call to getHierarchyState() because it is possible for the\nhierarchyState to be invalidated. Invalidation typically happens when a component\nis moved to a new container. In such a case the hierarchy state remains invalid\nuntil the next time getHierarchyState() is called on the component or one of its\ndescendants.
\nRetrieves the id
of this component. Will auto-generate an id
if one has not already been set.
Overrides: Ext.AbstractComponent.getId
This function takes the position argument passed to onRender and returns a\nDOM element that you can use in the insertBefore.
\nIndex, element id or element you want\nto put this component before.
\nDOM element that you can use in the insertBefore
\nGets the Ext.ComponentLoader for this Component.
\nThe loader instance, null if it doesn't exist.
\nOverridden in Ext.rtl.AbstractComponent.
\n\nReturns the x coordinate of this element reletive to its offsetParent
.
The local x coordinate
\nOverrides: Ext.util.Positionable.getLocalX
Overridden in Ext.rtl.AbstractComponent.
\n\nReturns the x and y coordinates of this element relative to its offsetParent
.
The local XY position of the element
\nOverrides: Ext.util.Positionable.getLocalXY
Returns the y coordinate of this element reletive to its offsetParent
.
The local y coordinate
\nOverrides: Ext.util.Positionable.getLocalY
Returns the offsets of this element from the passed element. The element must both\nbe part of the DOM tree and not have display:none to have page coordinates.
\nThe Positionable,\nHTMLElement, or element id to get get the offsets from.
\nThe XY page offsets (e.g. [100, -200]
)
Get an el for overflowing, defaults to the target el
\nReturns the CSS style object which will set the Component's scroll styles. This must be applied\nto the target element.
\nReturns the owning container if that container uses border
layout. Otherwise\nthis method returns null
.
Defined in override Ext.layout.container.border.Region.
\nThe owning border container or null
.
Returns the owning border
(Ext.layout.container.Border
) instance if there is\none. Otherwise this method returns null
.
Defined in override Ext.layout.container.border.Region.
\nThe owning border layout or null
.
Retrieves a plugin from this component's collection by its pluginId
.
plugin instance.
\nUsed by ComponentQuery, and the up method to find the\nowning Component in the linkage hierarchy.
\n\nBy default this returns the Container which contains this Component.
\n\nThis may be overriden by Component authors who implement ownership hierarchies which are not\nbased upon ownerCt, such as BoundLists being owned by Fields or Menus being owned by Buttons.
\nReturns a region object that defines the area of this element.
\nA Region containing \"top, left, bottom, right\" properties.
\nGets the current size of the component's underlying element.
\nAn object containing the element's size {width: (element width), height: (element height)}
Returns an object that describes how this component's width and height are managed.\nAll of these objects are shared and should not be modified.
\nThe size model for this component.
\nThe size model\nfor the width.
\nThe size model\nfor the height.
\nThe supplied default state gathering method for the AbstractComponent class.
\n\nThis method returns dimension settings such as flex
, anchor
, width
and height
along with collapsed
\nstate.
Subclasses which implement more complex state should call the superclass's implementation, and apply their state\nto the result if this basic state is to be saved.
\n\nNote that Component state will only be saved if the Component has a stateId and there as a StateProvider\nconfigured for the document.
\nOverrides: Ext.state.Stateful.getState
Gets the state id for this object.
\nThe 'stateId' or the implicit 'id' specified by component configuration.
\nReturns an offscreen div with the same class name as the element this is being rendered.\nThis is because child item rendering takes place in a detached div which, being not\npart of the document, has no styling.
\nThis is used to determine where to insert the 'html', 'contentEl' and 'items' in this component.
\nReturns the content region of this element. That is the region within the borders\nand padding.
\nA Region containing \"top, left, bottom, right\" member data.
\nGets the current X position of the DOM element based on page coordinates.
\nThe X position of the element
\nOverrides: Ext.util.Positionable.getX
Gets the xtype for this component as registered with Ext.ComponentManager. For a list of all available\nxtypes, see the Ext.Component header. Example usage:
\n\nvar t = new Ext.form.field.Text();\nalert(t.getXType()); // alerts 'textfield'\n
\nThe xtype
\nReturns this Component's xtype hierarchy as a slash-delimited string. For a list of all available xtypes, see the\nExt.Component header.
\n\nIf using your own subclasses, be aware that a Component must register its own xtype to participate in\ndetermination of inherited xtypes.
\n\nExample usage:
\n\nvar t = new Ext.form.field.Text();\nalert(t.getXTypes()); // alerts 'component/field/textfield'\n
\n Available since: 2.3.0
\nThe xtype hierarchy string
\nGets the current position of the DOM element based on page coordinates.
\nThe XY position of the element
\nOverrides: Ext.util.Positionable.getXY
Gets the current Y position of the DOM element based on page coordinates.
\nThe Y position of the element
\nOverrides: Ext.util.Positionable.getY
Returns the current animation if this object has any effects actively running or queued, else returns false.
\nThis method has been deprecated since 4.0
\nReplaced by getActiveAnimation
\n\nAnim if element has active effects, else false
\n\nChecks to see if this object has any listeners for a specified event, or whether the event bubbles. The answer\nindicates whether the event needs firing or not.
\nThe name of the event to check for
\ntrue
if the event is being listened for or bubbles, else false
Hides this Component, setting it to invisible using the configured hideMode.
\nA callback function to call after the Component is hidden.
\nThe scope (this
reference) in which the callback is executed.\nDefaults to this Component.
this
\nThis method is called by the Ext.layout.container.Border
class when instances are\nadded as regions to the layout. Since it is valid to add any component to a border\nlayout as a region, this method must be added to Ext.Component
but is only ever\ncalled when that component is owned by a border
layout.
Defined in override Ext.layout.container.border.Region.
\nprivate
\n\nThe initComponent template method is an important initialization step for a Component. It is intended to be\nimplemented by each subclass of Ext.Component to provide any needed constructor logic. The\ninitComponent method of the class being created is called first, with each initComponent method\nup the hierarchy to Ext.Component being called thereafter. This makes it easy to implement and,\nif needed, override the constructor logic of the Component at any step in the hierarchy.
\n\nThe initComponent method must contain a call to callParent in order\nto ensure that the parent class' initComponent method is also called.
\n\nAll config options passed to the constructor are applied to this
before initComponent is called,\nso you can simply access them with this.someOption
.
The following example demonstrates using a dynamic string for the text of a button at the time of\ninstantiation of the class.
\n\nExt.define('DynamicButtonText', {\n extend: 'Ext.button.Button',\n\n initComponent: function() {\n this.text = new Date();\n this.renderTo = Ext.getBody();\n this.callParent();\n }\n});\n\nExt.onReady(function() {\n Ext.create('DynamicButtonText');\n});\n
\n Available since: 1.1.0
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nOverrides: Ext.Component.initComponent
Initialize configuration for this class. a typical example:
\n\nExt.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});\n\nvar awesome = new My.awesome.Class({\n name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\nthis
\nInitialize any events on this component
\nCalled by getHierarchyState to initialize the hierarchyState the first\ntime it is requested.
\n\nOverridden in Ext.rtl.AbstractComponent.
\nInitializes padding by applying it to the target element, or if the layout manages\npadding ensures that the padding on the target element is \"0\".
\nInitialized the renderData to be used when rendering the renderTpl.
\nObject with keys and values that are going to be applied to the renderTpl
\n\n\n\nOverrides: Ext.util.Renderable.initRenderData
Initializes the state of the object upon construction.
\nApplies padding, margin, border, top, left, height, and width configs to the\nappropriate elements.
\nUtility method to determine if a Component is floating, and has an owning Container whose coordinate system\nit must be positioned in when using setPosition.
\nDetermines whether this component is the descendant of a particular container.
\ntrue
if the component is the descendant of a particular container, otherwise false
.
Method to determine whether this Component is currently disabled.
\nthe disabled state of this Component.
\nMethod to determine whether this Component is draggable.
\nthe draggable state of this component.
\nMethod to determine whether this Component is droppable.
\nthe droppable state of this component.
\nMethod to determine whether this Component is floating.
\nthe floating state of this component.
\nMethod to determine whether this Component is currently set to hidden.
\nthe hidden state of this Component.
\nDetermines whether this Component is the root of a layout. This returns true
if\nthis component can run its layout without assistance from or impact on its owner.\nIf this component cannot run its layout given these restrictions, false
is returned\nand its owner will be considered as the next candidate for the layout root.
Setting the _isLayoutRoot property to true
causes this method to always\nreturn true
. This may be useful when updating a layout of a Container which shrink\nwraps content, and you know that it will not change size, and so can safely be the\ntopmost participant in the layout run.
Returns true
if layout is suspended for this component. This can come from direct\nsuspension of this component's layout activity (Ext.Container.suspendLayout) or if one\nof this component's containers is suspended.
true
layout of this component is suspended.
Returns true if this component's local coordinate system is rtl. For normal\ncomponents this equates to the value of isParentRtl(). Floaters are a bit different\nbecause a floater's element can be a childNode of something other than its\nparent component's element. For floaters we have to read the dom to see if the\ncomponent's element's parentNode has a css direction value of \"rtl\".
\n\nDefined in override Ext.rtl.AbstractComponent.
\nDefined in override Ext.rtl.AbstractComponent.
\nReturns true if this component's parent container is rtl. Used by rtl positioning\nmethods to determine if the component should be positioned using a right-to-left\ncoordinate system.
\n\nDefined in override Ext.rtl.AbstractComponent.
\nReturns true
if this component is visible.
Available since: 1.1.0
\nPass true
to interrogate the visibility status of all parent Containers to\ndetermine whether this Component is truly visible to the user.
Generally, to determine whether a Component is hidden, the no argument form is needed. For example when creating\ndynamically laid out UIs in a hidden Container before showing them.
\nDefaults to: false
true
if this component is visible, false
otherwise.
Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended\nfrom the xtype (default) or whether it is directly of the xtype specified (shallow = true
).
If using your own subclasses, be aware that a Component must register its own xtype to participate in\ndetermination of inherited xtypes.
\n\nFor a list of all available xtypes, see the Ext.Component header.
\n\nExample usage:
\n\nvar t = new Ext.form.field.Text();\nvar isText = t.isXType('textfield'); // true\nvar isBoxSubclass = t.isXType('field'); // true, descended from Ext.form.field.Base\nvar isBoxInstance = t.isXType('field', true); // false, not a direct Ext.form.field.Base instance\n
\n Available since: 2.3.0
\nThe xtype to check for this Component
\ntrue
to check whether this Component is directly of the specified xtype, false
to\ncheck whether this Component is descended from the xtype.
Defaults to: false
true
if this component descends from the specified xtype, false
otherwise.
Shorthand for addManagedListener.
\n\nAdds listeners to any Observable object (or Ext.Element) which are automatically removed when this Component is\ndestroyed.
\nThe item to which to add a listener/listeners.
\n\nThe event name, or an object containing event name properties.
\n\nIf the ename
parameter was an event name, this is the handler function.
If the ename
parameter was an event name, this is the scope (this
reference)\nin which the handler function is executed.
If the ename
parameter was an event name, this is the\naddListener options.
Only when the destroyable
option is specified.
A Destroyable
object. An object which implements the destroy
method which removes all listeners added in this call. For example:
this.btnListeners = = myButton.mon({\n destroyable: true\n mouseover: function() { console.log('mouseover'); },\n mouseout: function() { console.log('mouseout'); },\n click: function() { console.log('click'); }\n});\n
\n\n\n\n\nAnd when those listeners need to be removed:
\n\n\n\n\nExt.destroy(this.btnListeners);\n
\n\n\n\n\nor
\n\n\n\n\nthis.btnListeners.destroy();\n
\n\nMove the element relative to its current position.
\nPossible values are:
\n\n\"l\"
(or \"left\"
)\"r\"
(or \"right\"
)\"t\"
(or \"top\"
, or \"up\"
)\"b\"
(or \"bottom\"
, or \"down\"
)How far to move the element in pixels
\ntrue for the default animation or a standard\nElement animation config object
\nShorthand for removeManagedListener.
\n\nRemoves listeners that were added by the mon method.
\nThe item from which to remove a listener/listeners.
\n\nThe event name, or an object containing event name properties.
\n\nIf the ename
parameter was an event name, this is the handler function.
If the ename
parameter was an event name, this is the scope (this
reference)\nin which the handler function is executed.
Returns the next node in the Component tree in tree traversal order.
\n\nNote that this is not limited to siblings, and if invoked upon a node with no matching siblings, will walk the\ntree to attempt to find a match. Contrast with nextSibling.
\nA ComponentQuery selector to filter the following nodes.
\nThe next node (or the next node which matches the selector).\nReturns null
if there is no matching node.
Returns the next sibling of this Component.
\n\nOptionally selects the next sibling which matches the passed ComponentQuery selector.
\n\nMay also be referred to as next()
Note that this is limited to siblings, and if no siblings of the item match, null
is returned. Contrast with\nnextNode
A ComponentQuery selector to filter the following items.
\nThe next sibling (or the next sibling which matches the selector).\nReturns null
if there is no matching sibling.
Shorthand for addListener.
\n\nAppends an event handler to this object. For example:
\n\nmyGridPanel.on(\"mouseover\", this.onMouseOver, this);\n
\n\nThe method also allows for a single argument to be passed which is a config object\ncontaining properties which specify multiple events. For example:
\n\nmyGridPanel.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\nOne can also specify options for each event handler separately:
\n\nmyGridPanel.on({\n cellClick: {fn: this.onCellClick, scope: this, single: true},\n mouseover: {fn: panel.onMouseOver, scope: panel}\n});\n
\n\nNames of methods in a specified scope may also be used. Note that\nscope
MUST be specified to use this option:
myGridPanel.on({\n cellClick: {fn: 'onCellClick', scope: this, single: true},\n mouseover: {fn: 'onMouseOver', scope: panel}\n});\n
\nThe name of the event to listen for.\nMay also be an object who's property names are event names.
\n\nThe method the event invokes, or if scope
is specified, the name* of the method within\nthe specified scope
. Will be called with arguments\ngiven to fireEvent plus the options
parameter described below.
The scope (this
reference) in which the handler function is\nexecuted. If omitted, defaults to the object which fired the event.
An object containing handler configuration.
\n\n\n\n\nNote: Unlike in ExtJS 3.x, the options object will also be passed as the last\nargument to every event handler.
\n\n\n\n\nThis object may contain any of the following properties:
\n\nThe scope (this
reference) in which the handler function is executed. If omitted,\n defaults to the object which fired the event.
The number of milliseconds to delay the invocation of the handler after the event fires.
\n\nTrue to add a handler to handle just the next firing of the event, and then remove itself.
\n\nCauses the handler to be scheduled to run in an Ext.util.DelayedTask delayed\n by the specified number of milliseconds. If the event fires again within that time,\n the original handler is not invoked, but the new handler is scheduled in its place.
\n\nOnly call the handler if the event was fired on the target Observable, not if the event\n was bubbled up from a child Observable.
\n\nThis option is only valid for listeners bound to Components.\n The name of a Component property which references an element to add a listener to.
\n\n\n\n\nThis option is useful during Component construction to add DOM event listeners to elements of\n Components which will exist only after the Component is rendered.\n For example, to add a click listener to a Panel's body:
\n\n\n\n\n new Ext.panel.Panel({\n title: 'The title',\n listeners: {\n click: this.handlePanelClick,\n element: 'body'\n }\n });\n
\n\nWhen specified as true
, the function returns A Destroyable
object. An object which implements the destroy
method which removes all listeners added in this call.
Defaults to: false
An optional numeric priority that determines the order in which event handlers\n are run. Event handlers with no priority will be run as if they had a priority\n of 0. Handlers with a higher priority will be prioritized to run sooner than\n those with a lower priority. Negative numbers can be used to set a priority\n lower than the default. Internally, the framework uses a range of 1000 or\n greater, and -1000 or lesser for handers that are intended to run before or\n after all others, so it is recommended to stay within the range of -999 to 999\n when setting the priority of event handlers in application-level code.
\n\n\n\n\nCombining Options
\n\n\n\n\nUsing the options argument, it is possible to combine different types of listeners:
\n\n\n\n\nA delayed, one-time listener.
\n\n\n\n\nmyPanel.on('hide', this.handleClick, this, {\n single: true,\n delay: 100\n});\n
\n\nOnly when the destroyable
option is specified.
A Destroyable
object. An object which implements the destroy
method which removes all listeners added in this call. For example:
this.btnListeners = = myButton.on({\n destroyable: true\n mouseover: function() { console.log('mouseover'); },\n mouseout: function() { console.log('mouseout'); },\n click: function() { console.log('click'); }\n});\n
\n\n\n\n\nAnd when those listeners need to be removed:
\n\n\n\n\nExt.destroy(this.btnListeners);\n
\n\n\n\n\nor
\n\n\n\n\nthis.btnListeners.destroy();\n
\n\nMethod to manage awareness of when components are added to their\nrespective Container, firing an added event. References are\nestablished at add time rather than at render time.
\n\nAllows addition of behavior when a Component is added to a\nContainer. At this stage, the Component is in the parent\nContainer's collection of child items. After calling the\nsuperclass's onAdded
, the ownerCt
reference will be present,\nand if configured with a ref, the refOwner
will be set.
Available since: 3.4.0
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nContainer which holds the component.
\nPosition at which the component was added.
\nOverrides: Ext.AbstractComponent.onAdded
Allows addition of behavior to the destroy operation.\nAfter calling the superclass's onDestroy, the Component will be destroyed.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nOverrides: Ext.Component.onDestroy
Allows addition of behavior to the disable operation.\nAfter calling the superclass's onDisable
, the Component will be disabled.
This is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nAllows addition of behavior to the enable operation.\nAfter calling the superclass's onEnable
, the Component will be enabled.
This is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nPossibly animates down to a target element.
\n\nAllows addition of behavior to the hide operation. After\ncalling the superclass’s onHide, the Component will be hidden.
\n\nGets passed the same parameters as hide.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nOverrides: Ext.AbstractComponent.onHide
Listen for TAB events and wrap round if tabbing of either end of the Floater
\nMousedown brings to front, and programatically grabs focus unless the mousedown was on a focusable element
\nCalled after the component is moved, this method is empty by default but can be implemented by any\nsubclass that needs to perform custom logic after a move occurs.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nMethod to manage awareness of when components are removed from their\nrespective Container, firing a removed event. References are properly\ncleaned up after removing a component from its owning container.
\n\nAllows addition of behavior when a Component is removed from\nits parent Container. At this stage, the Component has been\nremoved from its parent Container's collection of child items,\nbut has not been destroyed (It will be destroyed if the parent\nContainer's autoDestroy
is true
, or if the remove call was\npassed a truthy second parameter). After calling the\nsuperclass's onRemoved
, the ownerCt
and the refOwner
will not\nbe present.
Available since: 3.4.0
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nWill be passed as true
if the Container performing the remove operation will delete this\nComponent upon remove.
Template method called when this Component's DOM structure is created.
\n\nAt this point, this Component's (and all descendants') DOM structure exists but it has not\nbeen layed out (positioned and sized).
\n\nSubclasses which override this to gain access to the structure at render time should\ncall the parent class's method before attempting to access any child elements of the Component.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nThe parent Element in which this Component's encapsulating element is contained.
\n\n\n\nThe index within the parent Container's child collection of this Component.
\n\n\n\nOverrides: Ext.util.Renderable.onRender
Allows addition of behavior to the resize operation.
\n\nCalled when Ext.resizer.Resizer#drag event is fired.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nAllows addition of behavior to the show operation. After\ncalling the superclass's onShow, the Component will be visible.
\n\nOverride in subclasses where more complex behaviour is needed.
\n\nGets passed the same parameters as show.
\nThis is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nOverrides: Ext.AbstractComponent.onShow
Invoked after the afterShow method is complete.
\n\nGets passed the same callback
and scope
parameters that afterShow received.
This is a template method.\n a hook into the functionality of this class.\n Feel free to override it in child classes.
\nThis method is called when any of the stateEvents are fired.
\nPrepares a given class for observable instances. This method is called when a\nclass derives from this class or uses this class as a mixin.
\nThe class constructor to prepare.
\nReturns the previous node in the Component tree in tree traversal order.
\n\nNote that this is not limited to siblings, and if invoked upon a node with no matching siblings, will walk the\ntree in reverse order to attempt to find a match. Contrast with previousSibling.
\nA ComponentQuery selector to filter the preceding nodes.
\nThe previous node (or the previous node which matches the selector).\nReturns null
if there is no matching node.
Returns the previous sibling of this Component.
\n\nOptionally selects the previous sibling which matches the passed ComponentQuery\nselector.
\n\nMay also be referred to as prev()
Note that this is limited to siblings, and if no siblings of the item match, null
is returned. Contrast with\npreviousNode
A ComponentQuery selector to filter the preceding items.
\nThe previous sibling (or the previous sibling which matches the selector).\nReturns null
if there is no matching sibling.
Called by Component#doAutoRender
\n\nRegister a Container configured floating: true
with this Component's ZIndexManager.
Components added in this way will not participate in any layout, but will be rendered\nupon first show in the way that Windows are.
\nRelays selected events from the specified Observable as if the events were fired by this
.
For example if you are extending Grid, you might decide to forward some events from store.\nSo you can do this inside your initComponent:
\n\nthis.relayEvents(this.getStore(), ['load']);\n
\n\nThe grid instance will then have an observable 'load' event which will be passed the\nparameters of the store's load event and any function fired with the grid's load event\nwould have access to the grid using the this
keyword.
The Observable whose events this object is to relay.
\nArray of event names to relay.
\nA common prefix to prepend to the event names. For example:
\n\nthis.relayEvents(this.getStore(), ['load', 'clear'], 'store');\n
\n\nNow the grid will forward 'load' and 'clear' events of store as 'storeload' and 'storeclear'.
\nA Destroyable
object. An object which implements the destroy
method which, when destroyed, removes all relayers. For example:
this.storeRelayers = this.relayEvents(this.getStore(), ['load', 'clear'], 'store');\n
\n\nCan be undone by calling
\n\nExt.destroy(this.storeRelayers);\n
\n\nor
\n\nthis.store.relayers.destroy();\n
\nRemoves items in the childEls array based on the return value of a supplied test\nfunction. The function is called with a entry in childEls and if the test function\nreturn true, that entry is removed. If false, that entry is kept.
\nThe test function.
\nRemoves a CSS class from the top level element representing this component.
\nReturns the Component to allow method chaining.
\nRemoves a cls
to the uiCls
array, which will also call removeUIClsFromElement and removes it from all\nelements of this component.
Removes an event handler.
\nThe type of event the handler was associated with.
\n\nThe handler to remove. This must be a reference to the function passed into the\naddListener call.
\n\nThe 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\nRemoves listeners that were added by the mon method.
\nThe item from which to remove a listener/listeners.
\n\nThe event name, or an object containing event name properties.
\n\nIf the ename
parameter was an event name, this is the handler function.
If the ename
parameter was an event name, this is the scope (this
reference)\nin which the handler function is executed.
Method which removes a specified UI + uiCls
from the components element. The cls
which is added to the element\nwill be: this.baseCls + '-' + ui
.
The UI to add to the element.
\nMethod which removes a specified UI from the components element.
\nRenders the Component into the passed HTML element.
\n\nIf you are using a Container object to house this\nComponent, then do not use the render method.
\n\nA Container's child Components are rendered by that Container's\nlayout manager when the Container is first rendered.
\n\nIf the Container is already rendered when a new child Component is added, you may need to call\nthe Container's doLayout to refresh the view which\ncauses any unrendered child Components to be rendered. This is required so that you can add\nmultiple child components if needed while only refreshing the layout once.
\n\nWhen creating complex UIs, it is important to remember that sizing and positioning\nof child items is the responsibility of the Container's layout\nmanager. If you expect child items to be sized in response to user interactions, you must\nconfigure the Container with a layout manager which creates and manages the type of layout you\nhave in mind.
\n\nOmitting the Container's layout config means that a basic\nlayout manager is used which does nothing but render child components sequentially into the\nContainer. No sizing or positioning will be performed in this situation.
\nThe element this Component should be\nrendered into. If it is being created from existing markup, this should be omitted.
\nThe element ID or DOM node index within the container before\nwhich this component will be inserted (defaults to appending to the end of the container)
\nResets the progress bar value to 0 and text to empty string. If hide = true, the progress bar will also be hidden\n(using the hideMode property internally).
\nTrue to hide the progress bar.
\nDefaults to: false
this
\nResumes firing of the named event(s).
\n\nAfter calling this method to resume events, the events will fire when requested to fire.
\n\nNote that if the suspendEvent method is called multiple times for a certain event,\nthis converse method will have to be called the same number of times for it to resume firing.
\nMultiple event names to resume.
\nResumes firing events (see suspendEvents).
\n\nIf events were suspended using the queueSuspended
parameter, then all events fired\nduring event suspension will be sent to any listeners now.
Conditionally saves a single property from this object to the given state object.\nThe idea is to only save state which has changed from the initial state so that\ncurrent software settings do not override future software settings. Only those\nvalues that are user-changed state should be saved.
\nThe name of the property to save.
\nThe state object in to which to save the property.
\nThe name to use for the property in state.
\nTrue if the property was saved, false if not.
\nSaves the state of the object to the persistence store.
\nScrolls this Component's target element by the passed delta values, optionally animating.
\n\nAll of the following are equivalent:
\n\n comp.scrollBy(10, 10, true);\n comp.scrollBy([10, 10], true);\n comp.scrollBy({ x: 10, y: 10 }, true);\n
\nEither the x delta, an Array specifying x and y deltas or\nan object with \"x\" and \"y\" properties.
\nEither the y delta, or an animate flag or config object.
\nAnimate flag/config object if the delta values were passed separately.
\nThis method is called internally by Ext.ZIndexManager to signal that a floating Component has either been\nmoved to the top of its zIndex stack, or pushed from the top of its zIndex stack.
\n\nIf a Window is superceded by another Window, deactivating it hides its shadow.
\n\nThis method also fires the activate or\ndeactivate event depending on which action occurred.
\nTrue to activate the Component, false to deactivate it.
\nDefaults to: false
The newly active Component which is taking over topmost zIndex position.
\nSets the overflow on the content element of the component.
\nTrue to allow the Component to auto scroll.
\nthis
\nThis method changes the region
config property for this border region. This is\nonly valid if this component is in a border
layout (Ext.layout.container.Border
).
Defined in override Ext.layout.container.border.Region.
\nThe new region
value (\"north\"
, \"south\"
, \"east\"
or\n\"west\"
).
The previous value of the region
property.
Sets the element's box. If animate is true then x, y, width, and height will be\nanimated concurrently.
\nThe box to fill {x, y, width, height}
\ntrue for the default animation or a standard\nElement animation config object
\nthis
\nSets the dock position of this component in its parent panel. Note that this only has effect if this item is part\nof the dockedItems
collection of a parent that has a DockLayout (note that any Panel has a DockLayout by default)
The dock position.
\ntrue
to re-layout parent.
Defaults to: false
this
\nSets the height of the component. This method fires the resize event.
\nThe new height to set. This may be one of:
\n\nthis
\nThis method allows you to show or hide a LoadMask on top of this component.
\nTrue to show the default LoadMask, a config object that will be passed to the\nLoadMask constructor, or a message String to show. False to hide the current LoadMask.
\nTrue to mask the targetEl of this Component instead of the this.el
. For example,\nsetting this to true on a Panel will cause only the body to be masked.
Defaults to: false
The LoadMask instance that has just been shown.
\nOverridden in Ext.rtl.AbstractComponent.
\n\nSets the local x coordinate of this element using CSS style. When used on an\nabsolute positioned element this method is symmetrical with getLocalX, but\nmay not be symmetrical when used on a relatively positioned element.
\nThe x coordinate. A value of null
sets the left style to 'auto'.
this
\nOverrides: Ext.util.Positionable.setLocalX
Overridden in Ext.rtl.AbstractComponent.
\n\nSets the local x and y coordinates of this element using CSS style. When used on an\nabsolute positioned element this method is symmetrical with getLocalXY, but\nmay not be symmetrical when used on a relatively positioned element.
\nThe x coordinate or an array containing [x, y]. A value of\nnull
sets the left style to 'auto'
The y coordinate, required if x is not an array. A value of\nnull
sets the top style to 'auto'
this
\nOverrides: Ext.util.Positionable.setLocalXY
Sets the local y coordinate of this element using CSS style. When used on an\nabsolute positioned element this method is symmetrical with getLocalY, but\nmay not be symmetrical when used on a relatively positioned element.
\nThe y coordinate. A value of null
sets the top style to 'auto'.
this
\nOverrides: Ext.util.Positionable.setLocalY
Sets the overflow x/y on the content element of the component. The x/y overflow\nvalues can be any valid CSS overflow (e.g., 'auto' or 'scroll'). By default, the\nvalue is 'hidden'. Passing null for one of the values will erase the inline style.\nPassing undefined
will preserve the current value.
this
\nSets the page XY position of the component. To set the left and top instead, use setPosition.\nThis method fires the move event.
\nThe new x position or an array of [x,y]
.
The new y position.
\nTrue to animate the Component into its new position. You may also pass an\nanimation configuration.
\nthis
\nSets the left and top of the component. To set the page XY position instead, use setPagePosition. This\nmethod fires the move event.
\nThe new left, an array of [x,y]
, or animation config object containing x
and y
properties.
The new top.
\nIf true
, the Component is animated into its new position. You may also pass an\nanimation configuration.
this
\nSets the element's position and size to the specified region. If animation is true\nthen width, height, x and y will be animated concurrently.
\nThe region to fill
\ntrue for the default animation or a standard\nElement animation config object
\nthis
\nSets the weight
config property for this component. This is only valid if this\ncomponent is in a border
layout (Ext.layout.container.Border
).
Defined in override Ext.layout.container.border.Region.
\nThe new weight
value.
The previous value of the weight
property.
Sets the width and height of this Component. This method fires the resize event. This method can accept\neither width and height as separate arguments, or you can pass a size object like {width:10, height:20}
.
The new width to set. This may be one of:
\n\n{width: widthValue, height: heightValue}
.undefined
to leave the width unchanged.The new height to set (not required if a size object is passed as the first arg).\nThis may be one of:
\n\nundefined
to leave the height unchanged.this
\nSets the UI for the component. This will remove any existing UIs on the component. It will also loop through any\nuiCls
set on the component and rename them so they include the new UI.
The new UI for the component.
\nConvenience function to hide or show this component by Boolean.
\nAvailable since: 1.1.0
\ntrue
to show, false
to hide.
this
\nSets the width of the component. This method fires the resize event.
\nThe new width to setThis may be one of:
\n\nthis
\nSets the X position of the DOM element based on page coordinates.
\nX position
\nTrue for the default animation, or a standard\nElement animation config object
\nthis
\nOverrides: Ext.util.Positionable.setX
Sets the position of the DOM element in page coordinates.
\nContains X & Y [x, y] values for new position (coordinates\nare page-based)
\nTrue for the default animation, or a standard\nElement animation config object
\nthis
\nOverrides: Ext.util.Positionable.setXY
Sets the Y position of the DOM element based on page coordinates.
\nY position
\nTrue for the default animation, or a standard\nElement animation config object
\nthis
\nOverrides: Ext.util.Positionable.setY
z-index is managed by the zIndexManager and may be overwritten at any time.\nReturns the next z-index to be used.\nIf this is a Container, then it will have rebased any managed floating Components,\nand so the next available z-index will be approximately 10000 above that.
\nInject a reference to the function which applies the render template into the framing template. The framing template\nwraps the content.
\nShows this Component, rendering it first if autoRender or floating are true
.
After being shown, a floating Component (such as a Ext.window.Window), is activated it and\nbrought to the front of its z-index stack.
\nA callback function to call after the Component is displayed.\nOnly necessary if animation was specified.
\nThe scope (this
reference) in which the callback is executed.\nDefaults to this Component.
this
\nOverrides: Ext.AbstractComponent.show
Displays component at specific xy position.\nA floating component (like a menu) is positioned relative to its ownerCt if any.\nUseful for popping up a context menu:
\n\nlisteners: {\n itemcontextmenu: function(view, record, item, index, event, options) {\n Ext.create('Ext.menu.Menu', {\n width: 100,\n height: 100,\n margin: '0 0 10 0',\n items: [{\n text: 'regular item 1'\n },{\n text: 'regular item 2'\n },{\n text: 'regular item 3'\n }]\n }).showAt(event.getXY());\n }\n}\n
\nThe new x position or array of [x,y]
.
The new y position
\nTrue to animate the Component into its new position. You may also pass an\nanimation configuration.
\nthis
\nShows this component by the specified Component or Element.\nUsed when this component is floating.
\nThe Ext.Component or Ext.Element to show the component by.
\nAlignment position as used by Ext.util.Positionable.getAlignToXY.\nDefaults to defaultAlign
.
Alignment offsets as used by Ext.util.Positionable.getAlignToXY.
\nthis
\nGet 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
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\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
\nStops any running effects and clears this object's internal effects queue if it contains any additional effects\nthat haven't started yet.
\nThe Element
\nStops any running effects and clears this object's internal effects queue if it contains any additional effects\nthat haven't started yet.
\nThis method has been deprecated since 4.0
\nReplaced by stopAnimation
\n\nThe Element
\nSuspends firing of the named event(s).
\n\nAfter calling this method to suspend events, the events will no longer fire when requested to fire.
\n\nNote that if this is called multiple times for a certain event, the converse method\nresumeEvent will have to be called the same number of times for it to resume firing.
\nMultiple event names to suspend.
\nSuspends the firing of all events. (see resumeEvents)
\nPass as true to queue up suspended events to be fired\nafter the resumeEvents call instead of discarding all suspended events.
\nEnsures that all effects queued after syncFx is called on this object are run concurrently. This is the opposite\nof sequenceFx.
\nthis
\nsynchronizes the hidden state of this component with the state of its hierarchy
\nSends this Component to the back of (lower z-index than) any other visible windows
\nthis
\nBrings this floating Component to the front of any other visible, floating Components managed by the same\nZIndexManager
\n\nIf this Component is modal, inserts the modal mask just below this Component in the z-index stack.
\nSpecify true
to prevent the Component from being focused.
Defaults to: false
this
\nTranslates the passed page coordinates into left/top css values for the element
\nThe page x or an array containing [x, y]
\nThe page y, required if x is not an array
\nAn object with left and top properties. e.g.\n{left: (value), top: (value)}
\nShorthand for removeListener.
\n\nRemoves an event handler.
\nThe type of event the handler was associated with.
\n\nThe handler to remove. This must be a reference to the function passed into the\naddListener call.
\n\nThe 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\nNavigates up the ownership hierarchy searching for an ancestor Container which matches any passed simple selector or component.
\n\nImportant. There is not a universal upwards navigation pointer. There are several upwards relationships\nsuch as the button which activates a menu, or the\nmenu item which activated a submenu, or the\ncolumn header which activated the column menu.
\n\nThese differences are abstracted away by this method.
\n\nExample:
\n\nvar owningTabPanel = grid.up('tabpanel');\n
\nThe simple selector component or actual component to test. If not passed the immediate owner/activater is returned.
\nThis may be a selector upon which to stop the upward scan, or a limit of teh number of steps, or Component reference to stop on.
\nThe matching ancestor Container (or undefined
if no match was found).
Update the content area of a component.
\nAvailable since: 3.4.0
\nIf this component has been configured with a template via the tpl config then\nit will use this argument as data to populate the template. If this component was not configured with a template,\nthe components content area will be updated via Ext.Element update.
\nOnly legitimate when using the html
configuration.
Defaults to: false
Only legitimate when using the html
configuration. Callback to execute when\nscripts have finished loading.
Injected as an override by Ext.Aria.initialize
\nSets the current box measurements of the component's underlying element.
\nAn object in the format {x, y, width, height}
\nthis
\nUpdates the progress bar value, and optionally its text. If the text argument is not specified, any existing text\nvalue will be unchanged. To blank out existing text, pass ''. Note that even if the progress bar value exceeds 1,\nit will never automatically reset -- you are responsible for determining when the progress is complete and\ncalling reset to clear and/or hide the control.
\nA floating point value between 0 and 1 (e.g., .5)
\nDefaults to: 0
The string to display in the progress text element
\nDefaults to: ''
Whether to animate the transition of the progress bar. If this value is not\nspecified, the default for the class is used
\nDefaults to: false
this
\nUpdates the progress bar text. If specified, textEl will be updated, otherwise the progress bar itself will\ndisplay the updated text.
\nThe string to display in the progress text element
\nDefaults to: ''
this
\nInitiates an auto-updating progress bar. A duration can be specified, in which case the progress bar will\nautomatically reset after a fixed amount of time and optionally call a callback function if specified. If no\nduration is passed in, then the progress bar will run indefinitely and must be manually cleared by calling\nreset.
\n\nExample usage:
\n\nvar p = new Ext.ProgressBar({\n renderTo: 'my-el'\n});\n\n//Wait for 5 seconds, then update the status el (progress bar will auto-reset)\nvar p = Ext.create('Ext.ProgressBar', {\n renderTo: Ext.getBody(),\n width: 300\n});\n\n//Wait for 5 seconds, then update the status el (progress bar will auto-reset)\np.wait({\n interval: 500, //bar will move fast!\n duration: 50000,\n increment: 15,\n text: 'Updating...',\n scope: this,\n fn: function(){\n p.updateText('Done!');\n }\n});\n\n//Or update indefinitely until some async action completes, then reset manually\np.wait();\nmyAction.on('complete', function(){\n p.reset();\n p.updateText('Done!');\n});\n
\nConfiguration options
\nThe length of time in milliseconds that the progress bar should\nrun before resetting itself (defaults to undefined, in which case it will run indefinitely\nuntil reset is called)
\nThe length of time in milliseconds between each progress update\n(defaults to 1000 ms)
\nWhether to animate the transition of the progress bar. If this\nvalue is not specified, the default for the class is used.
\nThe number of progress update segments to display within the\nprogress bar (defaults to 10). If the bar reaches the end and is still updating, it will\nautomatically wrap back to the beginning.
\nOptional text to display in the progress bar element (defaults to '').
\nA callback function to execute after the progress bar finishes auto-\nupdating. The function will be called with no arguments. This function will be ignored if\nduration is not specified since in that case the progress bar can only be stopped programmatically,\nso any required function should be called by the same code after it resets the progress bar.
\nThe scope that is passed to the callback function (only applies when\nduration and fn are both passed).
\nthis
\nAdd methods / properties to the prototype of this class.
\n\nExt.define('My.awesome.Cat', {\n constructor: function() {\n ...\n }\n});\n\n My.awesome.Cat.addMembers({\n meow: function() {\n alert('Meowww...');\n }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n
\nAdd / override static properties of this class.
\n\nExt.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
\nthis
\nBorrow another class' members to the prototype of this class.
\n\nExt.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
\nThe class to borrow members from
\nThe names of the members to borrow
\nthis
\nCreate a new instance of this Class.
\n\nExt.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.create({\n someConfig: true\n});\n
\n\nAll parameters are passed to the constructor of the class.
\nthe created instance.
\nCreate aliases for existing prototype methods. Example:
\n\nExt.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
\nThe new method name, or an object to set multiple aliases. See\nflexSetter
\nThe original method name
\nGet the current class' name in string format.
\n\nExt.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
\nclassName
\nAdds members to class.
\nThis method has been deprecated since 4.1
\nUse addMembers instead.
\n\nOverride members of this class. Overridden methods can be invoked via\ncallParent.
\n\nExt.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n this.callParent(arguments);\n\n alert(\"Meeeeoooowwww\");\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\nAs of 4.1, direct use of this method is deprecated. Use Ext.define\ninstead:
\n\nExt.define('My.CatOverride', {\n override: 'My.Cat',\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n this.callParent(arguments);\n\n alert(\"Meeeeoooowwww\");\n }\n});\n
\n\nThe above accomplishes the same result but can be managed by the Ext.Loader\nwhich can properly order the override and its target class and the build process\ncan determine whether the override is needed based on the required state of the\ntarget class (My.Cat).
\nThis method has been deprecated since 4.1.0
\nUse Ext.define instead
\n\nThe properties to add to this class. This should be\nspecified as an object literal containing one or more properties.
\nthis class
\nFires after a Component has been visually activated.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after a Component had been added to a Container.
\nAvailable since: 3.4.0
\nParent Container
\nposition of Component
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the component rendering is finished.
\n\nThe afterrender
event is fired after this Component has been rendered, been postprocessed by any\nafterRender
method defined for the Component.
Available since: 3.4.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires before a Component has been visually activated. Returning false
from an event listener can prevent\nthe activate from occurring.
The options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires before a Component has been visually deactivated. Returning false
from an event listener can\nprevent the deactivate from occurring.
The options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires before the component is destroyed. Return false
from an event handler to stop the\ndestroy.
Available since: 1.1.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires before the component is hidden when calling the hide method. Return false
from an event\nhandler to stop the hide.
Available since: 1.1.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires before the component is rendered. Return false
from an event handler to stop the\nrender.
Available since: 1.1.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires before the component is shown when calling the show method. Return false
from an event\nhandler to stop the show.
Available since: 1.1.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires before the state of the object is restored. Return false from an event handler to stop the restore.
\nThe hash of state values returned from the StateProvider. If this\nevent is not vetoed, then the state object is passed to applyState. By default,\nthat simply copies property values into this object. The method maybe overriden to\nprovide custom state restoration.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires before the state of the object is saved to the configured state provider. Return false to stop the save.
\nThe hash of state values. This is determined by calling\ngetState() on the object. This method must be provided by the\ndeveloper to return whetever representation of state is required, by default, Ext.state.Stateful\nhas a null implementation.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires when this Component loses focus.
\nblur event.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires one time - after the component has been laid out for the first time at its initial size.
\nThe initial width.
\nThe initial height.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after a Component has been visually deactivated.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the component is destroyed.
\nAvailable since: 1.1.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the component is disabled.
\nAvailable since: 1.1.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the component is enabled.
\nAvailable since: 1.1.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires when this Component receives focus.
\nfocus event.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the component is hidden. Fires after the component is hidden when calling the hide\nmethod.
\nAvailable since: 1.1.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the component is moved.
\nThe new x position.
\nThe new y position.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires when a component is removed from an Ext.container.Container
\nAvailable since: 3.4.0
\nContainer which holds the component
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the component markup is rendered.
\nAvailable since: 1.1.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the component is resized. Note that this does not fire when the component is first laid out at its initial\nsize. To hook that point in the life cycle, use the boxready event.
\nThe new width that was set.
\nThe new height that was set.
\nThe previous width.
\nThe previous height.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the component is shown when calling the show method.
\nAvailable since: 1.1.0
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the state of the object is restored.
\nThe hash of state values returned from the StateProvider. This is passed\nto applyState. By default, that simply copies property values into this\nobject. The method maybe overriden to provide custom state restoration.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after the state of the object is saved to the configured state provider.
\nThe hash of state values. This is determined by calling\ngetState() on the object. This method must be provided by the\ndeveloper to return whetever representation of state is required, by default, Ext.state.Stateful\nhas a null implementation.
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nFires after each update interval
\nThe current progress value
\nThe current progress text
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\nTrue to include the \"default\" ProgressBar UI
\nDefaults to: $include-default-uis
The background-color of the ProgressBar
\nDefaults to: $base-color
The background-color of the ProgressBar's moving element
\nDefaults to: $base-color
The background-gradient of the ProgressBar's moving element. Can be either the name of\na predefined gradient or a list of color stops. Used as the $type
parameter for\nGlobal_CSS.background-gradient.
Defaults to: null
The border-color of the ProgressBar
\nDefaults to: $base-color
The border-radius of the ProgressBar
\nDefaults to: 0
The border-width of the ProgressBar
\nDefaults to: 1px
The height of the ProgressBar
\nDefaults to: 20px
The color of the ProgressBar's text when the ProgressBar's 'moving element is not under it
\nDefaults to: #000
The color of the ProgressBar's text when in front of the ProgressBar's moving element
\nDefaults to: #fff
The font-size of the ProgressBar's text
\nDefaults to: $font-size
The font-weight of the ProgressBar's text
\nDefaults to: bold
The text-align of the ProgressBar's text
\nDefaults to: center
Creates a visual theme for an Ext.ProgressBar
\nThe name of the UI being created. Can not included spaces or special punctuation\n(used in CSS class names).
\nThe border-color of the ProgressBar
\nDefaults to: $progress-border-color
The background-color of the ProgressBar
\nDefaults to: $progress-background-color
The background-color of the ProgressBar's moving element
\nDefaults to: $progress-bar-background-color
The background-gradient of the ProgressBar's moving element. Can be either the name of\na predefined gradient or a list of color stops. Used as the $type
parameter for\nGlobal_CSS.background-gradient.
Defaults to: $progress-bar-background-gradient
The color of the ProgressBar's text when in front of the ProgressBar's moving element
\nDefaults to: $progress-text-color-front
The color of the ProgressBar's text when the ProgressBar's 'moving element is not under it
\nDefaults to: $progress-text-color-back
The height of the ProgressBar
\nDefaults to: $progress-height
The border-width of the ProgressBar
\nDefaults to: $progress-border-width
The border-radius of the ProgressBar
\nDefaults to: $progress-border-radius
The text-align of the ProgressBar's text
\nDefaults to: $progress-text-text-align
The font-size of the ProgressBar's text
\nDefaults to: $progress-text-font-size
The font-weight of the ProgressBar's text
\nDefaults to: $progress-text-font-weight