[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java, 1.63, 1.6
Status: Pre-Alpha
Brought to you by:
henryml
|
From: rimestad <rim...@us...> - 2006-11-21 17:36:57
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6586/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: fix to the tree so that a large altering of the model does work... Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** GenericTreeView.java 15 Nov 2006 13:47:52 -0000 1.63 --- GenericTreeView.java 21 Nov 2006 17:36:55 -0000 1.64 *************** *** 520,526 **** private static final long serialVersionUID = 1L; - /** The current space*/ - private Space current; - /** * Constructor for SpaceNode --- 520,523 ---- *************** *** 529,533 **** public SpaceNode(Space space) { super(space); - current = space; Set surfaces = space.getEnvelope(); add(new SurfaceContainer("Surfaces", surfaces)); --- 526,529 ---- *************** *** 550,555 **** if (o instanceof Space) { Space s = (Space)o; ! current = s; ! if (updated == current) { model.nodeChanged(this); } --- 546,551 ---- if (o instanceof Space) { Space s = (Space)o; ! userObject = s; ! if (updated == s) { model.nodeChanged(this); } *************** *** 582,587 **** */ public String toString() { ! String nid = current.getDisplayName(); ! if (GUI.getInstance().isClosed(current)) { nid += " (C)"; } else { --- 578,583 ---- */ public String toString() { ! String nid = ((Space)userObject).getDisplayName(); ! if (GUI.getInstance().isClosed(((Space)userObject))) { nid += " (C)"; } else { *************** *** 596,600 **** */ public ImageIcon icon() { ! if (current.isConstructionSpace()) { return constructionspaceicon; } else { --- 592,596 ---- */ public ImageIcon icon() { ! if (((Space)userObject).isConstructionSpace()) { return constructionspaceicon; } else { *************** *** 1040,1045 **** if (o instanceof Project) { Project proj = (Project)o; if (proj == updated) { - userObject = proj; model.nodeChanged(this); } --- 1036,1041 ---- if (o instanceof Project) { Project proj = (Project)o; + userObject = proj; if (proj == updated) { model.nodeChanged(this); } *************** *** 1346,1349 **** --- 1342,1346 ---- */ public void update(Object object) { + log.info("changed"); updated = object; update(); |