Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10309/src/net/sourceforge/bprocessor/facade/modellor
Modified Files:
FacadeModellor.java
Log Message:
added getter and setter methods for postwidths. Posts now maintain their position when widths are changed.
Index: FacadeModellor.java
===================================================================
RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** FacadeModellor.java 8 Sep 2006 13:32:57 -0000 1.12
--- FacadeModellor.java 8 Sep 2006 14:08:40 -0000 1.13
***************
*** 199,206 ****
Surface s = (Surface)sit.next();
if (s.getName().equals(a.getValue())) {
! front = s;
}
! }
! createFacade();
} else if (a.getName().equals("V-posts")) {
int n = ((Double)a.getValue()).intValue();
--- 199,208 ----
Surface s = (Surface)sit.next();
if (s.getName().equals(a.getValue())) {
! if (front != s) {
! front = s;
! createFacade();
! }
}
! }
} else if (a.getName().equals("V-posts")) {
int n = ((Double)a.getValue()).intValue();
***************
*** 219,234 ****
} else if (a.getName().equals("V-postwidth")) {
double d = ((Double)a.getValue()).doubleValue();
! if (d != vertPostWidth) {
! Project.getInstance().checkpoint();
! vertPostWidth = d;
! createFacade();
! }
} else if (a.getName().equals("H-postwidth")) {
double d = ((Double)a.getValue()).doubleValue();
! if (d != horPostWidth) {
! Project.getInstance().checkpoint();
! horPostWidth = d;
! createFacade();
! }
} else if (a.getName().equals("Frame thickness")) {
double n = ((Double)a.getValue()).doubleValue();
--- 221,230 ----
} else if (a.getName().equals("V-postwidth")) {
double d = ((Double)a.getValue()).doubleValue();
! Project.getInstance().checkpoint();
! setVertPostWidth(d);
} else if (a.getName().equals("H-postwidth")) {
double d = ((Double)a.getValue()).doubleValue();
! Project.getInstance().checkpoint();
! setHorPostWidth(d);
} else if (a.getName().equals("Frame thickness")) {
double n = ((Double)a.getValue()).doubleValue();
***************
*** 358,361 ****
--- 354,358 ----
*/
private void createPostConstructors() {
+ log.info("created new posts");
if (front != null && depth > 0) {
List edges = front.getEdges();
***************
*** 598,600 ****
--- 595,633 ----
return s.extrude(delta * deltaCorrection, sides);
}
+ /**
+ * Get the vertical postwidth
+ * @return vertical postwidth
+ */
+ public double getVertPostWidth() {
+ return vertPostWidth;
+ }
+ /**
+ * Set the postwidth
+ * @param vertPostWidth new vertical postwidth
+ */
+ public void setVertPostWidth(double vertPostWidth) {
+ if (this.vertPostWidth != vertPostWidth) {
+ this.vertPostWidth = vertPostWidth;
+ removeWindows();
+ createWindows();
+ }
+ }
+ /**
+ * Get the horizontal postwidth
+ * @return the horizontal postwidth
+ */
+ public double getHorPostWidth() {
+ return horPostWidth;
+ }
+ /**
+ * Set the horizontal postwidth
+ * @param horPostWidth the new horizontal postwidth
+ */
+ public void setHorPostWidth(double horPostWidth) {
+ if (this.horPostWidth != horPostWidth) {
+ this.horPostWidth = horPostWidth;
+ removeWindows();
+ createWindows();
+ }
+ }
}
|