Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2655/src/net/sourceforge/bprocessor/gui/attrview
Modified Files:
AttributeView.java
Log Message:
All access to database now through the Project instance
Index: AttributeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AttributeView.java 15 Sep 2005 08:47:45 -0000 1.5
--- AttributeView.java 2 Oct 2005 14:37:10 -0000 1.6
***************
*** 10,18 ****
import net.sourceforge.bprocessor.kernel.notification.NotificationListener;
import net.sourceforge.bprocessor.kernel.notification.Notifier;
! import net.sourceforge.bprocessor.model.ConstructionSpaceFacade;
! import net.sourceforge.bprocessor.model.ElementFacade;
! import net.sourceforge.bprocessor.model.FunctionalSpaceFacade;
! import net.sourceforge.bprocessor.model.PartFacade;
! import net.sourceforge.bprocessor.model.SurfaceFacade;
import java.awt.GridLayout;
--- 10,19 ----
import net.sourceforge.bprocessor.kernel.notification.NotificationListener;
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.Surface;
import java.awt.GridLayout;
***************
*** 61,92 ****
String type = n.getType();
if (type.equals(Notification.FUNCTIONAL_SPACE_SELECTED)) {
! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance();
!
! Object current = fsf.findById(n.getObject());
!
ap.display(current);
} else if (type.equals(Notification.CONSTRUCTION_SPACE_SELECTED)) {
! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance();
!
! Object current = csf.findById(n.getObject());
!
ap.display(current);
} else if (type.equals(Notification.ELEMENT_SELECTED)) {
! ElementFacade ef = ElementFacade.getInstance();
!
! Object current = ef.findById(n.getObject());
!
ap.display(current);
} else if (type.equals(Notification.PART_SELECTED)) {
! PartFacade pf = PartFacade.getInstance();
!
! Object current = pf.findById(n.getObject());
!
ap.display(current);
} else if (type.equals(Notification.SURFACE_SELECTED)) {
! SurfaceFacade sf = SurfaceFacade.getInstance();
!
! Object current = sf.findById(n.getObject());
!
ap.display(current);
} else if (type.equals(Notification.FUNCTIONAL_SPACE_DESELECTED) ||
--- 62,78 ----
String type = n.getType();
if (type.equals(Notification.FUNCTIONAL_SPACE_SELECTED)) {
! FunctionalSpace current = Project.getInstance().findFunctionalSpaceById(n.getObject());
ap.display(current);
} else if (type.equals(Notification.CONSTRUCTION_SPACE_SELECTED)) {
! ConstructionSpace current = Project.getInstance().findConstructionSpaceById(n.getObject());
ap.display(current);
} else if (type.equals(Notification.ELEMENT_SELECTED)) {
! Element current = Project.getInstance().findElementById(n.getObject());
ap.display(current);
} else if (type.equals(Notification.PART_SELECTED)) {
! Part current = Project.getInstance().findPartById(n.getObject());
ap.display(current);
} else if (type.equals(Notification.SURFACE_SELECTED)) {
! Surface current = Project.getInstance().findSurfaceById(n.getObject());
ap.display(current);
} else if (type.equals(Notification.FUNCTIONAL_SPACE_DESELECTED) ||
|