+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
 package spark.layouts
 {
 import mx.containers.utilityClasses.ConstraintColumn;


use namespace mx_internal;

public class FormItemLayout extends ConstraintLayout
{
    public function FormItemLayout()
    {
        super();
    }
    
    // true if setLayoutColumnWidths has been called.
    private var useLayoutColumnWidths:Boolean = false;
    
    /**
     *  @private

     *  Used by layout to set the column widths for updateDisplayList. Must
     *  call this if you want to override the default widths of the columns.
     */
    public function setLayoutColumnWidths(value:Vector.<Number>):void
    {
        // apply new measurements and position the columns again.
        layoutColumnWidths = value;
        
        setColumnWidths(layoutColumnWidths);
        
        target.invalidateDisplayList();
    }
    
    /**
     *  @private
     *  Sets the column widths to the provided values.
     */ 
    private function setColumnWidths(value:Vector.<Number>):void
    {
        var constraintColumns:Vector.<ConstraintColumn> = this.constraintColumns;
        var numCols:int = constraintColumns.length;
        var totalWidth:Number = 0;
