bprocessor-commit Mailing List for B-processor (Page 147)
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-12-12 20:20:02
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15426/src/net/sourceforge/bprocessor/gl/tool Modified Files: CreateSpaceActionListener.java Log Message: Removed domain Index: CreateSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CreateSpaceActionListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CreateSpaceActionListener.java 11 Dec 2005 17:58:32 -0000 1.3 --- CreateSpaceActionListener.java 12 Dec 2005 20:19:54 -0000 1.4 *************** *** 14,19 **** import java.awt.event.ActionListener; - import net.sourceforge.bprocessor.model.FunctionalSpace; - import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; --- 14,17 ---- *************** *** 75,83 **** Space space; if (functional) { ! space = new FunctionalSpace(result.trim()); ! Project.getInstance().intern((FunctionalSpace)space); } else { ! space = new ConstructionSpace(result.trim()); ! Project.getInstance().intern((ConstructionSpace)space); } --- 73,81 ---- Space space; if (functional) { ! space = Space.createFunctionalSpace(result.trim()); ! Project.getInstance().intern(space); } else { ! space = Space.createConstructionSpace(result.trim()); ! Project.getInstance().intern(space); } |
From: Michael L. <he...@us...> - 2005-12-12 20:20:02
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15426/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Removed domain Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** View.java 12 Dec 2005 14:28:48 -0000 1.28 --- View.java 12 Dec 2005 20:19:53 -0000 1.29 *************** *** 13,18 **** import net.sourceforge.bprocessor.model.CoordinateSystem; - import net.sourceforge.bprocessor.model.FunctionalSpace; - import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.Plane; import net.sourceforge.bprocessor.model.Camera; --- 13,16 ---- *************** *** 673,682 **** //draw the front domain name ! if (frontDomain instanceof FunctionalSpace) { gl.glColor3d(0.2 + fcb, 0.2 + fcb, 0.5 + fcb); ! } else if (frontDomain instanceof ConstructionSpace) { gl.glColor3d(0.8 + fcb, 0.2 + fcb, 0.4 + fcb); - } else { - gl.glColor3d(0.2 + fcb, 0.2 + fcb, 0.2 + fcb); } --- 671,680 ---- //draw the front domain name ! if (frontDomain == null) { ! gl.glColor3d(0.2 + fcb, 0.2 + fcb, 0.2 + fcb); ! } else if (frontDomain.isFunctionalSpace()) { gl.glColor3d(0.2 + fcb, 0.2 + fcb, 0.5 + fcb); ! } else if (frontDomain.isConstructionSpace()) { gl.glColor3d(0.8 + fcb, 0.2 + fcb, 0.4 + fcb); } *************** *** 688,697 **** } //draw the back domain name ! if (backDomain instanceof FunctionalSpace) { gl.glColor3d(0.2 + bcb, 0.2 + bcb, 0.5 + bcb); ! } else if (backDomain instanceof ConstructionSpace) { gl.glColor3d(0.8 + bcb, 0.2 + bcb, 0.4 + bcb); - } else { - gl.glColor3d(0.2 + bcb, 0.2 + bcb, 0.2 + bcb); } --- 686,696 ---- } //draw the back domain name ! ! if (backDomain == null) { ! gl.glColor3d(0.2 + bcb, 0.2 + bcb, 0.2 + bcb); ! } else if (backDomain.isFunctionalSpace()) { gl.glColor3d(0.2 + bcb, 0.2 + bcb, 0.5 + bcb); ! } else if (backDomain.isConstructionSpace()) { gl.glColor3d(0.8 + bcb, 0.2 + bcb, 0.4 + bcb); } *************** *** 1307,1314 **** Space back = surface.getBackDomain(); Space front = surface.getFrontDomain(); ! if ((front instanceof FunctionalSpace) && (back instanceof FunctionalSpace)) { return false; } ! if ((front instanceof ConstructionSpace) && (back instanceof ConstructionSpace)) { return false; } --- 1306,1319 ---- Space back = surface.getBackDomain(); Space front = surface.getFrontDomain(); ! if (front == null) { ! return true; ! } ! if (back == null) { ! return true; ! } ! if ((front.isFunctionalSpace()) && (back.isFunctionalSpace())) { return false; } ! if ((front.isConstructionSpace()) && (back.isConstructionSpace())) { return false; } *************** *** 1327,1335 **** } else { // TODO check if the space space has a color ! if (space instanceof ConstructionSpace) { // We are looking at a constructionspace return frontCcolor; } ! if (space instanceof FunctionalSpace) { // We are looking at a constructionspace return backColor; --- 1332,1340 ---- } else { // TODO check if the space space has a color ! if (space.isConstructionSpace()) { // We are looking at a constructionspace return frontCcolor; } ! if (space.isFunctionalSpace()) { // We are looking at a constructionspace return backColor; |
From: Michael L. <he...@us...> - 2005-12-12 20:19:33
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15299/src/net/sourceforge/bprocessor/gui/actions Modified Files: CreateConstructionSpaceActionListener.java CreateFunctionalSpaceActionListener.java Log Message: Removed domain Index: CreateFunctionalSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateFunctionalSpaceActionListener.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CreateFunctionalSpaceActionListener.java 12 Dec 2005 10:06:21 -0000 1.6 --- CreateFunctionalSpaceActionListener.java 12 Dec 2005 20:19:22 -0000 1.7 *************** *** 8,12 **** import net.sourceforge.bprocessor.gui.GUI; - import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; --- 8,11 ---- *************** *** 45,50 **** if (result != null && !result.trim().equals("")) { ! Space fs = new FunctionalSpace(result.trim()); ! Project.getInstance().intern(fs); } --- 44,48 ---- if (result != null && !result.trim().equals("")) { ! Space fs = Space.createFunctionalSpace(result.trim()); Project.getInstance().intern(fs); } Index: CreateConstructionSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructionSpaceActionListener.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CreateConstructionSpaceActionListener.java 12 Dec 2005 10:06:21 -0000 1.6 --- CreateConstructionSpaceActionListener.java 12 Dec 2005 20:19:22 -0000 1.7 *************** *** 8,12 **** import net.sourceforge.bprocessor.gui.GUI; - import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; --- 8,11 ---- *************** *** 45,49 **** if (result != null && !result.trim().equals("")) { ! Space cs = new ConstructionSpace(result.trim()); Project.getInstance().intern(cs); } --- 44,48 ---- if (result != null && !result.trim().equals("")) { ! Space cs = Space.createConstructionSpace(result.trim()); Project.getInstance().intern(cs); } |
From: Michael L. <he...@us...> - 2005-12-12 20:19:01
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15179/src/net/sourceforge/bprocessor/model Modified Files: Surface.java MemoryFacade.java Space.java Project.java DatabaseFacade.java Removed Files: Domain.java Log Message: Removed domain --- Domain.java DELETED --- Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** Surface.java 11 Dec 2005 17:50:30 -0000 1.53 --- Surface.java 12 Dec 2005 20:18:52 -0000 1.54 *************** *** 725,735 **** * 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); } --- 725,735 ---- * Removes the domain from the surface, if the given domain * is either the front or back domain. ! * @param space the space to remove. */ ! public void removeDomain(Space space) { ! if (space == frontDomain) { setFrontDomain(null); } ! if (space == backDomain) { setBackDomain(null); } Index: DatabaseFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/DatabaseFacade.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DatabaseFacade.java 11 Dec 2005 17:27:19 -0000 1.5 --- DatabaseFacade.java 12 Dec 2005 20:18:52 -0000 1.6 *************** *** 81,85 **** * @return The domain */ ! public abstract Domain findDomainById(Long id); /** --- 81,85 ---- * @return The domain */ ! public abstract Space findDomainById(Long id); /** Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Project.java 11 Dec 2005 17:27:19 -0000 1.9 --- Project.java 12 Dec 2005 20:18:52 -0000 1.10 *************** *** 84,90 **** */ public void intern(Space space) { ! DatabaseFacade.getInstance().intern((Object) space); ! Notification n = new Notification(Notification.CONSTRUCTION_SPACE_CREATED, space.getId()); ! Notifier.getInstance().sendNotification(n); } --- 84,93 ---- */ public void intern(Space space) { ! if (space.isConstructionSpace()) { ! intern((ConstructionSpace) space); ! } ! if (space.isFunctionalSpace()) { ! intern((FunctionalSpace) space); ! } } *************** *** 110,119 **** while (surfIt.hasNext()) { Surface surface = (Surface)surfIt.next(); ! Domain back = surface.getBackDomain(); if (back == c) { surface.setBackDomain(null); DatabaseFacade.getInstance().update(surface); } else { ! Domain front = surface.getFrontDomain(); if (front == c) { surface.setFrontDomain(null); --- 113,122 ---- while (surfIt.hasNext()) { Surface surface = (Surface)surfIt.next(); ! Space back = surface.getBackDomain(); if (back == c) { surface.setBackDomain(null); DatabaseFacade.getInstance().update(surface); } else { ! Space front = surface.getFrontDomain(); if (front == c) { surface.setFrontDomain(null); *************** *** 149,153 **** * @param domain The domain to update */ ! public void update(Domain domain) { if (domain instanceof ConstructionSpace) { DatabaseFacade.getInstance().update((ConstructionSpace)domain); --- 152,156 ---- * @param domain The domain to update */ ! public void update(Space domain) { if (domain instanceof ConstructionSpace) { DatabaseFacade.getInstance().update((ConstructionSpace)domain); *************** *** 177,181 **** * @return The domain */ ! public Domain findDomainById(Long id) { return DatabaseFacade.getInstance().findDomainById(id); } --- 180,184 ---- * @return The domain */ ! public Space findDomainById(Long id) { return DatabaseFacade.getInstance().findDomainById(id); } *************** *** 249,258 **** while (surfIt.hasNext()) { Surface surface = (Surface)surfIt.next(); ! Domain back = surface.getBackDomain(); if (back == space) { surface.setBackDomain(null); DatabaseFacade.getInstance().update(surface); } else { ! Domain front = surface.getFrontDomain(); if (front == space) { surface.setFrontDomain(null); --- 252,261 ---- while (surfIt.hasNext()) { Surface surface = (Surface)surfIt.next(); ! Space back = surface.getBackDomain(); if (back == space) { surface.setBackDomain(null); DatabaseFacade.getInstance().update(surface); } else { ! Space front = surface.getFrontDomain(); if (front == space) { surface.setFrontDomain(null); *************** *** 278,287 **** while (surfIt.hasNext()) { Surface surface = (Surface)surfIt.next(); ! Domain back = surface.getBackDomain(); if (back == f) { surface.setBackDomain(null); DatabaseFacade.getInstance().update(surface); } else { ! Domain front = surface.getFrontDomain(); if (front == f) { surface.setFrontDomain(null); --- 281,290 ---- while (surfIt.hasNext()) { Surface surface = (Surface)surfIt.next(); ! Space back = surface.getBackDomain(); if (back == f) { surface.setBackDomain(null); DatabaseFacade.getInstance().update(surface); } else { ! Space front = surface.getFrontDomain(); if (front == f) { surface.setFrontDomain(null); *************** *** 341,345 **** //from any domain to which it belongs. ! Domain back = s.getBackDomain(); if (back != null) { if (back.removeSurface(s)) { --- 344,348 ---- //from any domain to which it belongs. ! Space back = s.getBackDomain(); if (back != null) { if (back.removeSurface(s)) { *************** *** 348,352 **** s.setBackDomain(null); } ! Domain front = s.getFrontDomain(); if (front != null) { if (front.removeSurface(s)) { --- 351,355 ---- s.setBackDomain(null); } ! Space front = s.getFrontDomain(); if (front != null) { if (front.removeSurface(s)) { Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Space.java 11 Dec 2005 17:50:30 -0000 1.8 --- Space.java 12 Dec 2005 20:18:52 -0000 1.9 *************** *** 7,12 **** package net.sourceforge.bprocessor.model; - import org.apache.log4j.Logger; /** --- 7,14 ---- package net.sourceforge.bprocessor.model; + import java.io.Serializable; + import java.util.HashSet; + import java.util.Set; /** *************** *** 18,29 **** * column="DOMAIN_ID" */ ! public class Space extends Domain { ! /** The logger */ ! private static Logger log = Logger.getLogger(Space.class); ! ! /** The space id */ ! private Long spaceId; ! ! /** The modellor */ private Modellor modellor; --- 20,32 ---- * column="DOMAIN_ID" */ ! public class Space implements Serializable { ! /** The id */ ! private Long id; ! /** The name */ ! private String name; ! /** The attributes */ ! private Set attributes; ! /** The surfaces */ ! private Set surfaces; /** The modellor */ private Modellor modellor; *************** *** 43,66 **** setName(name); } /** ! * Get the space id ! * @return The space id * @hibernate.id ! * column="SPACE_ID" * generator-class="increment" */ ! protected Long getSpaceId() { ! return spaceId; } /** ! * Set the space id ! * @param id The space id */ ! private void setSpaceId(Long id) { ! this.spaceId = id; } ! ! /** * Test for construction-space --- 46,189 ---- setName(name); } + /** ! * Create a Construction Space ! * @param name The name ! * @return The space ! */ ! public static Space createConstructionSpace(String name) { ! return new ConstructionSpace(name); ! } ! ! /** ! * Create a Functional Space ! * @param name The name ! * @return The space ! */ ! public static Space createFunctionalSpace(String name) { ! return new FunctionalSpace(name); ! } ! ! /** ! * Get the id ! * @return The id * @hibernate.id ! * column="DOMAIN_ID" * generator-class="increment" */ ! public Long getId() { ! return id; } /** ! * Set the id ! * @param id The id */ ! public void setId(Long id) { ! this.id = id; } ! ! /** ! * Get the name ! * @return The name ! * @hibernate.property ! */ ! public String getName() { ! return name; ! } ! ! /** ! * Set the name ! * @param name The name ! */ ! public void setName(String name) { ! this.name = name; ! } ! ! /** ! * Get the attributes ! * @return The attributes ! * @hibernate.set ! * cascade="delete" ! * lazy="false" ! * @hibernate.key ! * column="DOMAIN_ID" ! * @hibernate.one-to-many ! * class="net.sourceforge.bprocessor.model.Attribute" ! */ ! public Set getAttributes() { ! return attributes; ! } ! ! /** ! * Set the attributes ! * @param attributes The attributes ! */ ! public void setAttributes(Set attributes) { ! this.attributes = attributes; ! } ! ! /** ! * Get the surfaces ! * @return The surfaces ! * @hibernate.set ! * lazy="false" ! * @hibernate.key ! * column="DOMAIN_ID" ! * @hibernate.many-to-many ! * class="net.sourceforge.bprocessor.model.Surface" ! */ ! public Set getSurfaces() { ! return surfaces; ! } ! ! /** ! * Set the surfaces ! * @param surfaces The surfaces ! */ ! public void setSurfaces(Set surfaces) { ! this.surfaces = surfaces; ! } ! ! /** ! * Add a surface to the list of surfaces ! * @param surface The surface ! */ ! public void addSurface(Surface surface) { ! Set s = getSurfaces(); ! if (s == null) { ! Set set = new HashSet(); ! set.add(surface); ! setSurfaces(set); ! } else { ! s.add(surface); ! } ! Project.getInstance().update(this); ! } ! ! /** ! * Remove a surface from this domain ! * @param surface The surface to remove ! * @return True if the Domain contained the surface otherwise false ! */ ! public boolean removeSurface(Surface surface) { ! Set s = getSurfaces(); ! if (s != null && s.contains(surface)) { ! s.remove(surface); ! Project.getInstance().update(this); ! return true; ! } ! return false; ! } ! ! /** ! * String representation of the object ! * @return The string ! */ ! public String toString() { ! return "Domain[id=" + id + ",name=" + name + ",attributes=" + attributes.size() + ! ",surfaces=" + surfaces == null ? "0" : surfaces.size() + "]"; ! } ! /** * Test for construction-space *************** *** 70,74 **** return false; } ! /** * Test for functional-space --- 193,197 ---- return false; } ! /** * Test for functional-space *************** *** 78,82 **** return false; } ! /** * Get the modellor --- 201,205 ---- return false; } ! /** * Get the modellor *************** *** 86,90 **** return modellor; } ! /** * Set the modellor --- 209,213 ---- return modellor; } ! /** * Set the modellor *************** *** 94,104 **** this.modellor = modellor; } - - /** - * String representation of the object - * @return The string - */ - public String toString() { - return "Space[" + super.toString() + "]"; - } } --- 217,219 ---- Index: MemoryFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/MemoryFacade.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MemoryFacade.java 11 Dec 2005 17:27:19 -0000 1.5 --- MemoryFacade.java 12 Dec 2005 20:18:52 -0000 1.6 *************** *** 51,56 **** } else if (o instanceof Surface) { intern((Surface) o); ! } else if (o instanceof Domain) { ! intern((Domain) o); } } --- 51,56 ---- } else if (o instanceof Surface) { intern((Surface) o); ! } else if (o instanceof Space) { ! intern((Space) o); } } *************** *** 90,97 **** * @param d The Domain */ ! private void intern(Domain d) { d.setId(new Long(domainId++)); domains.put(d.getId(), d); - //System.out.println("d-intern " + d.toString()); } --- 90,96 ---- * @param d The Domain */ ! private void intern(Space d) { d.setId(new Long(domainId++)); domains.put(d.getId(), d); } *************** *** 115,120 **** } else if (o instanceof Surface) { remove((Surface) o); ! } else if (o instanceof Domain) { ! remove((Domain) o); } } --- 114,119 ---- } else if (o instanceof Surface) { remove((Surface) o); ! } else if (o instanceof Space) { ! remove((Space) o); } } *************** *** 151,155 **** * @param d The Domain */ ! private void remove(Domain d) { domains.remove(d.getId()); d.setId(null); --- 150,154 ---- * @param d The Domain */ ! private void remove(Space d) { domains.remove(d.getId()); d.setId(null); *************** *** 196,201 **** * @return The Domain */ ! public Domain findDomainById(Long id) { ! return (Domain) domains.get(id); } --- 195,200 ---- * @return The Domain */ ! public Space findDomainById(Long id) { ! return (Space) domains.get(id); } |
From: rimestad <rim...@us...> - 2005-12-12 14:46:29
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30034/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: Changed to reflect to changes to view Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** GLView.java 6 Dec 2005 16:56:13 -0000 1.28 --- GLView.java 12 Dec 2005 14:46:22 -0000 1.29 *************** *** 10,15 **** import net.sourceforge.bprocessor.gl.tool.ToolFactory; import net.sourceforge.bprocessor.gl.view.View; - import net.sourceforge.bprocessor.gl.view.ViewFactory; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.kernel.notification.NotificationListener; --- 10,15 ---- import net.sourceforge.bprocessor.gl.tool.ToolFactory; import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.model.Edge; + import net.sourceforge.bprocessor.model.Camera; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.kernel.notification.NotificationListener; *************** *** 84,88 **** jp.add(lengthPanel, BorderLayout.SOUTH); ! view = ViewFactory.getFactory(this).getDefault(); glc.addGLEventListener(view); --- 84,88 ---- jp.add(lengthPanel, BorderLayout.SOUTH); ! view = new View(this, Camera.create(Camera.VIEW_3D)); glc.addGLEventListener(view); *************** *** 164,172 **** /** ! * Change the view ! * @param v The view */ ! public void changeView(int v) { ! view.changeView(v); this.repaint(true); } --- 164,172 ---- /** ! * Change the camera ! * @param c The camera */ ! public void changeCamera(Camera c) { ! view.changeCamera(c); this.repaint(true); } |
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27500/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java PencilTool.java MoveTool.java ExtrudeTool.java TapeMeasureTool.java ExtrusionTool.java CameraTool.java Log Message: Changed to reflect to changes to view Index: ExtrudeTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrudeTool.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExtrudeTool.java 5 Dec 2005 07:56:50 -0000 1.1 --- ExtrudeTool.java 12 Dec 2005 14:33:22 -0000 1.2 *************** *** 12,18 **** import net.sourceforge.bprocessor.gl.GLView; - import net.sourceforge.bprocessor.gl.view.AbstractView; - import net.sourceforge.bprocessor.gl.view.Transformation; import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Plane; --- 12,17 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.view.View; + import net.sourceforge.bprocessor.gl.view.Transformation; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Plane; *************** *** 72,76 **** Transformation trans = view.transformation(); double x = prevX; ! double y = AbstractView.getHeight() - prevY; Vertex near = new Vertex("near", x, y, 0.0); Vertex far = new Vertex("far", x, y, 1.0); --- 71,75 ---- Transformation trans = view.transformation(); double x = prevX; ! double y = View.getHeight() - prevY; Vertex near = new Vertex("near", x, y, 0.0); Vertex far = new Vertex("far", x, y, 1.0); Index: MoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/MoveTool.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MoveTool.java 25 Nov 2005 17:48:08 -0000 1.18 --- MoveTool.java 12 Dec 2005 14:33:22 -0000 1.19 *************** *** 9,13 **** import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.model.ClippingPlane; ! import net.sourceforge.bprocessor.gl.view.AbstractView; import net.sourceforge.bprocessor.gl.view.Transformation; --- 9,13 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.model.ClippingPlane; ! import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.gl.view.Transformation; *************** *** 169,173 **** Transformation trans = glv.getView().transformation(); double x = previousX; ! double y = AbstractView.getHeight() - previousY; Vertex near = new Vertex("near", x, y, 0.0); Vertex far = new Vertex("far", x, y, 1.0); --- 169,173 ---- Transformation trans = glv.getView().transformation(); double x = previousX; ! double y = View.getHeight() - previousY; Vertex near = new Vertex("near", x, y, 0.0); Vertex far = new Vertex("far", x, y, 1.0); Index: CameraTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CameraTool.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CameraTool.java 1 Dec 2005 15:56:57 -0000 1.2 --- CameraTool.java 12 Dec 2005 14:33:22 -0000 1.3 *************** *** 9,13 **** import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.view.View; ! import net.sourceforge.bprocessor.gl.view.View3D; import net.sourceforge.bprocessor.model.Geometry; import net.sourceforge.bprocessor.model.Plane; --- 9,13 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.view.View; ! import net.sourceforge.bprocessor.model.Camera; import net.sourceforge.bprocessor.model.Geometry; import net.sourceforge.bprocessor.model.Plane; *************** *** 81,89 **** protected void dragged(MouseEvent e) { View view = glv.getView(); if ((e.getModifiersEx() & MouseEvent.BUTTON2_DOWN_MASK) == MouseEvent.BUTTON2_DOWN_MASK || e.getButton() == MouseEvent.BUTTON2) { glv.setCursor(dragCursor); ! double[] center = ((View3D)view).getCenter(); ! double[] camera = ((View3D)view).getCamera(); Vertex first = view.toPlaneCoords(new double[] {previousPos[0], previousPos[1]}, --- 81,92 ---- protected void dragged(MouseEvent e) { View view = glv.getView(); + Camera c = view.getCamera(); + double[] center = c.getCenter(); + double[] camera = c.getCamera(); + double[] roll = c.getRoll(); if ((e.getModifiersEx() & MouseEvent.BUTTON2_DOWN_MASK) == MouseEvent.BUTTON2_DOWN_MASK || e.getButton() == MouseEvent.BUTTON2) { glv.setCursor(dragCursor); ! Vertex first = view.toPlaneCoords(new double[] {previousPos[0], previousPos[1]}, *************** *** 96,109 **** (camera[1] - center[1]), (camera[2] - center[2]), 0)); ! view.translate(new double[] {first.getX() - second.getX(), first.getY() - second.getY(), first.getZ() - second.getZ()}); } else if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK || e.getButton() == MouseEvent.BUTTON1) { - View3D view2 = (View3D) view; double[] pivot = super.selectionCenter(); - double[] camera = view2.getCamera(); - double[] center = view2.getCenter(); - double[] roll = view2.getRoll(); double[] zero = new double[]{0, 0, 0}; --- 99,108 ---- (camera[1] - center[1]), (camera[2] - center[2]), 0)); ! c.translate(new double[] {first.getX() - second.getX(), first.getY() - second.getY(), first.getZ() - second.getZ()}); } else if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK || e.getButton() == MouseEvent.BUTTON1) { double[] pivot = super.selectionCenter(); double[] zero = new double[]{0, 0, 0}; Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ExtrusionTool.java 11 Dec 2005 17:50:58 -0000 1.33 --- ExtrusionTool.java 12 Dec 2005 14:33:22 -0000 1.34 *************** *** 9,13 **** import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.view.View; - import net.sourceforge.bprocessor.gl.view.AbstractView; import net.sourceforge.bprocessor.gl.view.Transformation; --- 9,12 ---- *************** *** 184,188 **** Transformation trans = view.transformation(); double x = prevX; ! double y = AbstractView.getHeight() - prevY; Vertex near = new Vertex("near", x, y, 0.0); Vertex far = new Vertex("far", x, y, 1.0); --- 183,187 ---- Transformation trans = view.transformation(); double x = prevX; ! double y = View.getHeight() - prevY; Vertex near = new Vertex("near", x, y, 0.0); Vertex far = new Vertex("far", x, y, 1.0); Index: PencilTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/PencilTool.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** PencilTool.java 11 Dec 2005 13:33:14 -0000 1.48 --- PencilTool.java 12 Dec 2005 14:33:22 -0000 1.49 *************** *** 16,20 **** import net.sourceforge.bprocessor.gl.GLView; - import net.sourceforge.bprocessor.gl.view.AbstractView; import net.sourceforge.bprocessor.gl.view.Transformation; import net.sourceforge.bprocessor.gl.view.View; --- 16,19 ---- *************** *** 546,550 **** boolean snap = false; double x = event.getX(); ! double y = AbstractView.getHeight() - event.getY(); View v = glv.getView(); Transformation transformation = v.transformation(); --- 545,549 ---- boolean snap = false; double x = event.getX(); ! double y = View.getHeight() - event.getY(); View v = glv.getView(); Transformation transformation = v.transformation(); Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** AbstractTool.java 6 Dec 2005 16:49:19 -0000 1.34 --- AbstractTool.java 12 Dec 2005 14:33:22 -0000 1.35 *************** *** 7,10 **** --- 7,11 ---- package net.sourceforge.bprocessor.gl.tool; + import net.sourceforge.bprocessor.model.Camera; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; *************** *** 12,16 **** import net.sourceforge.bprocessor.model.Vertex; import net.sourceforge.bprocessor.gl.view.View; - import net.sourceforge.bprocessor.gl.view.View3D; import net.sourceforge.bprocessor.gl.GLView; --- 13,16 ---- *************** *** 99,107 **** public void mouseWheelMoved(MouseWheelEvent e) { int rotation = e.getWheelRotation(); ! View v = glv.getView(); if (rotation > 0) { ! v.zoomout(); } else { ! v.zoomin(); } glv.repaint(false); --- 99,107 ---- public void mouseWheelMoved(MouseWheelEvent e) { int rotation = e.getWheelRotation(); ! Camera cam = (glv.getView()).getCamera(); if (rotation > 0) { ! cam.zoomout(); } else { ! cam.zoomin(); } glv.repaint(false); *************** *** 114,118 **** */ public double[] selectionCenter() { ! double[] center = ((View3D)glv.getView()).getCenter(); Iterator it = selection.iterator(); if (it.hasNext()) { --- 114,118 ---- */ public double[] selectionCenter() { ! double[] center = (glv.getView()).getCamera().getCenter(); Iterator it = selection.iterator(); if (it.hasNext()) { *************** *** 136,152 **** */ public void keyPressed(KeyEvent e) { ! View v = glv.getView(); if (e.getKeyCode() == KeyEvent.VK_UP) { ! v.translate(new double[] {0.0, -1.0, 0.0}); } else if (e.getKeyCode() == KeyEvent.VK_DOWN) { ! v.translate(new double[] {0.0, 1.0, 0.0}); } else if (e.getKeyCode() == KeyEvent.VK_LEFT) { ! v.translate(new double[] {-1.0, 0.0, 0.0}); } else if (e.getKeyCode() == KeyEvent.VK_RIGHT) { ! v.translate(new double[] {1.0, 0.0, 0.0}); } else if (e.getKeyCode() == KeyEvent.VK_Z) { ! v.zoomout(); } else if (e.getKeyCode() == KeyEvent.VK_X) { ! v.zoomin(); } else if (e.getKeyCode() == KeyEvent.VK_Q) { glv.changeTool(Tool.SELECT_TOOL); --- 136,152 ---- */ public void keyPressed(KeyEvent e) { ! Camera c = glv.getView().getCamera(); if (e.getKeyCode() == KeyEvent.VK_UP) { ! c.translate(new double[] {0.0, -1.0, 0.0}); } else if (e.getKeyCode() == KeyEvent.VK_DOWN) { ! c.translate(new double[] {0.0, 1.0, 0.0}); } else if (e.getKeyCode() == KeyEvent.VK_LEFT) { ! c.translate(new double[] {-1.0, 0.0, 0.0}); } else if (e.getKeyCode() == KeyEvent.VK_RIGHT) { ! c.translate(new double[] {1.0, 0.0, 0.0}); } else if (e.getKeyCode() == KeyEvent.VK_Z) { ! c.zoomout(); } else if (e.getKeyCode() == KeyEvent.VK_X) { ! c.zoomin(); } else if (e.getKeyCode() == KeyEvent.VK_Q) { glv.changeTool(Tool.SELECT_TOOL); *************** *** 160,170 **** glv.changeTool(Tool.EXTRUSION_TOOL); } else if (e.getKeyCode() == KeyEvent.VK_F1) { ! glv.changeView(View.VIEW_3D); } else if (e.getKeyCode() == KeyEvent.VK_F2) { ! glv.changeView(View.VIEW_XZ); } else if (e.getKeyCode() == KeyEvent.VK_F3) { ! glv.changeView(View.VIEW_XY); } else if (e.getKeyCode() == KeyEvent.VK_F4) { ! glv.changeView(View.VIEW_YZ); } else if (e.getKeyCode() == KeyEvent.VK_F5) { glv.getView().changeDrawMode(View.WIREFRAME_MODE); --- 160,170 ---- glv.changeTool(Tool.EXTRUSION_TOOL); } else if (e.getKeyCode() == KeyEvent.VK_F1) { ! glv.changeCamera(Camera.create(Camera.VIEW_3D)); } else if (e.getKeyCode() == KeyEvent.VK_F2) { ! glv.changeCamera(Camera.create(Camera.VIEW_XZ)); } else if (e.getKeyCode() == KeyEvent.VK_F3) { ! glv.changeCamera(Camera.create(Camera.VIEW_XY)); } else if (e.getKeyCode() == KeyEvent.VK_F4) { ! glv.changeCamera(Camera.create(Camera.VIEW_YZ)); } else if (e.getKeyCode() == KeyEvent.VK_F5) { glv.getView().changeDrawMode(View.WIREFRAME_MODE); *************** *** 202,206 **** AbstractTool.dy = y - pressPos[1]; - View v = glv.getView(); dragged(e); --- 202,205 ---- Index: TapeMeasureTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/TapeMeasureTool.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TapeMeasureTool.java 5 Dec 2005 17:26:37 -0000 1.3 --- TapeMeasureTool.java 12 Dec 2005 14:33:22 -0000 1.4 *************** *** 17,21 **** import net.sourceforge.bprocessor.gl.view.Transformation; - import net.sourceforge.bprocessor.gl.view.AbstractView; import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.gl.GLView; --- 17,20 ---- *************** *** 125,129 **** edgeNormal.scale(1 / edgeNormal.length()); double x = e.getX(); ! double y = AbstractView.getHeight() - e.getY(); View v = glv.getView(); Transformation transformation = v.transformation(); --- 124,128 ---- edgeNormal.scale(1 / edgeNormal.length()); double x = e.getX(); ! double y = View.getHeight() - e.getY(); View v = glv.getView(); Transformation transformation = v.transformation(); *************** *** 180,184 **** double x = e.getX(); ! double y = AbstractView.getHeight() - e.getY(); Transformation transformation = v.transformation(); Vertex near = new Vertex("near", x, y, 0.0); --- 179,183 ---- double x = e.getX(); ! double y = View.getHeight() - e.getY(); Transformation transformation = v.transformation(); Vertex near = new Vertex("near", x, y, 0.0); |
From: rimestad <rim...@us...> - 2005-12-12 14:29:01
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26502/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Removed Files: View3D.java ViewFactory.java Log Message: All views are compacted to one class, have to be refactored into differnet parts to make it more readable --- View3D.java DELETED --- Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** View.java 6 Dec 2005 16:53:54 -0000 1.27 --- View.java 12 Dec 2005 14:28:48 -0000 1.28 *************** *** 7,37 **** package net.sourceforge.bprocessor.gl.view; ! import java.util.List; import net.sourceforge.bprocessor.model.CoordinateSystem; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Vertex; - import net.sourceforge.bprocessor.model.Plane; - import net.sourceforge.bprocessor.gl.model.ClippingPlane; import net.sourceforge.bprocessor.model.Surface; [...2616 lines suppressed...] + * @param glv TheGLView + */ + ViewLighting(GLView glv) { + this.glv = glv; + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + URL url = cl.getResource("Biconlight.gif"); + 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.getView().changeDrawMode(View.LIGHTING_MODE); + glv.repaint(true); + } + } } --- ViewFactory.java DELETED --- |
From: rimestad <rim...@us...> - 2005-12-12 14:28:38
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26409/src/net/sourceforge/bprocessor/gl/view Removed Files: AbstractView.java Log Message: All views are compacted to one class, have to be refactored into differnet parts to make it more readable --- AbstractView.java DELETED --- |
From: rimestad <rim...@us...> - 2005-12-12 14:17:26
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23331/src/net/sourceforge/bprocessor/model Added Files: Camera.java Log Message: Camera added to the model (there still needs functionality to fetch it from the porject class and an facade so that there can be more than one camera at a time. Conversion to xml is not impl. --- NEW FILE: Camera.java --- //--------------------------------------------------------------------------------- // $Id: Camera.java,v 1.1 2005/12/12 14:17:12 rimestad Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model; import org.apache.log4j.Logger; /** * Camera for view placement in the model have a center and at camera position * as well as a up vector */ public class Camera { /** The 3D view view */ public static final int VIEW_3D = 1; /** The x z plane view */ public static final int VIEW_XZ = 2; /** The x y plane view */ public static final int VIEW_XY = 3; /** The y z plane view */ public static final int VIEW_YZ = 4; /** The logger */ private static Logger log = Logger.getLogger(Camera.class); /** The id of the camera */ private Long id; /** double arrays for modelView setup */ private double[] center, roll, camera; /** The focal width */ private double focalwidth; /** The name of the camera */ private String name; /** * The constructor for the persistence layer */ Camera() { } /** * Create a default camera of your choice * @param type the camera type * @return a new camera */ public static Camera create(int type) { Camera res = null; if (type == VIEW_3D) { res = new Camera("3d", new double[]{0, 0, 0}, new double[]{20, 5, 5}, new double[] {0, 0, 1}); } else if (type == VIEW_XZ) { res = new Camera("xz", new double[]{0, 0, 0}, new double[]{0, 20, 0}, new double[] {0, 0, 1}); } else if (type == VIEW_XY) { res = new Camera("xy", new double[]{0, 0, 0}, new double[]{0, 0, 20}, new double[] {0, 1, 0}); } else if (type == VIEW_YZ) { res = new Camera("yz", new double[]{0, 0, 0}, new double[]{20, 0, 0}, new double[] {0, 0, 1}); } return res; } /** * Constructor with arguments * @param center The center position * @param camera The camera positon * @param roll The roll of the camera (up vector) * @param name The name of the cam setting */ public Camera(String name, double[] center, double[] camera, double[] roll) { this.name = name; this.center = center; this.camera = camera; this.roll = roll; this.focalwidth = 65; } /** * Getter for the id * @return The id * @hibernate.id * column="CAMERA_ID" * generator-class="increment" */ public Long getId() { return id; } /** * Setter for the id * @param id The id */ public void setId(Long id) { this.id = id; } /** * Getter for the name * @return The name * @hibernate.property */ public String getName() { return name; } /** * Setter for the name * @param name The name */ public void setName(String name) { this.name = name; } /** * @return Returns the camera. * @hibernate.property */ public double[] getCamera() { return camera; } /** * @param camera The camera to set. */ public void setCamera(double[] camera) { this.camera = camera; } /** * @return Returns the center. * @hibernate.property */ public double[] getCenter() { return center; } /** * @param width The width of the camera. */ public void setFocalwidth(double width) { this.focalwidth = width; } /** * @return Returns the focalwidth. * @hibernate.property */ public double getFocalwidth() { return focalwidth; } /** * @param center The center to set. */ public void setCenter(double[] center) { this.center = center; } /** * @return Returns the roll. * @hibernate.property */ public double[] getRoll() { return roll; } /** * @param roll The roll to set. */ public void setRoll(double[] roll) { this.roll = roll; } /** * The distance from camera to center * @return The distance */ public double dist() { return Math.sqrt((camera[0] - center[0]) * (camera[0] - center[0]) + (camera[1] - center[1]) * (camera[1] - center[1]) + (camera[2] - center[2]) * (camera[2] - center[2])); } /** * Move the center left/right, up/down, forward/backward * @param mv the move vector */ public void translate(double [] mv) { if (mv.length == 3) { center[0] += mv[0]; center[1] += mv[1]; center[2] += mv[2]; camera[0] += mv[0]; camera[1] += mv[1]; camera[2] += mv[2]; } else { log.error("[translateViewMatrix] Wrong parameter size"); } } /** * Function to zoom in */ public void zoomin() { camera[0] -= (camera[0] - center[0]) * 0.1; camera[1] -= (camera[1] - center[1]) * 0.1; camera[2] -= (camera[2] - center[2]) * 0.1; } /** * Function to zoom out */ public void zoomout() { camera[0] += (camera[0] - center[0]) * 0.1; camera[1] += (camera[1] - center[1]) * 0.1; camera[2] += (camera[2] - center[2]) * 0.1; } } |
From: rimestad <rim...@us...> - 2005-12-12 10:11:46
|
Update of /cvsroot/bprocessor/tools/checkstyle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32118/checkstyle Modified Files: checkstyle.xml Log Message: added 1000 to legal file length so that files shoul be less than 3000 in stead of 2000 Index: checkstyle.xml =================================================================== RCS file: /cvsroot/bprocessor/tools/checkstyle/checkstyle.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** checkstyle.xml 27 Jun 2005 09:13:52 -0000 1.1.1.1 --- checkstyle.xml 12 Dec 2005 10:11:38 -0000 1.2 *************** *** 116,120 **** </module> <module name="FileLength"> ! <property name="max" value="2000"/> </module> <module name="ParameterNumber"> --- 116,120 ---- </module> <module name="FileLength"> ! <property name="max" value="3000"/> </module> <module name="ParameterNumber"> |
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30990/src/net/sourceforge/bprocessor/gui/actions Modified Files: CreateConstructionSpaceActionListener.java ToolsDetachActionListener.java CreateFunctionalSpaceActionListener.java ToolsJoinActionListener.java Log Message: Removed some usage of ConstructionSpace/FunctionalSpace Index: ToolsDetachActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ToolsDetachActionListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ToolsDetachActionListener.java 11 Dec 2005 17:27:54 -0000 1.5 --- ToolsDetachActionListener.java 12 Dec 2005 10:06:21 -0000 1.6 *************** *** 7,12 **** package net.sourceforge.bprocessor.gui.actions; - import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.Project; import java.awt.BorderLayout; --- 7,12 ---- package net.sourceforge.bprocessor.gui.actions; import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import java.awt.BorderLayout; *************** *** 85,89 **** Iterator it = spaces.iterator(); while (it.hasNext()) { ! FunctionalSpace fs = (FunctionalSpace)it.next(); leftValuesData.add(new ValueHolder(fs.getId(), fs.getName())); } --- 85,89 ---- Iterator it = spaces.iterator(); while (it.hasNext()) { ! Space fs = (Space)it.next(); leftValuesData.add(new ValueHolder(fs.getId(), fs.getName())); } Index: CreateConstructionSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructionSpaceActionListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CreateConstructionSpaceActionListener.java 2 Oct 2005 14:37:10 -0000 1.5 --- CreateConstructionSpaceActionListener.java 12 Dec 2005 10:06:21 -0000 1.6 *************** *** 10,13 **** --- 10,14 ---- import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import java.awt.event.ActionEvent; *************** *** 44,48 **** if (result != null && !result.trim().equals("")) { ! ConstructionSpace cs = new ConstructionSpace(result.trim()); Project.getInstance().intern(cs); } --- 45,49 ---- if (result != null && !result.trim().equals("")) { ! Space cs = new ConstructionSpace(result.trim()); Project.getInstance().intern(cs); } Index: CreateFunctionalSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateFunctionalSpaceActionListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CreateFunctionalSpaceActionListener.java 2 Oct 2005 14:37:10 -0000 1.5 --- CreateFunctionalSpaceActionListener.java 12 Dec 2005 10:06:21 -0000 1.6 *************** *** 10,13 **** --- 10,14 ---- import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import java.awt.event.ActionEvent; *************** *** 44,48 **** if (result != null && !result.trim().equals("")) { ! FunctionalSpace fs = new FunctionalSpace(result.trim()); Project.getInstance().intern(fs); --- 45,49 ---- if (result != null && !result.trim().equals("")) { ! Space fs = new FunctionalSpace(result.trim()); Project.getInstance().intern(fs); Index: ToolsJoinActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ToolsJoinActionListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ToolsJoinActionListener.java 11 Dec 2005 17:27:54 -0000 1.5 --- ToolsJoinActionListener.java 12 Dec 2005 10:06:21 -0000 1.6 *************** *** 8,13 **** - import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; --- 8,13 ---- import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; *************** *** 98,102 **** it = fss.iterator(); while (it.hasNext()) { ! FunctionalSpace fs = (FunctionalSpace)it.next(); rightValuesData.add(new ValueHolder(fs.getId(), fs.getName())); } --- 98,102 ---- it = fss.iterator(); while (it.hasNext()) { ! Space fs = (Space)it.next(); rightValuesData.add(new ValueHolder(fs.getId(), fs.getName())); } |
From: Michael L. <he...@us...> - 2005-12-12 10:06:30
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30990/src/net/sourceforge/bprocessor/gui/treeview Modified Files: SpacesTreeView.java Log Message: Removed some usage of ConstructionSpace/FunctionalSpace Index: SpacesTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpacesTreeView.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SpacesTreeView.java 11 Dec 2005 17:27:54 -0000 1.10 --- SpacesTreeView.java 12 Dec 2005 10:06:21 -0000 1.11 *************** *** 10,15 **** 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.FunctionalSpace; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; --- 10,13 ---- *************** *** 69,73 **** if (type.equals(Notification.FUNCTIONAL_SPACE_CREATED)) { ! FunctionalSpace fs = Project.getInstance().findFunctionalSpaceById(n.getObject()); RootNode rn = (RootNode)getModel().getRoot(); --- 67,71 ---- if (type.equals(Notification.FUNCTIONAL_SPACE_CREATED)) { ! Space fs = Project.getInstance().findFunctionalSpaceById(n.getObject()); RootNode rn = (RootNode)getModel().getRoot(); *************** *** 109,113 **** } else if (type.equals(Notification.CONSTRUCTION_SPACE_CREATED)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(n.getObject()); RootNode rn = (RootNode)getModel().getRoot(); --- 107,111 ---- } else if (type.equals(Notification.CONSTRUCTION_SPACE_CREATED)) { ! Space cs = Project.getInstance().findConstructionSpaceById(n.getObject()); RootNode rn = (RootNode)getModel().getRoot(); |
From: Michael L. <he...@us...> - 2005-12-12 10:06:30
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30990/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java MyKeyListener.java Log Message: Removed some usage of ConstructionSpace/FunctionalSpace Index: MyKeyListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/MyKeyListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MyKeyListener.java 21 Nov 2005 09:52:17 -0000 1.1 --- MyKeyListener.java 12 Dec 2005 10:06:21 -0000 1.2 *************** *** 11,17 **** import javax.swing.text.JTextComponent; ! import net.sourceforge.bprocessor.model.FunctionalSpace; ! import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.Project; /** --- 11,17 ---- import javax.swing.text.JTextComponent; ! import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; /** *************** *** 21,28 **** /** The current ConstructionSpace */ ! private ConstructionSpace cons; /** The current FunctionalSpace */ ! private FunctionalSpace funs; /** The current Object */ --- 21,28 ---- /** The current ConstructionSpace */ ! private Space cons; /** The current FunctionalSpace */ ! private Space funs; /** The current Object */ *************** *** 59,73 **** if (keyPressed == KeyEvent.VK_ENTER) { JTextComponent tf = (JTextComponent)e.getSource(); ! String newName = tf.getText(); ! if (current instanceof FunctionalSpace) { ! funs = (FunctionalSpace)current; ! funs.setName(newName); ! Project.getInstance().update(funs); ! } ! if (current instanceof ConstructionSpace) { ! cons = (ConstructionSpace)current; ! cons.setName(newName); ! Project.getInstance().update(cons); } } } --- 59,77 ---- if (keyPressed == KeyEvent.VK_ENTER) { JTextComponent tf = (JTextComponent)e.getSource(); ! String newName = tf.getText(); ! if (current instanceof Space) { ! Space space = (Space) current; ! if (space.isFunctionalSpace()) { ! funs = space; ! funs.setName(newName); ! Project.getInstance().update(funs); ! } ! if (space.isConstructionSpace()) { ! cons = space; ! cons.setName(newName); ! Project.getInstance().update(cons); ! } } + } } Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AttributeView.java 11 Dec 2005 17:27:54 -0000 1.10 --- AttributeView.java 12 Dec 2005 10:06:21 -0000 1.11 *************** *** 10,16 **** 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.FunctionalSpace; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; --- 10,15 ---- import net.sourceforge.bprocessor.kernel.notification.NotificationListener; import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; *************** *** 65,72 **** String type = n.getType(); if (type.equals(Notification.FUNCTIONAL_SPACE_SELECTED)) { ! FunctionalSpace current = Project.getInstance().findFunctionalSpaceById(n.getObject()); ap.displayFuncSpace(current); } else if (type.equals(Notification.CONSTRUCTION_SPACE_SELECTED)) { ! ConstructionSpace current = Project.getInstance().findConstructionSpaceById(n.getObject()); ap.displayConsSpace(current); } else if (type.equals(Notification.SURFACE_SELECTED)) { --- 64,71 ---- String type = n.getType(); if (type.equals(Notification.FUNCTIONAL_SPACE_SELECTED)) { ! Space current = Project.getInstance().findFunctionalSpaceById(n.getObject()); ap.displayFuncSpace(current); } else if (type.equals(Notification.CONSTRUCTION_SPACE_SELECTED)) { ! Space current = Project.getInstance().findConstructionSpaceById(n.getObject()); ap.displayConsSpace(current); } else if (type.equals(Notification.SURFACE_SELECTED)) { *************** *** 124,128 **** * @param o The object */ ! void displayFuncSpace(FunctionalSpace o) { removeAll(); --- 123,127 ---- * @param o The object */ ! void displayFuncSpace(Space o) { removeAll(); *************** *** 154,158 **** * @param o The object */ ! void displayConsSpace(ConstructionSpace o) { removeAll(); --- 153,157 ---- * @param o The object */ ! void displayConsSpace(Space o) { removeAll(); |
From: Michael L. <he...@us...> - 2005-12-12 10:06:00
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30874/src/net/sourceforge/bprocessor/gl/tool Modified Files: SelectTool.java Log Message: Removed some usage of ConstructionSpace/FunctionalSpace Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** SelectTool.java 11 Dec 2005 17:58:32 -0000 1.46 --- SelectTool.java 12 Dec 2005 10:05:52 -0000 1.47 *************** *** 19,24 **** import net.sourceforge.bprocessor.model.Vertex; import net.sourceforge.bprocessor.model.Surface; - import net.sourceforge.bprocessor.model.FunctionalSpace; - import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.Space; --- 19,22 ---- *************** *** 244,248 **** side.equals("front")); domainItem.addActionListener(ml); ! if (domain instanceof FunctionalSpace) { funcMenu.add(domainItem); } else { --- 242,246 ---- side.equals("front")); domainItem.addActionListener(ml); ! if (domain.isFunctionalSpace()) { funcMenu.add(domainItem); } else { *************** *** 429,433 **** } } else if (n.getType().equals(Notification.FUNCTIONAL_SPACE_SELECTED)) { ! FunctionalSpace fs = Project.getInstance().findFunctionalSpaceById(n.getObject()); Set s = fs.getSurfaces(); --- 427,431 ---- } } else if (n.getType().equals(Notification.FUNCTIONAL_SPACE_SELECTED)) { ! Space fs = Project.getInstance().findFunctionalSpaceById(n.getObject()); Set s = fs.getSurfaces(); *************** *** 440,444 **** } } else if (n.getType().equals(Notification.FUNCTIONAL_SPACE_DESELECTED)) { ! FunctionalSpace fs = Project.getInstance().findFunctionalSpaceById(n.getObject()); Set s = fs.getSurfaces(); --- 438,442 ---- } } else if (n.getType().equals(Notification.FUNCTIONAL_SPACE_DESELECTED)) { ! Space fs = Project.getInstance().findFunctionalSpaceById(n.getObject()); Set s = fs.getSurfaces(); *************** *** 451,455 **** } } else if (n.getType().equals(Notification.CONSTRUCTION_SPACE_SELECTED)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(n.getObject()); Set s = cs.getSurfaces(); --- 449,453 ---- } } else if (n.getType().equals(Notification.CONSTRUCTION_SPACE_SELECTED)) { ! Space cs = Project.getInstance().findConstructionSpaceById(n.getObject()); Set s = cs.getSurfaces(); *************** *** 462,466 **** } } else if (n.getType().equals(Notification.CONSTRUCTION_SPACE_DESELECTED)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(n.getObject()); Set s = cs.getSurfaces(); --- 460,464 ---- } } else if (n.getType().equals(Notification.CONSTRUCTION_SPACE_DESELECTED)) { ! Space cs = Project.getInstance().findConstructionSpaceById(n.getObject()); Set s = cs.getSurfaces(); |
From: Michael L. <he...@us...> - 2005-12-12 09:05:49
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18740/src/net/sourceforge/bprocessor/gl/view Modified Files: AbstractView.java Log Message: Removed some usage of ConstructionSpace/FunctionalSpace Index: AbstractView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** AbstractView.java 11 Dec 2005 17:58:32 -0000 1.73 --- AbstractView.java 12 Dec 2005 09:05:41 -0000 1.74 *************** *** 12,17 **** import net.sourceforge.bprocessor.model.CoordinateSystem; - import net.sourceforge.bprocessor.model.FunctionalSpace; - import net.sourceforge.bprocessor.model.ConstructionSpace; import net.sourceforge.bprocessor.model.Plane; import net.sourceforge.bprocessor.model.Edge; --- 12,15 ---- *************** *** 583,593 **** } //draw the front domain name ! ! if (frontDomain instanceof FunctionalSpace) { gl.glColor3d(0.2 + fcb, 0.2 + fcb, 0.5 + fcb); ! } else if (frontDomain instanceof ConstructionSpace) { gl.glColor3d(0.8 + fcb, 0.2 + fcb, 0.4 + fcb); - } else { - gl.glColor3d(0.2 + fcb, 0.2 + fcb, 0.2 + fcb); } --- 581,590 ---- } //draw the front domain name ! if (frontDomain == null) { ! gl.glColor3d(0.2 + fcb, 0.2 + fcb, 0.2 + fcb); ! } else if (frontDomain.isFunctionalSpace()) { gl.glColor3d(0.2 + fcb, 0.2 + fcb, 0.5 + fcb); ! } else if (frontDomain.isConstructionSpace()) { gl.glColor3d(0.8 + fcb, 0.2 + fcb, 0.4 + fcb); } *************** *** 599,610 **** } //draw the back domain name ! if (backDomain instanceof FunctionalSpace) { gl.glColor3d(0.2 + bcb, 0.2 + bcb, 0.5 + bcb); ! } else if (backDomain instanceof ConstructionSpace) { gl.glColor3d(0.8 + bcb, 0.2 + bcb, 0.4 + bcb); ! } else { ! gl.glColor3d(0.2 + bcb, 0.2 + bcb, 0.2 + bcb); ! } ! drawString(backTextAnchor.getX(), backTextAnchor.getY(), backName); --- 596,606 ---- } //draw the back domain name ! if (backDomain == null) { ! gl.glColor3d(0.2 + bcb, 0.2 + bcb, 0.2 + bcb); ! } else if (backDomain.isFunctionalSpace()) { gl.glColor3d(0.2 + bcb, 0.2 + bcb, 0.5 + bcb); ! } else if (backDomain.isConstructionSpace()) { gl.glColor3d(0.8 + bcb, 0.2 + bcb, 0.4 + bcb); ! } drawString(backTextAnchor.getX(), backTextAnchor.getY(), backName); *************** *** 1218,1225 **** Space back = surface.getBackDomain(); Space front = surface.getFrontDomain(); ! if ((front instanceof FunctionalSpace) && (back instanceof FunctionalSpace)) { return false; } ! if ((front instanceof ConstructionSpace) && (back instanceof ConstructionSpace)) { return false; } --- 1214,1227 ---- Space back = surface.getBackDomain(); Space front = surface.getFrontDomain(); ! if (back == null) { ! return true; ! } ! if (front == null) { ! return true; ! } ! if ((front.isFunctionalSpace()) && (back.isFunctionalSpace())) { return false; } ! if ((front.isConstructionSpace()) && (back.isConstructionSpace())) { return false; } *************** *** 1238,1246 **** } else { // TODO check if the space space has a color ! if (space instanceof ConstructionSpace) { // We are looking at a constructionspace return frontCcolor; } ! if (space instanceof FunctionalSpace) { // We are looking at a constructionspace return backColor; --- 1240,1248 ---- } else { // TODO check if the space space has a color ! if (space.isConstructionSpace()) { // We are looking at a constructionspace return frontCcolor; } ! if (space.isFunctionalSpace()) { // We are looking at a constructionspace return backColor; |
From: Michael L. <he...@us...> - 2005-12-11 17:58:40
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4394/src/net/sourceforge/bprocessor/gl/tool Modified Files: SelectTool.java CreateSpaceActionListener.java Log Message: Removed some usage of Domain Index: CreateSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CreateSpaceActionListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CreateSpaceActionListener.java 3 Nov 2005 11:11:23 -0000 1.2 --- CreateSpaceActionListener.java 11 Dec 2005 17:58:32 -0000 1.3 *************** *** 16,20 **** import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.ConstructionSpace; - import net.sourceforge.bprocessor.model.Domain; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; --- 16,19 ---- *************** *** 83,87 **** } ! Domain old; if (front) { old = surface.getFrontDomain(); --- 82,86 ---- } ! Space old; if (front) { old = surface.getFrontDomain(); Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** SelectTool.java 11 Dec 2005 17:50:58 -0000 1.45 --- SelectTool.java 11 Dec 2005 17:58:32 -0000 1.46 *************** *** 14,18 **** import net.sourceforge.bprocessor.kernel.notification.Notifier; ! import net.sourceforge.bprocessor.model.Domain; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; --- 14,18 ---- import net.sourceforge.bprocessor.kernel.notification.Notifier; ! import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; *************** *** 105,109 **** Iterator dit = ds.iterator(); while (dit.hasNext()) { ! Domain d = (Domain)dit.next(); Set s = d.getSurfaces(); Iterator it = s.iterator(); --- 105,109 ---- Iterator dit = ds.iterator(); while (dit.hasNext()) { ! Space d = (Space)dit.next(); Set s = d.getSurfaces(); Iterator it = s.iterator(); |
From: Michael L. <he...@us...> - 2005-12-11 17:58:39
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4394/src/net/sourceforge/bprocessor/gl/view Modified Files: AbstractView.java Log Message: Removed some usage of Domain Index: AbstractView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** AbstractView.java 11 Dec 2005 13:06:41 -0000 1.72 --- AbstractView.java 11 Dec 2005 17:58:32 -0000 1.73 *************** *** 17,21 **** import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; - import net.sourceforge.bprocessor.model.Domain; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Vertex; --- 17,20 ---- *************** *** 528,533 **** Vertex from = surface.center(); Vertex front = transformation.project(from); ! Domain frontDomain = surface.getFrontDomain(); ! Domain backDomain = surface.getBackDomain(); String frontName; String backName; --- 527,532 ---- Vertex from = surface.center(); Vertex front = transformation.project(from); ! Space frontDomain = surface.getFrontDomain(); ! Space backDomain = surface.getBackDomain(); String frontName; String backName; *************** *** 1217,1222 **** */ private boolean isVisible(Surface surface) { ! Domain back = surface.getBackDomain(); ! Domain front = surface.getFrontDomain(); if ((front instanceof FunctionalSpace) && (back instanceof FunctionalSpace)) { return false; --- 1216,1221 ---- */ private boolean isVisible(Surface surface) { ! Space back = surface.getBackDomain(); ! Space front = surface.getFrontDomain(); if ((front instanceof FunctionalSpace) && (back instanceof FunctionalSpace)) { return false; *************** *** 1234,1238 **** * @return The color */ ! private float[] getSpaceColor(Domain space) { if (space == null) { return noneColor; --- 1233,1237 ---- * @return The color */ ! private float[] getSpaceColor(Space space) { if (space == null) { return noneColor; *************** *** 1266,1274 **** if (isVisible(s)) { if (side == FRONT) { ! Domain back = s.getBackDomain(); gl.glColor3fv(getSpaceColor(back)); } if (side == BACK) { ! Domain front = s.getFrontDomain(); gl.glColor3fv(getSpaceColor(front)); } --- 1265,1273 ---- if (isVisible(s)) { if (side == FRONT) { ! Space back = s.getBackDomain(); gl.glColor3fv(getSpaceColor(back)); } if (side == BACK) { ! Space front = s.getFrontDomain(); gl.glColor3fv(getSpaceColor(front)); } |
From: Michael L. <he...@us...> - 2005-12-11 17:51:07
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3215/src/net/sourceforge/bprocessor/gl/tool Modified Files: PasteActionListener.java ShiftActionListener.java ExtrusionTool.java CopyActionListener.java DomainPopupListener.java SelectTool.java Log Message: Surface is now related to Space instead of Domain Index: PasteActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/PasteActionListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PasteActionListener.java 3 Nov 2005 11:11:23 -0000 1.2 --- PasteActionListener.java 11 Dec 2005 17:50:58 -0000 1.3 *************** *** 11,16 **** import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.model.Surface; - import net.sourceforge.bprocessor.model.Domain; import net.sourceforge.bprocessor.model.Project; --- 11,16 ---- import net.sourceforge.bprocessor.gl.view.View; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Project; *************** *** 48,53 **** */ public void actionPerformed(ActionEvent e) { ! Domain facing = CopyActionListener.getFacing(); ! Domain nonFacing = CopyActionListener.getNonFacing(); if (view.facingFront(surface)) { surface.setFrontDomain(facing); --- 48,53 ---- */ public void actionPerformed(ActionEvent e) { ! Space facing = CopyActionListener.getFacing(); ! Space nonFacing = CopyActionListener.getNonFacing(); if (view.facingFront(surface)) { surface.setFrontDomain(facing); Index: DomainPopupListener.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/DomainPopupListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DomainPopupListener.java 3 Nov 2005 11:11:23 -0000 1.2 --- DomainPopupListener.java 11 Dec 2005 17:50:58 -0000 1.3 *************** *** 10,15 **** import java.awt.event.ActionListener; ! import net.sourceforge.bprocessor.model.Domain; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; --- 10,16 ---- import java.awt.event.ActionListener; ! import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; *************** *** 24,28 **** /** The domain */ ! private Domain domain; /** The Surface */ --- 25,29 ---- /** The domain */ ! private Space domain; /** The Surface */ *************** *** 39,43 **** * @param front werther or not this popup for the front of the back of the surface */ ! public DomainPopupListener(Domain domain, Surface surface, boolean front) { this.domain = domain; this.surface = surface; --- 40,44 ---- * @param front werther or not this popup for the front of the back of the surface */ ! public DomainPopupListener(Space domain, Surface surface, boolean front) { this.domain = domain; this.surface = surface; *************** *** 51,55 **** public void actionPerformed(ActionEvent arg0) { if (front) { ! Domain oldFront = surface.getFrontDomain(); surface.setFrontDomain(domain); if (domain != null) { --- 52,56 ---- public void actionPerformed(ActionEvent arg0) { if (front) { ! Space oldFront = surface.getFrontDomain(); surface.setFrontDomain(domain); if (domain != null) { *************** *** 60,64 **** } } else { ! Domain oldBack = surface.getBackDomain(); surface.setBackDomain(domain); if (domain != null) { --- 61,65 ---- } } else { ! Space oldBack = surface.getBackDomain(); surface.setBackDomain(domain); if (domain != null) { Index: CopyActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CopyActionListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CopyActionListener.java 3 Nov 2005 11:11:23 -0000 1.2 --- CopyActionListener.java 11 Dec 2005 17:50:58 -0000 1.3 *************** *** 11,16 **** import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.model.Surface; - import net.sourceforge.bprocessor.model.Domain; import org.apache.log4j.Logger; --- 11,16 ---- import net.sourceforge.bprocessor.gl.view.View; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import org.apache.log4j.Logger; *************** *** 27,35 **** * The copied domain facing the camera */ ! private static Domain facing = null; /** * The copied domain not facing the camera */ ! private static Domain nonFacing = null; /** * The surface this listener shifts spaces on --- 27,35 ---- * The copied domain facing the camera */ ! private static Space facing = null; /** * The copied domain not facing the camera */ ! private static Space nonFacing = null; /** * The surface this listener shifts spaces on *************** *** 66,70 **** * @return the domain */ ! public static Domain getFacing() { return facing; } --- 66,70 ---- * @return the domain */ ! public static Space getFacing() { return facing; } *************** *** 73,77 **** * @return the domain */ ! public static Domain getNonFacing() { return nonFacing; } --- 73,77 ---- * @return the domain */ ! public static Space getNonFacing() { return nonFacing; } Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** SelectTool.java 28 Nov 2005 22:24:50 -0000 1.44 --- SelectTool.java 11 Dec 2005 17:50:58 -0000 1.45 *************** *** 237,241 **** boolean constEnabled = false; while (domIt.hasNext()) { ! Domain domain = (Domain)domIt.next(); if (domain instanceof Space) { JMenuItem domainItem = new JMenuItem(domain.getName()); --- 237,241 ---- boolean constEnabled = false; while (domIt.hasNext()) { ! Space domain = (Space)domIt.next(); if (domain instanceof Space) { JMenuItem domainItem = new JMenuItem(domain.getName()); Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ExtrusionTool.java 28 Nov 2005 22:24:50 -0000 1.32 --- ExtrusionTool.java 11 Dec 2005 17:50:58 -0000 1.33 *************** *** 17,23 **** import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; - import net.sourceforge.bprocessor.model.Domain; import net.sourceforge.bprocessor.model.Plane; --- 17,23 ---- import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; import net.sourceforge.bprocessor.model.Plane; *************** *** 422,427 **** Surface bottom = (Surface)extrudedSurfaces.getLast(); Vertex dir = top.center().minus(bottom.center()); ! Domain front = bottom.getFrontDomain(); ! Domain back = bottom.getBackDomain(); assignSpaces(extrudedSurfaces); --- 422,427 ---- Surface bottom = (Surface)extrudedSurfaces.getLast(); Vertex dir = top.center().minus(bottom.center()); ! Space front = bottom.getFrontDomain(); ! Space back = bottom.getBackDomain(); assignSpaces(extrudedSurfaces); *************** *** 457,462 **** Surface top = (Surface)surfaces.getFirst(); Surface bottom = (Surface)surfaces.getLast(); ! Domain front = bottom.getFrontDomain(); ! Domain back = bottom.getBackDomain(); surfaces.removeLast(); Vertex norm = bottom.normal(); --- 457,462 ---- Surface top = (Surface)surfaces.getFirst(); Surface bottom = (Surface)surfaces.getLast(); ! Space front = bottom.getFrontDomain(); ! Space back = bottom.getBackDomain(); surfaces.removeLast(); Vertex norm = bottom.normal(); *************** *** 474,478 **** * @param surfaces the set of surfaces */ ! private void assignBacks(Domain back, LinkedList surfaces) { Iterator surfIt = surfaces.iterator(); while (surfIt.hasNext()) { --- 474,478 ---- * @param surfaces the set of surfaces */ ! private void assignBacks(Space back, LinkedList surfaces) { Iterator surfIt = surfaces.iterator(); while (surfIt.hasNext()) { *************** *** 491,495 **** * @param surfaces the set of surfaces */ ! private void assignFronts(Domain front, LinkedList surfaces) { Iterator surfIt = surfaces.iterator(); while (surfIt.hasNext()) { --- 491,495 ---- * @param surfaces the set of surfaces */ ! private void assignFronts(Space front, LinkedList surfaces) { Iterator surfIt = surfaces.iterator(); while (surfIt.hasNext()) { Index: ShiftActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ShiftActionListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ShiftActionListener.java 3 Nov 2005 11:11:23 -0000 1.2 --- ShiftActionListener.java 11 Dec 2005 17:50:58 -0000 1.3 *************** *** 10,15 **** import java.awt.event.ActionListener; import net.sourceforge.bprocessor.model.Surface; - import net.sourceforge.bprocessor.model.Domain; import net.sourceforge.bprocessor.model.Project; --- 10,15 ---- import java.awt.event.ActionListener; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Project; *************** *** 43,48 **** */ public void actionPerformed(ActionEvent e) { ! Domain back = surface.getBackDomain(); ! Domain front = surface.getFrontDomain(); surface.setFrontDomain(back); --- 43,48 ---- */ public void actionPerformed(ActionEvent e) { ! Space back = surface.getBackDomain(); ! Space front = surface.getFrontDomain(); surface.setFrontDomain(back); |
From: Michael L. <he...@us...> - 2005-12-11 17:50:41
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3125/src/net/sourceforge/bprocessor/model Modified Files: Surface.java ConstructionSpace.java Space.java FunctionalSpace.java Log Message: Surface is now related to Space instead of Domain Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** Surface.java 8 Dec 2005 23:21:48 -0000 1.52 --- Surface.java 11 Dec 2005 17:50:30 -0000 1.53 *************** *** 49,56 **** /** The domain in front of the surface */ ! private Domain frontDomain; /** The domain behind the surface */ ! private Domain backDomain; /** Surface is clockwise */ --- 49,56 ---- /** The domain in front of the surface */ ! private Space frontDomain; /** The domain behind the surface */ ! private Space backDomain; /** Surface is clockwise */ *************** *** 517,522 **** Vertex other = inner.normal(); double dot = normal.dot(other); ! Domain front = getFrontDomain(); ! Domain back = getBackDomain(); if (dot > 0) { if (inner.getFrontDomain() == null) { --- 517,522 ---- Vertex other = inner.normal(); double dot = normal.dot(other); ! Space front = getFrontDomain(); ! Space back = getBackDomain(); if (dot > 0) { if (inner.getFrontDomain() == null) { *************** *** 674,678 **** * class="net.sourceforge.bprocessor.model.Domain" */ ! public Domain getBackDomain() { return backDomain; } --- 674,678 ---- * class="net.sourceforge.bprocessor.model.Domain" */ ! public Space getBackDomain() { return backDomain; } *************** *** 682,686 **** * @param back the domain */ ! public void setBackDomain(Domain back) { if (backDomain != back) { if (backDomain != null) { --- 682,686 ---- * @param back the domain */ ! public void setBackDomain(Space back) { if (backDomain != back) { if (backDomain != null) { *************** *** 702,706 **** * class="net.sourceforge.bprocessor.model.Domain" */ ! public Domain getFrontDomain() { return frontDomain; } --- 702,706 ---- * class="net.sourceforge.bprocessor.model.Domain" */ ! public Space getFrontDomain() { return frontDomain; } *************** *** 709,713 **** * @param front the frontdomain */ ! public void setFrontDomain(Domain front) { if (frontDomain != front) { if (frontDomain != null) { --- 709,713 ---- * @param front the frontdomain */ ! public void setFrontDomain(Space front) { if (frontDomain != front) { if (frontDomain != null) { Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Space.java 11 Dec 2005 17:27:19 -0000 1.7 --- Space.java 11 Dec 2005 17:50:30 -0000 1.8 *************** *** 7,12 **** package net.sourceforge.bprocessor.model; - import java.util.HashSet; - import java.util.Set; import org.apache.log4j.Logger; --- 7,10 ---- *************** *** 26,32 **** /** The space id */ private Long spaceId; ! ! /** The elements */ ! private Set elements; /** The modellor */ --- 24,28 ---- /** The space id */ private Long spaceId; ! /** The modellor */ *************** *** 65,93 **** this.spaceId = id; } ! /** ! * Get the elements ! * @return The elements ! * @hibernate.set ! * lazy="false" ! * @hibernate.key ! * column="SPACE_ID" ! * @hibernate.one-to-many ! * class="net.sourceforge.bprocessor.model.Element" */ ! public Set getElements() { ! if (elements == null) { ! return new HashSet(); ! } else { ! return elements; ! } } ! /** ! * Set the elements ! * @param elements The elements */ ! public void setElements(Set elements) { ! this.elements = elements; } --- 61,80 ---- this.spaceId = id; } ! ! /** ! * Test for construction-space ! * @return True if constructionspace */ ! public boolean isConstructionSpace() { ! return false; } ! /** ! * Test for functional-space ! * @return True if functional-space */ ! public boolean isFunctionalSpace() { ! return false; } *************** *** 113,118 **** */ public String toString() { ! return "Space[" + super.toString() + ",elements=" + ! elements == null ? "0" : elements.size() + "]"; } } --- 100,104 ---- */ public String toString() { ! return "Space[" + super.toString() + "]"; } } Index: ConstructionSpace.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ConstructionSpace.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConstructionSpace.java 28 Jul 2005 06:48:54 -0000 1.2 --- ConstructionSpace.java 11 Dec 2005 17:50:30 -0000 1.3 *************** *** 37,41 **** super(); setName(name); - setElements(null); } --- 37,40 ---- *************** *** 60,63 **** --- 59,70 ---- /** + * Test for construction-space + * @return True if constructionspace + */ + public boolean isConstructionSpace() { + return true; + } + + /** * Return the hash code of the object * @return The hash Index: FunctionalSpace.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/FunctionalSpace.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FunctionalSpace.java 28 Jul 2005 06:48:54 -0000 1.2 --- FunctionalSpace.java 11 Dec 2005 17:50:30 -0000 1.3 *************** *** 37,41 **** super(); setName(name); - setElements(null); } --- 37,40 ---- *************** *** 58,61 **** --- 57,68 ---- this.functionalSpaceId = id; } + + /** + * Test for functional-space + * @return True if functional-space + */ + public boolean isFunctionalSpace() { + return true; + } /** |
From: Michael L. <he...@us...> - 2005-12-11 17:50:41
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3125/src/net/sourceforge/bprocessor/model/xml Modified Files: PersistenceManager.java Log Message: Surface is now related to Space instead of Domain Index: PersistenceManager.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/xml/PersistenceManager.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PersistenceManager.java 11 Dec 2005 17:27:19 -0000 1.13 --- PersistenceManager.java 11 Dec 2005 17:50:30 -0000 1.14 *************** *** 10,13 **** --- 10,14 ---- import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.xml.impl.AttributeImpl; *************** *** 357,365 **** Long bid = (Long)(mapper.get(new Long(s.getBackdomainref()))); if (bid != null) { ! sm.setBackDomain(Project.getInstance().findDomainById(bid)); } Long fid = (Long)(mapper.get(new Long(s.getFrontdomainref()))); if (fid != null) { ! sm.setFrontDomain(Project.getInstance().findDomainById(fid)); } Project.getInstance().update(sm); --- 358,366 ---- Long bid = (Long)(mapper.get(new Long(s.getBackdomainref()))); if (bid != null) { ! sm.setBackDomain((Space) Project.getInstance().findDomainById(bid)); } Long fid = (Long)(mapper.get(new Long(s.getFrontdomainref()))); if (fid != null) { ! sm.setFrontDomain((Space) Project.getInstance().findDomainById(fid)); } Project.getInstance().update(sm); |
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31695/src/net/sourceforge/bprocessor/gui/actions Modified Files: ToolsDetachActionListener.java CreateElementActionListener.java CreatePartActionListener.java ToolsJoinActionListener.java Log Message: Removed part and element Index: CreatePartActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreatePartActionListener.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CreatePartActionListener.java 2 Oct 2005 14:37:10 -0000 1.6 --- CreatePartActionListener.java 11 Dec 2005 17:27:54 -0000 1.7 *************** *** 8,13 **** import net.sourceforge.bprocessor.gui.GUI; - import net.sourceforge.bprocessor.model.Part; import net.sourceforge.bprocessor.model.Project; import java.awt.event.ActionEvent; --- 8,13 ---- import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import java.awt.event.ActionEvent; *************** *** 44,49 **** if (result != null && !result.trim().equals("")) { ! Part p = new Part(result.trim()); ! Project.getInstance().intern(p); } } --- 44,49 ---- if (result != null && !result.trim().equals("")) { ! Space space = new Space(result.trim()); ! Project.getInstance().intern(space); } } Index: ToolsDetachActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ToolsDetachActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ToolsDetachActionListener.java 2 Oct 2005 14:37:10 -0000 1.4 --- ToolsDetachActionListener.java 11 Dec 2005 17:27:54 -0000 1.5 *************** *** 7,16 **** package net.sourceforge.bprocessor.gui.actions; - 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; --- 7,12 ---- *************** *** 190,280 **** String rsname = (String)rightSelector.getSelectedItem(); ValueHolder lsvalue = (ValueHolder)leftValues.getSelectedValue(); - - if (lsvalue != null) { - if (lsname.equals(FUNCTIONAL_SPACES)) { - FunctionalSpace fs = - Project.getInstance().findFunctionalSpaceById(lsvalue.getId()); - - if (rsname.equals(SURFACES)) { - Vector rightValuesData = new Vector(); - Collection surfaces = fs.getSurfaces(); - Iterator it = surfaces.iterator(); - while (it.hasNext()) { - Surface s = (Surface)it.next(); - rightValuesData.add(new ValueHolder(s.getId(), s.getName())); - } - rightValues.setListData(rightValuesData); - - } else if (rsname.equals(ELEMENTS)) { - Vector rightValuesData = new Vector(); - Collection elements = fs.getElements(); - Iterator it = elements.iterator(); - while (it.hasNext()) { - Element e = (Element)it.next(); - rightValuesData.add(new ValueHolder(e.getId(), e.getName())); - } - rightValues.setListData(rightValuesData); - } - } else if (lsname.equals(CONSTRUCTION_SPACES)) { - ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(lsvalue.getId()); - - if (rsname.equals(SURFACES)) { - Vector rightValuesData = new Vector(); - Collection surfaces = cs.getSurfaces(); - Iterator it = surfaces.iterator(); - while (it.hasNext()) { - Surface s = (Surface)it.next(); - rightValuesData.add(new ValueHolder(s.getId(), s.getName())); - } - rightValues.setListData(rightValuesData); - - } else if (rsname.equals(ELEMENTS)) { - Vector rightValuesData = new Vector(); - Collection elements = cs.getElements(); - Iterator it = elements.iterator(); - while (it.hasNext()) { - Element e = (Element)it.next(); - rightValuesData.add(new ValueHolder(e.getId(), e.getName())); - } - rightValues.setListData(rightValuesData); - } - } else if (lsname.equals(ELEMENTS)) { - Element e = Project.getInstance().findElementById(lsvalue.getId()); - - if (rsname.equals(SURFACES)) { - Vector rightValuesData = new Vector(); - Collection surfaces = e.getSurfaces(); - Iterator it = surfaces.iterator(); - while (it.hasNext()) { - Surface s = (Surface)it.next(); - rightValuesData.add(new ValueHolder(s.getId(), s.getName())); - } - rightValues.setListData(rightValuesData); - - } else if (rsname.equals(PARTS)) { - Vector rightValuesData = new Vector(); - Collection elements = e.getParts(); - Iterator it = elements.iterator(); - while (it.hasNext()) { - Part p = (Part)it.next(); - rightValuesData.add(new ValueHolder(p.getId(), p.getName())); - } - rightValues.setListData(rightValuesData); - } - } else if (lsname.equals(PARTS)) { - Part p = Project.getInstance().findPartById(lsvalue.getId()); - - if (rsname.equals(SURFACES)) { - Vector rightValuesData = new Vector(); - Collection surfaces = p.getSurfaces(); - Iterator it = surfaces.iterator(); - while (it.hasNext()) { - Surface s = (Surface)it.next(); - rightValuesData.add(new ValueHolder(s.getId(), s.getName())); - } - rightValues.setListData(rightValuesData); - } - } - } } } --- 186,189 ---- *************** *** 314,371 **** public void itemStateChanged(ItemEvent event) { String current = (String)leftSelector.getSelectedItem(); ! if (!current.equals(last)) { ! Vector leftValuesData = new Vector(); ! if (current.equals(FUNCTIONAL_SPACES)) { ! Collection spaces = Project.getInstance().getFunctionalSpaces(); ! Iterator it = spaces.iterator(); ! while (it.hasNext()) { ! FunctionalSpace fs = (FunctionalSpace)it.next(); ! leftValuesData.add(new ValueHolder(fs.getId(), fs.getName())); ! } ! ! rightSelector.removeAllItems(); ! rightSelector.addItem(SURFACES); ! rightSelector.addItem(ELEMENTS); ! ! } else if (current.equals(CONSTRUCTION_SPACES)) { ! Collection spaces = Project.getInstance().getConstructionSpaces(); ! Iterator it = spaces.iterator(); ! while (it.hasNext()) { ! ConstructionSpace cs = (ConstructionSpace)it.next(); ! leftValuesData.add(new ValueHolder(cs.getId(), cs.getName())); ! } ! ! rightSelector.removeAllItems(); ! rightSelector.addItem(SURFACES); ! rightSelector.addItem(ELEMENTS); ! ! } else if (current.equals(ELEMENTS)) { ! Collection elements = Project.getInstance().getElements(); ! Iterator it = elements.iterator(); ! while (it.hasNext()) { ! Element e = (Element)it.next(); ! leftValuesData.add(new ValueHolder(e.getId(), e.getName())); ! } ! ! rightSelector.removeAllItems(); ! rightSelector.addItem(SURFACES); ! rightSelector.addItem(PARTS); ! ! } else if (current.equals(PARTS)) { ! Collection parts = Project.getInstance().getParts(); ! Iterator it = parts.iterator(); ! while (it.hasNext()) { ! Part p = (Part)it.next(); ! leftValuesData.add(new ValueHolder(p.getId(), p.getName())); ! } ! ! rightSelector.removeAllItems(); ! rightSelector.addItem(SURFACES); ! } ! ! leftValues.setListData(leftValuesData); ! ! last = current; ! } } } --- 223,227 ---- public void itemStateChanged(ItemEvent event) { String current = (String)leftSelector.getSelectedItem(); ! } } *************** *** 411,494 **** public void itemStateChanged(ItemEvent event) { String current = (String)rightSelector.getSelectedItem(); ! if (current != null && !current.equals(last)) { ! Vector rightValuesData = new Vector(); ! ValueHolder lsvalue = (ValueHolder)leftValues.getSelectedValue(); ! if (lsvalue != null) { ! String lsname = (String)leftSelector.getSelectedItem(); ! String rsname = (String)rightSelector.getSelectedItem(); ! if (lsname.equals(FUNCTIONAL_SPACES)) { ! FunctionalSpace fs = Project.getInstance().findFunctionalSpaceById(lsvalue.getId()); ! ! if (rsname.equals(SURFACES)) { ! Collection surfaces = fs.getSurfaces(); ! Iterator it = surfaces.iterator(); ! while (it.hasNext()) { ! Surface s = (Surface)it.next(); ! rightValuesData.add(new ValueHolder(s.getId(), s.getName())); ! } ! ! } else if (rsname.equals(ELEMENTS)) { ! Collection elements = fs.getElements(); ! Iterator it = elements.iterator(); ! while (it.hasNext()) { ! Element e = (Element)it.next(); ! rightValuesData.add(new ValueHolder(e.getId(), e.getName())); ! } ! } ! } else if (lsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(lsvalue.getId()); ! ! if (rsname.equals(SURFACES)) { ! Collection surfaces = cs.getSurfaces(); ! Iterator it = surfaces.iterator(); ! while (it.hasNext()) { ! Surface s = (Surface)it.next(); ! rightValuesData.add(new ValueHolder(s.getId(), s.getName())); ! } ! ! } else if (rsname.equals(ELEMENTS)) { ! Collection elements = cs.getElements(); ! Iterator it = elements.iterator(); ! while (it.hasNext()) { ! Element e = (Element)it.next(); ! rightValuesData.add(new ValueHolder(e.getId(), e.getName())); ! } ! } ! } else if (lsname.equals(ELEMENTS)) { ! Element e = Project.getInstance().findElementById(lsvalue.getId()); ! ! if (rsname.equals(SURFACES)) { ! Collection surfaces = e.getSurfaces(); ! Iterator it = surfaces.iterator(); ! while (it.hasNext()) { ! Surface s = (Surface)it.next(); ! rightValuesData.add(new ValueHolder(s.getId(), s.getName())); ! } ! ! } else if (rsname.equals(PARTS)) { ! Collection elements = e.getParts(); ! Iterator it = elements.iterator(); ! while (it.hasNext()) { ! Part p = (Part)it.next(); ! rightValuesData.add(new ValueHolder(p.getId(), p.getName())); ! } ! } ! } else if (lsname.equals(PARTS)) { ! Part p = Project.getInstance().findPartById(lsvalue.getId()); ! ! if (rsname.equals(SURFACES)) { ! Collection surfaces = p.getSurfaces(); ! Iterator it = surfaces.iterator(); ! while (it.hasNext()) { ! Surface s = (Surface)it.next(); ! rightValuesData.add(new ValueHolder(s.getId(), s.getName())); ! } ! } ! } ! } ! rightValues.setListData(rightValuesData); ! ! last = current; ! } } } --- 267,271 ---- public void itemStateChanged(ItemEvent event) { String current = (String)rightSelector.getSelectedItem(); ! } } *************** *** 542,603 **** ValueHolder rsvalue = (ValueHolder)rightValues.getSelectedValue(); ! 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); ! } ! } ! } if (log.isDebugEnabled()) { log.debug("Detaching: " + rsvalue + " from " + lsvalue); --- 319,323 ---- ValueHolder rsvalue = (ValueHolder)rightValues.getSelectedValue(); ! if (log.isDebugEnabled()) { log.debug("Detaching: " + rsvalue + " from " + lsvalue); Index: CreateElementActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateElementActionListener.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CreateElementActionListener.java 2 Oct 2005 14:37:10 -0000 1.6 --- CreateElementActionListener.java 11 Dec 2005 17:27:54 -0000 1.7 *************** *** 8,13 **** import net.sourceforge.bprocessor.gui.GUI; - import net.sourceforge.bprocessor.model.Element; import net.sourceforge.bprocessor.model.Project; import java.awt.event.ActionEvent; --- 8,13 ---- import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Space; import java.awt.event.ActionEvent; *************** *** 44,50 **** if (result != null && !result.trim().equals("")) { ! Element el = new Element(result.trim()); ! Project.getInstance().intern(el); } } --- 44,50 ---- if (result != null && !result.trim().equals("")) { ! Space space = new Space(result.trim()); ! Project.getInstance().intern(space); } } Index: ToolsJoinActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ToolsJoinActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ToolsJoinActionListener.java 2 Oct 2005 14:37:10 -0000 1.4 --- ToolsJoinActionListener.java 11 Dec 2005 17:27:54 -0000 1.5 *************** *** 7,17 **** package net.sourceforge.bprocessor.gui.actions; ! 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; import java.awt.BorderLayout; --- 7,14 ---- package net.sourceforge.bprocessor.gui.actions; ! import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; import java.awt.BorderLayout; *************** *** 22,26 **** import java.awt.event.ItemListener; import java.util.Collection; - import java.util.HashSet; import java.util.Iterator; import java.util.Vector; --- 19,22 ---- *************** *** 187,234 **** public void itemStateChanged(ItemEvent event) { String current = (String)leftSelector.getSelectedItem(); - if (!current.equals(last)) { - Vector leftValuesData = new Vector(); - if (current.equals(SURFACES)) { - Collection surfaces = Project.getInstance().getSurfaces(); - Iterator it = surfaces.iterator(); - while (it.hasNext()) { - Surface s = (Surface)it.next(); - leftValuesData.add(new ValueHolder(s.getId(), s.getName())); - } - - rightSelector.removeAllItems(); - rightSelector.addItem(FUNCTIONAL_SPACES); - rightSelector.addItem(CONSTRUCTION_SPACES); - rightSelector.addItem(ELEMENTS); - rightSelector.addItem(PARTS); - - } else if (current.equals(ELEMENTS)) { - Collection elements = Project.getInstance().getElements(); - Iterator it = elements.iterator(); - while (it.hasNext()) { - Element e = (Element)it.next(); - leftValuesData.add(new ValueHolder(e.getId(), e.getName())); - } - - rightSelector.removeAllItems(); - rightSelector.addItem(FUNCTIONAL_SPACES); - rightSelector.addItem(CONSTRUCTION_SPACES); - - } else if (current.equals(PARTS)) { - Collection parts = Project.getInstance().getParts(); - Iterator it = parts.iterator(); - while (it.hasNext()) { - Part p = (Part)it.next(); - leftValuesData.add(new ValueHolder(p.getId(), p.getName())); - } - - rightSelector.removeAllItems(); - rightSelector.addItem(ELEMENTS); - } - - leftValues.setListData(leftValuesData); - - last = current; - } } } --- 183,186 ---- *************** *** 263,302 **** public void itemStateChanged(ItemEvent event) { String current = (String)rightSelector.getSelectedItem(); ! if (current != null && !current.equals(last)) { ! Vector rightValuesData = new Vector(); ! if (current.equals(FUNCTIONAL_SPACES)) { ! Collection fss = Project.getInstance().getFunctionalSpaces(); ! Iterator it = fss.iterator(); ! while (it.hasNext()) { ! FunctionalSpace fs = (FunctionalSpace)it.next(); ! rightValuesData.add(new ValueHolder(fs.getId(), fs.getName())); ! } ! } else if (current.equals(CONSTRUCTION_SPACES)) { ! Collection css = Project.getInstance().getConstructionSpaces(); ! Iterator it = css.iterator(); ! while (it.hasNext()) { ! ConstructionSpace cs = (ConstructionSpace)it.next(); ! rightValuesData.add(new ValueHolder(cs.getId(), cs.getName())); ! } ! } else if (current.equals(ELEMENTS)) { ! Collection elements = Project.getInstance().getElements(); ! Iterator it = elements.iterator(); ! while (it.hasNext()) { ! Element e = (Element)it.next(); ! rightValuesData.add(new ValueHolder(e.getId(), e.getName())); ! } ! } else if (current.equals(PARTS)) { ! Collection parts = Project.getInstance().getParts(); ! Iterator it = parts.iterator(); ! while (it.hasNext()) { ! Part p = (Part)it.next(); ! rightValuesData.add(new ValueHolder(p.getId(), p.getName())); ! } ! } ! ! rightValues.setListData(rightValuesData); ! ! last = current; ! } } } --- 215,219 ---- public void itemStateChanged(ItemEvent event) { String current = (String)rightSelector.getSelectedItem(); ! } } *************** *** 350,452 **** ValueHolder rsvalue = (ValueHolder)rightValues.getSelectedValue(); ! 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) { ! 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); ! Project.getInstance().update(fs); ! } else if (rsname.equals(CONSTRUCTION_SPACES)) { ! ConstructionSpace cs = Project.getInstance().findConstructionSpaceById(rsvalue.getId()); ! ! if (cs.getSurfaces() == null) { ! 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); ! Project.getInstance().update(cs); ! } else if (rsname.equals(ELEMENTS)) { ! Element e = Project.getInstance().findElementById(rsvalue.getId()); ! ! if (e.getSurfaces() == null) { ! 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); ! Project.getInstance().update(e); ! } else if (rsname.equals(PARTS)) { ! Part p = Project.getInstance().findPartById(rsvalue.getId()); ! ! if (p.getSurfaces() == null) { ! 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); ! 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) { ! fs.setElements(new HashSet()); ! } ! 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) { ! cs.setElements(new HashSet()); ! } ! 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) { ! e.setParts(new HashSet()); ! } ! e.getParts().add(p); ! Project.getInstance().update(e); ! } ! } ! } if (log.isDebugEnabled()) { log.debug("Joining: " + lsvalue + " with " + rsvalue); --- 267,271 ---- ValueHolder rsvalue = (ValueHolder)rightValues.getSelectedValue(); ! if (log.isDebugEnabled()) { log.debug("Joining: " + lsvalue + " with " + rsvalue); |
From: Michael L. <he...@us...> - 2005-12-11 17:28:04
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31695/src/net/sourceforge/bprocessor/gui/treeview Modified Files: SpacesTreeView.java Log Message: Removed part and element Index: SpacesTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpacesTreeView.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SpacesTreeView.java 21 Nov 2005 09:52:17 -0000 1.9 --- SpacesTreeView.java 11 Dec 2005 17:27:54 -0000 1.10 *************** *** 11,17 **** import net.sourceforge.bprocessor.kernel.notification.Notifier; import net.sourceforge.bprocessor.model.ConstructionSpace; - import net.sourceforge.bprocessor.model.Element; import net.sourceforge.bprocessor.model.FunctionalSpace; - import net.sourceforge.bprocessor.model.Part; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; --- 11,15 ---- *************** *** 108,146 **** } } - - Set elems = space.getElements(); - if (elems != null) { - Iterator it = space.getElements().iterator(); - - while (it.hasNext()) { - Element e = (Element)it.next(); - ElementNode en = new ElementNode(e.getId(), e.getName(), ecn); - SurfaceContainerNode escn = en.getSurfaceContainer(); - PartContainerNode pcn = en.getPartContainer(); - - Iterator eit = e.getSurfaces().iterator(); - while (eit.hasNext()) { - Surface s = (Surface)eit.next(); - escn.add(new SurfaceNode(s.getId(), s.getName(), escn)); - } - - eit = e.getParts().iterator(); - while (eit.hasNext()) { - Part p = (Part)eit.next(); - PartNode pn = new PartNode(p.getId(), p.getName(), pcn); - SurfaceContainerNode pscn = pn.getSurfaceContainer(); - - Iterator pit = p.getSurfaces().iterator(); - while (pit.hasNext()) { - Surface s = (Surface)pit.next(); - pscn.add(new SurfaceNode(s.getId(), s.getName(), pscn)); - } - - pcn.add(pn); - } - - ecn.add(en); - } - } getModel().valueForPathChanged(sn.getTreePath(), sn); --- 106,109 ---- |
From: Michael L. <he...@us...> - 2005-12-11 17:28:04
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31695/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java Log Message: Removed part and element Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AttributeView.java 21 Nov 2005 09:52:17 -0000 1.9 --- AttributeView.java 11 Dec 2005 17:27:54 -0000 1.10 *************** *** 11,17 **** 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; --- 11,15 ---- *************** *** 72,81 **** ConstructionSpace current = Project.getInstance().findConstructionSpaceById(n.getObject()); ap.displayConsSpace(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()); --- 70,73 ---- |
From: Michael L. <he...@us...> - 2005-12-11 17:28:03
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31695/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: Removed part and element Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** GUI.java 5 Dec 2005 21:00:24 -0000 1.14 --- GUI.java 11 Dec 2005 17:27:54 -0000 1.15 *************** *** 234,243 **** toolsJoin.setMnemonic(KeyEvent.VK_J); toolsJoin.addActionListener(new ToolsJoinActionListener()); ! //tools.add(toolsJoin); JMenuItem toolsDetach = new JMenuItem("Detach"); toolsDetach.setMnemonic(KeyEvent.VK_D); toolsDetach.addActionListener(new ToolsDetachActionListener()); ! //tools.add(toolsDetach); menu.registerMenu(tools); --- 234,243 ---- toolsJoin.setMnemonic(KeyEvent.VK_J); toolsJoin.addActionListener(new ToolsJoinActionListener()); ! tools.add(toolsJoin); JMenuItem toolsDetach = new JMenuItem("Detach"); toolsDetach.setMnemonic(KeyEvent.VK_D); toolsDetach.addActionListener(new ToolsDetachActionListener()); ! tools.add(toolsDetach); menu.registerMenu(tools); |
From: Michael L. <he...@us...> - 2005-12-11 17:27:27
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31544/src/net/sourceforge/bprocessor/model Modified Files: MemoryFacade.java Space.java Project.java DatabaseFacade.java Removed Files: Part.java Element.java Log Message: Removed part and element --- Part.java DELETED --- Index: DatabaseFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/DatabaseFacade.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DatabaseFacade.java 15 Nov 2005 18:58:30 -0000 1.4 --- DatabaseFacade.java 11 Dec 2005 17:27:19 -0000 1.5 *************** *** 97,113 **** /** - * Find all elements - * @return The elements - */ - public abstract Set getElements(); - - /** - * Find a element by id - * @param id The id - * @return The element - */ - public abstract Element findElementById(Long id); - - /** * Find all functional spaces * @return The functional spaces --- 97,100 ---- *************** *** 123,139 **** /** - * Find all parts - * @return The parts - */ - public abstract Set getParts(); - - /** - * Find a part by id - * @param id The id - * @return The part - */ - public abstract Part findPartById(Long id); - - /** * Find all surfaces * @return The surfaces --- 110,113 ---- Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Project.java 5 Dec 2005 07:53:46 -0000 1.8 --- Project.java 11 Dec 2005 17:27:19 -0000 1.9 *************** *** 80,99 **** /** ! * Create a construction space ! * @param c The construction space */ ! public void intern(ConstructionSpace c) { ! DatabaseFacade.getInstance().intern((Object) c); ! Notification n = new Notification(Notification.CONSTRUCTION_SPACE_CREATED, c.getId()); Notifier.getInstance().sendNotification(n); } ! /** ! * Update a construction space * @param c The construction space */ ! public void update(ConstructionSpace c) { ! DatabaseFacade.getInstance().update(c); ! Notification n = new Notification(Notification.CONSTRUCTION_SPACE_MODIFIED, c.getId()); Notifier.getInstance().sendNotification(n); } --- 80,99 ---- /** ! * Create a space ! * @param space The space */ ! public void intern(Space space) { ! DatabaseFacade.getInstance().intern((Object) space); ! Notification n = new Notification(Notification.CONSTRUCTION_SPACE_CREATED, space.getId()); Notifier.getInstance().sendNotification(n); } ! /** ! * Create a construction space * @param c The construction space */ ! public void intern(ConstructionSpace c) { ! DatabaseFacade.getInstance().intern((Object) c); ! Notification n = new Notification(Notification.CONSTRUCTION_SPACE_CREATED, c.getId()); Notifier.getInstance().sendNotification(n); } *************** *** 159,169 **** Notification n = new Notification(Notification.FUNCTIONAL_SPACE_MODIFIED, domain.getId()); Notifier.getInstance().sendNotification(n); - } else if (domain instanceof Element) { - update((Element)domain); - - } else if (domain instanceof Part) { - DatabaseFacade.getInstance().update((Part)domain); - Notification n = new Notification(Notification.PART_MODIFIED, domain.getId()); - Notifier.getInstance().sendNotification(n); } else { log.error("Unsupported type: " + domain.getClass().getName()); --- 159,162 ---- *************** *** 236,286 **** /** - * Intern an element - * @param e The element - */ - public void intern(Element e) { - DatabaseFacade.getInstance().intern((Object) e); - Notification n = new Notification(Notification.ELEMENT_CREATED, e.getId()); - Notifier.getInstance().sendNotification(n); - } - - /** - * Update an element - * @param e The element - */ - public void update(Element e) { - DatabaseFacade.getInstance().update(e); - Notification n = new Notification(Notification.ELEMENT_MODIFIED, e.getId()); - Notifier.getInstance().sendNotification(n); - } - - /** - * Remove an element - * @param e The element - */ - public void remove(Element e) { - DatabaseFacade.getInstance().remove(e); - Notification n = new Notification(Notification.ELEMENT_DELETED, e.getId()); - Notifier.getInstance().sendNotification(n); - } - - /** - * Find all elements - * @return The elements - */ - public Set getElements() { - return DatabaseFacade.getInstance().getElements(); - } - - /** - * Find a element by id - * @param id The id - * @return The element - */ - public Element findElementById(Long id) { - return DatabaseFacade.getInstance().findElementById(id); - } - - /** * Intern a functional space * @param f The functional space --- 229,232 ---- *************** *** 293,302 **** /** ! * Update a functional space ! * @param f The functional space */ ! public void update(FunctionalSpace f) { ! DatabaseFacade.getInstance().update(f); ! Notification n = new Notification(Notification.FUNCTIONAL_SPACE_MODIFIED, f.getId()); Notifier.getInstance().sendNotification(n); } --- 239,267 ---- /** ! * Remove a space ! * @param space The space to remove */ ! public void remove(Space space) { ! // setting references to this space to null ! Set surfaces = space.getSurfaces(); ! if (surfaces != null) { ! Iterator surfIt = surfaces.iterator(); ! while (surfIt.hasNext()) { ! Surface surface = (Surface)surfIt.next(); ! Domain back = surface.getBackDomain(); ! if (back == space) { ! surface.setBackDomain(null); ! DatabaseFacade.getInstance().update(surface); ! } else { ! Domain front = surface.getFrontDomain(); ! if (front == space) { ! surface.setFrontDomain(null); ! DatabaseFacade.getInstance().update(surface); ! } ! } ! } ! } ! DatabaseFacade.getInstance().remove(space); ! Notification n = new Notification(Notification.FUNCTIONAL_SPACE_DELETED, space.getId()); Notifier.getInstance().sendNotification(n); } *************** *** 349,397 **** /** - * Intern a part - * @param p The part - */ - public void intern(Part p) { - DatabaseFacade.getInstance().intern((Object) p); - Notification n = new Notification(Notification.PART_CREATED, p.getId()); - Notifier.getInstance().sendNotification(n); - } - - /** - * Update a part - * @param p The part - */ - public void update(Part p) { - DatabaseFacade.getInstance().update(p); - } - - /** - * Remove a part - * @param p The part - */ - public void remove(Part p) { - DatabaseFacade.getInstance().remove(p); - Notification n = new Notification(Notification.PART_DELETED, p.getId()); - Notifier.getInstance().sendNotification(n); - } - - /** - * Find all parts - * @return The parts - */ - public Set getParts() { - return DatabaseFacade.getInstance().getParts(); - } - - /** - * Find a part by id - * @param id The id - * @return The part - */ - public Part findPartById(Long id) { - return DatabaseFacade.getInstance().findPartById(id); - } - - /** * Intern a surface * @param s The surface --- 314,317 ---- Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Space.java 28 Nov 2005 22:23:49 -0000 1.6 --- Space.java 11 Dec 2005 17:27:19 -0000 1.7 *************** *** 20,24 **** * column="DOMAIN_ID" */ ! public abstract class Space extends Domain { /** The logger */ private static Logger log = Logger.getLogger(Space.class); --- 20,24 ---- * column="DOMAIN_ID" */ ! public class Space extends Domain { /** The logger */ private static Logger log = Logger.getLogger(Space.class); *************** *** 40,43 **** --- 40,51 ---- /** + * Constructor for space + * @param name The name + */ + public Space(String name) { + super(); + setName(name); + } + /** * Get the space id * @return The space id Index: MemoryFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/MemoryFacade.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MemoryFacade.java 15 Nov 2005 18:58:30 -0000 1.4 --- MemoryFacade.java 11 Dec 2005 17:27:19 -0000 1.5 *************** *** 218,238 **** /** - * Get all elements - * @return The elements - */ - public Set getElements() { - return filter(domains.values(), Element.class); - } - - /** - * Find element by id - * @param id the ID - * @return The element - */ - public Element findElementById(Long id) { - return (Element) domains.get(id); - } - - /** * Get all functional spaces * @return the Functional spaces --- 218,221 ---- *************** *** 252,272 **** /** - * Get all parts - * @return The parts - */ - public Set getParts() { - return filter(domains.values(), Part.class); - } - - /** - * Find part by id - * @param id The id - * @return The part - */ - public Part findPartById(Long id) { - return (Part) domains.get(id); - } - - /** * Get all surfaces * @return The surfaces --- 235,238 ---- --- Element.java DELETED --- |