Ext.data.JsonP.Ext_data_NodeInterface({"mixins":[],"code_type":"ext_define","inheritable":false,"component":false,"meta":{},"mixedInto":[],"uses":[],"aliases":{},"parentMixins":[],"superclasses":["Ext.Base"],"members":{"event":[{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"append","id":"event-append"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"beforeappend","id":"event-beforeappend"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"beforecollapse","id":"event-beforecollapse"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"beforeexpand","id":"event-beforeexpand"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"beforeinsert","id":"event-beforeinsert"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"beforemove","id":"event-beforemove"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"beforeremove","id":"event-beforeremove"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"collapse","id":"event-collapse"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"expand","id":"event-expand"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"insert","id":"event-insert"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"move","id":"event-move"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"remove","id":"event-remove"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"event","name":"sort","id":"event-sort"}],"property":[{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"$className","id":"property-S-className"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"property","name":"childNodes","id":"property-childNodes"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"configMap","id":"property-configMap"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"property","name":"firstChild","id":"property-firstChild"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigList","id":"property-initConfigList"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigMap","id":"property-initConfigMap"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"isInstance","id":"property-isInstance"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"property","name":"isNode","id":"property-isNode"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"property","name":"lastChild","id":"property-lastChild"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"property","name":"nextSibling","id":"property-nextSibling"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"property","name":"parentNode","id":"property-parentNode"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"property","name":"previousSibling","id":"property-previousSibling"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"property","name":"self","id":"property-self"}],"css_var":[],"method":[{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"appendChild","id":"method-appendChild"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"bubble","id":"method-bubble"},{"meta":{"deprecated":{"text":"as of 4.1. Use {@link #callParent} instead."},"protected":true},"owner":"Ext.Base","tagname":"method","name":"callOverridden","id":"method-callOverridden"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"callParent","id":"method-callParent"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"cascadeBy","id":"method-cascadeBy"},{"meta":{"private":true},"owner":"Ext.data.NodeInterface","tagname":"method","name":"clear","id":"method-clear"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"collapse","id":"method-collapse"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"collapseChildren","id":"method-collapseChildren"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"configClass","id":"method-configClass"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"contains","id":"method-contains"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"copy","id":"method-copy"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"createNode","id":"method-createNode"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"destroy","id":"method-destroy"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"eachChild","id":"method-eachChild"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"expand","id":"method-expand"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"expandChildren","id":"method-expandChildren"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"findChild","id":"method-findChild"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"findChildBy","id":"method-findChildBy"},{"meta":{"private":true},"owner":"Ext.data.NodeInterface","tagname":"method","name":"getBubbleTarget","id":"method-getBubbleTarget"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"getChildAt","id":"method-getChildAt"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"getConfig","id":"method-getConfig"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"getDepth","id":"method-getDepth"},{"meta":{},"owner":"Ext.Base","tagname":"method","name":"getInitialConfig","id":"method-getInitialConfig"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"getPath","id":"method-getPath"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"hasChildNodes","id":"method-hasChildNodes"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"hasConfig","id":"method-hasConfig"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"indexOf","id":"method-indexOf"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"indexOfId","id":"method-indexOfId"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"initConfig","id":"method-initConfig"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"insertBefore","id":"method-insertBefore"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"insertChild","id":"method-insertChild"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"isAncestor","id":"method-isAncestor"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"isExpandable","id":"method-isExpandable"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"isExpanded","id":"method-isExpanded"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"isFirst","id":"method-isFirst"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"isLast","id":"method-isLast"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"isLeaf","id":"method-isLeaf"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"isLoaded","id":"method-isLoaded"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"isLoading","id":"method-isLoading"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"isRoot","id":"method-isRoot"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"isVisible","id":"method-isVisible"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"onConfigUpdate","id":"method-onConfigUpdate"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"remove","id":"method-remove"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"removeAll","id":"method-removeAll"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"removeChild","id":"method-removeChild"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"replaceChild","id":"method-replaceChild"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"setConfig","id":"method-setConfig"},{"meta":{"private":true},"owner":"Ext.data.NodeInterface","tagname":"method","name":"setFirstChild","id":"method-setFirstChild"},{"meta":{"private":true},"owner":"Ext.data.NodeInterface","tagname":"method","name":"setLastChild","id":"method-setLastChild"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"sort","id":"method-sort"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"statics","id":"method-statics"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"method","name":"updateInfo","id":"method-updateInfo"}],"css_mixin":[],"cfg":[{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"allowDrag","id":"cfg-allowDrag"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"allowDrop","id":"cfg-allowDrop"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"checked","id":"cfg-checked"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"children","id":"cfg-children"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"cls","id":"cfg-cls"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"depth","id":"cfg-depth"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"expandable","id":"cfg-expandable"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"expanded","id":"cfg-expanded"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"href","id":"cfg-href"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"hrefTarget","id":"cfg-hrefTarget"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"icon","id":"cfg-icon"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"iconCls","id":"cfg-iconCls"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"index","id":"cfg-index"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"isFirst","id":"cfg-isFirst"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"isLast","id":"cfg-isLast"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"leaf","id":"cfg-leaf"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"loaded","id":"cfg-loaded"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"loading","id":"cfg-loading"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"parentId","id":"cfg-parentId"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"qtip","id":"cfg-qtip"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"qtitle","id":"cfg-qtitle"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"root","id":"cfg-root"},{"meta":{},"owner":"Ext.data.NodeInterface","tagname":"cfg","name":"text","id":"cfg-text"}]},"tagname":"class","extends":"Ext.Base","html":"

Hierarchy

Ext.Base
Ext.data.NodeInterface

Requires

Files

This class is used as a set of methods that are applied to the prototype of a\nModel to decorate it with a Node API. This means that models used in conjunction with a tree\nwill have all of the tree related methods available on the model. In general this class will\nnot be used directly by the developer. This class also creates extra fields on the model if\nthey do not exist, to help maintain the tree state and UI. These fields are documented as\nconfig options.

\n
Defined By

Config options

Ext.data.NodeInterface
view source
: Boolean
Set to false to deny dragging of this node. ...

Set to false to deny dragging of this node.

\n

Defaults to: true

Ext.data.NodeInterface
view source
: Boolean
Set to false to deny dropping on this node. ...

Set to false to deny dropping on this node.

\n

Defaults to: true

Ext.data.NodeInterface
view source
: Boolean
Set to true or false to show a checkbox alongside this node. ...

Set to true or false to show a checkbox alongside this node.

\n

Defaults to: null

Array of child nodes.

\n

Array of child nodes.

\n
Ext.data.NodeInterface
view source
cls : String

CSS class to apply for this node.

\n

CSS class to apply for this node.

\n
Ext.data.NodeInterface
view source
: Number
The number of parents this node has. ...

The number of parents this node has. A root node has depth 0, a child of it depth 1, and so on...

\n
Ext.data.NodeInterface
view source
: Boolean
Set to true to allow for expanding/collapsing of this node. ...

Set to true to allow for expanding/collapsing of this node.

\n

Defaults to: false

Ext.data.NodeInterface
view source
: Boolean
True if the node is expanded. ...

True if the node is expanded.

\n

Defaults to: false

Ext.data.NodeInterface
view source
href : String

An URL for a link that's created when this config is specified.

\n

An URL for a link that's created when this config is specified.

\n
Ext.data.NodeInterface
view source
: String
Target for link. ...

Target for link. Only applicable when href also specified.

\n
Ext.data.NodeInterface
view source
icon : String

URL for this node's icon.

\n

URL for this node's icon.

\n
Ext.data.NodeInterface
view source
iconCls : String

CSS class to apply for this node's icon.

\n

CSS class to apply for this node's icon.

\n
Ext.data.NodeInterface
view source
: Number
The position of the node inside its parent. ...

The position of the node inside its parent. When parent has 4 children and the node is third amongst them,\nindex will be 2.

\n
Ext.data.NodeInterface
view source
isFirst : Boolean

True if this is the first node.

\n

True if this is the first node.

\n
Ext.data.NodeInterface
view source
isLast : Boolean

True if this is the last node.

\n

True if this is the last node.

\n
Ext.data.NodeInterface
view source
: Boolean
Set to true to indicate that this child can have no children. ...

Set to true to indicate that this child can have no children. The expand icon/arrow will then not be\nrendered for this node.

\n

Defaults to: false

Ext.data.NodeInterface
view source
: Boolean
True if the node has finished loading. ...

True if the node has finished loading.

\n

Defaults to: false

Ext.data.NodeInterface
view source
: Boolean
True if the node is currently loading. ...

True if the node is currently loading.

\n

Defaults to: false

Ext.data.NodeInterface
view source
parentId : String

ID of parent node.

\n

ID of parent node.

\n
Ext.data.NodeInterface
view source
qtip : String

Tooltip text to show on this node.

\n

Tooltip text to show on this node.

\n
Ext.data.NodeInterface
view source
qtitle : String

Tooltip title.

\n

Tooltip title.

\n
Ext.data.NodeInterface
view source
root : Boolean

True if this is the root node.

\n

True if this is the root node.

\n
Ext.data.NodeInterface
view source
text : String

The text for to show on node label.

\n

The text for to show on node label.

\n

Properties

Defined By

Instance Properties

...
\n

Defaults to: "Ext.Base"

Ext.data.NodeInterface
view source
: Object
An array of this nodes children. ...

An array of this nodes children. Array will be empty if this node has no chidren.

\n
...
\n

Defaults to: {}

Ext.data.NodeInterface
view source
: Object
A reference to this node's first child node. ...

A reference to this node's first child node. null if this node has no children.

\n
...
\n

Defaults to: []

...
\n

Defaults to: {}

...
\n

Defaults to: true

Ext.data.NodeInterface
view source
: Boolean
true in this class to identify an object as an instantiated Node, or subclass thereof. ...

true in this class to identify an object as an instantiated Node, or subclass thereof.

\n

Defaults to: true

Ext.data.NodeInterface
view source
: Object
A reference to this node's last child node. ...

A reference to this node's last child node. null if this node has no children.

\n
Ext.data.NodeInterface
view source
: Object
A reference to this node's next sibling node. ...

A reference to this node's next sibling node. null if this node does not have a next sibling.

\n
Ext.data.NodeInterface
view source
: Object
A reference to this node's parent node. ...

A reference to this node's parent node. null if this node is the root node.

\n
Ext.data.NodeInterface
view source
: Object
A reference to this node's previous sibling node. ...

A reference to this node's previous sibling node. null if this node does not have a previous sibling.

\n
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,\nthis.self is scope-dependent and it's meant to be used for dynamic inheritance. See statics\nfor a detailed comparison

\n\n
Ext.define('My.Cat', {\n    statics: {\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        alert(this.self.speciesName); // dependent on 'this'\n    },\n\n    clone: function() {\n        return new this.self();\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n    statics: {\n        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'\n    }\n});\n\nvar cat = new My.Cat();                     // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'\n
\n
Defined By

Static Properties

...
\n

Defaults to: []

Methods

Defined By

Instance Methods

Inserts node(s) as the last child node of this node. ...

Inserts node(s) as the last child node of this node.

\n\n

If the node was previously a child node of another parent node, it will be removed from that node first.

\n

Parameters

Returns

Ext.data.NodeInterface
view source
( Function fn, [Object scope], [Array args] )
Bubbles up the tree from this node, calling the specified function with each node. ...

Bubbles 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.

\n

Parameters

  • fn : Function

    The function to call

    \n
  • scope : Object (optional)

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

    \n
  • args : Array (optional)

    The args to call the function with. Defaults to passing the current Node.

    \n
( Array/Arguments args ) : Objectdeprecatedprotected
Call the original method that was previously overridden with override\n\nExt.define('My.Cat', {\n constructor: functi...

Call the original method that was previously overridden with override

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

This method has been deprecated

\n

as of 4.1. Use callParent instead.

\n\n
\n

Parameters

  • args : Array/Arguments

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

    \n

Returns

  • Object

    Returns the result of calling the overridden method

    \n
( Array/Arguments args ) : Objectprotected
Call the \"parent\" method of the current method. ...

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

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

This can be used with an override as follows:

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

This also works with static methods.

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

Lastly, it also works with overridden static methods.

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

Parameters

  • args : Array/Arguments

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

    \n

Returns

  • Object

    Returns the result of calling the parent method

    \n
Ext.data.NodeInterface
view source
( Function fn, [Object scope], [Array args] )
Cascades down the tree from this node, calling the specified function with each node. ...

Cascades 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.

\n

Parameters

  • fn : Function

    The function to call

    \n
  • scope : Object (optional)

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

    \n
  • args : Array (optional)

    The args to call the function with. Defaults to passing the current Node.

    \n
Ext.data.NodeInterface
view source
( [Boolean destroy] )private
Clears the node. ...

Clears the node.

\n

Parameters

  • destroy : Boolean (optional)

    True to destroy the node.

    \n

    Defaults to: false

Ext.data.NodeInterface
view source
( [Boolean recursive], [Function callback], [Object scope] )
Collapse this node. ...

Collapse this node.

\n

Parameters

  • recursive : Boolean (optional)

    True to recursively collapse all the children

    \n

    Defaults to: false

  • callback : Function (optional)

    The function to execute once the collapse completes

    \n
  • scope : Object (optional)

    The scope to run the callback in

    \n
Ext.data.NodeInterface
view source
( [Function recursive], [Function callback], [Object scope] )
Collapse all the children of this node. ...

Collapse all the children of this node.

\n

Parameters

  • recursive : Function (optional)

    True to recursively collapse all the children

    \n

    Defaults to: false

  • callback : Function (optional)

    The function to execute once all the children are collapsed

    \n
  • scope : Object (optional)

    The scope to run the callback in

    \n
Ext.data.NodeInterface
view source
( Ext.data.NodeInterface node ) : Boolean
Returns 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.

\n

Parameters

Returns

Ext.data.NodeInterface
view source
( [String id], [Boolean deep] ) : Ext.data.NodeInterface
Creates a copy (clone) of this Node. ...

Creates a copy (clone) of this Node.

\n

Parameters

  • id : String (optional)

    A new id, defaults to this Node's id.

    \n
  • deep : Boolean (optional)

    True to recursively copy all child Nodes into the new Node.\nFalse to copy without child Nodes.

    \n

    Defaults to: false

Returns

Ext.data.NodeInterface
view source
( Object node ) : Ext.data.NodeInterface
Ensures that the passed object is an instance of a Record with the NodeInterface applied ...

Ensures that the passed object is an instance of a Record with the NodeInterface applied

\n

Parameters

Returns

Ext.data.NodeInterface
view source
( Object silent )
Destroys the node. ...

Destroys the node.

\n

Parameters

Overrides: Ext.Base.destroy

Ext.data.NodeInterface
view source
( Function fn, [Object scope], [Array args] )
Interates the child nodes of this node, calling the specified function with each node. ...

Interates 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.

\n

Parameters

  • fn : Function

    The function to call

    \n
  • scope : Object (optional)

    The scope (this reference) in which the function is executed. Defaults to the current Node in iteration.

    \n
  • args : Array (optional)

    The args to call the function with. Defaults to passing the current Node.

    \n
Ext.data.NodeInterface
view source
( [Boolean recursive], [Function callback], [Object scope] )
Expand this node. ...

Expand this node.

\n

Parameters

  • recursive : Boolean (optional)

    True to recursively expand all the children

    \n

    Defaults to: false

  • callback : Function (optional)

    The function to execute once the expand completes

    \n
  • scope : Object (optional)

    The scope to run the callback in

    \n
Ext.data.NodeInterface
view source
( [Boolean recursive], [Function callback], [Object scope] )
Expand all the children of this node. ...

Expand all the children of this node.

\n

Parameters

  • recursive : Boolean (optional)

    True to recursively expand all the children

    \n

    Defaults to: false

  • callback : Function (optional)

    The function to execute once all the children are expanded

    \n
  • scope : Object (optional)

    The scope to run the callback in

    \n
Ext.data.NodeInterface
view source
( String attribute, Object value, [Boolean deep] ) : Ext.data.NodeInterface
Finds the first child that has the attribute with the specified value. ...

Finds the first child that has the attribute with the specified value.

\n

Parameters

  • attribute : String

    The attribute name

    \n
  • value : Object

    The value to search for

    \n
  • deep : Boolean (optional)

    True to search through nodes deeper than the immediate children

    \n

    Defaults to: false

Returns

Ext.data.NodeInterface
view source
( Function fn, [Object scope], [Boolean deep] ) : Ext.data.NodeInterface
Finds the first child by a custom function. ...

Finds the first child by a custom function. The child matches if the function passed returns true.

\n

Parameters

  • fn : Function

    A function which must return true if the passed Node is the required Node.

    \n
  • scope : Object (optional)

    The scope (this reference) in which the function is executed. Defaults to the Node being tested.

    \n
  • deep : Boolean (optional)

    True to search through nodes deeper than the immediate children

    \n

    Defaults to: false

Returns

Ext.data.NodeInterface
view source
( ) : Objectprivate
Returns the bubble target for this node ...

Returns the bubble target for this node

\n

Returns

Ext.data.NodeInterface
view source
( Number index ) : Ext.data.NodeInterface
Returns the child node at the specified index. ...

Returns the child node at the specified index.

\n

Parameters

Returns

...
\n

Parameters

Ext.data.NodeInterface
view source
( ) : Number
Returns depth of this node (the root node has a depth of 0) ...

Returns depth of this node (the root node has a depth of 0)

\n

Returns

Returns the initial configuration passed to constructor when instantiating\nthis class. ...

Returns the initial configuration passed to constructor when instantiating\nthis class.

\n

Parameters

  • name : String (optional)

    Name of the config option to return.

    \n

Returns

  • Object/Mixed

    The full config object or a single config value\nwhen name parameter specified.

    \n
Ext.data.NodeInterface
view source
( [String field], [String separator] ) : String
Gets the hierarchical path from the root of the current node. ...

Gets the hierarchical path from the root of the current node.

\n

Parameters

  • field : String (optional)

    The field to construct the path from. Defaults to the model idProperty.

    \n
  • separator : String (optional)

    A separator to use.

    \n

    Defaults to: "/"

Returns

Ext.data.NodeInterface
view source
( ) : Boolean
Returns true if this node has one or more child nodes, else false. ...

Returns true if this node has one or more child nodes, else false.

\n

Returns

...
\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface node ) : Number
Returns the index of a child node ...

Returns the index of a child node

\n

Parameters

Returns

  • Number

    The index of the node or -1 if it was not found

    \n
Ext.data.NodeInterface
view source
( String id ) : Number
Returns the index of a child node that matches the id ...

Returns the index of a child node that matches the id

\n

Parameters

  • id : String

    The id of the node to find

    \n

Returns

  • Number

    The index of the node or -1 if it was not found

    \n
Initialize configuration for this class. ...

Initialize configuration for this class. a typical example:

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

Parameters

Returns

Inserts the first node before the second node in this nodes childNodes collection. ...

Inserts the first node before the second node in this nodes childNodes collection.

\n

Parameters

Returns

Inserts a node into this node. ...

Inserts a node into this node.

\n

Parameters

Returns

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface node ) : Boolean
Returns true if the passed node is an ancestor (at any point) of this node. ...

Returns true if the passed node is an ancestor (at any point) of this node.

\n

Parameters

Returns

Ext.data.NodeInterface
view source
( ) : Boolean
Returns true if this node has one or more child nodes, or if the expandable\nnode attribute is explicitly specified as...

Returns true if this node has one or more child nodes, or if the expandable\nnode attribute is explicitly specified as true, otherwise returns false.

\n

Returns

Ext.data.NodeInterface
view source
( ) : Boolean
Returns true if this node is expaned ...

Returns true if this node is expaned

\n

Returns

Ext.data.NodeInterface
view source
( ) : Boolean
Returns true if this node is the first child of its parent ...

Returns true if this node is the first child of its parent

\n

Returns

Ext.data.NodeInterface
view source
( ) : Boolean
Returns true if this node is the last child of its parent ...

Returns true if this node is the last child of its parent

\n

Returns

Ext.data.NodeInterface
view source
( ) : Boolean
Returns true if this node is a leaf ...

Returns true if this node is a leaf

\n

Returns

Ext.data.NodeInterface
view source
( ) : Boolean
Returns true if this node is loaded ...

Returns true if this node is loaded

\n

Returns

Ext.data.NodeInterface
view source
( ) : Boolean
Returns true if this node is loading ...

Returns true if this node is loading

\n

Returns

Ext.data.NodeInterface
view source
( ) : Boolean
Returns true if this node is the root node ...

Returns true if this node is the root node

\n

Returns

Ext.data.NodeInterface
view source
( ) : Boolean
Returns true if this node is visible ...

Returns true if this node is visible

\n

Returns

( Object names, Object callback, Object scope )private
...
\n

Parameters

Ext.data.NodeInterface
view source
( [Boolean destroy] ) : Ext.data.NodeInterface
Removes this node from its parent ...

Removes this node from its parent

\n

Parameters

  • destroy : Boolean (optional)

    True to destroy the node upon removal.

    \n

    Defaults to: false

Returns

Ext.data.NodeInterface
view source
( [Boolean destroy] ) : Ext.data.NodeInterface
Removes all child nodes from this node. ...

Removes all child nodes from this node.

\n

Parameters

  • destroy : Boolean (optional)

    <True to destroy the node upon removal.

    \n

    Defaults to: false

Returns

Removes a child node from this node. ...

Removes a child node from this node.

\n

Parameters

Returns

Replaces one child node in this node with another. ...

Replaces one child node in this node with another.

\n

Parameters

Returns

( Object config, Object applyIfNotSet )private
...
\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface node )private
Sets the first child of this node ...

Sets the first child of this node

\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface node )private
Sets the last child of this node ...

Sets the last child of this node

\n

Parameters

Ext.data.NodeInterface
view source
( Function fn, [Boolean recursive], [Boolean suppressEvent] )
Sorts this nodes children using the supplied sort function. ...

Sorts this nodes children using the supplied sort function.

\n

Parameters

  • fn : Function

    A function which, when passed two Nodes, returns -1, 0 or 1 depending upon required sort order.

    \n
  • recursive : Boolean (optional)

    True to apply this sort recursively

    \n

    Defaults to: false

  • suppressEvent : Boolean (optional)

    True to not fire a sort event.

    \n

    Defaults to: false

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,\nthis.statics() is scope-independent and it always returns the class from which it was called, regardless of what\nthis points to during run-time

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

Returns

Ext.data.NodeInterface
view source
( Object commit ) : Boolean
Updates general data of this node like isFirst, isLast, depth. ...

Updates general data of this node like isFirst, isLast, depth. This\nmethod is internally called after a node is moved. This shouldn't\nhave to be called by the developer unless they are creating custom\nTree plugins.

\n

Parameters

Returns

Defined By

Static Methods

( Object config )privatestatic
...
\n

Parameters

...
\n

Parameters

( Object name, Object member )privatestatic
...
\n

Parameters

Add methods / properties to the prototype of this class. ...

Add methods / properties to the prototype of this class.

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

Parameters

Add / override static properties of this class. ...

Add / override static properties of this class.

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

Parameters

Returns

( Object xtype )privatestatic
...
\n

Parameters

( Ext.Base fromClass, Array/String members ) : Ext.Baseprivatestatic
Borrow another class' members to the prototype of this class. ...

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

\n\n
Ext.define('Bank', {\n    money: '$$$',\n    printMoney: function() {\n        alert('$$$$$$$');\n    }\n});\n\nExt.define('Thief', {\n    ...\n});\n\nThief.borrow(Bank, ['money', 'printMoney']);\n\nvar steve = new Thief();\n\nalert(steve.money); // alerts '$$$'\nsteve.printMoney(); // alerts '$$$$$$$'\n
\n

Parameters

  • fromClass : Ext.Base

    The class to borrow members from

    \n
  • members : Array/String

    The names of the members to borrow

    \n

Returns

Create a new instance of this Class. ...

Create a new instance of this Class.

\n\n
Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.create({\n    someConfig: true\n});\n
\n\n

All parameters are passed to the constructor of the class.

\n

Returns

Create aliases for existing prototype methods. ...

Create aliases for existing prototype methods. Example:

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

Parameters

Ext.data.NodeInterface
view source
( Ext.Class/Ext.data.Model modelClass )static
This method allows you to decorate a Model's class to implement the NodeInterface. ...

This method allows you to decorate a Model's class to implement the NodeInterface.\nThis adds a set of methods, new events, new properties and new fields on every Record.

\n

Parameters

  • modelClass : Ext.Class/Ext.data.Model

    The Model class or an instance of the Model class you want to\ndecorate the prototype of.

    \n
( Object config )privatestatic
...
\n

Parameters

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

Get the current class' name in string format.

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

Returns

( )deprecatedstatic
Adds members to class. ...

Adds members to class.

\n
\n

This method has been deprecated since 4.1

\n

Use addMembers instead.

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

Used internally by the mixins pre-processor

\n

Parameters

( Object fn, Object scope )privatestatic
...
\n

Parameters

( Object members ) : Ext.Basedeprecatedstatic
Override members of this class. ...

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

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

As of 4.1, direct use of this method is deprecated. Use Ext.define\ninstead:

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

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

\n
\n

This method has been deprecated since 4.1.0

\n

Use Ext.define instead

\n\n
\n

Parameters

  • members : Object

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

    \n

Returns

Defined By

Events

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface this, Ext.data.NodeInterface node, Number index, Object eOpts )
Fires when a new child node is appended ...

Fires when a new child node is appended

\n

Parameters

Fires before a new child is appended, return false to cancel the append. ...

Fires before a new child is appended, return false to cancel the append.

\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface this, Object eOpts )
Fires before this node is collapsed. ...

Fires before this node is collapsed.

\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface this, Object eOpts )
Fires before this node is expanded. ...

Fires before this node is expanded.

\n

Parameters

Fires before a new child is inserted, return false to cancel the insert. ...

Fires before a new child is inserted, return false to cancel the insert.

\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface this, Ext.data.NodeInterface oldParent, Ext.data.NodeInterface newParent, Number index, Object eOpts )
Fires before this node is moved to a new location in the tree. ...

Fires before this node is moved to a new location in the tree. Return false to cancel the move.

\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface this, Ext.data.NodeInterface node, Boolean isMove, Object eOpts )
Fires before a child is removed, return false to cancel the remove. ...

Fires before a child is removed, return false to cancel the remove.

\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface this, Object eOpts )
Fires when this node is collapsed. ...

Fires when this node is collapsed.

\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface this, Object eOpts )
Fires when this node is expanded. ...

Fires when this node is expanded.

\n

Parameters

Fires when a new child node is inserted. ...

Fires when a new child node is inserted.

\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface this, Ext.data.NodeInterface oldParent, Ext.data.NodeInterface newParent, Number index, Object eOpts )
Fires when this node is moved to a new location in the tree ...

Fires when this node is moved to a new location in the tree

\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface this, Ext.data.NodeInterface node, Boolean isMove, Object eOpts )
Fires when a child node is removed ...

Fires when a child node is removed

\n

Parameters

Ext.data.NodeInterface
view source
( Ext.data.NodeInterface this, Ext.data.NodeInterface[] childNodes, Object eOpts )
Fires when this node's childNodes are sorted. ...

Fires when this node's childNodes are sorted.

\n

Parameters

","subclasses":[],"name":"Ext.data.NodeInterface","alternateClassNames":[],"inheritdoc":null,"files":[{"href":"NodeInterface.html#Ext-data-NodeInterface","filename":"NodeInterface.js"}],"html_meta":{},"singleton":false,"id":"class-Ext.data.NodeInterface","statics":{"property":[{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"property","name":"$onExtended","id":"static-property-S-onExtended"}],"event":[],"css_var":[],"method":[{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"addConfig","id":"static-method-addConfig"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"addInheritableStatics","id":"static-method-addInheritableStatics"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"addMember","id":"static-method-addMember"},{"meta":{"static":true},"owner":"Ext.Base","tagname":"method","name":"addMembers","id":"static-method-addMembers"},{"meta":{"static":true},"owner":"Ext.Base","tagname":"method","name":"addStatics","id":"static-method-addStatics"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"addXtype","id":"static-method-addXtype"},{"meta":{"private":true,"static":true},"owner":"Ext.Base","tagname":"method","name":"borrow","id":"static-method-borrow"},{"meta":{"static":true},"owner":"Ext.Base","tagname":"method","name":"create","id":"static-method-create"},{"meta":{"static":true},"owner":"Ext.Base","tagname":"method","name":"createAlias","id":"static-method-createAlias"},{"meta":{"static":true},"owner":"Ext.data.NodeInterface","tagname":"method","name":"decorate","id":"static-method-decorate"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"extend","id":"static-method-extend"},{"meta":{"static":true},"owner":"Ext.Base","tagname":"method","name":"getName","id":"static-method-getName"},{"meta":{"deprecated":{"text":"Use {@link #addMembers} instead.","version":"4.1"},"static":true},"owner":"Ext.Base","tagname":"method","name":"implement","id":"static-method-implement"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"mixin","id":"static-method-mixin"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"onExtended","id":"static-method-onExtended"},{"meta":{"deprecated":{"text":"Use {@link Ext#define Ext.define} instead","version":"4.1.0"},"markdown":true,"static":true},"owner":"Ext.Base","tagname":"method","name":"override","id":"static-method-override"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"triggerExtended","id":"static-method-triggerExtended"}],"css_mixin":[],"cfg":[]},"requires":["Ext.data.Field"]});