/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_data_Node({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.tree.TreeNode"],"extends":"Ext.util.Observable","uses":[],"html":"
Hierarchy
Ext.util.ObservableExt.data.NodeSubclasses
Files
true if this node is a leaf and does not have children
\ntrue if this node is a leaf and does not have children
\n(optional)
A config object containing one or more event handlers to be added to this\nobject during initialization. This should be a valid listeners config object as specified in the\naddListener example for attaching multiple handlers at once.
\n\nDOM events from ExtJs Components
\n\n\nWhile some ExtJs Component classes export selected DOM events (e.g. \"click\", \"mouseover\" etc), this\n\n\n
is usually only done when extra value can be added. For example the DataView's\nclick
event passing the node clicked on. To access DOM\nevents directly from a Component's HTMLElement, listeners must be added to the Element after the Component\nhas been rendered. A plugin can simplify this step:
// Plugin is configured with a listeners config object.\n// The Component is appended to the argument list of all handler functions.\nExt.DomObserver = Ext.extend(Object, {\n constructor: function(config) {\n this.listeners = config.listeners ? config.listeners : config;\n },\n\n // Component passes itself into plugin's init method\n init: function(c) {\n var p, l = this.listeners;\n for (p in l) {\n if (Ext.isFunction(l[p])) {\n l[p] = this.createHandler(l[p], c);\n } else {\n l[p].fn = this.createHandler(l[p].fn, c);\n }\n }\n\n // Add the listeners to the Element immediately following the render call\n c.render = c.render.createSequence(function() {\n var e = c.getEl();\n if (e) {\n e.on(l);\n }\n });\n },\n\n createHandler: function(fn, c) {\n return function(e) {\n fn.call(this, e, c);\n };\n }\n});\n\nvar combo = new Ext.form.ComboBox({\n\n // Collapse combo when its element is clicked on\n plugins: [ new Ext.DomObserver({\n click: function(evt, comp) {\n comp.collapse();\n }\n })],\n store: myStore,\n typeAhead: true,\n mode: 'local',\n triggerAction: 'all'\n});\n
\n\n\n\nThe attributes supplied for the node. You can use this property to access any custom attributes you supplied.
\nThe first direct child node of this node, or null if this node has no child nodes.
\nThe first direct child node of this node, or null if this node has no child nodes.
\nThe last direct child node of this node, or null if this node has no child nodes.
\nThe last direct child node of this node, or null if this node has no child nodes.
\nThe node immediately following this node in the tree, or null if there is no sibling node.
\nThe node immediately following this node in the tree, or null if there is no sibling node.
\nThe node immediately preceding this node in the tree, or null if there is no sibling node.
\nThe node immediately preceding this node in the tree, or null if there is no sibling node.
\nAdds the specified events to the list of events which this Observable may fire.
\nEither an object with event names as properties with a value of true
\nor the first event name string if multiple event names are being passed as separate parameters.
. Event name if multiple event names are being passed as separate parameters.\nUsage:
\n\nthis.addEvents('storeloaded', 'storecleared');\n
\n\nAppends an event handler to this object.
\nThe name of the event to listen for.
\nThe method the event invokes.
\nThe scope (this
reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.
An object containing handler configuration.\nproperties. This may contain any of the following properties:
this
reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.\nCombining Options
\nUsing the options argument, it is possible to combine different types of listeners:
\n
\nA delayed, one-time listener.\n
myDataView.on('click', this.onClick, this, {\nsingle: true,\ndelay: 100\n});
\n\nAttaching multiple handlers in 1 call
\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n
\n
myGridPanel.on({\n'click' : {\n fn: this.onClick,\n scope: this,\n delay: 100\n},\n'mouseover' : {\n fn: this.onMouseOver,\n scope: this\n},\n'mouseout' : {\n fn: this.onMouseOut,\n scope: this\n}\n});
\n\nOr a shorthand syntax:
\n
myGridPanel.on({\n'click' : this.onClick,\n'mouseover' : this.onMouseOver,\n'mouseout' : this.onMouseOut,\n scope: this\n});
\n\nInsert node(s) as the last child node of this node.
\nThe node or Array of nodes to append
\nThe appended node if single append, or null if an array was passed
\nBubbles up the tree from this node, calling the specified function with each node. The arguments to the function\nwill be the args provided or the current node. If the function returns false at any point,\nthe bubble is stopped.
\nCascades down the tree from this node, calling the specified function with each node. The arguments to the function\nwill be the args provided or the current node. If the function returns false at any point,\nthe cascade is stopped on that branch.
\nReturns true if this node is an ancestor (at any point) of the passed node.
\nInterates the child nodes of this node, calling the specified function with each node. The arguments to the function\nwill be the args provided or the current node. If the function returns false at any point,\nthe iteration stops.
\nEnables events fired by this Observable to bubble up an owner hierarchy by calling\nthis.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\nimplementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to\naccess the required target more quickly.
\n\n\nExample:
\n\n\nExt.override(Ext.form.Field, {\n // Add functionality to Field's initComponent to enable the change event to bubble\n initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {\n this.enableBubble('change');\n }),\n\n // We know that we want Field's events to bubble directly to the FormPanel.\n getBubbleTarget : function() {\n if (!this.formPanel) {\n this.formPanel = this.findParentByType('form');\n }\n return this.formPanel;\n }\n});\n\nvar myForm = new Ext.formPanel({\n title: 'User Details',\n items: [{\n ...\n }],\n listeners: {\n change: function() {\n // Title goes red if form has been modified.\n myForm.header.setStyle('color', 'red');\n }\n }\n});\n
\n\nFinds the first child that has the attribute with the specified value.
\nThe attribute name
\nThe value to search for
\nTrue to search through nodes deeper than the immediate children
\nThe found child or null if none was found
\nFinds the first child by a custom function. The child matches if the function passed returns true
.
A function which must return true
if the passed Node is the required Node.
The scope (this
reference) in which the function is executed. Defaults to the Node being tested.
True to search through nodes deeper than the immediate children
\nThe found child or null if none was found
\nprivate
\n\nFires the specified event with the passed parameters (minus the event name).
\n\n\nAn event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget)\nby calling enableBubble.
\n\nThe name of the event to fire.
\nVariable number of parameters are passed to handlers.
\nreturns false if any of the handlers return false otherwise it returns true.
\nOverrides: Ext.util.Observable.fireEvent
Returns the tree this node is in.
\nReturns true if this node has one or more child nodes, else false.
\nChecks to see if this object has any listeners for a specified event
\nThe name of the event to check for
\nTrue if the event is being listened for, else false
\nReturns the index of a child node
\nThe index of the node or -1 if it was not found
\nInserts the first node before the second node in this nodes childNodes collection.
\nThe node to insert
\nThe node to insert before (if null the node is appended)
\nThe inserted node
\nReturns true if the passed node is an ancestor (at any point) of this node.
\nReturns true if this node has one or more child nodes, or if the expandable\nnode attribute is explicitly specified as true (see attributes), otherwise returns false.
\nReturns true if this node is the first child of its parent
\nReturns true if this node is the last child of its parent
\nReturns true if this node is a leaf
\nAppends an event handler to this object (shorthand for addListener.)
\nThe type of event to listen for
\nThe method the event invokes
\nThe scope (this
reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.
An object containing handler configuration.
\nRelays selected events from the specified Observable as if the events were fired by this.
\nThe Observable whose events this object is to relay.
\nArray of event names to relay.
\nRemoves this node from its parent
\ntrue to destroy the node upon removal. Defaults to false.
\nthis
\nRemoves all child nodes from this node.
\ntrue to destroy the node upon removal. Defaults to false.
\nthis
\nRemoves a child node from this node.
\nThe node to remove
\ntrue to destroy the node upon removal. Defaults to false.
\nThe removed node
\nRemoves an event handler.
\nThe type of event the handler was associated with.
\nThe handler to remove. This must be a reference to the function passed into the addListener call.
\nThe scope originally specified for the handler.
\nReplaces one child node in this node with another.
\nThe replacement node
\nThe node to replace
\nThe replaced node
\nResume firing events. (see suspendEvents)\nIf events were suspended using the queueSuspended parameter, then all\nevents fired during event suspension will be sent to any listeners now.
\nSorts this nodes children using the supplied sort function.
\nA function which, when passed two Nodes, returns -1, 0 or 1 depending upon required sort order.
\nThe scope (this
reference) in which the function is executed. Defaults to the browser window.
Suspend the firing of all events. (see resumeEvents)
\nPass as true to queue up suspended events to be fired\nafter the resumeEvents call instead of discarding all suspended events;
\nRemoves an event handler (shorthand for removeListener.)
\nThe type of event the handler was associated with.
\nThe handler to remove. This must be a reference to the function passed into the addListener call.
\nThe scope originally specified for the handler.
\nFires when a new child node is appended
\nThe owner tree
\nThis node
\nThe newly appended node
\nThe index of the newly appended node
\nFires before a new child is appended, return false to cancel the append.
\nThe owner tree
\nThis node
\nThe child node to be appended
\nFires before a new child is inserted, return false to cancel the insert.
\nThe owner tree
\nThis node
\nThe child node to be inserted
\nThe child node the node is being inserted before
\nFires before this node is moved to a new location in the tree. Return false to cancel the move.
\nThe owner tree
\nThis node
\nThe parent of this node
\nThe new parent this node is moving to
\nThe index it is being moved to
\nFires before a child is removed, return false to cancel the remove.
\nThe owner tree
\nThis node
\nThe child node to be removed
\nFires when a new child node is inserted.
\nThe owner tree
\nThis node
\nThe child node inserted
\nThe child node the node was inserted before
\nFires when this node is moved to a new location in the tree
\nThe owner tree
\nThis node
\nThe old parent of this node
\nThe new parent of this node
\nThe index it was moved to
\nFires when a child node is removed
\nThe owner tree
\nThis node
\nThe removed node
\n