Revision: 2167 http://vexi.svn.sourceforge.net/vexi/?rev=2167&view=rev Author: clrg Date: 2007-09-12 09:47:01 -0700 (Wed, 12 Sep 2007)
Log Message: ----------- Reduce over-optimization of min/max traps with flags Modified Paths: -------------- trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp Modified: trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp =================================================================== --- trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp 2007-09-12 10:18:53 UTC (rev 2166) +++ trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp 2007-09-12 16:47:01 UTC (rev 2167) @@ -201,10 +201,10 @@ private static final int X_TRAP = 0x00400000; private static final int Y_TRAP = 0x00800000; - private static final int MINWIDTH_TRAP = 0x01000000; - private static final int MAXWIDTH_TRAP = 0x02000000; - private static final int MINHEIGHT_TRAP = 0x04000000; - private static final int MAXHEIGHT_TRAP = 0x08000000; + private static final int MINMAX_TRAPS = 0x01000000; + // unused - private static final int FLAG = 0x02000000; + // unused - private static final int FLAG = 0x04000000; + // unused - private static final int FLAG = 0x08000000; private static final int MOVE_TRAP = 0x10000000; private static final int PACK = 0x20000000; @@ -774,12 +774,12 @@ public void setMinMaxWidth(int min, int max) { if (this.minwidth == min && this.maxwidth == max) return; if (this.minwidth != min) { - PUT_BOX_FIELD(SC_minwidth,JSU.N(min),this.minwidth = min,MINWIDTH_TRAP) + PUT_BOX_FIELD(SC_minwidth,JSU.N(min),this.minwidth = min,MINMAX_TRAPS) } // can't have max<min if (min > max) max = min; if (this.maxwidth != max) { - PUT_BOX_FIELD(SC_maxwidth,JSU.N(max),this.maxwidth = max,MAXWIDTH_TRAP) + PUT_BOX_FIELD(SC_maxwidth,JSU.N(max),this.maxwidth = max,MINMAX_TRAPS) } setConstrain(); @@ -1149,9 +1149,9 @@ case "rowspan": throw new JSExn("Deprecated property read: "+JSU.toString(name)); case "width": return (minwidth==maxwidth) ? JSU.N(minwidth) : JSU.N(width); case "height": return (minheight==maxheight) ? JSU.N(minheight) : JSU.N(height); - case "minwidth": return JSU.N(minwidth); + case "minwidth": return JSU.N(contentwidth); case "maxwidth": return JSU.N(maxwidth); - case "minheight": return JSU.N(minheight); + case "minheight": return JSU.N(contentheight); case "maxheight": return JSU.N(maxheight); case "display": return JSU.B(test(DISPLAY)); case "visible": return isVisible() ? JSU.T : JSU.F; @@ -1379,10 +1379,10 @@ case "y": set(Y_TRAP); case "width": set(WIDTH_TRAP); case "height": set(HEIGHT_TRAP); - case "minwidth": set(MINWIDTH_TRAP); - case "maxwidth": set(MAXWIDTH_TRAP); - case "minheight": set(MINHEIGHT_TRAP); - case "maxheight": set(MAXHEIGHT_TRAP); + case "minwidth": set(MINMAX_TRAPS); + case "maxwidth": set(MINMAX_TRAPS); + case "minheight": set(MINMAX_TRAPS); + case "maxheight": set(MINMAX_TRAPS); case "Enter": set(ENTER_TRAP); case "Leave": set(LEAVE_TRAP); case "_Move": set(MOVE_TRAP); @@ -1400,10 +1400,6 @@ case "y": if (getTrap(SC_y) == null) clear(Y_TRAP); case "width": if (getTrap(SC_width) == null) clear(WIDTH_TRAP); case "height": if (getTrap(SC_height) == null) clear(HEIGHT_TRAP); - case "minwidth": if (getTrap(SC_minwidth) == null) clear(MINWIDTH_TRAP); - case "maxwidth": if (getTrap(SC_maxwidth) == null) clear(MAXWIDTH_TRAP); - case "minheight": if (getTrap(SC_minheight) == null) clear(MINHEIGHT_TRAP); - case "maxheight": if (getTrap(SC_maxheight) == null) clear(MAXHEIGHT_TRAP); case "Enter": if (getTrap(SC_Enter) == null) clear(ENTER_TRAP); case "Leave": if (getTrap(SC_Leave) == null) clear(LEAVE_TRAP); case "_Move": if (getTrap(SC__Move) == null) clear(MOVE_TRAP); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn