Ext.dom.CompositeElement

Alternate names

Ext.CompositeElement

Hierarchy

Ext.Base
Ext.dom.CompositeElementLite
Ext.dom.CompositeElement

Inherited mixins

Files

This class encapsulates a collection of DOM elements, providing methods to filter members, or to perform collective actions upon the whole set.

Although they are not listed, this class supports all of the methods of Ext.dom.Element. The methods from these classes will be performed on all the elements in this collection.

All methods return this and can be chained.

Usage:

 var els = Ext.select("#some-el div.some-class", true);
 // or select directly from an existing element
 var el = Ext.get('some-el');
 el.select('div.some-class', true);

 els.setWidth(100); // all elements become 100 width
 els.hide(true); // all elements fade out and hide
 // or
 els.setWidth(100).hide(true);

Properties

Defined By

Instance properties

The Array of DOM elements which this CompositeElement encapsulates. ...

The Array of DOM elements which this CompositeElement encapsulates.

This will not usually be accessed in developers' code, but developers wishing to augment the capabilities of the CompositeElementLite class may use it when adding methods to the class.

For example to add the nextAll method to the class to add all following siblings of selected elements, the code would be

Ext.override(Ext.dom.CompositeElementLite, {
    nextAll: function() {
        var elements = this.elements, i, l = elements.length, n, r = [], ri = -1;

        // Loop through all elements in this Composite, accumulating
        // an Array of all siblings.
        for (i = 0; i < l; i++) {
            for (n = elements[i].nextSibling; n; n = n.nextSibling) {
                r[++ri] = n;
            }
        }

        // Add all found siblings to this Composite
        return this.add(r);
    }
});

Defaults to: []

...

Defaults to: /\.|[^\w\-]/g

...

Defaults to: true

...

Defaults to: /^(?:delegate|single|delay|buffer|args|prepend)$/

...

Defaults to: {id: 'observable', hooks: {destroy: 'destroy'}}

Overrides: Ext.mixin.Sortable.mixinConfig

...

Defaults to: 'identifiable'

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

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

Ext.define('My.Cat', {
    statics: {
        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'
    },

    constructor: function() {
        alert(this.self.speciesName); // dependent on 'this'
    },

    clone: function() {
        return new this.self();
    }
});


Ext.define('My.SnowLeopard', {
    extend: 'My.Cat',
    statics: {
        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'
    }
});

var cat = new My.Cat();                     // alerts 'Cat'
var snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'

var clone = snowLeopard.clone();
alert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'
This shared object is keyed by style name (e.g., 'margin-left' or 'marginLeft'). ...

This shared object is keyed by style name (e.g., 'margin-left' or 'marginLeft'). The values are objects with the following properties:

  • name (String) : The actual name to be presented to the DOM. This is typically the value returned by normalize.
  • get (Function) : A hook function that will perform the get on this style. These functions receive "(dom, el)" arguments. The dom parameter is the DOM Element from which to get the style. The el argument (may be null) is the Ext.Element.
  • set (Function) : A hook function that will perform the set on this style. These functions receive "(dom, value, el)" arguments. The dom parameter is the DOM Element from which to get this style. The value parameter is the new value for the style. The el argument (may be null) is the Ext.Element.

The this pointer is the object that contains get or set, which means that this.name can be accessed if needed. The hook functions are both optional.

Defaults to: {}

...

Defaults to: /^([\w\-]+)$/

Defined By

Static properties

...

Defaults to: []

Methods

Defined By

Instance methods

Adds elements to this Composite object. ...

Adds elements to this Composite object.

Parameters

  • els : HTMLElement[]/Ext.dom.CompositeElementLite

    Either an Array of DOM elements to add, or another Composite object who's elements should be added.

  • root : HTMLElement/String (optional)

    The root element of the query or id of the root.

Returns

Fires

    ( eventName, fn, [scope], [options] )
    Appends an after-event handler. ...

    Appends an after-event handler.

    Same as addListener with order set to 'after'.

    Parameters

    • eventName : String/String[]/Object

      The name of the event to listen for.

    • fn : Function/String

      The method the event invokes.

    • scope : Object (optional)

      The scope for fn.

    • options : Object (optional)

      An object containing handler configuration.

    Fires

      ( eventName, fn, [scope], [options] )
      Appends a before-event handler. ...

      Appends a before-event handler. Returning false from the handler will stop the event.

      Same as addListener with order set to 'before'.

      Parameters

      • eventName : String/String[]/Object

        The name of the event to listen for.

      • fn : Function/String

        The method the event invokes.

      • scope : Object (optional)

        The scope for fn.

      • options : Object (optional)

        An object containing handler configuration.

      Fires

        ( names, [prefix], [suffix] ) : Ext.dom.Elementchainable
        Adds the given CSS class(es) to this Element. ...

        Adds the given CSS class(es) to this Element.

        Parameters

        • names : String

          The CSS class(es) to add to this element.

        • prefix : String (optional)

          Prefix to prepend to each class.

        • suffix : String (optional)

          Suffix to append to each class.

        Returns

        Fires

          ( selector, name, fn, scope, options, order )private
          ...

          Parameters

          Fires

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

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

            This method has been deprecated since 2.0

            It's no longer needed to add events before firing.

            Parameters

            • eventNames : Object/String...

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

            fixes scope with flyweight. ...

            fixes scope with flyweight.

            Parameters

            Returns

            Fires

              Overrides: Ext.mixin.Observable.addListener

              ( object, eventName, [fn], [scope], [options] )deprecated
              Adds listeners to any Observable object (or Element) which are automatically removed when this Component is destroyed. ...

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

              This method has been deprecated since 2.0

              All listeners are now automatically managed where necessary. Simply use addListener.

              Parameters

              • object : Ext.mixin.Observable/HTMLElement

                The item to which to add a listener/listeners.

              • eventName : Object/String

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

              • fn : Function (optional)

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

              • scope : Object (optional)

                If the eventName parameter was an event name, this is the scope in which the handler function is executed.

              • options : Object (optional)

                If the eventName parameter was an event name, this is the addListener options.

              Appends the passed element(s) to this element. ...

              Appends the passed element(s) to this element.

              Parameters

              Returns

              Appends this element to the passed element. ...

              Appends this element to the passed element.

              Parameters

              • el : String/HTMLElement/Ext.dom.Element

                The new parent element. The id of the node, a DOM Node or an existing Element.

              Returns

              ...

              Parameters

              Fires

                ...

                Parameters

                Fires

                  More flexible version of setStyle for setting style properties. ...

                  More flexible version of setStyle for setting style properties.

                  Parameters

                  • styles : String/Object/Function

                    A style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or a function which returns such a specification.

                  Returns

                  Fires

                    ...

                    Parameters

                    Returns

                    Call the original method that was previously overridden with override, This method is deprecated as callParent does ...

                    Call the original method that was previously overridden with override,

                    This method is deprecated as callParent does the same thing.

                    Ext.define('My.Cat', {
                        constructor: function() {
                            alert("I'm a cat!");
                        }
                    });
                    
                    My.Cat.override({
                        constructor: function() {
                            alert("I'm going to be a cat!");
                    
                            var instance = this.callOverridden();
                    
                            alert("Meeeeoooowwww");
                    
                            return instance;
                        }
                    });
                    
                    var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
                                              // alerts "I'm a cat!"
                                              // alerts "Meeeeoooowwww"
                    

                    Parameters

                    • args : Array/Arguments

                      The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)

                    Returns

                    • Object

                      Returns the result of calling the overridden method

                    Call the "parent" method of the current method. ...

                    Call the "parent" method of the current method. That is the method previously overridden by derivation or by an override (see Ext.define).

                     Ext.define('My.Base', {
                         constructor: function (x) {
                             this.x = x;
                         },
                    
                         statics: {
                             method: function (x) {
                                 return x;
                             }
                         }
                     });
                    
                     Ext.define('My.Derived', {
                         extend: 'My.Base',
                    
                         constructor: function () {
                             this.callParent([21]);
                         }
                     });
                    
                     var obj = new My.Derived();
                    
                     alert(obj.x);  // alerts 21
                    

                    This can be used with an override as follows:

                     Ext.define('My.DerivedOverride', {
                         override: 'My.Derived',
                    
                         constructor: function (x) {
                             this.callParent([x*2]); // calls original My.Derived constructor
                         }
                     });
                    
                     var obj = new My.Derived();
                    
                     alert(obj.x);  // now alerts 42
                    

                    This also works with static methods.

                     Ext.define('My.Derived2', {
                         extend: 'My.Base',
                    
                         statics: {
                             method: function (x) {
                                 return this.callParent([x*2]); // calls My.Base.method
                             }
                         }
                     });
                    
                     alert(My.Base.method(10));     // alerts 10
                     alert(My.Derived2.method(10)); // alerts 20
                    

                    Lastly, it also works with overridden static methods.

                     Ext.define('My.Derived2Override', {
                         override: 'My.Derived2',
                    
                         statics: {
                             method: function (x) {
                                 return this.callParent([x*2]); // calls My.Derived2.method
                             }
                         }
                     });
                    
                     alert(My.Derived2.method(10)); // now alerts 40
                    

                    To override a method and replace it and also call the superclass method, use callSuper. This is often done to patch a method to fix a bug.

                    Parameters

                    • args : Array/Arguments

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

                    Returns

                    • Object

                      Returns the result of calling the parent method

                    This method is used by an override to call the superclass method but bypass any overridden method. ...

                    This method is used by an override to call the superclass method but bypass any overridden method. This is often done to "patch" a method that contains a bug but for whatever reason cannot be fixed directly.

                    Consider:

                     Ext.define('Ext.some.Class', {
                         method: function () {
                             console.log('Good');
                         }
                     });
                    
                     Ext.define('Ext.some.DerivedClass', {
                         method: function () {
                             console.log('Bad');
                    
                             // ... logic but with a bug ...
                    
                             this.callParent();
                         }
                     });
                    

                    To patch the bug in DerivedClass.method, the typical solution is to create an override:

                     Ext.define('App.paches.DerivedClass', {
                         override: 'Ext.some.DerivedClass',
                    
                         method: function () {
                             console.log('Fixed');
                    
                             // ... logic but with bug fixed ...
                    
                             this.callSuper();
                         }
                     });
                    

                    The patch method cannot use callParent to call the superclass method since that would call the overridden method containing the bug. In other words, the above patch would only produce "Fixed" then "Good" in the console log, whereas, using callParent would produce "Fixed" then "Bad" then "Good".

                    Parameters

                    • args : Array/Arguments

                      The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)

                    Returns

                    • Object

                      Returns the result of calling the superclass method

                    ( actionFn, eventName, fn, scope, options, order ) : Ext.mixin.Observablechainableprivate
                    ...

                    Parameters

                    Returns

                    ( selector, [returnDom] ) : HTMLElement/Ext.dom.Element
                    Selects a single direct child based on the passed CSS selector (the selector should not contain an id). ...

                    Selects a single direct child based on the passed CSS selector (the selector should not contain an id).

                    Parameters

                    Returns

                    Removes all elements. ...

                    Removes all elements.

                    Removes all listeners for this object. ...

                    Removes all listeners for this object.

                    Fires

                      ...

                      Parameters

                      Fires

                        Returns true if this composite contains the passed element ...

                        Returns true if this composite contains the passed element

                        Parameters

                        Returns

                        Fires

                          Overrides: Ext.dom.Element.contains

                          ( config, [insertBefore], [returnDom] ) : Ext.dom.Element
                          Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child e...

                          Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element.

                          Parameters

                          • config : Object

                            DomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be automatically generated with the specified attributes.

                          • insertBefore : HTMLElement (optional)

                            a child element of this element.

                          • returnDom : Boolean (optional)

                            true to return the dom node instead of creating an Element.

                          Returns

                          ...

                          Parameters

                          Fires

                            Creates an event handling function which re-fires the event from this object as the passed event name. ...

                            Creates an event handling function which re-fires the event from this object as the passed event name.

                            Parameters

                            Returns

                            Fires

                              Translates an element using CSS 3 in 2D. ...

                              Translates an element using CSS 3 in 2D.

                              This method has been removed since 2.0.0

                              Removes this element's DOM reference. ...

                              Removes this element's DOM reference. Note that event and cache removal is handled at Ext.removeNode

                              Overrides: Ext.mixin.Observable.destroy, Ext.Base.destroy

                              ( name, fn, scope, options, order ) : Booleanprivate
                              ...

                              Parameters

                              Returns

                              Fires

                                ( eventName, args, action, connectedController )private
                                ...

                                Parameters

                                Fires

                                  ( name, fn, scope, options, order )private
                                  ...

                                  Parameters

                                  Fires

                                    ( selector, [returnDom] ) : HTMLElement/Ext.dom.Element
                                    Selects a single child at any depth below this element based on the passed CSS selector (the selector should not cont...

                                    Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).

                                    Parameters

                                    Returns

                                    Calls the passed function for each element in this composite. ...

                                    Calls the passed function for each element in this composite.

                                    Parameters

                                    • fn : Function

                                      The function to call.

                                      Parameters

                                    • scope : Object (optional)

                                      The scope (this reference) in which the function is executed. Defaults to the Element.

                                    Returns

                                    Fires

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

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

                                      Parameters

                                      • events : String/String[]

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

                                      Fires

                                        Clears this Composite and adds the elements passed. ...

                                        Clears this Composite and adds the elements passed.

                                        Parameters

                                        Returns

                                        Fires

                                          Filters this composite to only elements that match the passed selector. ...

                                          Filters this composite to only elements that match the passed selector.

                                          Parameters

                                          • selector : String/Function

                                            A string CSS selector or a comparison function. The comparison function will be called with the following arguments:

                                          Returns

                                          Fires

                                            ( simpleSelector, [maxDepth], [returnEl] ) : HTMLElement/null
                                            Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. ...

                                            Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. 'div.some-class' or 'span:first-child')

                                            Parameters

                                            • simpleSelector : String

                                              The simple selector to test.

                                            • maxDepth : Number/String/HTMLElement/Ext.Element (optional)

                                              The max depth to search as a number or element (defaults to 50 || document.body)

                                            • returnEl : Boolean (optional)

                                              true to return a Ext.Element object instead of DOM node.

                                            Returns

                                            • HTMLElement/null

                                              The matching DOM node (or null if no match was found).

                                            ( simpleSelector, [maxDepth], [returnEl] ) : HTMLElement/null
                                            Looks at parent nodes for a match of the passed simple selector (e.g. ...

                                            Looks at parent nodes for a match of the passed simple selector (e.g. 'div.some-class' or 'span:first-child').

                                            Parameters

                                            • simpleSelector : String

                                              The simple selector to test.

                                            • maxDepth : Number/String/HTMLElement/Ext.Element (optional)

                                              The max depth to search as a number or element (defaults to 10 || document.body).

                                            • returnEl : Boolean (optional)

                                              true to return a Ext.Element object instead of DOM node.

                                            Returns

                                            • HTMLElement/null

                                              The matching DOM node (or null if no match was found).

                                            ( eventName, args, fn, scope ) : Object
                                            Fires the specified event with the passed parameters and execute a function (action) at the end if there are no liste...

                                            Fires the specified event with the passed parameters and execute a function (action) at the end if there are no listeners that return false.

                                            Parameters

                                            • eventName : String

                                              The name of the event to fire.

                                            • args : Array

                                              Arguments to pass to handers.

                                            • fn : Function

                                              Action.

                                            • scope : Object

                                              Scope of fn.

                                            Returns

                                            Fires

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

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

                                              The first argument is the name of the event. Every other argument passed will be available when you listen for the event.

                                              Example

                                              Firstly, we set up a listener for our new event.

                                              this.on('myevent', function(arg1, arg2, arg3, arg4, options, e) {
                                                  console.log(arg1); // true
                                                  console.log(arg2); // 2
                                                  console.log(arg3); // { test: 'foo' }
                                                  console.log(arg4); // 14
                                                  console.log(options); // the options added when adding the listener
                                                  console.log(e); // the event object with information about the event
                                              });
                                              

                                              And then we can fire off the event.

                                              this.fireEvent('myevent', true, 2, { test: 'foo' }, 14);
                                              

                                              An event may be set to bubble up an Observable parent hierarchy by calling enableBubble.

                                              Parameters

                                              • eventName : String

                                                The name of the event to fire.

                                              • args : Object...

                                                Variable number of parameters are passed to handlers.

                                              Returns

                                              • Boolean

                                                Returns false if any of the handlers return false.

                                              Fires

                                                Returns the first Element ...

                                                Returns the first Element

                                                Returns

                                                Fires

                                                  Overrides: Ext.dom.Element.first

                                                  ( element, [position], [offsets] ) : Array
                                                  Gets the x,y coordinates to align this element with another element. ...

                                                  Gets the x,y coordinates to align this element with another element.

                                                  Parameters

                                                  • element : Mixed

                                                    The element to align to.

                                                  • position : String (optional)

                                                    The position to align to.

                                                    Defaults to: tl-bl

                                                  • offsets : Array (optional)

                                                    Offset the positioning by [x, y].

                                                  Returns

                                                  Fires

                                                    ( [anchor], [local], [size] ) : Arraydeprecated
                                                    Gets the x,y coordinates specified by the anchor position on the element. ...

                                                    Gets the x,y coordinates specified by the anchor position on the element.

                                                    This method has been deprecated since 2.0.0

                                                    This method is no longer available for Ext.Element. Please see Ext.Component.showBy to do anchoring at Component level instead.

                                                    Parameters

                                                    • anchor : String (optional)

                                                      The specified anchor position.

                                                      Defaults to: c

                                                    • local : Boolean (optional)

                                                      true to get the local (element top/left-relative) anchor position instead of page coordinates.

                                                    • size : Object (optional)

                                                      An object containing the size to use for calculating anchor position. {width: (target width), height: (target height)} (defaults to the element's current size)

                                                    Returns

                                                    • Array

                                                      [x, y] An array containing the element's x and y coordinates.

                                                    Fires

                                                      Returns the value of an attribute from the element's underlying DOM node. ...

                                                      Returns the value of an attribute from the element's underlying DOM node.

                                                      Parameters

                                                      • name : String

                                                        The attribute name.

                                                      • namespace : String (optional)

                                                        The namespace in which to look for the attribute.

                                                      Returns

                                                      Gets the width of the border(s) for the specified side(s) ...

                                                      Gets the width of the border(s) for the specified side(s)

                                                      Parameters

                                                      • side : String

                                                        Can be t, l, r, b or any combination of those to add multiple values. For example, passing 'lr' would get the border left width + the border right width.

                                                      Returns

                                                      • Number

                                                        The width of the sides passed added together

                                                      Fires

                                                        Gets the bottom Y coordinate of the element (element Y position + element height). ...

                                                        Gets the bottom Y coordinate of the element (element Y position + element height).

                                                        Returns

                                                        Fires

                                                          ( [contentBox], [local] ) : Object
                                                          Return an object defining the area of this Element which can be passed to setBox to set another Element's size/locati...

                                                          Return an object defining the area of this Element which can be passed to setBox to set another Element's size/location to match this element.

                                                          The returned object may also be addressed as an Array where index 0 contains the X position and index 1 contains the Y position. So the result may also be used for setXY.

                                                          Parameters

                                                          • contentBox : Boolean (optional)

                                                            If true a box for the content of the element is returned.

                                                          • local : Boolean (optional)

                                                            If true the element's left and top are returned instead of page x/y.

                                                          Returns

                                                          • Object

                                                            An object in the format

                                                            • x : Number

                                                              The element's X position.

                                                            • y : Number

                                                              The element's Y position.

                                                            • width : Number

                                                              The element's width.

                                                            • height : Number

                                                              The element's height.

                                                            • bottom : Number

                                                              The element's lower bound.

                                                            • right : Number

                                                              The element's rightmost bound.

                                                          Fires

                                                            Returns the value of bubbleEvents. ...

                                                            Returns the value of bubbleEvents.

                                                            Returns

                                                            ...

                                                            Parameters

                                                            Returns the number of elements in this Composite. ...

                                                            Returns the number of elements in this Composite.

                                                            Returns

                                                            Ext.dom.CompositeElement
                                                            view source
                                                            ( el )private
                                                            ...
                                                            Returns the innerHTML of an element. ...

                                                            Returns the innerHTML of an element.

                                                            This method has been deprecated since 2.0.0

                                                            Please use getHtml instead.

                                                            Returns

                                                            Returns the offset height of the element. ...

                                                            Returns the offset height of the element.

                                                            Parameters

                                                            • contentHeight : Boolean (optional)

                                                              true to get the height minus borders and padding.

                                                            Returns

                                                            Fires

                                                              Returns the innerHTML of an element. ...

                                                              Returns the innerHTML of an element.

                                                              Returns

                                                              Retrieves the id of this component. ...

                                                              Retrieves the id of this component. Will autogenerate an id if one has not already been set.

                                                              Returns

                                                              Fires

                                                                Returns the initial configuration passed to constructor. ...

                                                                Returns the initial configuration passed to constructor.

                                                                Parameters

                                                                • name : String (optional)

                                                                  When supplied, value for particular configuration option is returned, otherwise the full config object is returned.

                                                                Returns

                                                                Gets the left X coordinate. ...

                                                                Gets the left X coordinate.

                                                                Returns

                                                                Fires

                                                                  Returns the value of listeners. ...

                                                                  Returns the value of listeners.

                                                                  Returns

                                                                  ...

                                                                  Parameters

                                                                  Returns an object with properties top, left, right and bottom representing the margins of this element unless sides i...

                                                                  Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed, then it returns the calculated width of the sides (see getPadding).

                                                                  Parameters

                                                                  • sides : String (optional)

                                                                    Any combination of 'l', 'r', 't', 'b' to get the sum of those sides.

                                                                  Returns

                                                                  Fires

                                                                    Returns the offsets of this element from the passed element. ...

                                                                    Returns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have display:none to have page coordinates.

                                                                    Parameters

                                                                    • element : Mixed

                                                                      The element to get the offsets from.

                                                                    Returns

                                                                    • Array

                                                                      The XY page offsets (e.g. [100, -200])

                                                                    Fires

                                                                      Retrieves the height of the element account for the top and bottom margins. ...

                                                                      Retrieves the height of the element account for the top and bottom margins.

                                                                      This method has been removed since 2.0.0

                                                                      Retrieves the width of the element accounting for the left and right margins. ...

                                                                      Retrieves the width of the element accounting for the left and right margins.

                                                                      This method has been removed since 2.0.0

                                                                      Gets the width of the padding(s) for the specified side(s). ...

                                                                      Gets the width of the padding(s) for the specified side(s).

                                                                      Parameters

                                                                      • side : String

                                                                        Can be t, l, r, b or any combination of those to add multiple values. For example, passing 'lr' would get the padding left + the padding right.

                                                                      Returns

                                                                      • Number

                                                                        The padding of the sides passed added together.

                                                                      Fires

                                                                        Return an object defining the area of this Element which can be passed to setBox to set another Element's size/locati...

                                                                        Return an object defining the area of this Element which can be passed to setBox to set another Element's size/location to match this element.

                                                                        Parameters

                                                                        Returns

                                                                        • Object

                                                                          box An object in the format:

                                                                          {
                                                                              x: <Element's X position>,
                                                                              y: <Element's Y position>,
                                                                              width: <Element's width>,
                                                                              height: <Element's height>,
                                                                              bottom: <Element's lower bound>,
                                                                              right: <Element's rightmost bound>
                                                                          }
                                                                          

                                                                          The returned object may also be addressed as an Array where index 0 contains the X position and index 1 contains the Y position. So the result may also be used for setXY.

                                                                        Fires

                                                                          Gets the right X coordinate of the element (element X position + element width). ...

                                                                          Gets the right X coordinate of the element (element X position + element width).

                                                                          Returns

                                                                          Fires

                                                                            Gets the Scroller instance of the first parent that has one. ...

                                                                            Gets the Scroller instance of the first parent that has one.

                                                                            This method has been removed since 2.0.0

                                                                            Returns the size of the element. ...

                                                                            Returns the size of the element.

                                                                            Parameters

                                                                            • contentSize : Boolean (optional)

                                                                              true to get the width/size minus borders and padding.

                                                                            Returns

                                                                            Fires

                                                                              Normalizes currentStyle and computedStyle. ...

                                                                              Normalizes currentStyle and computedStyle.

                                                                              Parameters

                                                                              • prop : String

                                                                                The style property whose value is returned.

                                                                              Returns

                                                                              • String

                                                                                The current value of the style property for this element.

                                                                              Gets the top Y coordinate. ...

                                                                              Gets the top Y coordinate.

                                                                              Returns

                                                                              Fires

                                                                                Returns the value of the value attribute. ...

                                                                                Returns the value of the value attribute.

                                                                                Parameters

                                                                                • asNumber : Boolean

                                                                                  true to parse the value as a number.

                                                                                Returns

                                                                                Returns the dimensions of the element available to lay content out in. ...

                                                                                Returns the dimensions of the element available to lay content out in.

                                                                                If the element (or any ancestor element) has CSS style display: none, the dimensions will be zero.

                                                                                Example:

                                                                                var vpSize = Ext.getBody().getViewSize();
                                                                                
                                                                                // all Windows created afterwards will have a default value of 90% height and 95% width
                                                                                Ext.Window.override({
                                                                                    width: vpSize.width * 0.9,
                                                                                    height: vpSize.height * 0.95
                                                                                });
                                                                                // To handle window resizing you would have to hook onto onWindowResize.
                                                                                

                                                                                This method has been deprecated since 2.0.0

                                                                                Returns

                                                                                Returns the offset width of the element. ...

                                                                                Returns the offset width of the element.

                                                                                Parameters

                                                                                • contentWidth : Boolean (optional)

                                                                                  true to get the width minus borders and padding.

                                                                                Returns

                                                                                Fires

                                                                                  Gets the current X position of the element based on page coordinates. ...

                                                                                  Gets the current X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).

                                                                                  Returns

                                                                                  • Number

                                                                                    The X position of the element

                                                                                  Fires

                                                                                    Gets the current position of the element based on page coordinates. ...

                                                                                    Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).

                                                                                    Returns

                                                                                    • Array

                                                                                      The XY position of the element

                                                                                    Gets the current Y position of the element based on page coordinates. ...

                                                                                    Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).

                                                                                    Returns

                                                                                    • Number

                                                                                      The Y position of the element

                                                                                    Fires

                                                                                      Checks if the specified CSS class exists on this element's DOM node. ...

                                                                                      Checks if the specified CSS class exists on this element's DOM node.

                                                                                      Parameters

                                                                                      • name : String

                                                                                        The CSS class to check for.

                                                                                      Returns

                                                                                      • Boolean

                                                                                        true if the class exists, else false.

                                                                                      Fires

                                                                                        ...

                                                                                        Parameters

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

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

                                                                                        Parameters

                                                                                        • eventName : String

                                                                                          The name of the event to check for

                                                                                        Returns

                                                                                        • Boolean

                                                                                          True if the event is being listened for, else false

                                                                                        Fires

                                                                                          Hides this element. ...

                                                                                          Hides this element. Uses display mode to determine whether to use "display" or "visibility". See setVisible.

                                                                                          Find the index of the passed element within the composite collection. ...

                                                                                          Find the index of the passed element within the composite collection.

                                                                                          Parameters

                                                                                          Returns

                                                                                          Fires

                                                                                            ( instanceConfig ) : Objectchainableprotected
                                                                                            Initialize configuration for this class. ...

                                                                                            Initialize configuration for this class. a typical example:

                                                                                            Ext.define('My.awesome.Class', {
                                                                                                // The default config
                                                                                                config: {
                                                                                                    name: 'Awesome',
                                                                                                    isAwesome: true
                                                                                                },
                                                                                            
                                                                                                constructor: function(config) {
                                                                                                    this.initConfig(config);
                                                                                                }
                                                                                            });
                                                                                            
                                                                                            var awesome = new My.awesome.Class({
                                                                                                name: 'Super Awesome'
                                                                                            });
                                                                                            
                                                                                            alert(awesome.getName()); // 'Super Awesome'
                                                                                            

                                                                                            Parameters

                                                                                            Returns

                                                                                            • Object

                                                                                              mixins The mixin prototypes as key - value pairs

                                                                                            Fires

                                                                                              Inserts this element after the passed element in the DOM. ...

                                                                                              Inserts this element after the passed element in the DOM.

                                                                                              Parameters

                                                                                              • el : String/HTMLElement/Ext.dom.Element

                                                                                                The element to insert after. The id of the node, a DOM Node or an existing Element.

                                                                                              Returns

                                                                                              Inserts this element before the passed element in the DOM. ...

                                                                                              Inserts this element before the passed element in the DOM.

                                                                                              Parameters

                                                                                              • el : String/HTMLElement/Ext.dom.Element

                                                                                                The element before which this element will be inserted. The id of the node, a DOM Node or an existing Element.

                                                                                              Returns

                                                                                              Inserts an element as the first child of this element. ...

                                                                                              Inserts an element as the first child of this element.

                                                                                              Parameters

                                                                                              Returns

                                                                                              ( where, html, [returnEl] ) : HTMLElement/Ext.dom.Element
                                                                                              Inserts an HTML fragment into this element. ...

                                                                                              Inserts an HTML fragment into this element.

                                                                                              Parameters

                                                                                              Returns

                                                                                              • HTMLElement/Ext.dom.Element

                                                                                                The inserted node (or nearest related if more than 1 inserted).

                                                                                              Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element ...

                                                                                              Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element

                                                                                              Parameters

                                                                                              • el : String/HTMLElement/Ext.dom.Element/Object/Array

                                                                                                The id, element to insert or a DomHelper config to create and insert or an array of any of those.

                                                                                              • where : String (optional)

                                                                                                'before' or 'after'.

                                                                                                Defaults to: before

                                                                                              • returnDom : Boolean (optional)

                                                                                                true to return the raw DOM element instead of Ext.dom.Element.

                                                                                              Returns

                                                                                              • Ext.dom.Element

                                                                                                The inserted Element. If an array is passed, the last inserted element is returned.

                                                                                              Returns true if this element matches the passed simple selector (e.g. ...

                                                                                              Returns true if this element matches the passed simple selector (e.g. 'div.some-class' or 'span:first-child').

                                                                                              Parameters

                                                                                              • selector : String

                                                                                                The simple selector to test.

                                                                                              Returns

                                                                                              • Boolean

                                                                                                true if this element matches the selector, else false.

                                                                                              Determines if this element is a descendant of the passed in Element. ...

                                                                                              Determines if this element is a descendant of the passed in Element.

                                                                                              This method has been removed since 2.0.0

                                                                                              Checks if the current value of a style is equal to a given value. ...

                                                                                              Checks if the current value of a style is equal to a given value.

                                                                                              Parameters

                                                                                              • style : String

                                                                                                property whose value is returned.

                                                                                              • value : String

                                                                                                to check against.

                                                                                              Returns

                                                                                              • Boolean

                                                                                                true for when the current value equals the given value.

                                                                                              Fires

                                                                                                Returns true if the value of the given property is visually transparent. ...

                                                                                                Returns true if the value of the given property is visually transparent. This may be due to a 'transparent' style value or an rgba value with 0 in the alpha component.

                                                                                                This method has been deprecated since 2.0.0

                                                                                                Parameters

                                                                                                • prop : String

                                                                                                  The style property whose value is to be tested.

                                                                                                Returns

                                                                                                • Boolean

                                                                                                  true if the style property is visually transparent.

                                                                                                Fires

                                                                                                  Returns a flyweight Element of the dom element object at the specified index. ...

                                                                                                  Returns a flyweight Element of the dom element object at the specified index.

                                                                                                  Parameters

                                                                                                  Returns

                                                                                                  Fires

                                                                                                    Returns the last Element ...

                                                                                                    Returns the last Element

                                                                                                    Returns

                                                                                                    Fires

                                                                                                      Overrides: Ext.dom.Element.last

                                                                                                      Puts a mask over this element to disable user interaction. ...

                                                                                                      Puts a mask over this element to disable user interaction.

                                                                                                      This method has been removed since 2.0.0

                                                                                                      ( object, eventName, [fn], [scope], [options] )deprecated
                                                                                                      Alias for addManagedListener. ...

                                                                                                      Alias for addManagedListener.

                                                                                                      This method has been deprecated since 2.0.0

                                                                                                      This is now done automatically

                                                                                                      Parameters

                                                                                                      • object : Ext.mixin.Observable/HTMLElement

                                                                                                        The item to which to add a listener/listeners.

                                                                                                      • eventName : Object/String

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

                                                                                                      • fn : Function (optional)

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

                                                                                                      • scope : Object (optional)

                                                                                                        If the eventName parameter was an event name, this is the scope in which the handler function is executed.

                                                                                                      • options : Object (optional)

                                                                                                        If the eventName parameter was an event name, this is the addListener options.

                                                                                                      ( object, eventName, [fn], [scope] )deprecated
                                                                                                      Alias for removeManagedListener. ...

                                                                                                      Alias for removeManagedListener.

                                                                                                      This method has been deprecated since 2.0.0

                                                                                                      This is now done automatically

                                                                                                      Parameters

                                                                                                      • object : Ext.mixin.Observable/HTMLElement

                                                                                                        The item to which to add a listener/listeners.

                                                                                                      • eventName : Object/String

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

                                                                                                      • fn : Function (optional)

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

                                                                                                      • scope : Object (optional)

                                                                                                        If the eventName parameter was an event name, this is the scope in which the handler function is executed.

                                                                                                      ( [selector], [returnDom] ) : Ext.dom.Element/HTMLElement/null
                                                                                                      Gets the next sibling, skipping text nodes. ...

                                                                                                      Gets the next sibling, skipping text nodes.

                                                                                                      Parameters

                                                                                                      • selector : String (optional)

                                                                                                        Find the next sibling that matches the passed simple selector.

                                                                                                      • returnDom : Boolean (optional)

                                                                                                        true to return a raw dom node instead of an Ext.dom.Element.

                                                                                                      Returns

                                                                                                      Fires

                                                                                                        ( eventName, [fn], [scope], [options], [order] )
                                                                                                        Alias for addListener. ...

                                                                                                        Alias for addListener.

                                                                                                        Parameters

                                                                                                        • eventName : String/String[]/Object

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

                                                                                                        • fn : Function/String (optional)

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

                                                                                                        • scope : Object (optional)

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

                                                                                                        • options : Object (optional)

                                                                                                          An object containing handler configuration.

                                                                                                          This object may contain any of the following properties:

                                                                                                          • scope : Object (optional)

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

                                                                                                          • delay : Number (optional)

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

                                                                                                          • single : Boolean (optional)

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

                                                                                                          • order : String (optional)

                                                                                                            The order of when the listener should be added into the listener queue.

                                                                                                            If you set an order of before and the event you are listening to is preventable, you can return false and it will stop the event.

                                                                                                            Available options are before, current and after.

                                                                                                            Defaults to: current

                                                                                                          • buffer : Number (optional)

                                                                                                            Causes the handler to be delayed by the specified number of milliseconds. If the event fires again within that time, the original handler is not invoked, but the new handler is scheduled in its place.

                                                                                                          • element : String (optional)

                                                                                                            Allows you to add a listener onto a element of this component using the elements reference.

                                                                                                            Ext.create('Ext.Component', {
                                                                                                                listeners: {
                                                                                                                    element: 'element',
                                                                                                                    tap: function() {
                                                                                                                        alert('element tap!');
                                                                                                                    }
                                                                                                                }
                                                                                                            });
                                                                                                            

                                                                                                            All components have the element reference, which is the outer most element of the component. Ext.Container also has the innerElement element which contains all children. In most cases element is adequate.

                                                                                                          • delegate : String (optional)

                                                                                                            Uses Ext.ComponentQuery to delegate events to a specified query selector within this item.

                                                                                                            // Create a container with a two children; a button and a toolbar
                                                                                                            var container = Ext.create('Ext.Container', {
                                                                                                                items: [
                                                                                                                    {
                                                                                                                        xtype: 'toolbar',
                                                                                                                        docked: 'top',
                                                                                                                        title: 'My Toolbar'
                                                                                                                    },
                                                                                                                    {
                                                                                                                       xtype: 'button',
                                                                                                                       text: 'My Button'
                                                                                                                    }
                                                                                                                ]
                                                                                                            });
                                                                                                            
                                                                                                            container.addListener({
                                                                                                                // Ext.Buttons have an xtype of 'button', so we use that are a selector for our delegate
                                                                                                                delegate: 'button',
                                                                                                            
                                                                                                                tap: function() {
                                                                                                                    alert('Button tapped!');
                                                                                                                }
                                                                                                            });
                                                                                                            
                                                                                                        • order : String (optional)

                                                                                                          The order of when the listener should be added into the listener queue. Possible values are before, current and after.

                                                                                                          Defaults to: 'current'

                                                                                                        ( eventName, fn, [scope], [options] )
                                                                                                        Alias for addAfterListener. ...

                                                                                                        Alias for addAfterListener.

                                                                                                        Parameters

                                                                                                        • eventName : String/String[]/Object

                                                                                                          The name of the event to listen for.

                                                                                                        • fn : Function/String

                                                                                                          The method the event invokes.

                                                                                                        • scope : Object (optional)

                                                                                                          The scope for fn.

                                                                                                        • options : Object (optional)

                                                                                                          An object containing handler configuration.

                                                                                                        ( eventName, fn, [scope], [options] )
                                                                                                        Alias for addBeforeListener. ...

                                                                                                        Alias for addBeforeListener.

                                                                                                        Parameters

                                                                                                        • eventName : String/String[]/Object

                                                                                                          The name of the event to listen for.

                                                                                                        • fn : Function/String

                                                                                                          The method the event invokes.

                                                                                                        • scope : Object (optional)

                                                                                                          The scope for fn.

                                                                                                        • options : Object (optional)

                                                                                                          An object containing handler configuration.

                                                                                                        ( names, callback, scope )private
                                                                                                        ...

                                                                                                        Parameters

                                                                                                        ( [selector], [returnDom] ) : Ext.dom.Element/HTMLElement/null
                                                                                                        Gets the parent node for this element, optionally chaining up trying to match a selector. ...

                                                                                                        Gets the parent node for this element, optionally chaining up trying to match a selector.

                                                                                                        Parameters

                                                                                                        • selector : String (optional)

                                                                                                          Find a parent node that matches the passed simple selector.

                                                                                                        • returnDom : Boolean (optional)

                                                                                                          true to return a raw DOM node instead of an Ext.dom.Element.

                                                                                                        Returns

                                                                                                        Fires

                                                                                                          ( [selector], [returnDom] ) : Ext.dom.Element/HTMLElement/null
                                                                                                          Gets the previous sibling, skipping text nodes. ...

                                                                                                          Gets the previous sibling, skipping text nodes.

                                                                                                          Parameters

                                                                                                          • selector : String (optional)

                                                                                                            Find the previous sibling that matches the passed simple selector.

                                                                                                          • returnDom : Boolean (optional)

                                                                                                            true to return a raw DOM node instead of an Ext.dom.Element

                                                                                                          Returns

                                                                                                          Fires

                                                                                                            Removes all listeners for this object. ...

                                                                                                            Removes all listeners for this object.

                                                                                                            This method has been deprecated since 2.0.0

                                                                                                            Please use clearListeners instead.

                                                                                                            ( selector ) : HTMLElement[]
                                                                                                            Selects child nodes based on the passed CSS selector (the selector should not contain an id). ...

                                                                                                            Selects child nodes based on the passed CSS selector (the selector should not contain an id).

                                                                                                            Parameters

                                                                                                            • selector : String

                                                                                                              The CSS selector.

                                                                                                            Returns

                                                                                                            • HTMLElement[]

                                                                                                              An array of the matched nodes.

                                                                                                            ( className ) : Ext.dom.Elementchainabledeprecated
                                                                                                            Adds one or more CSS classes to this element and removes the same class(es) from all siblings. ...

                                                                                                            Adds one or more CSS classes to this element and removes the same class(es) from all siblings.

                                                                                                            This method has been deprecated since 2.0.0

                                                                                                            Parameters

                                                                                                            • className : String/String[]

                                                                                                              The CSS class to add, or an array of classes.

                                                                                                            Returns

                                                                                                            Fires

                                                                                                              ( args, fn, scope, options, order )private
                                                                                                              ...

                                                                                                              Parameters

                                                                                                              Fires

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

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

                                                                                                                Parameters

                                                                                                                • object : Object

                                                                                                                  The Observable whose events this object is to relay.

                                                                                                                • events : String/Array/Object

                                                                                                                  Array of event names to relay.

                                                                                                                Returns

                                                                                                                Fires

                                                                                                                  Removes this element's DOM reference. ...

                                                                                                                  Removes this element's DOM reference. Note that event and cache removal is handled at Ext.removeNode

                                                                                                                  This method has been deprecated since 2.0.0

                                                                                                                  Please use destroy instead.

                                                                                                                  ( eventName, fn, [scope], [options] )
                                                                                                                  Removes a before-event handler. ...

                                                                                                                  Removes a before-event handler.

                                                                                                                  Same as removeListener with order set to 'after'.

                                                                                                                  Parameters

                                                                                                                  • eventName : String/String[]/Object

                                                                                                                    The name of the event the handler was associated with.

                                                                                                                  • fn : Function/String

                                                                                                                    The handler to remove.

                                                                                                                  • scope : Object (optional)

                                                                                                                    The scope originally specified for fn.

                                                                                                                  • options : Object (optional)

                                                                                                                    Extra options object.

                                                                                                                  Fires

                                                                                                                    Removes all listeners for this object. ...

                                                                                                                    Removes all listeners for this object.

                                                                                                                    This method has been deprecated since 2.0.0

                                                                                                                    Please use clearListeners instead.

                                                                                                                    ( eventName, fn, [scope], [options] )
                                                                                                                    Removes a before-event handler. ...

                                                                                                                    Removes a before-event handler.

                                                                                                                    Same as removeListener with order set to 'before'.

                                                                                                                    Parameters

                                                                                                                    • eventName : String/String[]/Object

                                                                                                                      The name of the event the handler was associated with.

                                                                                                                    • fn : Function/String

                                                                                                                      The handler to remove.

                                                                                                                    • scope : Object (optional)

                                                                                                                      The scope originally specified for fn.

                                                                                                                    • options : Object (optional)

                                                                                                                      Extra options object.

                                                                                                                    Fires

                                                                                                                      ( names, [prefix], [suffix] ) : Ext.dom.Elementchainable
                                                                                                                      Removes the given CSS class(es) from this Element. ...

                                                                                                                      Removes the given CSS class(es) from this Element.

                                                                                                                      Parameters

                                                                                                                      • names : String

                                                                                                                        The CSS class(es) to remove from this element.

                                                                                                                      • prefix : String (optional)

                                                                                                                        Prefix to prepend to each class to be removed.

                                                                                                                        Defaults to: ''

                                                                                                                      • suffix : String (optional)

                                                                                                                        Suffix to append to each class to be removed.

                                                                                                                        Defaults to: ''

                                                                                                                      Returns

                                                                                                                      Fires

                                                                                                                        ( selector, name, fn, scope, order )private
                                                                                                                        ...

                                                                                                                        Parameters

                                                                                                                        Fires

                                                                                                                          Removes the specified element(s). ...

                                                                                                                          Removes the specified element(s).

                                                                                                                          Parameters

                                                                                                                          • el : String/HTMLElement/Ext.Element/Number

                                                                                                                            The id of an element, the Element itself, the index of the element in this composite or an array of any of those.

                                                                                                                          • removeDom : Boolean (optional)

                                                                                                                            true to also remove the element from the document

                                                                                                                          Returns

                                                                                                                          Fires

                                                                                                                            ( eventName, fn, [scope], [options], [order] )
                                                                                                                            Removes an event handler. ...

                                                                                                                            Removes an event handler.

                                                                                                                            Parameters

                                                                                                                            • eventName : String/String[]/Object

                                                                                                                              The type of event the handler was associated with.

                                                                                                                            • fn : Function/String

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

                                                                                                                            • scope : Object (optional)

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

                                                                                                                            • options : Object (optional)

                                                                                                                              Extra options object. See addListener for details.

                                                                                                                            • order : String (optional)

                                                                                                                              The order of the listener to remove. Possible values are before, current and after.

                                                                                                                              Defaults to: 'current'

                                                                                                                            Fires

                                                                                                                              ( object, eventName, [fn], [scope] )deprecated
                                                                                                                              Adds listeners to any Observable object (or Element) which are automatically removed when this Component is destroyed. ...

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

                                                                                                                              This method has been deprecated since 2.0

                                                                                                                              All listeners are now automatically managed where necessary. Simply use removeListener.

                                                                                                                              Parameters

                                                                                                                              • object : Ext.mixin.Observable/HTMLElement

                                                                                                                                The item to which to add a listener/listeners.

                                                                                                                              • eventName : Object/String

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

                                                                                                                              • fn : Function (optional)

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

                                                                                                                              • scope : Object (optional)

                                                                                                                                If the eventName parameter was an event name, this is the scope in which the handler function is executed.

                                                                                                                              Forces the browser to repaint this element. ...

                                                                                                                              Forces the browser to repaint this element.

                                                                                                                              Returns

                                                                                                                              Fires

                                                                                                                                Replaces the passed element with this element. ...

                                                                                                                                Replaces the passed element with this element.

                                                                                                                                Parameters

                                                                                                                                • element : String/HTMLElement/Ext.dom.Element

                                                                                                                                  The element to replace. The id of the node, a DOM Node or an existing Element.

                                                                                                                                Returns

                                                                                                                                ( oldName, newName, [prefix], [suffix] ) : Ext.dom.Elementchainable
                                                                                                                                Replaces a CSS class on the element with another. ...

                                                                                                                                Replaces a CSS class on the element with another. If the old name does not exist, the new name will simply be added.

                                                                                                                                Parameters

                                                                                                                                • oldName : String

                                                                                                                                  The CSS class to replace.

                                                                                                                                • newName : String

                                                                                                                                  The replacement CSS class.

                                                                                                                                • prefix : String (optional)

                                                                                                                                  Prefix to prepend to each class to be replaced.

                                                                                                                                  Defaults to: ''

                                                                                                                                • suffix : String (optional)

                                                                                                                                  Suffix to append to each class to be replaced.

                                                                                                                                  Defaults to: ''

                                                                                                                                Returns

                                                                                                                                Fires

                                                                                                                                  Replaces the specified element with the passed element. ...

                                                                                                                                  Replaces the specified element with the passed element.

                                                                                                                                  Parameters

                                                                                                                                  • el : String/HTMLElement/Ext.Element/Number

                                                                                                                                    The id of an element, the Element itself, the index of the element in this composite to replace.

                                                                                                                                  • replacement : String/Ext.Element

                                                                                                                                    The id of an element or the Element itself.

                                                                                                                                  • domReplace : Boolean (optional)

                                                                                                                                    true to remove and replace the element in the document too.

                                                                                                                                  Returns

                                                                                                                                  Fires

                                                                                                                                    Replaces this element with the passed element. ...

                                                                                                                                    Replaces this element with the passed element.

                                                                                                                                    Parameters

                                                                                                                                    • el : String/HTMLElement/Ext.dom.Element/Object

                                                                                                                                      The new element (id of the node, a DOM Node or an existing Element) or a DomHelper config of an element to create.

                                                                                                                                    Returns

                                                                                                                                    Resumes firing events (see suspendEvents). ...

                                                                                                                                    Resumes firing events (see suspendEvents).

                                                                                                                                    Parameters

                                                                                                                                    • discardQueuedEvents : Boolean

                                                                                                                                      Pass as true to discard any queued events.

                                                                                                                                    Selects elements based on the passed CSS selector to enable Element methods to be applied to many related elements in...

                                                                                                                                    Selects elements based on the passed CSS selector to enable Element methods to be applied to many related elements in one statement through the returned. The element is the root of the search. CompositeElementLite object.

                                                                                                                                    Parameters

                                                                                                                                    • selector : String/HTMLElement[]

                                                                                                                                      The CSS selector or an array of elements

                                                                                                                                    • composite : Boolean

                                                                                                                                      Return a CompositeElement as opposed to a CompositeElementLite. Defaults to false.

                                                                                                                                    Returns

                                                                                                                                    Serializes a DOM form into a url encoded string ...

                                                                                                                                    Serializes a DOM form into a url encoded string

                                                                                                                                    This method has been deprecated since 2.0.0

                                                                                                                                    Please see Ext.form.Panel.getValues instead

                                                                                                                                    Parameters

                                                                                                                                    Returns

                                                                                                                                    ( attributes, [useSet] ) : Ext.dom.Elementchainable
                                                                                                                                    Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function). ...

                                                                                                                                    Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function).

                                                                                                                                    Parameters

                                                                                                                                    • attributes : Object

                                                                                                                                      The object with the attributes.

                                                                                                                                    • useSet : Boolean (optional)

                                                                                                                                      false to override the default setAttribute to use expandos.

                                                                                                                                      Defaults to: true

                                                                                                                                    Returns

                                                                                                                                    Fires

                                                                                                                                      Sets the element's CSS bottom style. ...

                                                                                                                                      Sets the element's CSS bottom style.

                                                                                                                                      Parameters

                                                                                                                                      • bottom : String

                                                                                                                                        The bottom CSS property value.

                                                                                                                                      Returns

                                                                                                                                      Fires

                                                                                                                                        Sets the element's box. ...

                                                                                                                                        Sets the element's box. Use getBox on another element to get a box object.

                                                                                                                                        Parameters

                                                                                                                                        • box : Object

                                                                                                                                          The box to fill, for example:

                                                                                                                                          {
                                                                                                                                              left: ...,
                                                                                                                                              top: ...,
                                                                                                                                              width: ...,
                                                                                                                                              height: ...
                                                                                                                                          }
                                                                                                                                          

                                                                                                                                        Returns

                                                                                                                                        Fires

                                                                                                                                          Sets the value of bubbleEvents. ...

                                                                                                                                          Sets the value of bubbleEvents.

                                                                                                                                          Parameters

                                                                                                                                          Sets the specified CSS class on this element's DOM node. ...

                                                                                                                                          Sets the specified CSS class on this element's DOM node.

                                                                                                                                          Parameters

                                                                                                                                          • className : String/Array

                                                                                                                                            The CSS class to set on this element.

                                                                                                                                          ( config, applyIfNotSet ) : Ext.Basechainableprivate
                                                                                                                                          ...

                                                                                                                                          Parameters

                                                                                                                                          Returns

                                                                                                                                          Sets the innerHTML of this element. ...

                                                                                                                                          Sets the innerHTML of this element.

                                                                                                                                          This method has been deprecated since 2.0.0

                                                                                                                                          Please use setHtml instead.

                                                                                                                                          Parameters

                                                                                                                                          Set the height of this Element. ...

                                                                                                                                          Set the height of this Element.

                                                                                                                                          Parameters

                                                                                                                                          Returns

                                                                                                                                          Fires

                                                                                                                                            Sets the innerHTML of this element. ...

                                                                                                                                            Sets the innerHTML of this element.

                                                                                                                                            Parameters

                                                                                                                                            ...

                                                                                                                                            Parameters

                                                                                                                                            Returns

                                                                                                                                            Overrides: Ext.mixin.Identifiable.setId

                                                                                                                                            Sets the element's left position directly using CSS style (instead of setX). ...

                                                                                                                                            Sets the element's left position directly using CSS style (instead of setX).

                                                                                                                                            Parameters

                                                                                                                                            • left : String

                                                                                                                                              The left CSS property value.

                                                                                                                                            Returns

                                                                                                                                            Fires

                                                                                                                                              Sets the value of listeners. ...

                                                                                                                                              Sets the value of listeners.

                                                                                                                                              Parameters

                                                                                                                                              Set the maximum height of this Element. ...

                                                                                                                                              Set the maximum height of this Element.

                                                                                                                                              Parameters

                                                                                                                                              Returns

                                                                                                                                              Fires

                                                                                                                                                Set the maximum width of this Element. ...

                                                                                                                                                Set the maximum width of this Element.

                                                                                                                                                Parameters

                                                                                                                                                Returns

                                                                                                                                                Fires

                                                                                                                                                  Set the minimum height of this Element. ...

                                                                                                                                                  Set the minimum height of this Element.

                                                                                                                                                  Parameters

                                                                                                                                                  Returns

                                                                                                                                                  Fires

                                                                                                                                                    Set the minimum width of this Element. ...

                                                                                                                                                    Set the minimum width of this Element.

                                                                                                                                                    Parameters

                                                                                                                                                    Returns

                                                                                                                                                    Fires

                                                                                                                                                      Sets the element's CSS right style. ...

                                                                                                                                                      Sets the element's CSS right style.

                                                                                                                                                      Parameters

                                                                                                                                                      • right : String

                                                                                                                                                        The right CSS property value.

                                                                                                                                                      Returns

                                                                                                                                                      Fires

                                                                                                                                                        Set the size of this Element. ...

                                                                                                                                                        Set the size of this Element.

                                                                                                                                                        Parameters

                                                                                                                                                        • width : Number/String

                                                                                                                                                          The new width. This may be one of:

                                                                                                                                                          • A Number specifying the new width in this Element's defaultUnits (by default, pixels).
                                                                                                                                                          • A String used to set the CSS width style. Animation may not be used.
                                                                                                                                                          • A size object in the format {width: widthValue, height: heightValue}.
                                                                                                                                                        • height : Number/String

                                                                                                                                                          The new height. This may be one of:

                                                                                                                                                          • A Number specifying the new height in this Element's defaultUnits (by default, pixels).
                                                                                                                                                          • A String used to set the CSS height style. Animation may not be used.

                                                                                                                                                        Returns

                                                                                                                                                        Fires

                                                                                                                                                          ...

                                                                                                                                                          Parameters

                                                                                                                                                          Returns

                                                                                                                                                          Fires

                                                                                                                                                            ( property, [value] ) : Ext.dom.Elementchainable
                                                                                                                                                            Wrapper for setting style properties, also takes single object parameter of multiple styles. ...

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

                                                                                                                                                            Parameters

                                                                                                                                                            • property : String/Object

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

                                                                                                                                                            • value : String (optional)

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

                                                                                                                                                            Returns

                                                                                                                                                            ...

                                                                                                                                                            Parameters

                                                                                                                                                            Sets the element's top position directly using CSS style (instead of setY). ...

                                                                                                                                                            Sets the element's top position directly using CSS style (instead of setY).

                                                                                                                                                            Parameters

                                                                                                                                                            • top : String

                                                                                                                                                              The top CSS property value.

                                                                                                                                                            Returns

                                                                                                                                                            Fires

                                                                                                                                                              Sets the element's top and left positions directly using CSS style. ...

                                                                                                                                                              Sets the element's top and left positions directly using CSS style.

                                                                                                                                                              This method has been removed since 2.0.0

                                                                                                                                                              Use this to change the visibility mode between VISIBILITY, DISPLAY or OFFSETS. ...

                                                                                                                                                              Use this to change the visibility mode between VISIBILITY, DISPLAY or OFFSETS.

                                                                                                                                                              Parameters

                                                                                                                                                              Returns

                                                                                                                                                              Sets the visibility of the element (see details). ...

                                                                                                                                                              Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.

                                                                                                                                                              Parameters

                                                                                                                                                              • visible : Boolean

                                                                                                                                                                Whether the element is visible.

                                                                                                                                                              Returns

                                                                                                                                                              Fires

                                                                                                                                                                Set the width of this Element. ...

                                                                                                                                                                Set the width of this Element.

                                                                                                                                                                Parameters

                                                                                                                                                                Returns

                                                                                                                                                                Fires

                                                                                                                                                                  Sets the X position of the element based on page coordinates. ...

                                                                                                                                                                  Sets the X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).

                                                                                                                                                                  Parameters

                                                                                                                                                                  • x : Number

                                                                                                                                                                    The X position of the element

                                                                                                                                                                  Returns

                                                                                                                                                                  Fires

                                                                                                                                                                    Sets the position of the element in page coordinates, regardless of how the element is positioned. ...

                                                                                                                                                                    Sets the position of the element in page coordinates, regardless of how the element is positioned. The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).

                                                                                                                                                                    Parameters

                                                                                                                                                                    • pos : Number[]

                                                                                                                                                                      Contains X & Y [x, y] values for new position (coordinates are page-based).

                                                                                                                                                                    Returns

                                                                                                                                                                    Fires

                                                                                                                                                                      Sets the Y position of the element based on page coordinates. ...

                                                                                                                                                                      Sets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).

                                                                                                                                                                      Parameters

                                                                                                                                                                      • y : Number

                                                                                                                                                                        The Y position of the element.

                                                                                                                                                                      Returns

                                                                                                                                                                      Fires

                                                                                                                                                                        Shows this element. ...

                                                                                                                                                                        Shows this element. Uses display mode to determine whether to use "display" or "visibility". See setVisible.

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

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

                                                                                                                                                                        Ext.define('My.Cat', {
                                                                                                                                                                            statics: {
                                                                                                                                                                                totalCreated: 0,
                                                                                                                                                                                speciesName: 'Cat' // My.Cat.speciesName = 'Cat'
                                                                                                                                                                            },
                                                                                                                                                                        
                                                                                                                                                                            constructor: function() {
                                                                                                                                                                                var statics = this.statics();
                                                                                                                                                                        
                                                                                                                                                                                alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to
                                                                                                                                                                                                                // equivalent to: My.Cat.speciesName
                                                                                                                                                                        
                                                                                                                                                                                alert(this.self.speciesName);   // dependent on 'this'
                                                                                                                                                                        
                                                                                                                                                                                statics.totalCreated++;
                                                                                                                                                                            },
                                                                                                                                                                        
                                                                                                                                                                            clone: function() {
                                                                                                                                                                                var cloned = new this.self();                    // dependent on 'this'
                                                                                                                                                                        
                                                                                                                                                                                cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName
                                                                                                                                                                        
                                                                                                                                                                                return cloned;
                                                                                                                                                                            }
                                                                                                                                                                        });
                                                                                                                                                                        
                                                                                                                                                                        
                                                                                                                                                                        Ext.define('My.SnowLeopard', {
                                                                                                                                                                            extend: 'My.Cat',
                                                                                                                                                                        
                                                                                                                                                                            statics: {
                                                                                                                                                                                speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'
                                                                                                                                                                            },
                                                                                                                                                                        
                                                                                                                                                                            constructor: function() {
                                                                                                                                                                                this.callParent();
                                                                                                                                                                            }
                                                                                                                                                                        });
                                                                                                                                                                        
                                                                                                                                                                        var cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'
                                                                                                                                                                        
                                                                                                                                                                        var snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'
                                                                                                                                                                        
                                                                                                                                                                        var clone = snowLeopard.clone();
                                                                                                                                                                        alert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'
                                                                                                                                                                        alert(clone.groupName);                 // alerts 'Cat'
                                                                                                                                                                        
                                                                                                                                                                        alert(My.Cat.totalCreated);             // alerts 3
                                                                                                                                                                        

                                                                                                                                                                        Returns

                                                                                                                                                                        Suspends the firing of all events. ...

                                                                                                                                                                        Suspends the firing of all events.

                                                                                                                                                                        All events will be queued but you can discard the queued events by passing false in the resumeEvents call

                                                                                                                                                                        ( firstClass, secondClass, flag, prefix ) : Mixedchainableprivate
                                                                                                                                                                        ...

                                                                                                                                                                        Parameters

                                                                                                                                                                        Returns

                                                                                                                                                                        • Mixed

                                                                                                                                                                        Fires

                                                                                                                                                                          Toggles the specified CSS class on this element (removes it if it already exists, otherwise adds it). ...

                                                                                                                                                                          Toggles the specified CSS class on this element (removes it if it already exists, otherwise adds it).

                                                                                                                                                                          Parameters

                                                                                                                                                                          • className : String

                                                                                                                                                                            The CSS class to toggle.

                                                                                                                                                                          Returns

                                                                                                                                                                          Fires

                                                                                                                                                                            ( toggle, eventName, fn, scope, options, order )private
                                                                                                                                                                            ...

                                                                                                                                                                            Parameters

                                                                                                                                                                            Fires

                                                                                                                                                                              Ext.dom.CompositeElement
                                                                                                                                                                              view source
                                                                                                                                                                              ( el )private
                                                                                                                                                                              Translates the passed page coordinates into left/top CSS values for this element. ...

                                                                                                                                                                              Translates the passed page coordinates into left/top CSS values for this element.

                                                                                                                                                                              Parameters

                                                                                                                                                                              • x : Number/Array

                                                                                                                                                                                The page x or an array containing [x, y].

                                                                                                                                                                              • y : Number (optional)

                                                                                                                                                                                The page y, required if x is not an array.

                                                                                                                                                                              Returns

                                                                                                                                                                              • Object

                                                                                                                                                                                An object with left and top properties. e.g. {left: (value), top: (value)}.

                                                                                                                                                                              Fires

                                                                                                                                                                                ( eventName, fn, [scope], [options], [order] )
                                                                                                                                                                                Alias for removeListener. ...

                                                                                                                                                                                Alias for removeListener.

                                                                                                                                                                                Parameters

                                                                                                                                                                                • eventName : String/String[]/Object

                                                                                                                                                                                  The type of event the handler was associated with.

                                                                                                                                                                                • fn : Function/String

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

                                                                                                                                                                                • scope : Object (optional)

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

                                                                                                                                                                                • options : Object (optional)

                                                                                                                                                                                  Extra options object. See addListener for details.

                                                                                                                                                                                • order : String (optional)

                                                                                                                                                                                  The order of the listener to remove. Possible values are before, current and after.

                                                                                                                                                                                  Defaults to: 'current'

                                                                                                                                                                                ( eventName, fn, [scope], [options] )
                                                                                                                                                                                Alias for removeAfterListener. ...

                                                                                                                                                                                Alias for removeAfterListener.

                                                                                                                                                                                Parameters

                                                                                                                                                                                • eventName : String/String[]/Object

                                                                                                                                                                                  The name of the event the handler was associated with.

                                                                                                                                                                                • fn : Function/String

                                                                                                                                                                                  The handler to remove.

                                                                                                                                                                                • scope : Object (optional)

                                                                                                                                                                                  The scope originally specified for fn.

                                                                                                                                                                                • options : Object (optional)

                                                                                                                                                                                  Extra options object.

                                                                                                                                                                                ( eventName, fn, [scope], [options] )
                                                                                                                                                                                Alias for removeBeforeListener. ...

                                                                                                                                                                                Alias for removeBeforeListener.

                                                                                                                                                                                Parameters

                                                                                                                                                                                • eventName : String/String[]/Object

                                                                                                                                                                                  The name of the event the handler was associated with.

                                                                                                                                                                                • fn : Function/String

                                                                                                                                                                                  The handler to remove.

                                                                                                                                                                                • scope : Object (optional)

                                                                                                                                                                                  The scope originally specified for fn.

                                                                                                                                                                                • options : Object (optional)

                                                                                                                                                                                  Extra options object.

                                                                                                                                                                                Removes a previously applied mask. ...

                                                                                                                                                                                Removes a previously applied mask.

                                                                                                                                                                                This method has been removed since 2.0.0

                                                                                                                                                                                ( simpleSelector, [maxDepth] ) : Ext.dom.Element/null
                                                                                                                                                                                Walks up the dom looking for a parent node that matches the passed simple selector (e.g. ...

                                                                                                                                                                                Walks up the dom looking for a parent node that matches the passed simple selector (e.g. 'div.some-class' or 'span:first-child'). This is a shortcut for findParentNode() that always returns an Ext.dom.Element.

                                                                                                                                                                                Parameters

                                                                                                                                                                                • simpleSelector : String

                                                                                                                                                                                  The simple selector to test

                                                                                                                                                                                • maxDepth : Number/String/HTMLElement/Ext.Element (optional)

                                                                                                                                                                                  The max depth to search as a number or element (defaults to 10 || document.body).

                                                                                                                                                                                Returns

                                                                                                                                                                                • Ext.dom.Element/null

                                                                                                                                                                                  The matching DOM node (or null if no match was found).

                                                                                                                                                                                Fires

                                                                                                                                                                                  Sets the innerHTML of this element. ...

                                                                                                                                                                                  Sets the innerHTML of this element.

                                                                                                                                                                                  This method has been deprecated since 2.0.0

                                                                                                                                                                                  Please use setHtml instead.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( [config], [domNode] ) : HTMLElement/Ext.dom.Element
                                                                                                                                                                                  Creates and wraps this element with another element. ...

                                                                                                                                                                                  Creates and wraps this element with another element.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  • config : Object (optional)

                                                                                                                                                                                    DomHelper element config object for the wrapper element or null for an empty div

                                                                                                                                                                                  • domNode : Boolean (optional)

                                                                                                                                                                                    true to return the raw DOM element instead of Ext.dom.Element.

                                                                                                                                                                                  Returns

                                                                                                                                                                                  Defined By

                                                                                                                                                                                  Static methods

                                                                                                                                                                                  ( config, fullMerge )privatestatic
                                                                                                                                                                                  ...

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( members )chainableprivatestatic
                                                                                                                                                                                  ...

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( name, member )chainableprivatestatic
                                                                                                                                                                                  ...

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( members )chainablestatic
                                                                                                                                                                                  Add methods / properties to the prototype of this class. ...

                                                                                                                                                                                  Add methods / properties to the prototype of this class.

                                                                                                                                                                                  Ext.define('My.awesome.Cat', {
                                                                                                                                                                                      constructor: function() {
                                                                                                                                                                                          // ...
                                                                                                                                                                                      }
                                                                                                                                                                                  });
                                                                                                                                                                                  
                                                                                                                                                                                   My.awesome.Cat.addMembers({
                                                                                                                                                                                       meow: function() {
                                                                                                                                                                                          alert('Meowww...');
                                                                                                                                                                                       }
                                                                                                                                                                                   });
                                                                                                                                                                                  
                                                                                                                                                                                   var kitty = new My.awesome.Cat();
                                                                                                                                                                                   kitty.meow();
                                                                                                                                                                                  

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( members ) : Ext.Basechainablestatic
                                                                                                                                                                                  Add / override static properties of this class. ...

                                                                                                                                                                                  Add / override static properties of this class.

                                                                                                                                                                                  Ext.define('My.cool.Class', {
                                                                                                                                                                                      // this.se
                                                                                                                                                                                  });
                                                                                                                                                                                  
                                                                                                                                                                                  My.cool.Class.addStatics({
                                                                                                                                                                                      someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'
                                                                                                                                                                                      method1: function() {  },    // My.cool.Class.method1 = function() { ... };
                                                                                                                                                                                      method2: function() {  }     // My.cool.Class.method2 = function() { ... };
                                                                                                                                                                                  });
                                                                                                                                                                                  

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  Returns

                                                                                                                                                                                  ( xtype )chainableprivatestatic
                                                                                                                                                                                  ...

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( fromClass, members ) : Ext.Basechainableprivatestatic
                                                                                                                                                                                  Borrow another class' members to the prototype of this class. ...

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

                                                                                                                                                                                  Ext.define('Bank', {
                                                                                                                                                                                      money: '$$$',
                                                                                                                                                                                      printMoney: function() {
                                                                                                                                                                                          alert('$$$$$$$');
                                                                                                                                                                                      }
                                                                                                                                                                                  });
                                                                                                                                                                                  
                                                                                                                                                                                  Ext.define('Thief', {
                                                                                                                                                                                      // ...
                                                                                                                                                                                  });
                                                                                                                                                                                  
                                                                                                                                                                                  Thief.borrow(Bank, ['money', 'printMoney']);
                                                                                                                                                                                  
                                                                                                                                                                                  var steve = new Thief();
                                                                                                                                                                                  
                                                                                                                                                                                  alert(steve.money); // alerts '$$$'
                                                                                                                                                                                  steve.printMoney(); // alerts '$$$$$$$'
                                                                                                                                                                                  

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  • fromClass : Ext.Base

                                                                                                                                                                                    The class to borrow members from

                                                                                                                                                                                  • members : Array/String

                                                                                                                                                                                    The names of the members to borrow

                                                                                                                                                                                  Returns

                                                                                                                                                                                  ( args )protectedstatic
                                                                                                                                                                                  ...

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( alias, origin )static
                                                                                                                                                                                  Create aliases for existing prototype methods. ...

                                                                                                                                                                                  Create aliases for existing prototype methods. Example:

                                                                                                                                                                                  Ext.define('My.cool.Class', {
                                                                                                                                                                                      method1: function() {  },
                                                                                                                                                                                      method2: function() {  }
                                                                                                                                                                                  });
                                                                                                                                                                                  
                                                                                                                                                                                  var test = new My.cool.Class();
                                                                                                                                                                                  
                                                                                                                                                                                  My.cool.Class.createAlias({
                                                                                                                                                                                      method3: 'method1',
                                                                                                                                                                                      method4: 'method2'
                                                                                                                                                                                  });
                                                                                                                                                                                  
                                                                                                                                                                                  test.method3(); // test.method1()
                                                                                                                                                                                  
                                                                                                                                                                                  My.cool.Class.createAlias('method5', 'method3');
                                                                                                                                                                                  
                                                                                                                                                                                  test.method5(); // test.method3() -> test.method1()
                                                                                                                                                                                  

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( parent )privatestatic
                                                                                                                                                                                  ...

                                                                                                                                                                                  Parameters

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

                                                                                                                                                                                  Get the current class' name in string format.

                                                                                                                                                                                  Ext.define('My.cool.Class', {
                                                                                                                                                                                      constructor: function() {
                                                                                                                                                                                          alert(this.self.getName()); // alerts 'My.cool.Class'
                                                                                                                                                                                      }
                                                                                                                                                                                  });
                                                                                                                                                                                  
                                                                                                                                                                                  My.cool.Class.getName(); // 'My.cool.Class'
                                                                                                                                                                                  

                                                                                                                                                                                  Returns

                                                                                                                                                                                  ...
                                                                                                                                                                                  ( name, mixinClass )privatestatic
                                                                                                                                                                                  Used internally by the mixins pre-processor ...

                                                                                                                                                                                  Used internally by the mixins pre-processor

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( fn, scope )chainableprivatestatic
                                                                                                                                                                                  ...

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( members ) : Ext.Basechainabledeprecatedstatic
                                                                                                                                                                                  Override members of this class. ...

                                                                                                                                                                                  Override members of this class. Overridden methods can be invoked via callParent.

                                                                                                                                                                                  Ext.define('My.Cat', {
                                                                                                                                                                                      constructor: function() {
                                                                                                                                                                                          alert("I'm a cat!");
                                                                                                                                                                                      }
                                                                                                                                                                                  });
                                                                                                                                                                                  
                                                                                                                                                                                  My.Cat.override({
                                                                                                                                                                                      constructor: function() {
                                                                                                                                                                                          alert("I'm going to be a cat!");
                                                                                                                                                                                  
                                                                                                                                                                                          var instance = this.callParent(arguments);
                                                                                                                                                                                  
                                                                                                                                                                                          alert("Meeeeoooowwww");
                                                                                                                                                                                  
                                                                                                                                                                                          return instance;
                                                                                                                                                                                      }
                                                                                                                                                                                  });
                                                                                                                                                                                  
                                                                                                                                                                                  var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
                                                                                                                                                                                                            // alerts "I'm a cat!"
                                                                                                                                                                                                            // alerts "Meeeeoooowwww"
                                                                                                                                                                                  

                                                                                                                                                                                  As of 2.1, direct use of this method is deprecated. Use Ext.define instead:

                                                                                                                                                                                  Ext.define('My.CatOverride', {
                                                                                                                                                                                      override: 'My.Cat',
                                                                                                                                                                                  
                                                                                                                                                                                      constructor: function() {
                                                                                                                                                                                          alert("I'm going to be a cat!");
                                                                                                                                                                                  
                                                                                                                                                                                          var instance = this.callParent(arguments);
                                                                                                                                                                                  
                                                                                                                                                                                          alert("Meeeeoooowwww");
                                                                                                                                                                                  
                                                                                                                                                                                          return instance;
                                                                                                                                                                                      }
                                                                                                                                                                                  });
                                                                                                                                                                                  

                                                                                                                                                                                  The above accomplishes the same result but can be managed by the Ext.Loader which can properly order the override and its target class and the build process can determine whether the override is needed based on the required state of the target class (My.Cat).

                                                                                                                                                                                  This method has been deprecated since 2.1.0

                                                                                                                                                                                  Please use Ext.define instead

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  • members : Object

                                                                                                                                                                                    The properties to add to this class. This should be specified as an object literal containing one or more properties.

                                                                                                                                                                                  Returns

                                                                                                                                                                                  Defined By

                                                                                                                                                                                  Events

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fires when there is a double tap. ...

                                                                                                                                                                                  Fires when there is a double tap.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fires when you touch and hold still for more than 1 second. ...

                                                                                                                                                                                  Fires when you touch and hold still for more than 1 second.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  Fires whenever this Element actually becomes visible (painted) on the screen. ...

                                                                                                                                                                                  Fires whenever this Element actually becomes visible (painted) on the screen. This is useful when you need to perform 'read' operations on the DOM element, i.e: calculating natural sizes and positioning.

                                                                                                                                                                                  Note: This event is not available to be used with event delegation. Instead painted only fires if you explicitly add at least one listener to it, for performance reasons.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fires continuously when there is pinching (the touch must move for this to be fired). ...

                                                                                                                                                                                  Fires continuously when there is pinching (the touch must move for this to be fired).

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fires when a pinch has ended. ...

                                                                                                                                                                                  Fires when a pinch has ended.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fired once when a pinch has started. ...

                                                                                                                                                                                  Fired once when a pinch has started.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  Important note: For the best performance on mobile devices, use this only when you absolutely need to monitor a Eleme...

                                                                                                                                                                                  Important note: For the best performance on mobile devices, use this only when you absolutely need to monitor a Element's size.

                                                                                                                                                                                  Note: This event is not available to be used with event delegation. Instead resize only fires if you explicitly add at least one listener to it, for performance reasons.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fires continuously when there is rotation (the touch must move for this to be fired). ...

                                                                                                                                                                                  Fires continuously when there is rotation (the touch must move for this to be fired). When listening to this, ensure you know about the Ext.event.Event.angle and Ext.event.Event.rotation properties in the event object.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fires when a rotation event has ended. ...

                                                                                                                                                                                  Fires when a rotation event has ended.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fired once when a rotation has started. ...

                                                                                                                                                                                  Fired once when a rotation has started.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fires when there is a single tap. ...

                                                                                                                                                                                  Fires when there is a single tap.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fires when there is a swipe When listening to this, ensure you know about the Ext.event.Event.direction property in t...

                                                                                                                                                                                  Fires when there is a swipe When listening to this, ensure you know about the Ext.event.Event.direction property in the event object.

                                                                                                                                                                                  Parameters

                                                                                                                                                                                  ( event, node, options, eOpts )
                                                                                                                                                                                  Fires when you touch and hold still for more than 1 second. ...

                                                                                                                                                                                  Fires when you touch and hold still for more than 1 second.

                                                                                                                                                                                  Parameters