[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview SurfacesTreeView.java,1.6,1.7 Sp
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-10-02 19:55:02
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2655/src/net/sourceforge/bprocessor/gui/treeview Modified Files: SurfacesTreeView.java SpacesTreeView.java Log Message: All access to database now through the Project instance Index: SurfacesTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SurfacesTreeView.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SurfacesTreeView.java 22 Sep 2005 12:25:31 -0000 1.6 --- SurfacesTreeView.java 2 Oct 2005 14:37:10 -0000 1.7 *************** *** 10,15 **** import net.sourceforge.bprocessor.kernel.notification.NotificationListener; import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.Surface; - import net.sourceforge.bprocessor.model.SurfaceFacade; import java.awt.event.MouseEvent; --- 10,15 ---- import net.sourceforge.bprocessor.kernel.notification.NotificationListener; import net.sourceforge.bprocessor.kernel.notification.Notifier; + import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; import java.awt.event.MouseEvent; *************** *** 60,64 **** if (type.equals(Notification.SURFACE_CREATED)) { ! Surface s = SurfaceFacade.getInstance().findById(n.getObject()); RootNode rn = (RootNode)getModel().getRoot(); SurfaceNode sn = new SurfaceNode(n.getObject(), s.getName(), rn); --- 60,64 ---- if (type.equals(Notification.SURFACE_CREATED)) { ! Surface s = Project.getInstance().findSurfaceById(n.getObject()); RootNode rn = (RootNode)getModel().getRoot(); SurfaceNode sn = new SurfaceNode(n.getObject(), s.getName(), rn); Index: SpacesTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpacesTreeView.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SpacesTreeView.java 30 Sep 2005 07:59:59 -0000 1.7 --- SpacesTreeView.java 2 Oct 2005 14:37:10 -0000 1.8 *************** *** 11,19 **** import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.ConstructionSpace; - import net.sourceforge.bprocessor.model.ConstructionSpaceFacade; import net.sourceforge.bprocessor.model.Element; import net.sourceforge.bprocessor.model.FunctionalSpace; - import net.sourceforge.bprocessor.model.FunctionalSpaceFacade; import net.sourceforge.bprocessor.model.Part; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; --- 11,18 ---- import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.Element; import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.Part; + import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; *************** *** 72,77 **** if (type.equals(Notification.FUNCTIONAL_SPACE_CREATED)) { ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! FunctionalSpace fs = fsf.findById(n.getObject()); RootNode rn = (RootNode)getModel().getRoot(); --- 71,75 ---- if (type.equals(Notification.FUNCTIONAL_SPACE_CREATED)) { ! FunctionalSpace fs = Project.getInstance().findFunctionalSpaceById(n.getObject()); RootNode rn = (RootNode)getModel().getRoot(); *************** *** 87,95 **** if (type.equals(Notification.FUNCTIONAL_SPACE_MODIFIED)) { ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! space = fsf.findById(n.getObject()); } else { ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! space = csf.findById(n.getObject()); } --- 85,91 ---- if (type.equals(Notification.FUNCTIONAL_SPACE_MODIFIED)) { ! space = Project.getInstance().findFunctionalSpaceById(n.getObject()); } else { ! space = Project.getInstance().findConstructionSpaceById(n.getObject()); } *************** *** 149,154 **** } else if (type.equals(Notification.CONSTRUCTION_SPACE_CREATED)) { ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! ConstructionSpace cs = csf.findById(n.getObject()); RootNode rn = (RootNode)getModel().getRoot(); --- 145,149 ---- } else if (type.equals(Notification.CONSTRUCTION_SPACE_CREATED)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(n.getObject()); RootNode rn = (RootNode)getModel().getRoot(); |