code: protected void processNode(final ClientAbstractNodeInfo treeNode, final TreeNode nodeRoot, final boolean refresh) {
  		// Branches
  		if (null != treeNode && treeNode instanceof ClientBranchNodeInfo) {
  			String treeNodeLabel = ((ClientBranchNodeInfo) treeNode).getLabel();
  			final TreeNode node = new TreeNode(treeNodeLabel);
  			node.setAttribute(EXPANDED_ATTR, ((ClientBranchNodeInfo) treeNode).isExpanded());
  			tree.add(node, nodeRoot);
  
  			// treeNodes
  			List<ClientAbstractNodeInfo> children = treeNode.getTreeNodes();
  			for (ClientAbstractNodeInfo newNode : children) {
  				processNode(newNode, node, refresh);
  			}
  			// Leafs
  		} else if (null != treeNode && treeNode instanceof ClientLayerNodeInfo) {
  			if (treeNode instanceof ClientLayerNodeInfo) {
  				Layer<?> layer = mapModel.getLayer(((ClientLayerNodeInfo) treeNode).getLayerId());
  				// Ignore layers that are not available in the map
  				if (layer != null) {
  					LayerTreeLegendNode ltln = new LayerTreeLegendNode(this.tree, layer);
  					tree.add(ltln, nodeRoot);
  					ltln.init();
  				}
  			}
  		}
  	}
docs: Processes a treeNode (add it to the TreeGrid).
  
  @param treeNode
  The treeNode to process
  @param nodeRoot
  The root node to which the treeNode has to be added
  @param refresh
  True if the tree is refreshed (causing it to keep its expanded state)