|
From: Harry E. <har...@us...> - 2006-11-01 23:45:19
|
Update of /cvsroot/synclast/client/src/com/synclast/ui In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20405 Modified Files: Widget.java Log Message: Kinda sorta fixed setPosition. The basic concept of this method is kinda broken, but this should fix it enough to get by with for now, until I can rip it out completely, and put in something better. Index: Widget.java =================================================================== RCS file: /cvsroot/synclast/client/src/com/synclast/ui/Widget.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Widget.java 20 Sep 2006 12:19:53 -0000 1.25 --- Widget.java 1 Nov 2006 23:45:16 -0000 1.26 *************** *** 268,273 **** --- 268,284 ---- * cause the ALIGN value to be set to the value specified, as a side * effect of this call. + * Be careful, this method has issues, and a race condition. If it doesn't + * work as expected, you have been warned. + * TODO: Fix this method */ public void setPosition(int x, int y, int align) { + //Ugly hack to kinda make this whole method work. + //Not sure what can be done to make it work the way you would expect + //given that, if this widget (subclass) changes its size, all the math + //below will be completely invalid. + //TODO: Fix this crazy method to resemble proper functioning + if(invalid) { + validate(); + } set(ALIGN, align); if ((align & Graphics.LEFT) != 0) { |