Revision: 4329
          http://vexi.svn.sourceforge.net/vexi/?rev=4329&view=rev
Author:   clrg
Date:     2012-01-17 09:27:33 +0000 (Tue, 17 Jan 2012)
Log Message:
-----------
A few minor changes
- add "Resize" jsdoc
- merge setPlaceNoAbort() into setPlaceInTree()

Modified Paths:
--------------
    trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp

Modified: trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp
===================================================================
--- trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp 2012-01-17 
02:14:53 UTC (rev 4328)
+++ trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp 2012-01-17 
09:27:33 UTC (rev 4329)
@@ -18,7 +18,6 @@
 import org.ibex.util.Callable;
 import org.ibex.util.Logger;
 import org.vexi.graphics.Color;
-import org.vexi.graphics.Picture;
 import org.vexi.graphics.PixelBuffer;
 import org.vexi.plat.Platform;
 import org.vexi.util.BasicTree;
@@ -513,37 +512,33 @@
         }
     }
     
-    private final void setPlace() throws JSExn { set(PLACE); setPlaceInTree(); 
}
+    private final void setPlace() throws JSExn { set(PLACE); 
setPlaceInTree(true); }
     private final void setParentPlace() throws JSExn {
         if (parent != null) {
             parent.setPlace();
         }
     }
-    private final void setPlaceInTree() throws JSExn {
+    private final void setPlaceInTree(boolean abortReflow) throws JSExn {
         Box b=this;
         while (b.test(DISPLAY) && b.parent!=null && 
!b.parent.test(PLACE_DESCENDENT)) {
             b = b.parent;
             b.set(PLACE_DESCENDENT);
         }
-        Surface s = b.getSurface();
-        if (s!=null) {
-            s.abortReflow();
+        if (abortReflow) {
+               Surface s = b.getSurface();
+               if (s!=null) {
+                   s.abortReflow();
+               }
         }
     }
-    private final void setPlaceNoAbort () {
-        Box b=this;
-        while (b.test(DISPLAY) && b.parent!=null && 
!b.parent.test(PLACE_DESCENDENT)) {
-            b = b.parent;
-            b.set(PLACE_DESCENDENT);
-        }
-    }
     
+    
     private final void requestReflow() throws JSExn {
         if (test(CONSTRAIN) || test(CONSTRAIN_DESCENDENT)) {
             setConstrainInTree();
         }
         if (test(PLACE) || test(PLACE_DESCENDENT)) {
-            setPlaceInTree();
+            setPlaceInTree(true);
         }
     }
     
@@ -680,7 +675,7 @@
         // assign contentwidth and mark for place in parent and placing of 
children 
         if (newwidth != contentwidth) {
             if (parent != null) {
-                setPlaceNoAbort();
+                setPlaceInTree(false);
                 parent.set(PLACE);
                 parent.set(CONSTRAIN); // parent already in constrain()
                 
PUT_BOX_FIELD(SC_contentwidth,JSU.N(newwidth),contentwidth=newwidth,CONTENTWIDTH_TRAP)
@@ -690,7 +685,7 @@
                     newwidth = min(getSurface().pendingWidth, newwidth);
                 }
                 if (newwidth != contentwidth) {
-                    setPlaceNoAbort();
+                    setPlaceInTree(false);
                     
PUT_BOX_FIELD(SC_contentwidth,JSU.N(newwidth),contentwidth=newwidth,CONTENTWIDTH_TRAP)
                 }
             }
@@ -2338,6 +2333,16 @@
          * <p>These properties are put to by the core. Place traps on these 
properties for event
          * notification.</p> */ 
         
+        /* <p>Notification that the contents of a box have been resized and 
box contenwidth/contentheight
+         * is about to be calculated, all of which preceeds box tree 
placement.</p>
+         * 
+         * <p>This is primarily useful for custom layout of children where 
their positioning is dependent
+         * upon their sizes, and changes in child sizes are not guaranteed to 
affect the dimensions of the
+         * parent without script intervetion i.e. 'layer' or 'place' parent 
layout.</p>
+         * 
+         * @type(true) */
+        //also "Resize":
+        
         /* <p>The value true is written to this property when the mouse enters 
a box.</p> @type(true) */
         //also "Enter":
         

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to