DefaultMutableTreeNode node, boolean isExpanding) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); Integer datasetID = new Integer(ds.getID()); node.removeAllChildren(); if (isExpanding) { List list = agentCtrl.getImages(ds.getID());   if (list.size() != 0) { addNodesToDatasetMaps(datasetID, node, list); addImagesToDataset(list, node); } else { DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(EMPTY); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } } else {  DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(LOADING); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } treeModel.reload(node); }
DefaultMutableTreeNode node, boolean isExpanding) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); Integer datasetID = new Integer(ds.getID()); node.removeAllChildren(); if (isExpanding) { List list = agentCtrl.getImages(ds.getID());   if (list.size() != 0) { addNodesToDatasetMaps(datasetID, node, list); addImagesToDataset(list, node); } else treeModel.insertNodeInto(new DefaultMutableTreeNode(EMPTY), node, node.getChildCount()); } else treeModel.insertNodeInto(new DefaultMutableTreeNode(LOADING), node, node.getChildCount()); treeModel.reload(node); }
	private void datasetNodeNavigation(DatasetSummary ds, 										DefaultMutableTreeNode node, 										boolean isExpanding)	{		DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel();		Integer datasetID = new Integer(ds.getID());		node.removeAllChildren();		if (isExpanding) {			List list = agentCtrl.getImages(ds.getID());			//TODO: loading will never be displayed b/c we are in the			// same thread.			if (list.size() != 0) {				addNodesToDatasetMaps(datasetID, node, list);				addImagesToDataset(list, node); 				} else {				DefaultMutableTreeNode childNode = 										new DefaultMutableTreeNode(EMPTY);				treeModel.insertNodeInto(childNode, node, 										node.getChildCount());									}		} else {			//removeNodesFromDatasetMaps(datasetID, node);			DefaultMutableTreeNode childNode = 					new DefaultMutableTreeNode(LOADING);			treeModel.insertNodeInto(childNode, node, node.getChildCount());				}		treeModel.reload(node);	}