YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.upnp.server.configuration.TreeNodeManager Class Reference

Manager class for TreeNodes to easily apply operations on them and to make it easy for testing and extending. More...

Collaboration diagram for de.yaacc.upnp.server.configuration.TreeNodeManager:
Collaboration graph

Classes

class  Change
 What a change of the visible list did, so the adapter can report exactly that range.
 

Public Member Functions

 TreeNodeManager ()
 Simple constructor.
 
void setTreeNodes (List< TreeNode > treeNodes)
 Set the current visible tree nodes.
 
List< TreeNode > getTreeNodes ()
 Get the Current visible Tree nodes.
 
TreeNode get (int index)
 Get TreeNode from the current nodes by index.
 
boolean addNode (TreeNode node)
 Add new node to the current tree nodes.
 
void updateNodes (List< TreeNode > newNodes)
 Clear the current nodes and insert new nodes.
 
boolean removeNode (TreeNode node)
 Delete one node from the visible nodes.
 
void clearNodes ()
 Clear the current nodes.
 
int size ()
 Get the current number of visible nodes.
 
int indexOf (TreeNode node)
 
int collapseNode (TreeNode node)
 Collapsing node and all of his children.
 
Change collapse (TreeNode node)
 Collapses the node: its children and the visible descendants of its expanded children leave the visible list.
 
int expandNode (TreeNode node)
 Expanding node and all of his children.
 
Change expand (TreeNode node)
 Expands the node: its children and the visible descendants of its expanded children are inserted behind it in one block.
 
Change removeWithDescendants (TreeNode node)
 Removes the node from the visible list together with its visible descendants.
 
int collapseNodeBranch (TreeNode node)
 
int expandNodeBranch (TreeNode node)
 Expanding node full branches.
 
void expandNodeToLevel (TreeNode node, int level)
 Expanding one node branch to until specific level.
 
void expandNodesAtLevel (int level)
 Expanding all tree nodes branches to until specific level.
 
void collapseAll ()
 Collapsing all nodes in the tree with their children.
 
void expandAll ()
 Expanding all nodes in the tree with their children.
 

Detailed Description

Manager class for TreeNodes to easily apply operations on them and to make it easy for testing and extending.

Member Function Documentation

◆ addNode()

boolean de.yaacc.upnp.server.configuration.TreeNodeManager.addNode ( TreeNode node)

Add new node to the current tree nodes.

Parameters
nodeto add it to the current tree nodes
Returns
true of this node is added

◆ collapse()

Change de.yaacc.upnp.server.configuration.TreeNodeManager.collapse ( TreeNode node)

Collapses the node: its children and the visible descendants of its expanded children leave the visible list.

Descendants keep their own expanded state, so expanding the node again restores them.

Returns
the removed rows (count 0 if the node is not visible or not expanded)

Referenced by de.yaacc.upnp.server.configuration.TreeNodeManager.collapseNode(), and de.yaacc.upnp.server.configuration.TreeViewAdapter.collapseNode().

Here is the caller graph for this function:

◆ collapseNode()

int de.yaacc.upnp.server.configuration.TreeNodeManager.collapseNode ( TreeNode node)

Collapsing node and all of his children.

Parameters
nodeThe node to collapse it
Returns
the index of this node if it exists in the list
Here is the call graph for this function:

◆ collapseNodeBranch()

int de.yaacc.upnp.server.configuration.TreeNodeManager.collapseNodeBranch ( TreeNode node)
Parameters
nodeThe node to collapse the branch of it
Returns
the index of this node if it exists in the list

Referenced by de.yaacc.upnp.server.configuration.TreeNodeManager.collapseAll(), and de.yaacc.upnp.server.configuration.TreeNodeManager.collapseNodeBranch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ expand()

Change de.yaacc.upnp.server.configuration.TreeNodeManager.expand ( TreeNode node)

Expands the node: its children and the visible descendants of its expanded children are inserted behind it in one block.

Returns
the inserted rows (count 0 if the node is not visible or already expanded)

Referenced by de.yaacc.upnp.server.configuration.TreeNodeManager.expandNode(), and de.yaacc.upnp.server.configuration.TreeViewAdapter.expandNode().

Here is the caller graph for this function:

◆ expandNode()

int de.yaacc.upnp.server.configuration.TreeNodeManager.expandNode ( TreeNode node)

Expanding node and all of his children.

Parameters
nodeThe node to expand it
Returns
the index of this node if it exists in the list

Referenced by de.yaacc.upnp.server.configuration.TreeNodeManager.expandNodeToLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ expandNodeBranch()

int de.yaacc.upnp.server.configuration.TreeNodeManager.expandNodeBranch ( TreeNode node)

Expanding node full branches.

Parameters
nodeThe node to expand the branch of it
Returns
the index of this node if it exists in the list

Referenced by de.yaacc.upnp.server.configuration.TreeNodeManager.expandAll(), and de.yaacc.upnp.server.configuration.TreeNodeManager.expandNodeBranch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ expandNodesAtLevel()

void de.yaacc.upnp.server.configuration.TreeNodeManager.expandNodesAtLevel ( int level)

Expanding all tree nodes branches to until specific level.

Parameters
levelto expand all nodes branches to it
Here is the call graph for this function:

◆ expandNodeToLevel()

void de.yaacc.upnp.server.configuration.TreeNodeManager.expandNodeToLevel ( TreeNode node,
int level )

Expanding one node branch to until specific level.

Parameters
nodeto expand branch of it until level
levelto expand node branches to it

Referenced by de.yaacc.upnp.server.configuration.TreeNodeManager.expandNodesAtLevel(), and de.yaacc.upnp.server.configuration.TreeNodeManager.expandNodeToLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get()

TreeNode de.yaacc.upnp.server.configuration.TreeNodeManager.get ( int index)

Get TreeNode from the current nodes by index.

Parameters
indexof node to get it
Returns
TreeNode from by index from current tree nodes if exists

◆ getTreeNodes()

List< TreeNode > de.yaacc.upnp.server.configuration.TreeNodeManager.getTreeNodes ( )

Get the Current visible Tree nodes.

Returns
The visible Tree nodes main

◆ indexOf()

int de.yaacc.upnp.server.configuration.TreeNodeManager.indexOf ( TreeNode node)
Returns
the index of the node in the visible list, -1 if it is not visible

Referenced by de.yaacc.upnp.server.configuration.TreeViewAdapter.notifyNodeChanged().

Here is the caller graph for this function:

◆ removeNode()

boolean de.yaacc.upnp.server.configuration.TreeNodeManager.removeNode ( TreeNode node)

Delete one node from the visible nodes.

Parameters
nodeto delete it from the current nodes
Returns
true of this node is deleted

◆ removeWithDescendants()

Change de.yaacc.upnp.server.configuration.TreeNodeManager.removeWithDescendants ( TreeNode node)

Removes the node from the visible list together with its visible descendants.

Returns
the removed rows, starting at the node itself (count 0 if it is not visible)

Referenced by de.yaacc.upnp.server.configuration.TreeViewAdapter.removeNode().

Here is the caller graph for this function:

◆ setTreeNodes()

void de.yaacc.upnp.server.configuration.TreeNodeManager.setTreeNodes ( List< TreeNode > treeNodes)

Set the current visible tree nodes.

Parameters
treeNodesNew tree nodes

◆ size()

int de.yaacc.upnp.server.configuration.TreeNodeManager.size ( )

Get the current number of visible nodes.

Returns
the size of visible nodes

◆ updateNodes()

void de.yaacc.upnp.server.configuration.TreeNodeManager.updateNodes ( List< TreeNode > newNodes)

Clear the current nodes and insert new nodes.

Parameters
newNodesto update the current nodes with them

Referenced by de.yaacc.upnp.server.configuration.TreeNodeManager.collapseAll(), and de.yaacc.upnp.server.configuration.TreeViewAdapter.updateTreeNodes().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: