Interface INodeInterface

Hierarchy

Index

Properties

Methods

Properties

optional public alias?: Array<string>

[Config Option] (String[])

optional public alternateClassName?: any

[Config Option] (String/String[])

optional public childNodes?: any

[Property] (Object)

optional public config?: any

[Config Option] (Object)

optional public extend?: string

[Config Option] (String)

optional public firstChild?: any

[Property] (Object)

optional public inheritableStatics?: any

[Config Option] (Object)

optional public lastChild?: any

[Property] (Object)

optional public mixins?: any

[Config Option] (Object)

optional public nextSibling?: any

[Property] (Object)

optional public parentNode?: any

[Property] (Object)

optional public platformConfig?: any

[Config Option] (Object)

optional public previousSibling?: any

[Property] (Object)

optional public self?: IClass

[Property] (Ext.Class)

optional public singleton?: boolean

[Config Option] (Boolean)

optional public statics?: any

[Config Option] (Object)

optional public uses?: Array<string>

[Config Option] (String[])

Methods

optional public appendChild(node?: any): INodeInterface

[Method] Insert node s as the last child node of this node

Parameters

  • node?: any optional

    Ext.data.NodeInterface/Ext.data.NodeInterface[] The node or Array of nodes to append.

Returns

INodeInterface

Ext.data.NodeInterface The appended node if single append, or null if an array was passed.

optional public bubble(fn?: any, scope?: any, args?: Array<any>)

[Method] Bubbles up the tree from this node calling the specified function with each node

Parameters

  • fn?: any optional

    Function The function to call.

  • scope?: any optional

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

  • args?: Array<any> optional

    Array The args to call the function with (default to passing the current Node).

optional public callOverridden(args?: any): any

[Method] Call the original method that was previously overridden with override This method is deprecated as callParent does

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)

Returns

any

Object Returns the result of calling the overridden method

optional public callParent(args?: any): any

[Method] Call the parent method of the current method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)

Returns

any

Object Returns the result of calling the parent method

optional public callSuper(args?: any): any

[Method] This method is used by an override to call the superclass method but bypass any overridden method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)

Returns

any

Object Returns the result of calling the superclass method

optional public cascadeBy(fn?: any, scope?: any, args?: Array<any>)

[Method] Cascades down the tree from this node calling the specified function with each node

Parameters

  • fn?: any optional

    Function The function to call

  • scope?: any optional

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

  • args?: Array<any> optional

    Array The args to call the function with (default to passing the current Node).

optional public collapse(recursive?: any, callback?: any, scope?: any)

[Method] Collapse this node

Parameters

  • recursive?: any optional

    Function true to recursively collapse all the children.

  • callback?: any optional

    Function The function to execute once the collapse completes.

  • scope?: any optional

    Object The scope to run the callback in.

optional public contains(node?: INodeInterface): boolean

[Method] Returns true if this node is an ancestor at any point of the passed node

Parameters

Returns

boolean

Boolean

optional public copy(newId?: string, deep?: boolean): INodeInterface

[Method] Creates a copy clone of this Node

Parameters

  • newId?: string optional

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

  • deep?: boolean optional

    Boolean If passed as true, all child Nodes are recursively copied into the new Node. If omitted or false, the copy will have no child Nodes.

Returns

INodeInterface

Ext.data.NodeInterface A copy of this Node.

optional public destroy(silent?: any)

[Method] Destroys the node

Parameters

  • silent?: any optional

    Object

optional public eachChild(fn?: any, scope?: any, args?: Array<any>)

[Method] Iterates the child nodes of this node calling the specified function with each node

Parameters

  • fn?: any optional

    Function The function to call.

  • scope?: any optional

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

  • args?: Array<any> optional

    Array The args to call the function with (default to passing the current Node).

optional public expand(recursive?: any, callback?: any, scope?: any)

[Method] Expand this node

Parameters

  • recursive?: any optional

    Function true to recursively expand all the children.

  • callback?: any optional

    Function The function to execute once the expand completes.

  • scope?: any optional

    Object The scope to run the callback in.

optional public findChild(attribute?: string, value?: any, deep?: boolean): INodeInterface

[Method] Finds the first child that has the attribute with the specified value

Parameters

  • attribute?: string optional

    String The attribute name.

  • value?: any optional

    Object The value to search for.

  • deep?: boolean optional

    Boolean true to search through nodes deeper than the immediate children.

Returns

INodeInterface

Ext.data.NodeInterface The found child or null if none was found.

optional public findChildBy(fn?: any, scope?: any, deep?: boolean): INodeInterface

[Method] Finds the first child by a custom function

Parameters

  • fn?: any optional

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

  • scope?: any optional

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

  • deep?: boolean optional

    Boolean True to search through nodes deeper than the immediate children.

Returns

INodeInterface

Ext.data.NodeInterface The found child or null if none was found.

optional public getChildAt(index?: number): INodeInterface

[Method] Returns the child node at the specified index

Parameters

  • index?: number optional

    Number

Returns

INodeInterface

Ext.data.NodeInterface

optional public getDepth(): number

[Method] Returns depth of this node the root node has a depth of 0

Returns

number

Number

optional public getInitialConfig(name?: string): any

[Method] Returns the initial configuration passed to constructor

Parameters

  • name?: string optional

    String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.

Returns

any

Object/Mixed

optional public getPath(field?: string, separator?: string): string

[Method] Gets the hierarchical path from the root of the current node

Parameters

  • field?: string optional

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

  • separator?: string optional

    String A separator to use.

Returns

string

String The node path

optional public hasChildNodes(): boolean

[Method] Returns true if this node has one or more child nodes else false

Returns

boolean

Boolean

optional public indexOf(child?: INodeInterface): number

[Method] Returns the index of a child node

Parameters

Returns

number

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

optional public initConfig(instanceConfig?: any): any

[Method] Initialize configuration for this class

Parameters

  • instanceConfig?: any optional

    Object

Returns

any

Object mixins The mixin prototypes as key - value pairs

optional public insertBefore(node?: INodeInterface, refNode?: INodeInterface): INodeInterface

[Method] Inserts the first node before the second node in this nodes childNodes collection

Parameters

  • node?: INodeInterface optional

    Ext.data.NodeInterface The node to insert.

  • refNode?: INodeInterface optional

    Ext.data.NodeInterface The node to insert before (if null the node is appended).

Returns

INodeInterface

Ext.data.NodeInterface The inserted node.

optional public insertChild(index?: number, node?: IModel): IModel

[Method] Insert a node into this node

Parameters

  • index?: number optional

    Number The zero-based index to insert the node at.

  • node?: IModel optional

    Ext.data.Model The node to insert.

Returns

IModel

Ext.data.Model The record you just inserted.

optional public isAncestor(node?: INodeInterface): boolean

[Method] Returns true if the passed node is an ancestor at any point of this node

Parameters

Returns

boolean

Boolean

optional public isExpandable(): boolean

[Method] Returns true if this node has one or more child nodes or if the expandable node attribute is explicitly specified as

Returns

boolean

Boolean

optional public isExpanded(): boolean

[Method] Returns true if this node is expanded

Returns

boolean

Boolean

optional public isFirst(): boolean

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

Returns

boolean

Boolean

optional public isLast(): boolean

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

Returns

boolean

Boolean

optional public isLeaf(): boolean

[Method] Returns true if this node is a leaf

Returns

boolean

Boolean

optional public isLoaded(): boolean

[Method] Returns true if this node is loaded

Returns

boolean

Boolean

optional public isLoading(): boolean

[Method] Returns true if this node is loading

Returns

boolean

Boolean

optional public isRoot(): boolean

[Method] Returns true if this node is the root node

Returns

boolean

Boolean

optional public isVisible(): boolean

[Method] Returns true if this node is visible

Returns

boolean

Boolean

optional public remove(destroy?: boolean): INodeInterface

[Method] Removes this node from its parent

Parameters

  • destroy?: boolean optional

    Boolean true to destroy the node upon removal.

Returns

INodeInterface

Ext.data.NodeInterface this

optional public removeAll(destroy?: boolean): INodeInterface

[Method] Removes all child nodes from this node

Parameters

  • destroy?: boolean optional

    Boolean true to destroy the node upon removal.

Returns

INodeInterface

Ext.data.NodeInterface this

optional public removeChild(node?: INodeInterface, destroy?: boolean): INodeInterface

[Method] Removes a child node from this node

Parameters

  • node?: INodeInterface optional

    Ext.data.NodeInterface The node to remove.

  • destroy?: boolean optional

    Boolean true to destroy the node upon removal.

Returns

INodeInterface

Ext.data.NodeInterface The removed node.

optional public replaceChild(newChild?: INodeInterface, oldChild?: INodeInterface): INodeInterface

[Method] Replaces one child node in this node with another

Parameters

  • newChild?: INodeInterface optional

    Ext.data.NodeInterface The replacement node.

  • oldChild?: INodeInterface optional

    Ext.data.NodeInterface The node to replace.

Returns

INodeInterface

Ext.data.NodeInterface The replaced node.

optional public sort(sortFn?: any, recursive?: boolean, suppressEvent?: boolean)

[Method] Sorts this nodes children using the supplied sort function

Parameters

  • sortFn?: any optional

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

  • recursive?: boolean optional

    Boolean Whether or not to apply this sort recursively.

  • suppressEvent?: boolean optional

    Boolean Set to true to not fire a sort event.

optional public updateInfo(silent?: any): boolean

[Method] Updates general data of this node like isFirst isLast depth

Parameters

  • silent?: any optional

    Object

Returns

boolean

Boolean