|
| id : String The id for this node. If one is not specified, one is generated. | Node |
| leaf : Boolean true if this node is a leaf and does not have children | Node |
| listeners : ObjectA config object containing one or more event handlers to be added to this
object during initialization. This should ... A config object containing one or more event handlers to be added to this
object during initialization. This should be a valid listeners config object as specified in the
addListener example for attaching multiple handlers at once.
@@ -113,61 +114,62 @@ Or a shorthand syntax:
:
Node Insert node(s) as the last child node of this node. Insert node(s) as the last child node of this node. | Node |
| bubble( Function fn , [Object scope ], [Array args ] )
:
- voidBubbles up the tree from this node, calling the specified function with each node. The arguments to the function
-wil... Bubbles up the tree from this node, calling the specified function with each node. The arguments to the function
-will be the args provided or the current node. If the function returns false at any point,
+ void Bubbles up the tree from this node, calling the specified function with each node. The arguments to the function
+will... Bubbles up the tree from this node, calling the specified function with each node. The arguments to the function
+will be the args provided or the current node. If the function returns false at any point,
the bubble is stopped. | Node |
| cascade( Function fn , [Object scope ], [Array args ] )
:
- voidCascades down the tree from this node, calling the specified function with each node. The arguments to the function
-... Cascades down the tree from this node, calling the specified function with each node. The arguments to the function
-will be the args provided or the current node. If the function returns false at any point,
+ void Cascades down the tree from this node, calling the specified function with each node. The arguments to the function
+w... Cascades down the tree from this node, calling the specified function with each node. The arguments to the function
+will be the args provided or the current node. If the function returns false at any point,
the cascade is stopped on that branch. | Node |
| contains( Node node )
:
BooleanReturns true if this node is an ancestor (at any point) of the passed node. Returns true if this node is an ancestor (at any point) of the passed node. | Node |
| destroy()
:
void | Node |
| eachChild( Function fn , [Object scope ], [Array args ] )
:
- voidInterates the child nodes of this node, calling the specified function with each node. The arguments to the function
... Interates the child nodes of this node, calling the specified function with each node. The arguments to the function
-will be the args provided or the current node. If the function returns false at any point,
+ void Interates the child nodes of this node, calling the specified function with each node. The arguments to the function
+... Interates the child nodes of this node, calling the specified function with each node. The arguments to the function
+will be the args provided or the current node. If the function returns false at any point,
the iteration stops. Parameters:fn : FunctionThe function to call scope : Object(optional) The scope (this reference) in which the function is executed. Defaults to the current Node in the iteration. args : Array(optional) The args to call the function with (default to passing the current Node) Returns: | Node |
| enableBubble( String/Array events )
:
- voidEnables 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.
- This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
-implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
-access the required target more quickly.
- Example: Ext.override(Ext.form.Field, {
- // Add functionality to Field's initComponent to enable the change event to bubble
- initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
- this.enableBubble('change');
- }),
-
- // We know that we want Field's events to bubble directly to the FormPanel.
- getBubbleTarget : function() {
- if (!this.formPanel) {
- this.formPanel = this.findParentByType('form');
- }
- return this.formPanel;
- }
-});
-
-var myForm = new Ext.formPanel({
- title: 'User Details',
- items: [{
- ...
- }],
- listeners: {
- change: function() {
- // Title goes red if form has been modified.
- myForm.header.setStyle('color', 'red');
- }
- }
-});
| Observable |
| findChild( String attribute , Mixed value )
- :
- NodeFinds the first child that has the attribute with the specified value. Finds the first child that has the attribute with the specified value. Parameters:attribute : StringThe attribute name value : MixedThe value to search for Returns: | Node |
| findChildBy( Function fn , [Object scope ] )
- :
- NodeFinds the first child by a custom function. The child matches if the function passed returns true. Finds the first child by a custom function. The child matches if the function passed returns true . | Node |
| fireEvent( String eventName , Object... args )
+ voidEnables 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.
+ This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.
+ Example: Ext.override(Ext.form.Field, {
+ // Add functionality to Field's initComponent to enable the change event to bubble
+ initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+ this.enableBubble('change');
+ }),
+
+ // We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget : function() {
+ if (!this.formPanel) {
+ this.formPanel = this.findParentByType('form');
+ }
+ return this.formPanel;
+ }
+});
+
+var myForm = new Ext.formPanel({
+ title: 'User Details',
+ items: [{
+ ...
+ }],
+ listeners: {
+ change: function() {
+ // Title goes red if form has been modified.
+ myForm.header.setStyle('color', 'red');
+ }
+ }
+});
| Observable |
| findChild( String attribute , Mixed value , [Boolean deep ] )
+ :
+ NodeFinds the first child that has the attribute with the specified value. Finds the first child that has the attribute with the specified value. | Node |
| findChildBy( Function fn , [Object scope ], [Boolean deep ] )
+ :
+ NodeFinds the first child by a custom function. The child matches if the function passed returns true. Finds the first child by a custom function. The child matches if the function passed returns true . Parameters:fn : FunctionA function which must return true if the passed Node is the required Node. scope : Object(optional) The scope (this reference) in which the function is executed. Defaults to the Node being tested. deep : Boolean(Optional) True to search through nodes deeper than the immediate children Returns: | Node |
| fireEvent( String eventName , Object... args )
:
BooleanFires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse... | Node |
| isExpandable()
:
- BooleanReturns true if this node has one or more child nodes, or if the expandable
-node attribute is explicitly specified a... Returns true if this node has one or more child nodes, or if the expandable
+ Boolean Returns true if this node has one or more child nodes, or if the expandable
+node attribute is explicitly specified as... Returns true if this node has one or more child nodes, or if the expandable
node attribute is explicitly specified as true (see attributes), otherwise returns false. | Node |
| isFirst()
:
BooleanReturns true if this node is the first child of its parent Returns true if this node is the first child of its parent | Node |
| isLast()
|