}
// Process and idChanged event
public void idChanged(HelpModelEvent e) {
ID id = e.getID();
HelpModel helpModel = glossary.getModel();
debug("idChanged("+e+")");
if (e.getSource() != helpModel) {
System.err.println("Internal inconsistency!");
System.err.println(" "+e.getSource()+" != "+helpModel);
throw new Error("Internal error");
}
if (id == null) {
//return;
}
TreePath s = tree.getSelectionPath();
if (s != null) {
Object o = s.getLastPathComponent();
// should require only a TreeNode
if (o instanceof DefaultMutableTreeNode) {
DefaultMutableTreeNode tn = (DefaultMutableTreeNode) o;
IndexItem item = (IndexItem) tn.getUserObject();
if (item != null) {
ID nId = item.getID();
if (nId != null && nId.equals(id)) {
return;
}
}
}
}