lastModule = (ChainModuleData) node.getObject(); moduleCanvas.highlightModule(lastModule);
Object obj  = node.getObject(); if (obj != null && obj instanceof ChainModuleData) { lastModule = (ChainModuleData) obj; moduleCanvas.highlightModule(lastModule); }
	public void valueChanged(TreeSelectionEvent e) {			// If this change is occurring because a		if (lockTreeChange == true)			return;						ModuleTreeNode node = 			(ModuleTreeNode) tree.getLastSelectedPathComponent();		if (node == null) 			return;				if (lastModule != null) {			moduleCanvas.unhighlightModules(lastModule);		}		if (node.isLeaf()) { // it's a module			lastModule = (ChainModuleData) node.getObject();			moduleCanvas.highlightModule(lastModule);		}		else if (node.getObject() instanceof ModuleCategoryData) {			lastModule = null;			ModuleCategoryData mc = (ModuleCategoryData) node.getObject();			moduleCanvas.highlightCategory(mc);				}		// clicked on uncategorized		else if (node.getName() != null && 				node.getName().compareTo(ModuleTreeNode.UNCAT_NAME) ==0)			moduleCanvas.highlightCategory(null);		else			moduleCanvas.unhighlightModules();	}