bprocessor-commit Mailing List for B-processor (Page 157)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael L. <he...@us...> - 2005-10-02 17:40:48
|
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) || |
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); } } |
From: Nordholt <nor...@us...> - 2005-10-02 17:29:30
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23086/actions Modified Files: ToolsJoinActionListener.java Log Message: made temporary changes to prevent crashes Index: ToolsJoinActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ToolsJoinActionListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ToolsJoinActionListener.java 28 Jul 2005 06:54:41 -0000 1.2 --- ToolsJoinActionListener.java 30 Sep 2005 18:02:22 -0000 1.3 *************** *** 17,20 **** --- 17,21 ---- import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.SurfaceFacade; + import net.sourceforge.bprocessor.model.Domain; import java.awt.BorderLayout; *************** *** 374,377 **** --- 375,385 ---- fs.setSurfaces(new HashSet()); } + //this is temporary until front and back domains are supported better. + //this will set the front domain to this domain + Domain front = s.getFrontDomain(); + if (front != null) { + front.removeSurface(s); + } + s.setFrontDomain(fs); fs.getSurfaces().add(s); fsf.update(fs); *************** *** 383,386 **** --- 391,401 ---- cs.setSurfaces(new HashSet()); } + //this is temporary until front and back domains are supported better. + //this will set the front domain to this domain + Domain front = s.getFrontDomain(); + if (front != null) { + front.removeSurface(s); + } + s.setFrontDomain(cs); cs.getSurfaces().add(s); csf.update(cs); *************** *** 392,395 **** --- 407,417 ---- e.setSurfaces(new HashSet()); } + //this is temporary until front and back domains are supported better. + //this will set the front domain to this domain + Domain front = s.getFrontDomain(); + if (front != null) { + front.removeSurface(s); + } + s.setFrontDomain(e); e.getSurfaces().add(s); ef.update(e); *************** *** 401,404 **** --- 423,433 ---- p.setSurfaces(new HashSet()); } + //this is temporary until front and back domains are supported better. + //this will set the front domain to this domain + Domain front = s.getFrontDomain(); + if (front != null) { + front.removeSurface(s); + } + s.setFrontDomain(p); p.getSurfaces().add(s); pf.update(p); |
From: Nordholt <nor...@us...> - 2005-10-01 05:20:19
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20958 Modified Files: SelectTool.java Log Message: Pressing the domain labels brins up the domain popup Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** SelectTool.java 30 Sep 2005 12:47:09 -0000 1.26 --- SelectTool.java 30 Sep 2005 17:54:36 -0000 1.27 *************** *** 9,12 **** --- 9,13 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.view.View; + import net.sourceforge.bprocessor.gl.DomainPopupListener; import net.sourceforge.bprocessor.kernel.notification.Notification; *************** *** 30,33 **** --- 31,38 ---- import java.awt.event.KeyEvent; import java.awt.event.InputEvent; + import java.awt.event.MouseListener; + + import javax.swing.JPopupMenu; + import javax.swing.JMenuItem; import java.util.Iterator; *************** *** 76,80 **** protected void moved(MouseEvent e) { //findTarget(e); ! target = null; } --- 81,85 ---- protected void moved(MouseEvent e) { //findTarget(e); ! //target = null; } *************** *** 85,89 **** protected void dragged(MouseEvent e) { //findTarget(e); ! target = null; } --- 90,94 ---- protected void dragged(MouseEvent e) { //findTarget(e); ! //target = null; } *************** *** 120,124 **** } else { findTarget(e); ! if (target == null) { Iterator it = new HashSet(selection).iterator(); while (it.hasNext()) { --- 125,153 ---- } else { findTarget(e); ! if (target instanceof String) { ! String side = (String)target; ! JPopupMenu pp = new JPopupMenu(side); ! Set domains = DomainFacade.getInstance().findAll(); ! Iterator domIt = domains.iterator(); ! Iterator selIt = new HashSet(selection).iterator(); ! Surface surface = null; ! if (selIt.hasNext()) { ! Object o = selIt.next(); ! if (o instanceof Surface) { ! surface = (Surface)o; ! } ! } ! while (domIt.hasNext()) { ! Domain domain = (Domain)domIt.next(); ! JMenuItem domainItem = new JMenuItem(domain.getName()); ! MouseListener ml = new DomainPopupListener(domain, ! surface, ! side.equals("front")); ! domainItem.addMouseListener(ml); ! pp.add(domainItem); ! } ! pp.pack(); ! glv.popup(pp, e.getX(), e.getY()); ! } else if (target == null) { Iterator it = new HashSet(selection).iterator(); while (it.hasNext()) { *************** *** 146,150 **** } } ! /** * Sends the notification for select --- 175,179 ---- } } ! /** * Sends the notification for select |
From: Nordholt <nor...@us...> - 2005-09-30 19:25:06
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20505 Modified Files: GLView.java Log Message: added method for showing popup menues on the canvas Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** GLView.java 14 Sep 2005 14:02:13 -0000 1.15 --- GLView.java 30 Sep 2005 17:52:06 -0000 1.16 *************** *** 27,30 **** --- 27,31 ---- import javax.swing.JPanel; import javax.swing.JLabel; + import javax.swing.JPopupMenu; import org.apache.log4j.Logger; *************** *** 170,174 **** return glc; } ! /** * The length field class --- 171,185 ---- return glc; } ! ! /** ! * Displays the popup menu at the given coordinates ! * @param pp the popup menu ! * @param x the x coordinate ! * @param y the y coordinate ! */ ! public void popup(JPopupMenu pp, int x, int y) { ! pp.show(glc, x, y); ! } ! /** * The length field class *************** *** 177,181 **** /** The logger */ private Logger log = Logger.getLogger(LengthField.class); ! /** * The constructor --- 188,192 ---- /** The logger */ private Logger log = Logger.getLogger(LengthField.class); ! /** * The constructor *************** *** 209,213 **** return 0; } ! /** * Handle a notification --- 220,224 ---- return 0; } ! /** * Handle a notification |
From: Nordholt <nor...@us...> - 2005-09-30 18:32:18
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22017 Modified Files: Surface.java Log Message: removed out commented debugger code Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Surface.java 30 Sep 2005 11:15:34 -0000 1.34 --- Surface.java 30 Sep 2005 17:59:13 -0000 1.35 *************** *** 474,487 **** double tHole = holeDet / denominator; double epsilon = 0.00001; - //log.info("1st ineq: " + (Math.abs((surfOr.getX() + surfDir.getX() * tSurf) - - // (holeOr.getX() + holeDir.getX() * tHole)))); - //log.info("2st ineq: " + (Math.abs((surfOr.getY() + surfDir.getY() * tSurf) - - //(holeOr.getY() + holeDir.getY() * tHole)))); - //log.info("3st ineq: " + (Math.abs((surfOr.getZ() + surfDir.getZ() * tSurf) - - // (holeOr.getZ() + holeDir.getZ() * tHole)))); - //checking if there is an intersection and if it is within the line segments - //log.info("X: " + surfOr.getX() + "::" + holeOr.getX()); - //log.info("Y: " + surfOr.getY() + "::" + holeOr.getY()); - //log.info("Z: " + surfOr.getZ() + "::" + holeOr.getZ()); if ((tSurf > 0) && (tHole > 0) && (Math.abs((surfOr.getX() + surfDir.getX() * tSurf) - --- 474,477 ---- *************** *** 495,499 **** < epsilon)) { //the parameters for the "from" point on the edges - //log.info("Intersection"); double tSurfFrom = 0; double tHoleFrom = 0; --- 485,488 ---- *************** *** 517,524 **** } if (tHoleFrom > tHole && tSurfFrom >= tSurf) { - //log.info("not count base"); contained = false; } else if (tSurfFrom >= tSurf) { - //log.info("Count: " + crossings); crossings++; } --- 506,511 ---- *************** *** 527,531 **** } if (crossings % 2 == 0) { - //log.info("count based"); contained = false; } --- 514,517 ---- *************** *** 594,597 **** --- 580,597 ---- /** + * Removes the domain from the surface, if the given domain + * is either the front or back domain. + * @param domain the domain to remove. + */ + public void removeDomain(Domain domain) { + if (domain.equals(frontDomain)) { + setFrontDomain(null); + } + if (domain.equals(backDomain)) { + setBackDomain(null); + } + } + + /** * Returns the normal to this * @return A vector normal for this surface, null if the surface consists of only one edge |
From: Nordholt <nor...@us...> - 2005-09-30 18:13:55
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20604 Added Files: DomainPopupListener.java Log Message: Added listener class for the domain popup --- NEW FILE: DomainPopupListener.java --- //--------------------------------------------------------------------------------- // $Id: DomainPopupListener.java,v 1.1 2005/09/30 17:52:43 nordholt Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.gl; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Domain; import net.sourceforge.bprocessor.model.DomainFacade; import net.sourceforge.bprocessor.model.SurfaceFacade; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import org.apache.log4j.Logger; /** * The listener for the domain popup menu. */ public class DomainPopupListener extends MouseAdapter { /** The Log */ private static Logger log = Logger.getLogger(GLView.class); /** The domain */ private Domain domain; /** The Surface */ private Surface surface; /** Boolean telling if this is for the front or back of the surface*/ private boolean front; /** * Constructs a listener for an item in the domain popup * @param domain the domain * @param surface the surface * @param front werther or not this popup for the back or front of the back of the surface */ public DomainPopupListener(Domain domain, Surface surface, boolean front) { this.domain = domain; this.surface = surface; this.front = front; } /** * Invoked when mouse is pressed * @param e a mouseevent */ public void mousePressed(MouseEvent e) { if (front) { surface.setFrontDomain(domain); domain.addSurface(surface); } else { surface.setBackDomain(domain); domain.addSurface(surface); } DomainFacade.getInstance().update(domain); SurfaceFacade.getInstance().update(surface); } } |
From: Nordholt <nor...@us...> - 2005-09-30 18:11:36
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21771 Modified Files: Domain.java Log Message: added update on a domain when a surface is removed Index: Domain.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Domain.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Domain.java 21 Sep 2005 14:04:33 -0000 1.8 --- Domain.java 30 Sep 2005 17:58:06 -0000 1.9 *************** *** 148,151 **** --- 148,152 ---- if (s != null && s.contains(surface)) { s.remove(surface); + DomainFacade.getInstance().update(this); return true; } |
From: rimestad <rim...@us...> - 2005-09-30 16:31:09
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31734/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java Log Message: Change from CTRL to ALT as rotation button for 1-button mouse handling Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** AbstractTool.java 30 Sep 2005 12:47:09 -0000 1.20 --- AbstractTool.java 30 Sep 2005 16:30:59 -0000 1.21 *************** *** 58,64 **** protected static final double EPSILON = 0.4; - /** The zoom action listener */ - private static ActionListener zoomAction; - /** The move action listener */ private static ActionListener moveAction; --- 58,61 ---- *************** *** 86,90 **** timer.start(); moveAction = new CameraMoveTimer(this, glv); - zoomAction = new CameraZoomTimer(this, glv); } --- 83,86 ---- *************** *** 200,209 **** pressPos[0] = e.getX(); pressPos[1] = e.getY(); ! int zoommask = InputEvent.ALT_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK; ! int rotamask = InputEvent.CTRL_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK; ! ! if (currentButton == MouseEvent.BUTTON2 || (e.getModifiersEx() & zoommask) == zoommask) { ! timer.addActionListener(zoomAction); ! } else if (currentButton == MouseEvent.BUTTON3 || (e.getModifiersEx() & rotamask) == rotamask) { timer.addActionListener(moveAction); } --- 196,201 ---- pressPos[0] = e.getX(); pressPos[1] = e.getY(); ! int rotamask = InputEvent.ALT_DOWN_MASK; ! if (currentButton == MouseEvent.BUTTON3 || (e.getModifiersEx() & rotamask) == rotamask) { timer.addActionListener(moveAction); } *************** *** 219,235 **** public void mouseReleased(MouseEvent e) { int currentButton = e.getButton(); - int zoommask = InputEvent.ALT_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK; - int rotamask = InputEvent.CTRL_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK; ! if (currentButton == MouseEvent.BUTTON3 || (e.getModifiersEx() & rotamask) == rotamask) { ! timer.removeActionListener(moveAction); ! this.dx = 0; ! this.dy = 0; ! } else if (currentButton == MouseEvent.BUTTON2 || ! (e.getModifiersEx() & zoommask) == zoommask) { ! timer.removeActionListener(zoomAction); ! this.dx = 0; ! this.dy = 0; ! } released(e); glv.repaint(true); --- 211,219 ---- public void mouseReleased(MouseEvent e) { int currentButton = e.getButton(); ! timer.removeActionListener(moveAction); ! this.dx = 0; ! this.dy = 0; ! released(e); glv.repaint(true); |
From: rimestad <rim...@us...> - 2005-09-30 15:51:53
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19730/src/net/sourceforge/bprocessor/gl/view Modified Files: View3D.java Log Message: fixed rotation so it now rotates around the center of view Index: View3D.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View3D.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** View3D.java 16 Sep 2005 12:09:07 -0000 1.16 --- View3D.java 30 Sep 2005 15:51:45 -0000 1.17 *************** *** 73,84 **** gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, new float[] {0.0f, 0.0f, 0.0f, 1.0f}); ! glu.gluLookAt(0.0 + center[0], 25.0 * getZoomFactor() + center[1], 0.0 + center[2], ! center[0], center[1], center[2], 0.0, 0.0, 1.0); - - //gl.glMultMatrixd(viewTrans); gl.glRotated(rotationX, 1.0, 0.0, 0.0); gl.glRotated(rotationZ, 0.0, 0.0, 1.0); ! if (picking == 0) { gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, modelMatrix); --- 73,83 ---- gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, new float[] {0.0f, 0.0f, 0.0f, 1.0f}); ! glu.gluLookAt(0.0, 25.0 * getZoomFactor(), 0.0, ! 0.0, 0.0, 0.0, 0.0, 0.0, 1.0); gl.glRotated(rotationX, 1.0, 0.0, 0.0); gl.glRotated(rotationZ, 0.0, 0.0, 1.0); ! gl.glMultMatrixd(viewTrans); ! if (picking == 0) { gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, modelMatrix); *************** *** 94,100 **** public void translateCenter(double [] mv) { if (mv.length == 3) { ! this.center[0] -= mv[0]; ! this.center[1] += mv[2]; ! this.center[2] += mv[1]; } else { log.error("[translateViewMatrix] Wrong parameter size"); --- 93,102 ---- public void translateCenter(double [] mv) { if (mv.length == 3) { ! this.viewTrans[12] -= modelMatrix[0] * mv[0] + modelMatrix[1] * mv[1] + ! modelMatrix[2] * mv[2]; ! this.viewTrans[13] -= modelMatrix[4] * mv[0] + modelMatrix[5] * mv[1] + ! modelMatrix[6] * mv[2]; ! this.viewTrans[14] -= modelMatrix[8] * mv[0] + modelMatrix[9] * mv[1] + ! modelMatrix[10] * mv[2]; } else { log.error("[translateViewMatrix] Wrong parameter size"); |
From: Michael L. <he...@us...> - 2005-09-30 12:47:57
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6406/src/net/sourceforge/bprocessor/model Modified Files: Edge.java Vertex.java EdgeFacade.java VertexFacade.java SurfaceFacade.java Log Message: Change facades Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Edge.java 28 Sep 2005 13:42:48 -0000 1.12 --- Edge.java 30 Sep 2005 12:47:46 -0000 1.13 *************** *** 11,14 **** --- 11,17 ---- import org.apache.log4j.Logger; + + import java.util.HashSet; + import java.util.Iterator; import java.util.Set; *************** *** 285,289 **** */ public Set getSurfaces() { ! return SurfaceFacade.getInstance().findByEdge(this); } --- 288,301 ---- */ public Set getSurfaces() { ! Set result = new HashSet(); ! Set surfaces = SurfaceFacade.getInstance().findAll(); ! Iterator iter = surfaces.iterator(); ! while (iter.hasNext()) { ! Surface current = (Surface) iter.next(); ! if (current.contains(this)) { ! result.add(current); ! } ! } ! return result; } Index: EdgeFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EdgeFacade.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** EdgeFacade.java 30 Sep 2005 11:35:06 -0000 1.8 --- EdgeFacade.java 30 Sep 2005 12:47:46 -0000 1.9 *************** *** 224,262 **** return result; } - - /** - * Find edges that has a vertex - * @param v The vertex - * @return The edges - */ - public synchronized Set findByVertex(Vertex v) { - Set result = new HashSet(); - - HibernateUtil hu = HibernateUtil.getInstance(); - Transaction tx = null; - try { - Session session = hu.currentSession(); - tx = session.beginTransaction(); - - Query q = session.createQuery("SELECT e FROM Edge AS e " + - "WHERE e.from.id = :id OR e.to.id = :id"); - q.setLong("id", v.getId().longValue()); - - Iterator it = q.iterate(); - while (it.hasNext()) { - result.add((Edge)it.next()); - } - - tx.commit(); - } catch (Exception ex) { - if (tx != null) { - tx.rollback(); - } - log.error(ex.getMessage(), ex); - } finally { - hu.closeSession(); - } - - return result; - } } --- 224,226 ---- Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Vertex.java 28 Sep 2005 13:42:48 -0000 1.11 --- Vertex.java 30 Sep 2005 12:47:46 -0000 1.12 *************** *** 8,11 **** --- 8,13 ---- import java.io.Serializable; + import java.util.HashSet; + import java.util.Iterator; import java.util.Set; *************** *** 186,190 **** */ public Set getEdges() { ! return EdgeFacade.getInstance().findByVertex(this); } --- 188,201 ---- */ public Set getEdges() { ! Set result = new HashSet(); ! Set edges = EdgeFacade.getInstance().findAll(); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! if (current.contains(this)) { ! result.add(current); ! } ! } ! return result; } *************** *** 264,268 **** */ public double length() { ! return Math.sqrt(Math.abs(getX() * getX() + getY() * getY() + getZ() * getZ())); } --- 275,291 ---- */ public double length() { ! return Math.sqrt(getX() * getX() + getY() * getY() + getZ() * getZ()); ! } ! ! /** ! * Compute distance from v to this vertex ! * @param v The vertex to compute the distance to ! * @return The distance ! */ ! public double distance(Vertex v) { ! double dx = v.getX() - getX(); ! double dy = v.getY() - getY(); ! double dz = v.getZ() - getZ(); ! return Math.sqrt(dx * dx + dy * dy + dz * dz); } Index: SurfaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceFacade.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SurfaceFacade.java 30 Sep 2005 11:35:06 -0000 1.12 --- SurfaceFacade.java 30 Sep 2005 12:47:46 -0000 1.13 *************** *** 241,280 **** return result; } - - /** - * Find surfaces based upon an edge - * @param e The edge - * @return The surfaces - */ - public synchronized Set findByEdge(Edge e) { - Set result = new HashSet(); - - HibernateUtil hu = HibernateUtil.getInstance(); - Transaction tx = null; - try { - Session session = hu.currentSession(); - tx = session.beginTransaction(); - - Query q = session.createQuery("SELECT s FROM Surface AS s " + - "JOIN s.edges AS edges " + - "WHERE edges.id = :id"); - q.setLong("id", e.getId().longValue()); - - Iterator it = q.iterate(); - while (it.hasNext()) { - result.add((Surface)it.next()); - } - - tx.commit(); - } catch (Exception ex) { - if (tx != null) { - tx.rollback(); - } - log.error(ex.getMessage(), ex); - } finally { - hu.closeSession(); - } - - return result; - } } --- 241,243 ---- Index: VertexFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/VertexFacade.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** VertexFacade.java 30 Sep 2005 11:35:06 -0000 1.9 --- VertexFacade.java 30 Sep 2005 12:47:46 -0000 1.10 *************** *** 235,278 **** public synchronized Set findByLocation(double x, double y, double z, double delta) { Set result = new HashSet(); ! ! HibernateUtil hu = HibernateUtil.getInstance(); ! Transaction tx = null; ! try { ! Session session = hu.currentSession(); ! tx = session.beginTransaction(); ! ! double minX = x - delta; ! double maxX = x + delta; ! double minY = y - delta; ! double maxY = y + delta; ! double minZ = z - delta; ! double maxZ = z + delta; ! ! Query q = session.createQuery("SELECT v FROM Vertex AS v WHERE " + ! "v.x BETWEEN :minX AND :maxX AND " + ! "v.y BETWEEN :minY AND :maxY AND " + ! "v.z BETWEEN :minZ AND :maxZ"); ! q.setDouble("minX", minX); ! q.setDouble("maxX", maxX); ! q.setDouble("minY", minY); ! q.setDouble("maxY", maxY); ! q.setDouble("minZ", minZ); ! q.setDouble("maxZ", maxZ); ! ! Iterator it = q.iterate(); ! while (it.hasNext()) { ! result.add((Vertex)it.next()); ! } ! ! tx.commit(); ! } catch (Exception ex) { ! if (tx != null) { ! tx.rollback(); } - log.error(ex.getMessage(), ex); - } finally { - hu.closeSession(); } - return result; } --- 235,249 ---- public synchronized Set findByLocation(double x, double y, double z, double delta) { Set result = new HashSet(); ! Set vertices = findAll(); ! Iterator iter = vertices.iterator(); ! double limit = delta; ! Vertex tester = new Vertex("", x, y, z); ! while (iter.hasNext()) { ! Vertex current = (Vertex) iter.next(); ! double distance = current.distance(tester); ! if (distance <= limit) { ! result.add(current); } } return result; } |
From: Michael L. <he...@us...> - 2005-09-30 12:47:18
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6232/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java ExtrusionTool.java SelectTool.java Log Message: Fixed create calls Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** SelectTool.java 29 Sep 2005 21:02:34 -0000 1.25 --- SelectTool.java 30 Sep 2005 12:47:09 -0000 1.26 *************** *** 96,100 **** if (e.getClickCount() >= 2 && target instanceof Surface) { DomainFacade df = DomainFacade.getInstance(); ! Set ds = df.findBySurface((Surface)target); if (!ds.isEmpty()) { Iterator dit = ds.iterator(); --- 96,107 ---- if (e.getClickCount() >= 2 && target instanceof Surface) { DomainFacade df = DomainFacade.getInstance(); ! Set ds = new HashSet(); ! Surface surf = (Surface) target; ! if (surf.getBackDomain() != null) { ! ds.add(surf.getBackDomain()); ! } ! if (surf.getFrontDomain() != null) { ! ds.add(surf.getFrontDomain()); ! } if (!ds.isEmpty()) { Iterator dit = ds.iterator(); Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ExtrusionTool.java 29 Sep 2005 10:46:41 -0000 1.17 --- ExtrusionTool.java 30 Sep 2005 12:47:09 -0000 1.18 *************** *** 198,202 **** Domain newCSpace = extendSurf.getBackDomain(); if (newCSpace == null) { ! newCSpace = ConstructionSpaceFacade.getInstance().create(new ConstructionSpace("innerSpace")); } Domain outer = extendSurf.getFrontDomain(); --- 198,203 ---- Domain newCSpace = extendSurf.getBackDomain(); if (newCSpace == null) { ! newCSpace = new ConstructionSpace("innerSpace"); ! ConstructionSpaceFacade.getInstance().create((ConstructionSpace) newCSpace); } Domain outer = extendSurf.getFrontDomain(); Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** AbstractTool.java 29 Sep 2005 10:46:41 -0000 1.19 --- AbstractTool.java 30 Sep 2005 12:47:09 -0000 1.20 *************** *** 277,281 **** Vertex v = new Vertex("V" + vertexNum); vertexNum++; ! v = VertexFacade.getInstance().create(v); v.setX(coord[0]); --- 277,281 ---- Vertex v = new Vertex("V" + vertexNum); vertexNum++; ! VertexFacade.getInstance().create(v); v.setX(coord[0]); *************** *** 326,330 **** Edge e = new Edge("E" + edgeNum); edgeNum++; ! e = EdgeFacade.getInstance().create(e); e.setTo(to); --- 326,330 ---- Edge e = new Edge("E" + edgeNum); edgeNum++; ! EdgeFacade.getInstance().create(e); e.setTo(to); *************** *** 360,364 **** Surface s = new Surface("S" + surfaceNum); surfaceNum++; ! s = SurfaceFacade.getInstance().create(s); s.setEdges(list); --- 360,364 ---- Surface s = new Surface("S" + surfaceNum); surfaceNum++; ! SurfaceFacade.getInstance().create(s); s.setEdges(list); |
From: Michael L. <he...@us...> - 2005-09-30 12:36:18
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3862/src/net/sourceforge/bprocessor/gui/actions Modified Files: CreateConstructionSpaceActionListener.java CreateConstructorActionListener.java CreateElementActionListener.java CreateFunctionalSpaceActionListener.java CreatePartActionListener.java CreateSurfaceActionListener.java Log Message: Fixed calls of create Index: CreateElementActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateElementActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CreateElementActionListener.java 28 Jul 2005 10:18:40 -0000 1.4 --- CreateElementActionListener.java 30 Sep 2005 12:36:09 -0000 1.5 *************** *** 47,51 **** Element el = new Element(result.trim()); ! el = ef.create(el); } } --- 47,51 ---- Element el = new Element(result.trim()); ! ef.create(el); } } Index: CreatePartActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreatePartActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CreatePartActionListener.java 28 Jul 2005 10:18:40 -0000 1.4 --- CreatePartActionListener.java 30 Sep 2005 12:36:09 -0000 1.5 *************** *** 47,51 **** Part p = new Part(result.trim()); ! p = pf.create(p); } } --- 47,51 ---- Part p = new Part(result.trim()); ! pf.create(p); } } Index: CreateSurfaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateSurfaceActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CreateSurfaceActionListener.java 28 Jul 2005 10:18:40 -0000 1.4 --- CreateSurfaceActionListener.java 30 Sep 2005 12:36:09 -0000 1.5 *************** *** 47,51 **** Surface s = new Surface(result.trim()); ! s = sf.create(s); } } --- 47,51 ---- Surface s = new Surface(result.trim()); ! sf.create(s); } } Index: CreateConstructionSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructionSpaceActionListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CreateConstructionSpaceActionListener.java 28 Jul 2005 10:18:40 -0000 1.3 --- CreateConstructionSpaceActionListener.java 30 Sep 2005 12:36:09 -0000 1.4 *************** *** 47,51 **** ConstructionSpace cs = new ConstructionSpace(result.trim()); ! cs = csf.create(cs); } } --- 47,51 ---- ConstructionSpace cs = new ConstructionSpace(result.trim()); ! csf.create(cs); } } Index: CreateConstructorActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructorActionListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CreateConstructorActionListener.java 28 Jul 2005 06:54:40 -0000 1.3 --- CreateConstructorActionListener.java 30 Sep 2005 12:36:09 -0000 1.4 *************** *** 48,52 **** s.setConstructor(true); ! s = sf.create(s); } } --- 48,52 ---- s.setConstructor(true); ! sf.create(s); } } Index: CreateFunctionalSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateFunctionalSpaceActionListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CreateFunctionalSpaceActionListener.java 28 Jul 2005 10:18:40 -0000 1.3 --- CreateFunctionalSpaceActionListener.java 30 Sep 2005 12:36:09 -0000 1.4 *************** *** 47,51 **** FunctionalSpace fs = new FunctionalSpace(result.trim()); ! fs = fsf.create(fs); } } --- 47,51 ---- FunctionalSpace fs = new FunctionalSpace(result.trim()); ! fsf.create(fs); } } |
From: Michael L. <he...@us...> - 2005-09-30 11:35:15
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23625/src/net/sourceforge/bprocessor/model Modified Files: PartFacade.java EdgeFacade.java ConstructionSpaceFacade.java ElementFacade.java AttributeFacade.java VertexFacade.java SurfaceFacade.java FunctionalSpaceFacade.java Log Message: Changed return of all create methods to void Index: ConstructionSpaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ConstructionSpaceFacade.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ConstructionSpaceFacade.java 30 Sep 2005 11:15:34 -0000 1.11 --- ConstructionSpaceFacade.java 30 Sep 2005 11:35:06 -0000 1.12 *************** *** 50,56 **** * Create a construction space * @param c The construction space - * @return The construction space */ ! public synchronized ConstructionSpace create(ConstructionSpace c) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; --- 50,55 ---- * Create a construction space * @param c The construction space */ ! public synchronized void create(ConstructionSpace c) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; *************** *** 73,78 **** hu.closeSession(); } - - return c; } --- 72,75 ---- Index: ElementFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ElementFacade.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ElementFacade.java 21 Sep 2005 08:57:07 -0000 1.6 --- ElementFacade.java 30 Sep 2005 11:35:06 -0000 1.7 *************** *** 50,56 **** * Create an element * @param e The element - * @return The element */ ! public synchronized Element create(Element e) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; --- 50,55 ---- * Create an element * @param e The element */ ! public synchronized void create(Element e) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; *************** *** 73,78 **** hu.closeSession(); } - - return e; } --- 72,75 ---- Index: AttributeFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/AttributeFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AttributeFacade.java 20 Sep 2005 12:56:45 -0000 1.2 --- AttributeFacade.java 30 Sep 2005 11:35:06 -0000 1.3 *************** *** 43,49 **** * Create an attribute * @param a The attribute - * @return The created attribute */ ! public synchronized Attribute create(Attribute a) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; --- 43,48 ---- * Create an attribute * @param a The attribute */ ! public synchronized void create(Attribute a) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; *************** *** 63,68 **** hu.closeSession(); } - - return a; } --- 62,65 ---- Index: SurfaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceFacade.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SurfaceFacade.java 21 Sep 2005 14:04:33 -0000 1.11 --- SurfaceFacade.java 30 Sep 2005 11:35:06 -0000 1.12 *************** *** 49,55 **** * Create a surface * @param s The surface - * @return The created surface */ ! public synchronized Surface create(Surface s) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; --- 49,54 ---- * Create a surface * @param s The surface */ ! public synchronized void create(Surface s) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; *************** *** 72,77 **** hu.closeSession(); } - - return s; } --- 71,74 ---- Index: VertexFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/VertexFacade.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** VertexFacade.java 30 Sep 2005 10:52:02 -0000 1.8 --- VertexFacade.java 30 Sep 2005 11:35:06 -0000 1.9 *************** *** 50,56 **** * Create a vertex * @param v The vertex - * @return The vertex */ ! public synchronized Vertex create(Vertex v) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; --- 50,55 ---- * Create a vertex * @param v The vertex */ ! public synchronized void create(Vertex v) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; *************** *** 73,77 **** hu.closeSession(); } - return v; } --- 72,75 ---- Index: EdgeFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EdgeFacade.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EdgeFacade.java 21 Sep 2005 08:57:07 -0000 1.7 --- EdgeFacade.java 30 Sep 2005 11:35:06 -0000 1.8 *************** *** 50,56 **** * Create an edge * @param e The edge - * @return The edge */ ! public synchronized Edge create(Edge e) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; --- 50,55 ---- * Create an edge * @param e The edge */ ! public synchronized void create(Edge e) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; *************** *** 73,78 **** hu.closeSession(); } - - return e; } --- 72,75 ---- Index: PartFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/PartFacade.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PartFacade.java 21 Sep 2005 08:57:07 -0000 1.6 --- PartFacade.java 30 Sep 2005 11:35:06 -0000 1.7 *************** *** 50,56 **** * Create a part * @param p The part - * @return The part */ ! public synchronized Part create(Part p) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; --- 50,55 ---- * Create a part * @param p The part */ ! public synchronized void create(Part p) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; *************** *** 73,78 **** hu.closeSession(); } - - return p; } --- 72,75 ---- Index: FunctionalSpaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/FunctionalSpaceFacade.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** FunctionalSpaceFacade.java 30 Sep 2005 11:15:34 -0000 1.11 --- FunctionalSpaceFacade.java 30 Sep 2005 11:35:06 -0000 1.12 *************** *** 50,56 **** * Create a functional space * @param f The functional space - * @return The functional space */ ! public synchronized FunctionalSpace create(FunctionalSpace f) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; --- 50,55 ---- * Create a functional space * @param f The functional space */ ! public synchronized void create(FunctionalSpace f) { HibernateUtil hu = HibernateUtil.getInstance(); Transaction tx = null; *************** *** 73,78 **** hu.closeSession(); } - - return f; } --- 72,75 ---- |
From: Michael L. <he...@us...> - 2005-09-30 11:35:15
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23625/src/net/sourceforge/bprocessor/model/xml Modified Files: PersistenceManager.java Log Message: Changed return of all create methods to void Index: PersistenceManager.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/xml/PersistenceManager.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PersistenceManager.java 30 Sep 2005 10:52:00 -0000 1.8 --- PersistenceManager.java 30 Sep 2005 11:35:06 -0000 1.9 *************** *** 135,139 **** new net.sourceforge.bprocessor.model.Attribute(a.getName(), a.getType(), a.getValue()); ! am = AttributeFacade.getInstance().create(am); mapper.put(new Long(a.getId()), am.getId()); --- 135,139 ---- new net.sourceforge.bprocessor.model.Attribute(a.getName(), a.getType(), a.getValue()); ! AttributeFacade.getInstance().create(am); mapper.put(new Long(a.getId()), am.getId()); *************** *** 154,158 **** ConstructionSpace csm = new ConstructionSpace(cs.getName()); ! csm = ConstructionSpaceFacade.getInstance().create(csm); mapper.put(new Long(cs.getId()), csm.getId()); --- 154,158 ---- ConstructionSpace csm = new ConstructionSpace(cs.getName()); ! ConstructionSpaceFacade.getInstance().create(csm); mapper.put(new Long(cs.getId()), csm.getId()); *************** *** 171,175 **** FunctionalSpace fsm = new FunctionalSpace(fs.getName()); ! fsm = FunctionalSpaceFacade.getInstance().create(fsm); mapper.put(new Long(fs.getId()), fsm.getId()); --- 171,175 ---- FunctionalSpace fsm = new FunctionalSpace(fs.getName()); ! FunctionalSpaceFacade.getInstance().create(fsm); mapper.put(new Long(fs.getId()), fsm.getId()); *************** *** 190,194 **** new net.sourceforge.bprocessor.model.Element(e.getName()); ! em = ElementFacade.getInstance().create(em); mapper.put(new Long(e.getId()), em.getId()); --- 190,194 ---- new net.sourceforge.bprocessor.model.Element(e.getName()); ! ElementFacade.getInstance().create(em); mapper.put(new Long(e.getId()), em.getId()); *************** *** 209,213 **** new net.sourceforge.bprocessor.model.Part(p.getName()); ! pm = PartFacade.getInstance().create(pm); mapper.put(new Long(p.getId()), pm.getId()); --- 209,213 ---- new net.sourceforge.bprocessor.model.Part(p.getName()); ! PartFacade.getInstance().create(pm); mapper.put(new Long(p.getId()), pm.getId()); *************** *** 232,236 **** sm.setIsInner(s.isIsinner()); ! sm = SurfaceFacade.getInstance().create(sm); mapper.put(new Long(s.getId()), sm.getId()); --- 232,236 ---- sm.setIsInner(s.isIsinner()); ! SurfaceFacade.getInstance().create(sm); mapper.put(new Long(s.getId()), sm.getId()); *************** *** 251,255 **** new net.sourceforge.bprocessor.model.Edge(e.getName()); ! em = EdgeFacade.getInstance().create(em); mapper.put(new Long(e.getId()), em.getId()); --- 251,255 ---- new net.sourceforge.bprocessor.model.Edge(e.getName()); ! EdgeFacade.getInstance().create(em); mapper.put(new Long(e.getId()), em.getId()); *************** *** 275,279 **** vm.setW(v.getW()); ! vm = VertexFacade.getInstance().create(vm); mapper.put(new Long(v.getId()), vm.getId()); --- 275,279 ---- vm.setW(v.getW()); ! VertexFacade.getInstance().create(vm); mapper.put(new Long(v.getId()), vm.getId()); |
From: Michael L. <he...@us...> - 2005-09-30 11:15:43
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20476/src/net/sourceforge/bprocessor/model Modified Files: DomainFacade.java Surface.java ConstructionSpaceFacade.java FunctionalSpaceFacade.java Log Message: Removed some unused methods Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Surface.java 30 Sep 2005 08:14:24 -0000 1.33 --- Surface.java 30 Sep 2005 11:15:34 -0000 1.34 *************** *** 533,561 **** } - /** - * Get the front Space - * @return The space in front of the surfacespace - */ - public Space getFrontSpace() { - Set set = FunctionalSpaceFacade.getInstance().findBySurface(this); - //log.info("spaces found " + set.size()); - if (set != null) { - Iterator it = set.iterator(); - if (it.hasNext()) { - Space s = (Space)it.next(); - return s; - } - } - return null; - } - - /** - * Get the rear Space - * @return The rear space - */ - public Space getRearSpace() { - return null; - } - /** * Get the whether this is an inner surface. --- 533,536 ---- Index: ConstructionSpaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ConstructionSpaceFacade.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ConstructionSpaceFacade.java 30 Sep 2005 08:14:24 -0000 1.10 --- ConstructionSpaceFacade.java 30 Sep 2005 11:15:34 -0000 1.11 *************** *** 248,286 **** return result; } - - /** - * Find the Construction spaces matched with a surface - * @param surface The surface - * @return The space the given surface is conected with - */ - public synchronized Set findBySurface(Surface surface) { - Set result = new HashSet(); - - HibernateUtil hu = HibernateUtil.getInstance(); - Transaction tx = null; - try { - Session session = hu.currentSession(); - tx = session.beginTransaction(); - - Query q = session.createQuery("SELECT cs FROM ConstructionSpace AS cs," + - "Domain AS d " + - "JOIN d.surfaces AS surfaces " + - "WHERE surfaces.id = :id AND d.id = cs.id"); - q.setLong("id", surface.getId().longValue()); - - Iterator it = q.iterate(); - while (it.hasNext()) { - result.add((ConstructionSpace)it.next()); - } - tx.commit(); - } catch (Exception ex) { - if (tx != null) { - tx.rollback(); - } - log.error(ex.getMessage(), ex); - } finally { - hu.closeSession(); - } - return result; - } } --- 248,250 ---- Index: DomainFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/DomainFacade.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DomainFacade.java 21 Sep 2005 14:04:33 -0000 1.4 --- DomainFacade.java 30 Sep 2005 11:15:34 -0000 1.5 *************** *** 123,160 **** return result; } - - /** - * Find all the domains associated with a surface - * @param surface the surface - * @return the set of domains - */ - public synchronized Set findBySurface(Surface surface) { - Set result = new HashSet(); - - HibernateUtil hu = HibernateUtil.getInstance(); - Transaction tx = null; - try { - Session session = hu.currentSession(); - tx = session.beginTransaction(); - - Query q = session.createQuery("SELECT d FROM Domain AS d " + - "JOIN d.surfaces AS surfaces " + - "WHERE surfaces.id = :id"); - q.setLong("id", surface.getId().longValue()); - - Iterator it = q.iterate(); - while (it.hasNext()) { - result.add((Domain)it.next()); - } - tx.commit(); - } catch (Exception ex) { - if (tx != null) { - tx.rollback(); - } - log.error(ex.getMessage(), ex); - } finally { - hu.closeSession(); - } - return result; - } } --- 123,125 ---- Index: FunctionalSpaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/FunctionalSpaceFacade.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** FunctionalSpaceFacade.java 30 Sep 2005 08:14:24 -0000 1.10 --- FunctionalSpaceFacade.java 30 Sep 2005 11:15:34 -0000 1.11 *************** *** 248,286 **** return result; } - - /** - * Find the Functional spaces matched with a surface - * @param surface The the surface - * @return The space the given surface is conected with - */ - public synchronized Set findBySurface(Surface surface) { - Set result = new HashSet(); - - HibernateUtil hu = HibernateUtil.getInstance(); - Transaction tx = null; - try { - Session session = hu.currentSession(); - tx = session.beginTransaction(); - - Query q = session.createQuery("SELECT f FROM FunctionalSpace AS f," + - "Domain AS d " + - "JOIN d.surfaces AS surfaces " + - "WHERE surfaces.id = :id AND d.id = f.id"); - q.setLong("id", surface.getId().longValue()); - - Iterator it = q.iterate(); - while (it.hasNext()) { - result.add((FunctionalSpace)it.next()); - } - tx.commit(); - } catch (Exception ex) { - if (tx != null) { - tx.rollback(); - } - log.error(ex.getMessage(), ex); - } finally { - hu.closeSession(); - } - return result; - } } --- 248,250 ---- |
From: Michael L. <he...@us...> - 2005-09-30 10:52:10
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14743/src/net/sourceforge/bprocessor/model/xml Modified Files: PersistenceManager.java Log Message: Fixed some bugs... Index: PersistenceManager.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/xml/PersistenceManager.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PersistenceManager.java 20 Sep 2005 12:41:23 -0000 1.7 --- PersistenceManager.java 30 Sep 2005 10:52:00 -0000 1.8 *************** *** 10,13 **** --- 10,14 ---- import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.ConstructionSpaceFacade; + import net.sourceforge.bprocessor.model.DomainFacade; import net.sourceforge.bprocessor.model.EdgeFacade; import net.sourceforge.bprocessor.model.ElementFacade; *************** *** 17,21 **** import net.sourceforge.bprocessor.model.SurfaceFacade; import net.sourceforge.bprocessor.model.VertexFacade; - import net.sourceforge.bprocessor.model.DomainFacade; import net.sourceforge.bprocessor.model.xml.impl.AttributeImpl; --- 18,21 ---- *************** *** 55,78 **** private static Logger log = Logger.getLogger(PersistenceManager.class); - /** Key: CONSTRUCTION_SPACE */ - private static final Integer KEY_CONSTRUCTION_SPACE = new Integer(0); - - /** Key: FUNCTIONAL_SPACE */ - private static final Integer KEY_FUNCTIONAL_SPACE = new Integer(1); - /** Key: ELEMENT */ ! private static final Integer KEY_ELEMENT = new Integer(2); /** Key: PART */ ! private static final Integer KEY_PART = new Integer(3); /** Key: SURFACE */ ! private static final Integer KEY_SURFACE = new Integer(4); /** Key: EDGE */ ! private static final Integer KEY_EDGE = new Integer(5); /** Key: VERTEX */ ! private static final Integer KEY_VERTEX = new Integer(6); /** Mapper counter */ --- 55,76 ---- private static Logger log = Logger.getLogger(PersistenceManager.class); /** Key: ELEMENT */ ! private static final Integer KEY_ELEMENT = new Integer(0); /** Key: PART */ ! private static final Integer KEY_PART = new Integer(1); /** Key: SURFACE */ ! private static final Integer KEY_SURFACE = new Integer(2); /** Key: EDGE */ ! private static final Integer KEY_EDGE = new Integer(3); /** Key: VERTEX */ ! private static final Integer KEY_VERTEX = new Integer(4); ! ! /** Key: DOMAIN */ ! ! private static final Integer KEY_DOMAIN = new Integer(5); /** Mapper counter */ *************** *** 97,101 **** Bprocessor bp = loadFile(fis); - counter = 0; mapper = new HashMap(); --- 95,98 ---- *************** *** 530,538 **** sm.setInnerSurfaces(isr); } - Long bid = (Long)(mapper.get(new Long(s.getBackdomainref()))); ! sm.setBackDomain(DomainFacade.getInstance().findById(bid)); Long fid = (Long)(mapper.get(new Long(s.getFrontdomainref()))); ! sm.setFrontDomain(DomainFacade.getInstance().findById(fid)); SurfaceFacade.getInstance().update(sm); } --- 527,538 ---- sm.setInnerSurfaces(isr); } Long bid = (Long)(mapper.get(new Long(s.getBackdomainref()))); ! if (bid != null) { ! sm.setBackDomain(DomainFacade.getInstance().findById(bid)); ! } Long fid = (Long)(mapper.get(new Long(s.getFrontdomainref()))); ! if (fid != null) { ! sm.setFrontDomain(DomainFacade.getInstance().findById(fid)); ! } SurfaceFacade.getInstance().update(sm); } *************** *** 605,612 **** Bprocessor bp = new BprocessorImpl(); ! counter = 0; mapper = new HashMap(); - mapper.put(KEY_CONSTRUCTION_SPACE, new HashMap()); - mapper.put(KEY_FUNCTIONAL_SPACE, new HashMap()); mapper.put(KEY_ELEMENT, new HashMap()); mapper.put(KEY_PART, new HashMap()); --- 605,610 ---- Bprocessor bp = new BprocessorImpl(); ! counter = 1; mapper = new HashMap(); mapper.put(KEY_ELEMENT, new HashMap()); mapper.put(KEY_PART, new HashMap()); *************** *** 614,618 **** mapper.put(KEY_EDGE, new HashMap()); mapper.put(KEY_VERTEX, new HashMap()); ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); EdgeFacade edf = EdgeFacade.getInstance(); --- 612,617 ---- mapper.put(KEY_EDGE, new HashMap()); mapper.put(KEY_VERTEX, new HashMap()); ! mapper.put(KEY_DOMAIN, new HashMap()); ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); EdgeFacade edf = EdgeFacade.getInstance(); *************** *** 680,694 **** Set data = cs.getAttributes(); ! Iterator it = data.iterator(); ! while (it.hasNext()) { ! net.sourceforge.bprocessor.model.Attribute a = ! (net.sourceforge.bprocessor.model.Attribute)it.next(); ! Long aid = saveAttribute(bp, a); ! csx.getAttributeref().add(aid); } ! ! Map csm = (Map)mapper.get(KEY_CONSTRUCTION_SPACE); csm.put(cs.getId(), new Long(csx.getId())); --- 679,694 ---- Set data = cs.getAttributes(); ! if (data != null) { ! Iterator it = data.iterator(); ! while (it.hasNext()) { ! net.sourceforge.bprocessor.model.Attribute a = ! (net.sourceforge.bprocessor.model.Attribute)it.next(); ! Long aid = saveAttribute(bp, a); ! csx.getAttributeref().add(aid); ! } } ! Map csm = (Map)mapper.get(KEY_DOMAIN); csm.put(cs.getId(), new Long(csx.getId())); *************** *** 722,726 **** } ! Map fsm = (Map)mapper.get(KEY_FUNCTIONAL_SPACE); fsm.put(fs.getId(), new Long(fsx.getId())); --- 722,726 ---- } ! Map fsm = (Map)mapper.get(KEY_DOMAIN); fsm.put(fs.getId(), new Long(fsx.getId())); *************** *** 810,814 **** sx.setName(s.getName()); sx.setConstructor(s.getConstructor()); ! Map sm = (Map)mapper.get(KEY_SURFACE); sm.put(s.getId(), new Long(sx.getId())); --- 810,814 ---- sx.setName(s.getName()); sx.setConstructor(s.getConstructor()); ! sx.setIsinner(s.getIsInner()); Map sm = (Map)mapper.get(KEY_SURFACE); sm.put(s.getId(), new Long(sx.getId())); *************** *** 889,900 **** data = cs.getElements(); ! it = data.iterator(); ! while (it.hasNext()) { ! net.sourceforge.bprocessor.model.Element e = ! (net.sourceforge.bprocessor.model.Element)it.next(); ! Map m = (Map)mapper.get(KEY_ELEMENT); ! csx.getElementref().add(m.get(e.getId())); } } --- 889,902 ---- data = cs.getElements(); ! if (data != null) { ! it = data.iterator(); ! while (it.hasNext()) { ! net.sourceforge.bprocessor.model.Element e = ! (net.sourceforge.bprocessor.model.Element)it.next(); ! Map m = (Map)mapper.get(KEY_ELEMENT); ! csx.getElementref().add(m.get(e.getId())); ! } } } *************** *** 908,912 **** */ private static Constructionspace findConstructionSpace(Bprocessor bp, ConstructionSpace cs) { ! Map m = (Map)mapper.get(KEY_CONSTRUCTION_SPACE); Long id = (Long)m.get(cs.getId()); --- 910,914 ---- */ private static Constructionspace findConstructionSpace(Bprocessor bp, ConstructionSpace cs) { ! Map m = (Map)mapper.get(KEY_DOMAIN); Long id = (Long)m.get(cs.getId()); *************** *** 963,967 **** */ private static Functionalspace findFunctionalSpace(Bprocessor bp, FunctionalSpace fs) { ! Map m = (Map)mapper.get(KEY_FUNCTIONAL_SPACE); Long id = (Long)m.get(fs.getId()); --- 965,969 ---- */ private static Functionalspace findFunctionalSpace(Bprocessor bp, FunctionalSpace fs) { ! Map m = (Map)mapper.get(KEY_DOMAIN); Long id = (Long)m.get(fs.getId()); *************** *** 1107,1120 **** Set isData = s.getInnerSurfaces(); ! it = isData.iterator(); ! while (it.hasNext()) { ! net.sourceforge.bprocessor.model.Surface is = ! (net.sourceforge.bprocessor.model.Surface)it.next(); ! Map m = (Map)mapper.get(KEY_SURFACE); - sx.getInnersurfacesref().add(m.get(is.getId())); } - } } --- 1109,1133 ---- Set isData = s.getInnerSurfaces(); ! if (isData != null) { ! it = isData.iterator(); ! while (it.hasNext()) { ! net.sourceforge.bprocessor.model.Surface is = ! (net.sourceforge.bprocessor.model.Surface)it.next(); ! Map m = (Map)mapper.get(KEY_SURFACE); ! ! sx.getInnersurfacesref().add(m.get(is.getId())); ! } ! } ! { ! Map m = (Map)mapper.get(KEY_DOMAIN); ! if (s.getBackDomain() != null) { ! sx.setBackdomainref(((Long) m.get(s.getBackDomain().getId())).longValue()); ! } ! if (s.getFrontDomain() != null) { ! sx.setFrontdomainref(((Long) m.get(s.getFrontDomain().getId())).longValue()); ! } } } } |
From: Michael L. <he...@us...> - 2005-09-30 10:52:10
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14743/src/net/sourceforge/bprocessor/model Modified Files: VertexFacade.java Log Message: Fixed some bugs... Index: VertexFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/VertexFacade.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** VertexFacade.java 21 Sep 2005 08:57:07 -0000 1.7 --- VertexFacade.java 30 Sep 2005 10:52:02 -0000 1.8 *************** *** 73,77 **** hu.closeSession(); } - return v; } --- 73,76 ---- |
From: Michael L. <he...@us...> - 2005-09-30 08:14:35
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15201/src/net/sourceforge/bprocessor/model Modified Files: Surface.java ConstructionSpaceFacade.java FunctionalSpaceFacade.java Log Message: Changed equals to == Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Surface.java 29 Sep 2005 11:54:35 -0000 1.32 --- Surface.java 30 Sep 2005 08:14:24 -0000 1.33 *************** *** 373,377 **** while (innerIt.hasNext()) { Surface innerSurf = (Surface)innerIt.next(); ! if (innerSurf.equals(this)) { if (!containedCheck(this, surf)) { //The inner surface has been moved out of its outer surface --- 373,377 ---- while (innerIt.hasNext()) { Surface innerSurf = (Surface)innerIt.next(); ! if (innerSurf == this) { if (!containedCheck(this, surf)) { //The inner surface has been moved out of its outer surface Index: ConstructionSpaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ConstructionSpaceFacade.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ConstructionSpaceFacade.java 21 Sep 2005 08:57:07 -0000 1.9 --- ConstructionSpaceFacade.java 30 Sep 2005 08:14:24 -0000 1.10 *************** *** 119,128 **** Surface surface = (Surface)surfIt.next(); Domain back = surface.getBackDomain(); ! if (back.equals(c)) { surface.setBackDomain(null); SurfaceFacade.getInstance().update(surface); } else { Domain front = surface.getFrontDomain(); ! if (front.equals(c)) { surface.setFrontDomain(null); SurfaceFacade.getInstance().update(surface); --- 119,128 ---- Surface surface = (Surface)surfIt.next(); Domain back = surface.getBackDomain(); ! if (back == c) { surface.setBackDomain(null); SurfaceFacade.getInstance().update(surface); } else { Domain front = surface.getFrontDomain(); ! if (front == c) { surface.setFrontDomain(null); SurfaceFacade.getInstance().update(surface); Index: FunctionalSpaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/FunctionalSpaceFacade.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FunctionalSpaceFacade.java 21 Sep 2005 08:57:07 -0000 1.9 --- FunctionalSpaceFacade.java 30 Sep 2005 08:14:24 -0000 1.10 *************** *** 119,128 **** Surface surface = (Surface)surfIt.next(); Domain back = surface.getBackDomain(); ! if (back.equals(f)) { surface.setBackDomain(null); SurfaceFacade.getInstance().update(surface); } else { Domain front = surface.getFrontDomain(); ! if (front.equals(f)) { surface.setFrontDomain(null); SurfaceFacade.getInstance().update(surface); --- 119,128 ---- Surface surface = (Surface)surfIt.next(); Domain back = surface.getBackDomain(); ! if (back == f) { surface.setBackDomain(null); SurfaceFacade.getInstance().update(surface); } else { Domain front = surface.getFrontDomain(); ! if (front == f) { surface.setFrontDomain(null); SurfaceFacade.getInstance().update(surface); |
From: Michael L. <he...@us...> - 2005-09-30 08:00:07
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10804/src/net/sourceforge/bprocessor/gui/treeview Modified Files: SpacesTreeView.java Log Message: Index: SpacesTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpacesTreeView.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SpacesTreeView.java 22 Sep 2005 12:25:31 -0000 1.6 --- SpacesTreeView.java 30 Sep 2005 07:59:59 -0000 1.7 *************** *** 65,70 **** if (log.isDebugEnabled()) { log.debug(n); } ! String type = n.getType(); --- 65,72 ---- if (log.isDebugEnabled()) { log.debug(n); + } else { + log.info(n); } ! String type = n.getType(); |
From: Michael L. <he...@us...> - 2005-09-29 21:02:42
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17033/src/net/sourceforge/bprocessor/gl/tool Modified Files: PencilTool.java ToolFactory.java SelectTool.java Log Message: Moved PencilAction inside ToolFactory Fixed bug wrt naming vertices in PencilTool Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ToolFactory.java 14 Sep 2005 14:09:38 -0000 1.7 --- ToolFactory.java 29 Sep 2005 21:02:34 -0000 1.8 *************** *** 193,224 **** } - - } - /** - * The debug action inner class - */ - class PencilAction extends AbstractAction { - /** The GLView */ - private GLView glv = null; - - /** - * Constructor - * @param glv TheGLView - */ - PencilAction(GLView glv) { - this.glv = glv; - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - URL url = cl.getResource("drawicon.png"); - ImageIcon im = new ImageIcon(url); - putValue(Action.SMALL_ICON, im); - } - /** ! * Called when the button is pressed ! * @param e The ActionEvent */ ! public void actionPerformed(ActionEvent e) { ! glv.changeTool(Tool.PENCIL_TOOL); } } - --- 193,222 ---- } /** ! * The debug action inner class */ ! class PencilAction extends AbstractAction { ! /** The GLView */ ! private GLView glv = null; ! ! /** ! * Constructor ! * @param glv TheGLView ! */ ! PencilAction(GLView glv) { ! this.glv = glv; ! ClassLoader cl = Thread.currentThread().getContextClassLoader(); ! URL url = cl.getResource("drawicon.png"); ! ImageIcon im = new ImageIcon(url); ! putValue(Action.SMALL_ICON, im); ! } ! ! /** ! * Called when the button is pressed ! * @param e The ActionEvent ! */ ! public void actionPerformed(ActionEvent e) { ! glv.changeTool(Tool.PENCIL_TOOL); ! } } } Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** SelectTool.java 21 Sep 2005 14:05:55 -0000 1.24 --- SelectTool.java 29 Sep 2005 21:02:34 -0000 1.25 *************** *** 76,79 **** --- 76,80 ---- protected void moved(MouseEvent e) { //findTarget(e); + target = null; } *************** *** 84,87 **** --- 85,89 ---- protected void dragged(MouseEvent e) { //findTarget(e); + target = null; } Index: PencilTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/PencilTool.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** PencilTool.java 23 Sep 2005 10:47:13 -0000 1.22 --- PencilTool.java 29 Sep 2005 21:02:34 -0000 1.23 *************** *** 83,86 **** --- 83,87 ---- protected void intern(Vertex vertex) { if (vertex.getId() == null) { + vertex.setName("V" + vertexNum++); VertexFacade.getInstance().create(vertex); } *************** *** 268,272 **** Plane plane = surface.plane(); Vertex vertex = plane.intersection(ray); ! vertex.setName("V" + vertexNum++); current = vertex; if (active != null) { --- 269,273 ---- Plane plane = surface.plane(); Vertex vertex = plane.intersection(ray); ! vertex.setName("current"); current = vertex; if (active != null) { *************** *** 283,287 **** Edge intersection = edge.intersection(ray); Vertex vertex = intersection.getFrom(); ! vertex.setName("V" + vertexNum++); current = vertex; } --- 284,288 ---- Edge intersection = edge.intersection(ray); Vertex vertex = intersection.getFrom(); ! vertex.setName("current"); current = vertex; } *************** *** 291,295 **** snap = true; if (vertex != null) { ! vertex.setName("V" + vertexNum++); current = vertex; } --- 292,296 ---- snap = true; if (vertex != null) { ! vertex.setName("current"); current = vertex; } |
From: Michael L. <he...@us...> - 2005-09-29 21:00:45
|
Update of /cvsroot/bprocessor/gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16535 Modified Files: build.xml Log Message: Added a "fast" target that builds with stylecheck Index: build.xml =================================================================== RCS file: /cvsroot/bprocessor/gl/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 10 Aug 2005 12:42:46 -0000 1.3 --- build.xml 29 Sep 2005 21:00:37 -0000 1.4 *************** *** 90,94 **** </target> ! <target name="compile" depends="checkstyle,copylib"> <ant dir="src" target="compile"/> </target> --- 90,94 ---- </target> ! <target name="compile" depends="copylib"> <ant dir="src" target="compile"/> </target> *************** *** 125,129 **** </target> ! <target name="dist" depends="jar"> <copy todir="${basedir}/../build/dist/plugin"> <fileset dir="${dist.dir}"> --- 125,137 ---- </target> ! <target name="dist" depends="checkstyle,jar"> ! <copy todir="${basedir}/../build/dist/plugin"> ! <fileset dir="${dist.dir}"> ! <include name="**/*"/> ! </fileset> ! </copy> ! </target> ! ! <target name="fast" depends="jar"> <copy todir="${basedir}/../build/dist/plugin"> <fileset dir="${dist.dir}"> |
From: Michael L. <he...@us...> - 2005-09-29 15:05:13
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25072/src/net/sourceforge/bprocessor/gl/view Modified Files: AbstractView.java Log Message: Fixed a style-error Index: AbstractView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** AbstractView.java 29 Sep 2005 11:26:57 -0000 1.37 --- AbstractView.java 29 Sep 2005 15:05:02 -0000 1.38 *************** *** 391,398 **** void labelSurface(Surface surface) { Vertex from = surface.center(); ! //CoordinateSystem system = surface.coordinateSystem(); ! //Vertex n = system.getN(); Vertex n = surface.normal(); ! n.scale(1/n.length()); Vertex spot = from.add(n); Transformation transformation = transformation(); --- 391,398 ---- void labelSurface(Surface surface) { Vertex from = surface.center(); ! // CoordinateSystem system = surface.coordinateSystem(); ! // Vertex n = system.getN(); Vertex n = surface.normal(); ! n.scale(1 / n.length()); Vertex spot = from.add(n); Transformation transformation = transformation(); |
From: Michael L. <he...@us...> - 2005-09-29 11:54:51
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9577/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Implemented Surface.connected() Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Surface.java 29 Sep 2005 09:28:07 -0000 1.31 --- Surface.java 29 Sep 2005 11:54:35 -0000 1.32 *************** *** 174,189 **** vertices.add(e0.getTo()); } else if (edges.size() > 1) { ! // The first vertex must ! // be the one that is NOT shared ! // between e0 and e1 ! Edge e0 = (Edge) edges.get(0); ! Edge e1 = (Edge) edges.get(1); ! Vertex current = null; ! if (!e1.contains(e0.getFrom())) { ! current = e0.getFrom(); ! } ! if (!e1.contains(e0.getTo())) { ! current = e0.getTo(); ! } if (current != null) { vertices.add(current); --- 174,178 ---- vertices.add(e0.getTo()); } else if (edges.size() > 1) { ! Vertex current = getFirtVertex(); if (current != null) { vertices.add(current); *************** *** 227,230 **** --- 216,230 ---- /** + * Return true if this surface is connected. + * @return True if this surface is connected. + */ + public boolean connected() { + List vertices = getVertices(); + if (vertices.size() > 1) { + return (vertices.get(0) == vertices.get(vertices.size() - 1)); + } + return false; + } + /** * Calculate center of gravity * @return The center of gravity |
From: Michael L. <he...@us...> - 2005-09-29 11:27:05
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4358/src/net/sourceforge/bprocessor/gl/view Modified Files: AbstractView.java Log Message: Uses normal() instead of CoordinateSystem to draw spacenames Index: AbstractView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** AbstractView.java 26 Sep 2005 13:17:38 -0000 1.36 --- AbstractView.java 29 Sep 2005 11:26:57 -0000 1.37 *************** *** 391,396 **** void labelSurface(Surface surface) { Vertex from = surface.center(); ! CoordinateSystem system = surface.coordinateSystem(); ! Vertex n = system.getN(); Vertex spot = from.add(n); Transformation transformation = transformation(); --- 391,398 ---- void labelSurface(Surface surface) { Vertex from = surface.center(); ! //CoordinateSystem system = surface.coordinateSystem(); ! //Vertex n = system.getN(); ! Vertex n = surface.normal(); ! n.scale(1/n.length()); Vertex spot = from.add(n); Transformation transformation = transformation(); |