93949596979899100101102103
public void circuitChanged(CircuitEvent event) { int action = event.getAction(); DefaultTreeModel model = (DefaultTreeModel) getModel(); if (action == CircuitEvent.ACTION_SET_NAME) { model.nodeChanged(this); } else { if (computeChildren()) { model.nodeStructureChanged(this); } else if (action == CircuitEvent.ACTION_INVALIDATE) { Object o = event.getData();
257258259260261262263264265266267
parent = current; } else { // exists existingNe =( NodeElement) previous.getUserObject(); existingNe.addItem(id, module); model.nodeChanged(previous); parent = previous; } level++; } }
458459460461462463464465466467468
parent = current; } else { // exists existingNe =(NodeElement) previous.getUserObject(); existingNe.addItem(id, module); model.nodeChanged(previous); parent = previous; } if (field.getIndex() != DcObject._SYS_MODULE) level++;
471472473474475476477478479480481
rs.close(); NodeElement topElem = (NodeElement) top.getUserObject(); topElem.setItems(items); model.nodeChanged(top); } catch (Exception e) { logger.error(e, e); } }
207208209210211212213214215216217
child.addItem(item, Integer.valueOf(module)); insertNode(child, actualParent); existingChild = child; } else { existingChild.addItem(item, Integer.valueOf(module)); model.nodeChanged(existingChild); } add(item, module, child, existingChild); } }
13341335133613371338133913401341134213431344
// drawn as a result. DefaultTreeModel model = (DefaultTreeModel)cellHierarchyTree.getModel(); if (parentNode != null) { model.nodeStructureChanged(parentNode); } model.nodeChanged(this); // Make sure selected node is still selected TreePath treePath = new TreePath(getPath()); cellHierarchyTree.setSelectionPath(treePath);
174175176177178179180181182183184
} else { DisplayPackageDescription nodeInfo = (DisplayPackageDescription)node.getUserObject(); nodeInfo.updateSize(node); // important to set default values for nodes DefaultTreeModel model = (DefaultTreeModel)componentTree.getModel(); model.nodeChanged(node); descriptionLabel.setText(nodeInfo.getDescription()); sizeLabel.setText(sizeString + nodeInfo.getSize()); } }
113114115116117118119120121122123
if (node != null) { DisplayPackageDescription nodeInfo = (DisplayPackageDescription)node.getUserObject(); nodeInfo.toggleState(node); DefaultTreeModel model = (DefaultTreeModel)componentTree.getModel(); model.nodeChanged(node); descriptionLabel.setText(nodeInfo.getDescription()); sizeLabel.setText(sizeString + nodeInfo.getSize()); } }
167168169170171172173174175176177
280281282283284285286287288289290
test.setEnabled(select); } } DefaultTreeModel model = ((DefaultTreeModel) tree.getModel()); model.nodeChanged((TreeNode) model.getRoot()); } private JComboBox addComboBox(JPanel panel, String title, String rootTypeId, String defaultTypeId) { final JLabel label = new JLabel(title); label.setAlignmentX(Component.LEFT_ALIGNMENT);