[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java, 1.80, 1.8
Status: Pre-Alpha
Brought to you by:
henryml
|
From: Michael L. <he...@us...> - 2007-03-09 10:03:51
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24469/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: Fixed class-cast exception Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** GenericTreeView.java 8 Mar 2007 14:47:26 -0000 1.80 --- GenericTreeView.java 9 Mar 2007 10:03:48 -0000 1.81 *************** *** 507,511 **** int[] ins = new int[sorted.size()]; int i = 0; ! for (Entity current : entities) { this.add(new EntityNode(current)); ins[i] = this.getChildCount() - 1; --- 507,511 ---- int[] ins = new int[sorted.size()]; int i = 0; ! for (Object current : entities) { this.add(new EntityNode(current)); ins[i] = this.getChildCount() - 1; *************** *** 514,517 **** --- 514,527 ---- model.nodesWereInserted(this, ins); } + + /** + * Create a node for the given entity. The default is to + * return an EntityNode. + * @param entity The entity to create a node for.0 + * @return A node for the given entity. + */ + public EntityNode nodeFor(Object entity) { + return new EntityNode(entity); + } } |