[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java,1.2,1.3
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-01-03 15:47:03
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11228/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: GenericTreeView implements observer Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GenericTreeView.java 3 Jan 2006 12:14:04 -0000 1.2 --- GenericTreeView.java 3 Jan 2006 15:46:55 -0000 1.3 *************** *** 23,26 **** --- 23,28 ---- import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Entity; + import net.sourceforge.bprocessor.model.Observer; + import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; *************** *** 30,34 **** * The GenericTreeView */ ! public class GenericTreeView extends TreeView implements NotificationListener { /** The model */ --- 32,36 ---- * The GenericTreeView */ ! public class GenericTreeView extends TreeView implements NotificationListener, Observer { /** The model */ *************** *** 52,55 **** --- 54,58 ---- setShowsRootHandles(true); Notifier.getInstance().addListener(this); + Project.getInstance().addObserver(this); this.addTreeSelectionListener(new SelectionListener()); model = (DefaultTreeModel) getModel(); *************** *** 336,338 **** --- 339,349 ---- } + /** + * Update + * @param object The changed object + */ + public void update(Object object) { + System.out.println("update " + object); + } + } |