[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/actions CreateConstructionSpaceActionList
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-10-02 17:40:48
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2655/src/net/sourceforge/bprocessor/gui/actions Modified Files: CreateConstructionSpaceActionListener.java ToolsDetachActionListener.java CreateConstructorActionListener.java CreateElementActionListener.java CreateFunctionalSpaceActionListener.java CreatePartActionListener.java ToolsJoinActionListener.java CreateSurfaceActionListener.java Log Message: All access to database now through the Project instance Index: CreateElementActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateElementActionListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CreateElementActionListener.java 30 Sep 2005 12:36:09 -0000 1.5 --- CreateElementActionListener.java 2 Oct 2005 14:37:10 -0000 1.6 *************** *** 9,13 **** import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Element; ! import net.sourceforge.bprocessor.model.ElementFacade; import java.awt.event.ActionEvent; --- 9,13 ---- import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Element; ! import net.sourceforge.bprocessor.model.Project; import java.awt.event.ActionEvent; *************** *** 44,51 **** if (result != null && !result.trim().equals("")) { - ElementFacade ef = ElementFacade.getInstance(); Element el = new Element(result.trim()); ! ef.create(el); } } --- 44,50 ---- if (result != null && !result.trim().equals("")) { Element el = new Element(result.trim()); ! Project.getInstance().intern(el); } } Index: CreatePartActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreatePartActionListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CreatePartActionListener.java 30 Sep 2005 12:36:09 -0000 1.5 --- CreatePartActionListener.java 2 Oct 2005 14:37:10 -0000 1.6 *************** *** 9,13 **** import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Part; ! import net.sourceforge.bprocessor.model.PartFacade; import java.awt.event.ActionEvent; --- 9,13 ---- import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Part; ! import net.sourceforge.bprocessor.model.Project; import java.awt.event.ActionEvent; *************** *** 44,51 **** if (result != null && !result.trim().equals("")) { - PartFacade pf = PartFacade.getInstance(); Part p = new Part(result.trim()); ! ! pf.create(p); } } --- 44,49 ---- if (result != null && !result.trim().equals("")) { Part p = new Part(result.trim()); ! Project.getInstance().intern(p); } } Index: CreateConstructionSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructionSpaceActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CreateConstructionSpaceActionListener.java 30 Sep 2005 12:36:09 -0000 1.4 --- CreateConstructionSpaceActionListener.java 2 Oct 2005 14:37:10 -0000 1.5 *************** *** 9,13 **** import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.ConstructionSpace; ! import net.sourceforge.bprocessor.model.ConstructionSpaceFacade; import java.awt.event.ActionEvent; --- 9,13 ---- import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.ConstructionSpace; ! import net.sourceforge.bprocessor.model.Project; import java.awt.event.ActionEvent; *************** *** 44,51 **** if (result != null && !result.trim().equals("")) { - ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ConstructionSpace cs = new ConstructionSpace(result.trim()); ! ! csf.create(cs); } } --- 44,49 ---- if (result != null && !result.trim().equals("")) { ConstructionSpace cs = new ConstructionSpace(result.trim()); ! Project.getInstance().intern(cs); } } Index: CreateSurfaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateSurfaceActionListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CreateSurfaceActionListener.java 30 Sep 2005 12:36:09 -0000 1.5 --- CreateSurfaceActionListener.java 2 Oct 2005 14:37:10 -0000 1.6 *************** *** 8,13 **** import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Surface; - import net.sourceforge.bprocessor.model.SurfaceFacade; import java.awt.event.ActionEvent; --- 8,13 ---- import net.sourceforge.bprocessor.gui.GUI; + import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; import java.awt.event.ActionEvent; *************** *** 44,51 **** if (result != null && !result.trim().equals("")) { - SurfaceFacade sf = SurfaceFacade.getInstance(); Surface s = new Surface(result.trim()); ! sf.create(s); } } --- 44,50 ---- if (result != null && !result.trim().equals("")) { Surface s = new Surface(result.trim()); ! Project.getInstance().intern(s); } } Index: ToolsDetachActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ToolsDetachActionListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ToolsDetachActionListener.java 30 Sep 2005 18:02:42 -0000 1.3 --- ToolsDetachActionListener.java 2 Oct 2005 14:37:10 -0000 1.4 *************** *** 8,20 **** import net.sourceforge.bprocessor.model.ConstructionSpace; - import net.sourceforge.bprocessor.model.ConstructionSpaceFacade; import net.sourceforge.bprocessor.model.Element; - import net.sourceforge.bprocessor.model.ElementFacade; import net.sourceforge.bprocessor.model.FunctionalSpace; - import net.sourceforge.bprocessor.model.FunctionalSpaceFacade; import net.sourceforge.bprocessor.model.Part; ! import net.sourceforge.bprocessor.model.PartFacade; import net.sourceforge.bprocessor.model.Surface; - import net.sourceforge.bprocessor.model.SurfaceFacade; import java.awt.BorderLayout; --- 8,16 ---- 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.BorderLayout; *************** *** 90,95 **** Vector leftValuesData = new Vector(); ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! Collection spaces = fsf.findAll(); Iterator it = spaces.iterator(); while (it.hasNext()) { --- 86,90 ---- Vector leftValuesData = new Vector(); ! Collection spaces = Project.getInstance().getFunctionalSpaces(); Iterator it = spaces.iterator(); while (it.hasNext()) { *************** *** 198,203 **** if (lsvalue != null) { if (lsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! FunctionalSpace fs = fsf.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { --- 193,198 ---- if (lsvalue != null) { if (lsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpace fs = ! Project.getInstance().findFunctionalSpaceById(lsvalue.getId()); if (rsname.equals(SURFACES)) { *************** *** 222,227 **** } } else if (lsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! ConstructionSpace cs = csf.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { --- 217,221 ---- } } else if (lsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(lsvalue.getId()); if (rsname.equals(SURFACES)) { *************** *** 246,251 **** } } else if (lsname.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Element e = ef.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { --- 240,244 ---- } } else if (lsname.equals(ELEMENTS)) { ! Element e = Project.getInstance().findElementById(lsvalue.getId()); if (rsname.equals(SURFACES)) { *************** *** 270,275 **** } } else if (lsname.equals(PARTS)) { ! PartFacade pf = PartFacade.getInstance(); ! Part p = pf.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { --- 263,267 ---- } } else if (lsname.equals(PARTS)) { ! Part p = Project.getInstance().findPartById(lsvalue.getId()); if (rsname.equals(SURFACES)) { *************** *** 325,330 **** Vector leftValuesData = new Vector(); if (current.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! Collection spaces = fsf.findAll(); Iterator it = spaces.iterator(); while (it.hasNext()) { --- 317,321 ---- Vector leftValuesData = new Vector(); if (current.equals(FUNCTIONAL_SPACES)) { ! Collection spaces = Project.getInstance().getFunctionalSpaces(); Iterator it = spaces.iterator(); while (it.hasNext()) { *************** *** 338,343 **** } else if (current.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! Collection spaces = csf.findAll(); Iterator it = spaces.iterator(); while (it.hasNext()) { --- 329,333 ---- } else if (current.equals(CONSTRUCTION_SPACES)) { ! Collection spaces = Project.getInstance().getConstructionSpaces(); Iterator it = spaces.iterator(); while (it.hasNext()) { *************** *** 351,356 **** } else if (current.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Collection elements = ef.findAll(); Iterator it = elements.iterator(); while (it.hasNext()) { --- 341,345 ---- } else if (current.equals(ELEMENTS)) { ! Collection elements = Project.getInstance().getElements(); Iterator it = elements.iterator(); while (it.hasNext()) { *************** *** 364,369 **** } else if (current.equals(PARTS)) { ! PartFacade pf = PartFacade.getInstance(); ! Collection parts = pf.findAll(); Iterator it = parts.iterator(); while (it.hasNext()) { --- 353,357 ---- } else if (current.equals(PARTS)) { ! Collection parts = Project.getInstance().getParts(); Iterator it = parts.iterator(); while (it.hasNext()) { *************** *** 430,435 **** String rsname = (String)rightSelector.getSelectedItem(); if (lsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! FunctionalSpace fs = fsf.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { --- 418,422 ---- String rsname = (String)rightSelector.getSelectedItem(); if (lsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpace fs = Project.getInstance().findFunctionalSpaceById(lsvalue.getId()); if (rsname.equals(SURFACES)) { *************** *** 450,455 **** } } else if (lsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! ConstructionSpace cs = csf.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { --- 437,441 ---- } } else if (lsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(lsvalue.getId()); if (rsname.equals(SURFACES)) { *************** *** 470,475 **** } } else if (lsname.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Element e = ef.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { --- 456,460 ---- } } else if (lsname.equals(ELEMENTS)) { ! Element e = Project.getInstance().findElementById(lsvalue.getId()); if (rsname.equals(SURFACES)) { *************** *** 490,495 **** } } else if (lsname.equals(PARTS)) { ! PartFacade pf = PartFacade.getInstance(); ! Part p = pf.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { --- 475,479 ---- } } else if (lsname.equals(PARTS)) { ! Part p = Project.getInstance().findPartById(lsvalue.getId()); if (rsname.equals(SURFACES)) { *************** *** 560,627 **** if (lsvalue != null && rsvalue != null) { if (lsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! FunctionalSpace fs = fsf.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { ! SurfaceFacade sf = SurfaceFacade.getInstance(); ! Surface s = sf.findById(rsvalue.getId()); s.removeDomain(fs); fs.getSurfaces().remove(s); ! fsf.update(fs); } else if (rsname.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Element e = ef.findById(rsvalue.getId()); fs.getElements().remove(e); ! fsf.update(fs); } } else if (lsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! ConstructionSpace cs = csf.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { ! SurfaceFacade sf = SurfaceFacade.getInstance(); ! Surface s = sf.findById(rsvalue.getId()); s.removeDomain(cs); cs.getSurfaces().remove(s); ! csf.update(cs); } else if (rsname.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Element e = ef.findById(rsvalue.getId()); cs.getElements().remove(e); ! csf.update(cs); } } else if (lsname.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Element e = ef.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { ! SurfaceFacade sf = SurfaceFacade.getInstance(); ! Surface s = sf.findById(rsvalue.getId()); s.removeDomain(e); e.getSurfaces().remove(s); ! ef.update(e); } else if (rsname.equals(PARTS)) { ! PartFacade pf = PartFacade.getInstance(); ! Part p = pf.findById(rsvalue.getId()); e.getParts().remove(p); ! ef.update(e); } } else if (lsname.equals(PARTS)) { ! PartFacade pf = PartFacade.getInstance(); ! Part p = pf.findById(lsvalue.getId()); if (rsname.equals(SURFACES)) { ! SurfaceFacade sf = SurfaceFacade.getInstance(); ! Surface s = sf.findById(rsvalue.getId()); s.removeDomain(p); p.getSurfaces().remove(s); ! pf.update(p); } } --- 544,600 ---- if (lsvalue != null && rsvalue != null) { if (lsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpace fs = Project.getInstance().findFunctionalSpaceById(lsvalue.getId()); if (rsname.equals(SURFACES)) { ! Surface s = Project.getInstance().findSurfaceById(rsvalue.getId()); s.removeDomain(fs); fs.getSurfaces().remove(s); ! Project.getInstance().update(fs); } else if (rsname.equals(ELEMENTS)) { ! Element e = Project.getInstance().findElementById(rsvalue.getId()); fs.getElements().remove(e); ! Project.getInstance().update(fs); } } else if (lsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(lsvalue.getId()); if (rsname.equals(SURFACES)) { ! Surface s = Project.getInstance().findSurfaceById(rsvalue.getId()); s.removeDomain(cs); cs.getSurfaces().remove(s); ! Project.getInstance().update(cs); } else if (rsname.equals(ELEMENTS)) { ! Element e = Project.getInstance().findElementById(rsvalue.getId()); cs.getElements().remove(e); ! Project.getInstance().update(cs); } } else if (lsname.equals(ELEMENTS)) { ! Element e = Project.getInstance().findElementById(lsvalue.getId()); if (rsname.equals(SURFACES)) { ! Surface s = Project.getInstance().findSurfaceById(rsvalue.getId()); s.removeDomain(e); e.getSurfaces().remove(s); ! Project.getInstance().update(e); } else if (rsname.equals(PARTS)) { ! Part p = Project.getInstance().findPartById(rsvalue.getId()); e.getParts().remove(p); ! Project.getInstance().update(e); } } else if (lsname.equals(PARTS)) { ! Part p = Project.getInstance().findPartById(lsvalue.getId()); if (rsname.equals(SURFACES)) { ! Surface s = Project.getInstance().findSurfaceById(rsvalue.getId()); s.removeDomain(p); p.getSurfaces().remove(s); ! Project.getInstance().update(p); } } Index: ToolsJoinActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ToolsJoinActionListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ToolsJoinActionListener.java 30 Sep 2005 18:02:22 -0000 1.3 --- ToolsJoinActionListener.java 2 Oct 2005 14:37:10 -0000 1.4 *************** *** 8,20 **** import net.sourceforge.bprocessor.model.ConstructionSpace; - import net.sourceforge.bprocessor.model.ConstructionSpaceFacade; import net.sourceforge.bprocessor.model.Element; - import net.sourceforge.bprocessor.model.ElementFacade; import net.sourceforge.bprocessor.model.FunctionalSpace; - import net.sourceforge.bprocessor.model.FunctionalSpaceFacade; import net.sourceforge.bprocessor.model.Part; ! import net.sourceforge.bprocessor.model.PartFacade; import net.sourceforge.bprocessor.model.Surface; - import net.sourceforge.bprocessor.model.SurfaceFacade; import net.sourceforge.bprocessor.model.Domain; --- 8,16 ---- 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 net.sourceforge.bprocessor.model.Domain; *************** *** 86,91 **** Vector leftValuesData = new Vector(); ! SurfaceFacade sf = SurfaceFacade.getInstance(); ! Collection surfaces = sf.findAll(); Iterator it = surfaces.iterator(); while (it.hasNext()) { --- 82,86 ---- Vector leftValuesData = new Vector(); ! Collection surfaces = Project.getInstance().getSurfaces(); Iterator it = surfaces.iterator(); while (it.hasNext()) { *************** *** 104,109 **** Vector rightValuesData = new Vector(); ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! Collection fss = fsf.findAll(); it = fss.iterator(); while (it.hasNext()) { --- 99,103 ---- Vector rightValuesData = new Vector(); ! Collection fss = Project.getInstance().getFunctionalSpaces(); it = fss.iterator(); while (it.hasNext()) { *************** *** 196,201 **** Vector leftValuesData = new Vector(); if (current.equals(SURFACES)) { ! SurfaceFacade sf = SurfaceFacade.getInstance(); ! Collection surfaces = sf.findAll(); Iterator it = surfaces.iterator(); while (it.hasNext()) { --- 190,194 ---- Vector leftValuesData = new Vector(); if (current.equals(SURFACES)) { ! Collection surfaces = Project.getInstance().getSurfaces(); Iterator it = surfaces.iterator(); while (it.hasNext()) { *************** *** 211,216 **** } else if (current.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Collection elements = ef.findAll(); Iterator it = elements.iterator(); while (it.hasNext()) { --- 204,208 ---- } else if (current.equals(ELEMENTS)) { ! Collection elements = Project.getInstance().getElements(); Iterator it = elements.iterator(); while (it.hasNext()) { *************** *** 224,229 **** } else if (current.equals(PARTS)) { ! PartFacade pf = PartFacade.getInstance(); ! Collection parts = pf.findAll(); Iterator it = parts.iterator(); while (it.hasNext()) { --- 216,220 ---- } else if (current.equals(PARTS)) { ! Collection parts = Project.getInstance().getParts(); Iterator it = parts.iterator(); while (it.hasNext()) { *************** *** 275,280 **** Vector rightValuesData = new Vector(); if (current.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! Collection fss = fsf.findAll(); Iterator it = fss.iterator(); while (it.hasNext()) { --- 266,270 ---- Vector rightValuesData = new Vector(); if (current.equals(FUNCTIONAL_SPACES)) { ! Collection fss = Project.getInstance().getFunctionalSpaces(); Iterator it = fss.iterator(); while (it.hasNext()) { *************** *** 283,288 **** } } else if (current.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! Collection css = csf.findAll(); Iterator it = css.iterator(); while (it.hasNext()) { --- 273,277 ---- } } else if (current.equals(CONSTRUCTION_SPACES)) { ! Collection css = Project.getInstance().getConstructionSpaces(); Iterator it = css.iterator(); while (it.hasNext()) { *************** *** 291,296 **** } } else if (current.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Collection elements = ef.findAll(); Iterator it = elements.iterator(); while (it.hasNext()) { --- 280,284 ---- } } else if (current.equals(ELEMENTS)) { ! Collection elements = Project.getInstance().getElements(); Iterator it = elements.iterator(); while (it.hasNext()) { *************** *** 299,304 **** } } else if (current.equals(PARTS)) { ! PartFacade pf = PartFacade.getInstance(); ! Collection parts = pf.findAll(); Iterator it = parts.iterator(); while (it.hasNext()) { --- 287,291 ---- } } else if (current.equals(PARTS)) { ! Collection parts = Project.getInstance().getParts(); Iterator it = parts.iterator(); while (it.hasNext()) { *************** *** 365,374 **** if (lsvalue != null && rsvalue != null) { if (lsname.equals(SURFACES)) { ! SurfaceFacade sf = SurfaceFacade.getInstance(); ! Surface s = sf.findById(lsvalue.getId()); if (rsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! FunctionalSpace fs = fsf.findById(rsvalue.getId()); if (fs.getSurfaces() == null) { --- 352,359 ---- if (lsvalue != null && rsvalue != null) { if (lsname.equals(SURFACES)) { ! Surface s = Project.getInstance().findSurfaceById(lsvalue.getId()); if (rsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpace fs = Project.getInstance().findFunctionalSpaceById(rsvalue.getId()); if (fs.getSurfaces() == null) { *************** *** 383,390 **** s.setFrontDomain(fs); fs.getSurfaces().add(s); ! fsf.update(fs); } else if (rsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! ConstructionSpace cs = csf.findById(rsvalue.getId()); if (cs.getSurfaces() == null) { --- 368,374 ---- s.setFrontDomain(fs); fs.getSurfaces().add(s); ! Project.getInstance().update(fs); } else if (rsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(rsvalue.getId()); if (cs.getSurfaces() == null) { *************** *** 399,406 **** s.setFrontDomain(cs); cs.getSurfaces().add(s); ! csf.update(cs); } else if (rsname.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Element e = ef.findById(rsvalue.getId()); if (e.getSurfaces() == null) { --- 383,389 ---- s.setFrontDomain(cs); cs.getSurfaces().add(s); ! Project.getInstance().update(cs); } else if (rsname.equals(ELEMENTS)) { ! Element e = Project.getInstance().findElementById(rsvalue.getId()); if (e.getSurfaces() == null) { *************** *** 415,422 **** s.setFrontDomain(e); e.getSurfaces().add(s); ! ef.update(e); } else if (rsname.equals(PARTS)) { ! PartFacade pf = PartFacade.getInstance(); ! Part p = pf.findById(rsvalue.getId()); if (p.getSurfaces() == null) { --- 398,404 ---- s.setFrontDomain(e); e.getSurfaces().add(s); ! Project.getInstance().update(e); } else if (rsname.equals(PARTS)) { ! Part p = Project.getInstance().findPartById(rsvalue.getId()); if (p.getSurfaces() == null) { *************** *** 431,443 **** s.setFrontDomain(p); p.getSurfaces().add(s); ! pf.update(p); } } else if (lsname.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Element e = ef.findById(lsvalue.getId()); if (rsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); ! FunctionalSpace fs = fsf.findById(rsvalue.getId()); if (fs.getElements() == null) { --- 413,423 ---- s.setFrontDomain(p); p.getSurfaces().add(s); ! Project.getInstance().update(p); } } else if (lsname.equals(ELEMENTS)) { ! Element e = Project.getInstance().findElementById(lsvalue.getId()); if (rsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpace fs = Project.getInstance().findFunctionalSpaceById(rsvalue.getId()); if (fs.getElements() == null) { *************** *** 445,452 **** } fs.getElements().add(e); ! fsf.update(fs); } else if (rsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! ConstructionSpace cs = csf.findById(rsvalue.getId()); if (cs.getElements() == null) { --- 425,431 ---- } fs.getElements().add(e); ! Project.getInstance().update(fs); } else if (rsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(rsvalue.getId()); if (cs.getElements() == null) { *************** *** 454,466 **** } cs.getElements().add(e); ! csf.update(cs); } } else if (lsname.equals(PARTS)) { ! PartFacade pf = PartFacade.getInstance(); ! Part p = pf.findById(lsvalue.getId()); if (rsname.equals(ELEMENTS)) { ! ElementFacade ef = ElementFacade.getInstance(); ! Element e = ef.findById(rsvalue.getId()); if (e.getParts() == null) { --- 433,443 ---- } cs.getElements().add(e); ! Project.getInstance().update(cs); } } else if (lsname.equals(PARTS)) { ! Part p = Project.getInstance().findPartById(lsvalue.getId()); if (rsname.equals(ELEMENTS)) { ! Element e = Project.getInstance().findElementById(rsvalue.getId()); if (e.getParts() == null) { *************** *** 468,472 **** } e.getParts().add(p); ! ef.update(e); } } --- 445,449 ---- } e.getParts().add(p); ! Project.getInstance().update(e); } } Index: CreateConstructorActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructorActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CreateConstructorActionListener.java 30 Sep 2005 12:36:09 -0000 1.4 --- CreateConstructorActionListener.java 2 Oct 2005 14:37:10 -0000 1.5 *************** *** 8,13 **** import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Surface; - import net.sourceforge.bprocessor.model.SurfaceFacade; import java.awt.event.ActionEvent; --- 8,13 ---- import net.sourceforge.bprocessor.gui.GUI; + import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; import java.awt.event.ActionEvent; *************** *** 44,52 **** if (result != null && !result.trim().equals("")) { - SurfaceFacade sf = SurfaceFacade.getInstance(); Surface s = new Surface(result.trim()); s.setConstructor(true); ! sf.create(s); } } --- 44,51 ---- if (result != null && !result.trim().equals("")) { Surface s = new Surface(result.trim()); s.setConstructor(true); ! Project.getInstance().intern(s); } } Index: CreateFunctionalSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateFunctionalSpaceActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CreateFunctionalSpaceActionListener.java 30 Sep 2005 12:36:09 -0000 1.4 --- CreateFunctionalSpaceActionListener.java 2 Oct 2005 14:37:10 -0000 1.5 *************** *** 9,13 **** import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.FunctionalSpace; ! import net.sourceforge.bprocessor.model.FunctionalSpaceFacade; import java.awt.event.ActionEvent; --- 9,13 ---- import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.FunctionalSpace; ! import net.sourceforge.bprocessor.model.Project; import java.awt.event.ActionEvent; *************** *** 44,51 **** if (result != null && !result.trim().equals("")) { - FunctionalSpaceFacade fsf = FunctionalSpaceFacade.getInstance(); FunctionalSpace fs = new FunctionalSpace(result.trim()); ! fsf.create(fs); } } --- 44,50 ---- if (result != null && !result.trim().equals("")) { FunctionalSpace fs = new FunctionalSpace(result.trim()); ! Project.getInstance().intern(fs); } } |