<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
- <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../prettify/prettify.js"></script>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js"><span id='Ext-ComponentQuery'>/**
-</span> * @class Ext.ComponentQuery
- * @extends Object
- * @singleton
- *
- * Provides searching of Components within Ext.ComponentManager (globally) or a specific
+</span> * Provides searching of Components within Ext.ComponentManager (globally) or a specific
* Ext.container.Container on the document with a similar syntax to a CSS selector.
*
* Components can be retrieved by using their {@link Ext.Component xtype} with an optional . prefix
* Default pseudos include:
*
* - not
+ * - last
*
* Queries return an array of components.
* Here are some example queries.
method: filterFnPattern
}];
-<span id='Ext-ComponentQuery-Query'> /**
-</span> * @class Ext.ComponentQuery.Query
- * @extends Object
- * @private
- */
+ // @class Ext.ComponentQuery.Query
+ // This internal class is completely hidden in documentation.
cq.Query = Ext.extend(Object, {
constructor: function(cfg) {
cfg = cfg || {};
Ext.apply(this, cfg);
},
-<span id='Ext-ComponentQuery-Query-method-execute'> /**
-</span> * @private
- * Executes this Query upon the selected root.
- * The root provides the initial source of candidate Component matches which are progressively
- * filtered by iterating through this Query's operations cache.
- * If no root is provided, all registered Components are searched via the ComponentManager.
- * root may be a Container who's descendant Components are filtered
- * root may be a Component with an implementation of getRefItems which provides some nested Components such as the
- * docked items within a Panel.
- * root may be an array of candidate Components to filter using this Query.
- */
+ // Executes this Query upon the selected root.
+ // The root provides the initial source of candidate Component matches which are progressively
+ // filtered by iterating through this Query's operations cache.
+ // If no root is provided, all registered Components are searched via the ComponentManager.
+ // root may be a Container who's descendant Components are filtered
+ // root may be a Component with an implementation of getRefItems which provides some nested Components such as the
+ // docked items within a Panel.
+ // root may be an array of candidate Components to filter using this Query.
execute : function(root) {
var operations = this.operations,
i = 0,
}
}
return results;
+ },
+ last: function(components) {
+ return components[components.length - 1];
}
},
* If omitted, all Components within the document are included in the search.
*
* This parameter may also be an array of Components to filter according to the selector.</p>
- * @returns {[Ext.Component]} The matched Components.
+ * @returns {Ext.Component[]} The matched Components.
*
* @member Ext.ComponentQuery
*/