[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java, 1.127, 1.
Status: Pre-Alpha
Brought to you by:
henryml
|
From: Michael L. <he...@us...> - 2007-12-10 13:31:14
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13239/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: small fixes Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** GenericTreeView.java 10 Dec 2007 12:08:25 -0000 1.127 --- GenericTreeView.java 10 Dec 2007 13:31:17 -0000 1.128 *************** *** 420,430 **** */ public void update(Object o) { ! if (o != null) { ! this.userObject = o; ! if (o == updated) { ! model.nodeChanged(this); ! } ! } else { ! log.warn("Tried to update with null on " + this); } } --- 420,426 ---- */ public void update(Object o) { ! this.userObject = o; ! if (o == updated) { ! model.nodeChanged(this); } } *************** *** 634,638 **** } else { Set surfaces = space.getEnvelope(); ! add(new SurfaceContainer("Surfaces", surfaces)); } } --- 630,634 ---- } else { Set surfaces = space.getEnvelope(); ! add(new SurfaceContainer("Envelope", surfaces)); } } *************** *** 646,650 **** add(new SurfaceContainer("Envelope", surfaces)); String lvlstr = Space.levelToString(space.getLevel() + 1); ! add(new ElementContainer(lvlstr, space.getElements())); add(new GeometryContainer("Geometry", space)); ContainerNode cn = new ConstructorContainer("Constructors", space.getConstructors()); --- 642,646 ---- add(new SurfaceContainer("Envelope", surfaces)); String lvlstr = Space.levelToString(space.getLevel() + 1); ! add(new ElementContainer(lvlstr + "s", space.getElements())); add(new GeometryContainer("Geometry", space)); ContainerNode cn = new ConstructorContainer("Constructors", space.getConstructors()); *************** *** 784,790 **** public void update(Object o) { super.update(o); ! if (o instanceof Surface) { ! ((GenericNode)getChildAt(0)).update(((Surface)o).getEdges()); ! } } } --- 780,784 ---- public void update(Object o) { super.update(o); ! ((GenericNode)getChildAt(0)).update(((Surface)o).getEdges()); } } *************** *** 819,831 **** */ public void update(Object o) { ! ! if (o instanceof Constructor) { ! if (updated == o) { ! model.nodeChanged(this); ! } ! if (o instanceof CoordinateSystem) { ! CoordinateSystem system = (CoordinateSystem) o; ! ((GenericNode)getChildAt(0)).update(system.relations()); ! } } } --- 813,820 ---- */ public void update(Object o) { ! super.update(o); ! if (o instanceof CoordinateSystem) { ! CoordinateSystem system = (CoordinateSystem) o; ! ((GenericNode)getChildAt(0)).update(system.relations()); } } *************** *** 859,870 **** */ public void update(Object o) { ! if (o instanceof Edge) { ! super.update(o); ! Edge e = (Edge)o; ! ((EntityNode)this.getChildAt(0)).update(e.getFrom()); ! ((EntityNode)this.getChildAt(1)).update(e.getTo()); ! } else { ! log.warn("Should be a edge but weren't" + o); ! } } } --- 848,855 ---- */ public void update(Object o) { ! super.update(o); ! Edge e = (Edge)o; ! ((EntityNode)this.getChildAt(0)).update(e.getFrom()); ! ((EntityNode)this.getChildAt(1)).update(e.getTo()); } } *************** *** 1175,1190 **** /** {@inheritDoc} */ @Override - public void update(Object o) { - if (o instanceof Component) { - Component lo = (Component)o; - if (lo != userObject) { - userObject = lo; - model.nodeChanged(this); - } - } - } - - /** {@inheritDoc} */ - @Override public JPopupMenu menu() { JPopupMenu menu = new JPopupMenu(); --- 1160,1163 ---- |