|
From: Harry E. <har...@us...> - 2006-11-01 23:01:57
|
Update of /cvsroot/synclast/client/src/com/synclast/ui In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2539 Modified Files: Container.java Log Message: Container, like BoxContainer, FlowContainer, and TableContainer, now supports fixed size. Now Neil can stop complaining. Index: Container.java =================================================================== RCS file: /cvsroot/synclast/client/src/com/synclast/ui/Container.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** Container.java 3 Oct 2006 18:55:56 -0000 1.42 --- Container.java 1 Nov 2006 23:01:50 -0000 1.43 *************** *** 234,250 **** // Recalculate width and height w = h = 0; ! for (int i = widgets.size() - 1; i >= 0; --i) { ! Widget widget = (Widget) widgets.elementAt(i); ! if (fixedW != 0) { ! borderLayout(widget, fixedW, fixedH); ! } ! w = Math.max(w, widget.x + widget.w ); ! h = Math.max(h, widget.y + widget.h); } - int offset = 2 * getTotalInset(); - w += offset; - h += offset; } --- 234,255 ---- // Recalculate width and height w = h = 0; ! if(fixedW != 0) { ! w = fixedW; ! h = fixedH; ! } else { ! for (int i = widgets.size() - 1; i >= 0; --i) { ! Widget widget = (Widget) widgets.elementAt(i); ! /* if (fixedW != 0) { ! borderLayout(widget, fixedW, fixedH); ! }*/ ! w = Math.max(w, widget.x + widget.w ); ! h = Math.max(h, widget.y + widget.h); ! } ! int offset = 2 * getTotalInset(); ! w += offset; ! h += offset; } } |