 import mx.core.ILayoutElement;
 import mx.utils.OnDemandEventDispatcher;
 
-
+/**
+*  The base class for all layouts.
+ * 
+ *  To create a custom layout that works with the Spark containers,
+ *  you must extend <code>LayoutBase</code> or one of its subclasses.
+ *
+ *  <p>At minimum, subclasses must implement the <code>updateDisplayList()</code>
+ *  method, which positions and sizes the target GroupBase's elements, and 
+ *  the <code>measure()</code> method, which calculates the target's default
+ *  size.
+ *
+ *  Subclasses may override methods like <code>elementBoundsAboveScrollRect()</code>
+ *  and <code>elementBoundsBelowScrollRect()</code> to customize the way 
+ *  the target behaves when it's connected to scrollbars.
+ * 
+ *  <p>Subclasses that support virtualization must respect the 
+ *  <code>useVirtualLayout</code> property and should only retrieve
+ *  layout elements within the scrollRect (the value of
+ *  <code>getTargetScrollRect()</code>) using <code>getVirtualElementAt()</code>
+ *  from within <code>updateDisplayList()</code>.
+ */
 public class LayoutBase extends OnDemandEventDispatcher
 {
-    //--------------------------------------------------------------------------
-    //
-    //  Class methods
-    //
-    //--------------------------------------------------------------------------
-
-    internal static function hasPercentWidth(layoutElement:ILayoutElement):Boolean
-    {
-        return !isNaN(layoutElement.percentWidth);
-    }
-    
-    internal static function hasPercentHeight(layoutElement:ILayoutElement):Boolean
-    {
-        return !isNaN(layoutElement.percentHeight);
-    }
-
     //--------------------------------------------------------------------------
     //
     //  Constructor

    private var _target:GroupBase;
    
    /**
     *  The GroupBase whose layout we're responsible for.  
     *  
     *  The target is responsible for delegating the updateDisplayList()
     *  and measure() methods to its layout.
     * 
     *  @default null;
     *  @see #updateDisplayList
     *  @see #measure

     *  Returns the bounds of the first layout element that either spans or
     *  is to the right of the scrollRect's right edge.
     * 
     *  <p>This is a convenience method that is used by the default
     *  implementation of the <code>getHorizontalScrollPositionDelta()</code> method.
     *  Subclasses that rely on the default implementation of
     *  <code>getHorizontalScrollPositionDelta()</code> should override this method to
     *  provide an accurate bounding rectangle that has valid <code>left</code> and 
     *  <code>right</code> properties.</p>
     * 
     *  By default this method returns a Rectangle with width=1, height=0, 
     *  whose right edge is one more than the scrollRect's right edge, 
     *  and top=0.
     * 
     *  @param scrollRect The target's scrollRect.
     *  @return Returns the bounds of the first element that spans or is to
