 
 package mx.layout
 {
+import flash.geom.Rectangle;
+
 import mx.components.baseClasses.GroupBase;
 import mx.core.ILayoutElement;
 import mx.events.PropertyChangeEvent;

        }

        // Last, if we have explicit overrides for both rowCount and columnCount, then
        // make sure that the count along the minor axis is deduced from the element count
        // and the count along the major axis.
        // Note that we do this *after* justification is taken into account as we want to
        // justify based on the explicit user settings.

        element.setLayoutBoundsPosition(x, y);
    }

    /**
     *  @private 
     *  @return Returns the x coordinate of the left edge for the specified column.  
     */
    final private function leftEdge(columnIndex:int):Number
    {
        return Math.max(0, columnIndex * (_columnWidth + _horizontalGap));
    }
    
    /**
     *  @private 
     *  @return Returns the x coordinate of the right edge for the specified column.  
     */
    final private function rightEdge(columnIndex:int):Number
    {
        return Math.min(target.contentWidth, columnIndex * (_columnWidth + _horizontalGap) + _columnWidth);
    }
    
    /**
     *  @private 
     *  @return Returns the y coordinate of the top edge for the specified row.  
     */
    final private function topEdge(rowIndex:int):Number
    {
        return Math.max(0, rowIndex * (_rowHeight + _verticalGap));
    }

    /**
     *  @private 
     *  @return Returns the y coordinate of the bottom edge for the specified row.  
     */
    final private function bottomEdge(rowIndex:int):Number
    {
        return Math.min(target.contentHeight, rowIndex * (_rowHeight + _verticalGap) + _rowHeight);
    }
    
    //--------------------------------------------------------------------------
    //
    //  Overriden methods from LayoutBase
