Class: IWNodeElement

IWNodeElement

An interface providing tree functionality

new IWNodeElement()

An Interface providing tree functionality

Methods


add(node)

Adds a new node.
Parameters:
Name Type Description
node Object Object with tree functionality
Returns:
Type
void

checkIfExistsAsParent(node)

Checks if node already exists as predecessor (to prevent circles).
Parameters:
Name Type Description
node Object Object with tree functionality
Returns:
Type
Boolean

getChildren()

Returns an array with all children
Returns:
children
Type
Array

getName()

Returns name of the node element
Returns:
name
Type
String

getParent()

Returns parent node
Returns:
node Object with tree functionality
Type
Object

hasChild(child)

Checks if node exists as child.
Parameters:
Name Type Description
child Object
Returns:
Type
Boolean

hasChildren()

Returns a boolean if node has any childs
Returns:
Type
Boolean

isMarked()

Returns if node is marked.
Returns:
Type
Boolean

mark()

Marks the node. Throws 'statechanged' event if node was unmarked.
Returns:
Type
void

remove(node)

Removes the node from the children.
Parameters:
Name Type Description
node Object Object with tree functionality
Returns:
Type
void

setName(name)

Sets name of the node element
Parameters:
Name Type Description
name String the name of the node element
Returns:
Type
void

setParent(newParent)

Sets the parent of this node
Parameters:
Name Type Description
newParent Object the parent node.
Returns:
Type
void

unmark()

Unmarks the node. Throws 'statechanged' event if node was marked.
Returns:
Type
void