private Node determineNewSelectedNode(JoeTree tree) {
		Node newSelectedNode = null;

		// Find the range
		Node firstNewSelectedNode = tree.getYoungestInSelection();
		//int ioFirstNewSelectedNode = tree.getVisibleNodes().indexOf(firstNewSelectedNode);
		Node lastNewSelectedNode = tree.getOldestInSelection();
		//int ioLastNewSelectedNode = tree.getVisibleNodes().indexOf(lastNewSelectedNode);

		// Handle Boundary conditions for the selection.
		if (firstNewSelectedNode == tree.getVisibleNodes().get(0)) {
			tree.getDocument().panel.layout.setNodeToDrawFrom(firstNewSelectedNode, 0);
			newSelectedNode = firstNewSelectedNode;
		} else if (lastNewSelectedNode == tree.getVisibleNodes().get(tree.getVisibleNodes().size() - 1)) {
			newSelectedNode = lastNewSelectedNode;
		} else {
			newSelectedNode = firstNewSelectedNode;
		}
		
		return newSelectedNode;
	}