[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Space.java,1.15,1.16 Project.java,1.3
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-02-01 09:00:35
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3261/src/net/sourceforge/bprocessor/model Modified Files: Space.java Project.java Log Message: Renamed "surfaces" to "envelope" in Space, since a space can also have interior surfaces Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Space.java 30 Jan 2006 10:04:50 -0000 1.15 --- Space.java 1 Feb 2006 09:00:23 -0000 1.16 *************** *** 26,31 **** /** The attributes */ private Set attributes; ! /** The surfaces */ ! private Set surfaces; --- 26,31 ---- /** The attributes */ private Set attributes; ! /** The envelope (a set of surfaces) */ ! private Set envelope; *************** *** 133,139 **** * class="net.sourceforge.bprocessor.model.Surface" */ ! public Set getSurfaces() { ! if (surfaces != null) { ! return surfaces; } else { return new HashSet(); --- 133,139 ---- * class="net.sourceforge.bprocessor.model.Surface" */ ! public Set getEnvelope() { ! if (envelope != null) { ! return envelope; } else { return new HashSet(); *************** *** 145,177 **** * @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) { ! if (surfaces == null) { ! surfaces = new HashSet(); } ! surfaces.add(surface); changed(); } /** ! * 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); changed(); ! return true; } - return false; } --- 145,175 ---- * @param surfaces The surfaces */ ! public void setEnvelope(Set surfaces) { ! this.envelope = surfaces; } /** ! * Add a surface to the envelope * @param surface The surface */ public void addSurface(Surface surface) { ! if (envelope == null) { ! envelope = new HashSet(); } ! envelope.add(surface); changed(); } /** ! * Remove a surface from the envelope of this domain * @param surface The surface to remove */ ! public void removeSurface(Surface surface) { ! if (envelope != null) { ! envelope.remove(surface); changed(); ! } else { ! throw new Error("removing " + surface + " from " + this + " with no envelope"); } } Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Project.java 30 Jan 2006 15:08:39 -0000 1.32 --- Project.java 1 Feb 2006 09:00:23 -0000 1.33 *************** *** 262,266 **** */ public void remove(Space space) { ! Set surfaces = space.getSurfaces(); if (surfaces != null) { Iterator surfIt = surfaces.iterator(); --- 262,266 ---- */ public void remove(Space space) { ! Set surfaces = space.getEnvelope(); if (surfaces != null) { Iterator surfIt = surfaces.iterator(); |