| listeners : ObjectA config object containing one or more event handlers to be added to this
+ Represents a tree data structure and bubbles all the events for its nodes. The nodes
+in the tree have most standard DOM functionality. Config Options|
| 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.
@@ -54,13 +54,13 @@ Ext.DomObserver = Ext.extend(Object, {
typeAhead: true,
mode: 'local',
triggerAction: 'all'
-}); | Observable | | pathSeparator : String The token used to separate paths in node ids (defaults to '/'). | Tree |
Public Properties|
| root : Node The root node for this tree | Tree |
Public Methods|
| Tree( [Node root ] )
- Parameters:root : Node(optional) The root node Returns: | Tree | | addEvents( Object|String o , string Optional. )
- :
+}); | Observable | | pathSeparator : String The token used to separate paths in node ids (defaults to '/'). | Tree |
Public Properties|
| root : Node The root node for this tree | Tree |
Public Methods|
| Tree( [Node root ] )
+ Parameters:root : Node(optional) The root node Returns: | Tree | | addEvents( Object|String o , string Optional. )
+ :
voidAdds 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. | Observable | | addListener( String eventName , Function handler , [Object scope ], [Object options ] )
- :
+Usage:this.addEvents('storeloaded', 'storecleared'); Returns: | Observable | | addListener( String eventName , Function handler , [Object scope ], [Object options ] )
+ :
voidAppends an event handler to this object. Appends an event handler to this object. Parameters:eventName : StringThe name of the event to listen for. handler : FunctionThe method the event invokes. 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.
properties. This may contain any of the following properties:
@@ -110,87 +110,87 @@ Or a shorthand syntax:
'mouseover' : this.onMouseOver,
'mouseout' : this.onMouseOut,
scope: this
-}); Returns: | Observable | | enableBubble( Object 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 | | fireEvent( String eventName , Object... args )
- :
- BooleanFires the specified event with the passed parameters (minus the event name).
+}); Returns: | Observable | | 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 | | 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... | Observable | | getNodeById( String id )
- :
- NodeGets a node in this tree by its id. Gets a node in this tree by its id. | Tree | | getRootNode()
- :
- NodeReturns the root node for this tree. Returns the root node for this tree. | Tree | | hasListener( String eventName )
- :
- BooleanChecks 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 | Observable | | on( String eventName , Function handler , [Object scope ], [Object options ] )
- :
+by calling enableBubble. | Observable | | getNodeById( String id )
+ :
+ NodeGets a node in this tree by its id. Gets a node in this tree by its id. | Tree | | getRootNode()
+ :
+ NodeReturns the root node for this tree. Returns the root node for this tree. | Tree | | hasListener( String eventName )
+ :
+ BooleanChecks 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 | Observable | | on( String eventName , Function handler , [Object scope ], [Object options ] )
+ :
voidAppends an event handler to this object (shorthand for addListener.) Appends an event handler to this object (shorthand for addListener.) Parameters:eventName : StringThe type of event to listen for handler : FunctionThe method the event invokes 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. Returns: | Observable | | purgeListeners()
- :
- voidRemoves all listeners for this object Removes all listeners for this object | Observable | | relayEvents( Object o , Array events )
- :
- voidRelays 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. | Observable | | removeListener( String eventName , Function handler , [Object scope ] )
- :
- voidRemoves an event handler. Removes an event handler. | Observable | | resumeEvents()
- :
- voidResume firing events. (see suspendEvents)
-If events were suspended using the queueSuspended parameter, then all
+If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration. Returns: | Observable | | purgeListeners()
+ :
+ voidRemoves all listeners for this object Removes all listeners for this object | Observable | | relayEvents( Object o , Array events )
+ :
+ voidRelays 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. | Observable | | removeListener( String eventName , Function handler , [Object scope ] )
+ :
+ voidRemoves an event handler. Removes an event handler. | Observable | | resumeEvents()
+ :
+ voidResume firing events. (see suspendEvents)
+If events were suspended using the queueSuspended parameter, then all
event... Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
-events fired during event suspension will be sent to any listeners now. | Observable | | setRootNode( Node node )
- :
- NodeSets the root node for this tree. Sets the root node for this tree. | Tree | | suspendEvents( Boolean queueSuspended )
- :
+events fired during event suspension will be sent to any listeners now. | Observable | | setRootNode( Node node )
+ :
+ NodeSets the root node for this tree. Sets the root node for this tree. | Tree | | suspendEvents( Boolean queueSuspended )
+ :
voidSuspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:queueSuspended : BooleanPass as true to queue up suspended events to be fired
-after the resumeEvents call instead of discarding all suspended events; Returns: | Observable | | un( String eventName , Function handler , [Object scope ] )
- :
- voidRemoves an event handler (shorthand for removeListener.) | Observable |
Public Events|
| append :
- ( Tree tree , Node parent , Node node , Number index )
- Fires when a new child node is appended to a node in this tree. Fires when a new child node is appended to a node in this tree. Listeners will be called with the following arguments: | Tree | | beforeappend :
- ( Tree tree , Node parent , Node node )
- Fires before a new child is appended to a node in this tree, return false to cancel the append. Fires before a new child is appended to a node in this tree, return false to cancel the append. Listeners will be called with the following arguments: | Tree | | beforeinsert :
- ( Tree tree , Node parent , Node node , Node refNode )
- Fires before a new child is inserted in a node in this tree, return false to cancel the insert. Fires before a new child is inserted in a node in this tree, return false to cancel the insert. Listeners will be called with the following arguments: | Tree | | beforemove :
- ( Tree tree , Node node , Node oldParent , Node newParent , Number index )
- Fires before a node is moved to a new location in the tree. Return false to cancel the move. Fires before a node is moved to a new location in the tree. Return false to cancel the move. Listeners will be called with the following arguments: | Tree | | beforeremove :
- ( Tree tree , Node parent , Node node )
- Fires before a child is removed from a node in this tree, return false to cancel the remove. Fires before a child is removed from a node in this tree, return false to cancel the remove. Listeners will be called with the following arguments: | Tree | | insert :
- ( Tree tree , Node parent , Node node , Node refNode )
- Fires when a new child node is inserted in a node in this tree. Fires when a new child node is inserted in a node in this tree. Listeners will be called with the following arguments: | Tree | | move :
- ( Tree tree , Node node , Node oldParent , Node newParent , Number index )
- Fires when a node is moved to a new location in the tree Fires when a node is moved to a new location in the tree Listeners will be called with the following arguments:tree : TreeThe owner tree node : NodeThe node moved oldParent : NodeThe old parent of this node newParent : NodeThe new parent of this node index : NumberThe index it was moved to
| Tree | | remove :
- ( Tree tree , Node parent , Node node )
+after the resumeEvents call instead of discarding all suspended events;Returns: | Observable | | un( String eventName , Function handler , [Object scope ] )
+ :
+ voidRemoves an event handler (shorthand for removeListener.) | Observable |
Public Events|
| append :
+ ( Tree tree , Node parent , Node node , Number index )
+ Fires when a new child node is appended to a node in this tree. Fires when a new child node is appended to a node in this tree. Listeners will be called with the following arguments: | Tree | | beforeappend :
+ ( Tree tree , Node parent , Node node )
+ Fires before a new child is appended to a node in this tree, return false to cancel the append. Fires before a new child is appended to a node in this tree, return false to cancel the append. Listeners will be called with the following arguments: | Tree | | beforeinsert :
+ ( Tree tree , Node parent , Node node , Node refNode )
+ Fires before a new child is inserted in a node in this tree, return false to cancel the insert. Fires before a new child is inserted in a node in this tree, return false to cancel the insert. Listeners will be called with the following arguments: | Tree | | beforemove :
+ ( Tree tree , Node node , Node oldParent , Node newParent , Number index )
+ Fires before a node is moved to a new location in the tree. Return false to cancel the move. Fires before a node is moved to a new location in the tree. Return false to cancel the move. Listeners will be called with the following arguments: | Tree | | beforeremove :
+ ( Tree tree , Node parent , Node node )
+ Fires before a child is removed from a node in this tree, return false to cancel the remove. Fires before a child is removed from a node in this tree, return false to cancel the remove. Listeners will be called with the following arguments: | Tree | | insert :
+ ( Tree tree , Node parent , Node node , Node refNode )
+ Fires when a new child node is inserted in a node in this tree. Fires when a new child node is inserted in a node in this tree. Listeners will be called with the following arguments: | Tree | | move :
+ ( Tree tree , Node node , Node oldParent , Node newParent , Number index )
+ Fires when a node is moved to a new location in the tree Fires when a node is moved to a new location in the tree Listeners will be called with the following arguments:tree : TreeThe owner tree node : NodeThe node moved oldParent : NodeThe old parent of this node newParent : NodeThe new parent of this node index : NumberThe index it was moved to
| Tree | | remove :
+ ( Tree tree , Node parent , Node node )
Fires when a child node is removed from a node in this tree. Fires when a child node is removed from a node in this tree. Listeners will be called with the following arguments:tree : TreeThe owner tree parent : NodeThe parent node node : NodeThe child node removed
| Tree |
\ No newline at end of file
|