[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java, 1.128, 1.
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-12-10 13:47:32
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19504/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: cleanup Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -d -r1.128 -r1.129 *** GenericTreeView.java 10 Dec 2007 13:31:17 -0000 1.128 --- GenericTreeView.java 10 Dec 2007 13:47:34 -0000 1.129 *************** *** 417,420 **** --- 417,430 ---- /** + * Update child with specifed index with the given object + * @param index index of child + * @param object object to update child with + */ + public void updateChild(int index, Object object) { + GenericNode child = (GenericNode) getChildAt(index); + child.update(object); + } + + /** * @param o the object to update with */ *************** *** 780,784 **** public void update(Object o) { super.update(o); ! ((GenericNode)getChildAt(0)).update(((Surface)o).getEdges()); } } --- 790,795 ---- public void update(Object o) { super.update(o); ! Surface surface = (Surface) o; ! updateChild(0, surface.getEdges()); } } *************** *** 816,820 **** if (o instanceof CoordinateSystem) { CoordinateSystem system = (CoordinateSystem) o; ! ((GenericNode)getChildAt(0)).update(system.relations()); } } --- 827,831 ---- if (o instanceof CoordinateSystem) { CoordinateSystem system = (CoordinateSystem) o; ! updateChild(0, system.relations()); } } *************** *** 849,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()); } } --- 860,866 ---- public void update(Object o) { super.update(o); ! Edge edge = (Edge)o; ! updateChild(0, edge.getFrom()); ! updateChild(1, edge.getTo()); } } |