      *  Note that the column may only be partially in view.
      * 
      *  @see firstIndexInView
-     *  @see inView
+     *  @see fractionOfElementInView
      *  
      *  @langversion 3.0
      *  @playerversion Flash 10

    {
        var n:int = g.numElements;

        if (inView(i) >= 1)
        {
            // Special case: if we hit the first/last element, 
            // then return the area of the padding so that we

import spark.layout.supportClasses.LayoutElementHelper;
import spark.layout.supportClasses.LinearLayoutVector;

/**
 *  The HorizontalLayout arranges the layout elements in a horizontal sequence,
 *  left to right, with optional gaps between the elements and optional padding
 *  around the sequence of elements.
 *
 *  <p>During measure(), the default size of the container is calculated by
 *  accumulating the preferred sizes of the elements, including gaps and padding.
 *  When requestedColumnCount is set, only the space for that many elements
 *  will be measured, starting from the first element.</p>
 *
 *  <p>During updateDisplayList(), the width of each element is calculated
 *  according to the following rules, listed in their respective order of
 *  precedence (element's minimum width and maximum width are always respected):
 *  <ul>
 *    <li>If variableColumnWidth is false, then set the element's width to the
 *    value of the columnWidth property.</li>
 *
 *    <li>If the element's percentWidth is set, then calculate the element's
 *    width by distributing the available container width between all
 *    elements with percentWidth setting. The available container width
 *    is equal to the container width minus the gaps, the padding and the
 *    space occupied by the rest of the elements. The element's precentWidth
 *    property is ignored when the layout is virtualized.</li>
 *
 *    <li>Set the element's width to its preferred width.</li>
 *  <ul>
 *
 *  The height of each element is calculated according to the following rules,
 *  listed in their respective order of precedence (element's minium height and
 *  maximum height are always respected):
 *  <ul>
 *    <li>If verticalAlign is "justify" then set the element's height to the
 *    container height.</li>
 *
 *    <li>If verticalAlign is "contentJustify" then set the element's height
 *    to the maximum between the container's height and all elements' preferred
 *    height.</li>
 *
 *    <li>If the element's percentHeight is set, then calculate the element's
 *    height as a percentage of the container's height.</li>
 *
 *    <li>Set the element's height to its preferred height.</li>
 *  </ul>
 *
 *  The horizontal position of the elements is determined by arranging them
 *  in a horizontal sequence, left to right, taking into account the padding
 *  before the first element and the gaps between the elements.
 *
 *  The vertical position of the elements is determined by the layout's 
 *  verticalAlign property.</p>
 *
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
