 import flash.utils.getDefinitionByName;
 
 import mx.binding.BindingManager;
+import mx.containers.utilityClasses.PostScaleAdapter;
 import mx.controls.Button;
 import mx.controls.HScrollBar;
 import mx.controls.VScrollBar;

    //  Class methods
    //
    //--------------------------------------------------------------------------

    //--------------------------------------------------------------------------
    //

        var n:int = numChildren;
        for (var i:int = 0; i < n; i++)
        {
            var x:Number;
            var y:Number;
            var width:Number;
            var height:Number;
            
            var child:DisplayObject = getChildAt(i);
            if (child is IUIComponent)
            {
                if (!IUIComponent(child).includeInLayout)
                    continue;
                var uic:IUIComponent = PostScaleAdapter.getCompatibleIUIComponent(child);
                width = uic.width;
                height = uic.height;
                x = uic.x;
                y = uic.y;
            }
            else
            {
                width = child.width;
                height = child.height;
                x = child.x;
                y = child.y;
            }

            left = Math.min(left, x);
            top = Math.min(top, y);

            // width/height can be NaN if using percentages and
            // hasn't been layed out yet.
            if (!isNaN(width))
                right = Math.max(right, x + width);
            if (!isNaN(height))
                bottom = Math.max(bottom, y + height);
        }

        // Add in the right/bottom margins and view metrics.
