<commit_before>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2008 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.core.ILayoutElement;
import mx.core.IVisualElement;
import mx.resources.ResourceManager;

import spark.components.supportClasses.GroupBase;
import spark.layouts.supportClasses.LayoutBase;
import spark.layouts.supportClasses.LayoutElementHelper;

[ResourceBundle("layout")]

/**
 *  The BasicLayout class arranges the layout elements according to their individual settings,
 *  independent of each-other. BasicLayout, also called absolute layout, requires that you 
 *  explicitly position each container child. 
 *  You can use the <code>x</code> and <code>y</code> properties of the child, 
 *  or constraints to position each child.
 *
 *  <p><b>Note: </b>The Spark list-based controls (the Spark List control and its subclasses
 *  such as ButtonBar, ComboBox, DropDownList, and TabBar) do not support the BasicLayout class. 
 *  Do not use BasicLayout with the Spark list-based controls.</p>
 *
 *  <p>Per-element supported constraints are <code>left</code>, <code>right</code>, 
 *  <code>top</code>, <code>bottom</code>, <code>horizontalCenter</code>,
 *  <code>verticalCenter</code>, <code>baseline</code>, <code>percentWidth</code>, and <code>percentHeight</code>.
 *  Element's minimum and maximum sizes will always be respected.</p>
 *
 *  <p>The measured size of the container is calculated from the elements, their
 *  constraints and their preferred sizes. The measured size of the container
 *  is big enough to fit in all of the elements at their preferred sizes with
 *  their constraints satisfied. </p>
 *
 *  <p>Here are some examples of how measured size is calculated:
 *  <ul>
 *    <li>If the container has a single element with <code>left</code> constraint specified,
 *    then the container's measured width will be equal to the element's preferred
 *    width plus the value of the <code>left</code> constraint.</li>
 *
 *    <li>If the container has a single element with <code>percentWidth</code> specified, 
 *    then the container's measured width will be equal to the element's preferred width.
 *    Even though the element's <code>percentWidth</code> is not directly factored in the calculations,
 *    it will be respected during a call to the <code>updateDisplayList()</code> method.</li>
 * 
 *    <li>If the container has a single element with <code>baseline</code> constraint specified,
 *    then the container's measured height will be equal to the element's preferred height
 *    plus the <code>baseline</code> and minus the value of the element's <code>baselinePosition</code> property.</li>
 *
 *    <li>If the container has a single element with <code>verticalCenter</code> constraint specified,
 *    then the container's measured height will be equal to the element's preferred height
 *    plus double the value of the <code>verticalCenter</code> constraint.</li>
 *  </ul>
 * </p>
 *
 *  <p>During a call to the <code>updateDisplayList()</code> method, 
 *  the element's size is determined according to
 *  the rules in the following order of precedence (the element's minimum and
 *  maximum sizes are always respected):</p>
 *  <ul>
 *    <li>If the element has <code>percentWidth</code> or <code>percentHeight</code> set, 
 *    then its size is calculated as a percentage of the available size, where the available
 *    size is the container size minus any <code>left</code>, <code>right</code>,
 *    <code>top</code>, or <code>bottom</code> constraints.</li>
 *
 *    <li>If the element has both left and right constraints, it's width is
 *    set to be the container's width minus the <code>left</code> 
 *    and <code>right</code> constraints.</li>
 * 
 *    <li>If the element has both <code>top</code> and <code>bottom</code> constraints, 
 *    it's height is set to be the container's height minus the <code>top</code> 
 *    and <code>bottom</code> constraints.</li>
 *
 *    <li>The element is set to its preferred width and/or height.</li>
 *  </ul>
 * 
 *  <p>The element's position is determined according to the rules in the following
 *  order of precedence:</p>
 *  <ul>
 *    <li>The <code>horizontalCenter</code> or <code>verticalCenter</code> constraints 
 *    specify the distance between the container's center and the element's center.
 *    Set the <code>horizontalCenter</code> or <code>verticalCenter</code> constraints 
 *    to zero to center the element within the container in 
 *    the horizontal or vertical direction.</li>
 * 
 *    <li>If element's baseline is specified, then the element is positioned in
 *    the vertical direction such that its <code>baselinePosition</code> (usually the base line
 *    of its first line of text) is aligned with <code>baseline</code> constraint.</li>
 *
 *    <li>If element's <code>top</code> or <code>left</code> constraints 
 *    are specified, then the element is
 *    positioned such that the top-left corner of the element's layout bounds is<commit_msg>Transferred from the Adobe Open Source Subversion Repository<commit_after>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2008 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.core.ILayoutElement;
import mx.core.IVisualElement;
import mx.resources.ResourceManager;

import spark.components.supportClasses.GroupBase;
import spark.layouts.supportClasses.LayoutBase;
import spark.layouts.supportClasses.LayoutElementHelper;

[ResourceBundle("layout")]

/**
 *  The BasicLayout class arranges the layout elements according to their individual settings,
 *  independent of each-other. BasicLayout, also called absolute layout, requires that you 
 *  explicitly position each container child. 
 *  You can use the <code>x</code> and <code>y</code> properties of the child, 
 *  or constraints to position each child.
 *
 *  <p><b>Note: </b>The Spark list-based controls (the Spark List control and its subclasses
 *  such as ButtonBar, ComboBox, DropDownList, and TabBar) do not support the BasicLayout class. 
 *  Do not use BasicLayout with the Spark list-based controls.</p>
 *
 *  <p>Per-element supported constraints are <code>left</code>, <code>right</code>, 
 *  <code>top</code>, <code>bottom</code>, <code>horizontalCenter</code>,
 *  <code>verticalCenter</code>, <code>baseline</code>, <code>percentWidth</code>, and <code>percentHeight</code>.
 *  Element's minimum and maximum sizes will always be respected.</p>
 *
 *  <p>The measured size of the container is calculated from the elements, their
 *  constraints and their preferred sizes. The measured size of the container
 *  is big enough to fit in all of the elements at their preferred sizes with
 *  their constraints satisfied. </p>
 *
 *  <p>Here are some examples of how measured size is calculated:
 *  <ul>
 *    <li>If the container has a single element with <code>left</code> constraint specified,
 *    then the container's measured width will be equal to the element's preferred
 *    width plus the value of the <code>left</code> constraint.</li>
 *
 *    <li>If the container has a single element with <code>percentWidth</code> specified, 
 *    then the container's measured width will be equal to the element's preferred width.
 *    Even though the element's <code>percentWidth</code> is not directly factored in the calculations,
 *    it will be respected during a call to the <code>updateDisplayList()</code> method.</li>
 * 
 *    <li>If the container has a single element with <code>baseline</code> constraint specified,
 *    then the container's measured height will be equal to the element's preferred height
 *    plus the <code>baseline</code> and minus the value of the element's <code>baselinePosition</code> property.</li>
 *
 *    <li>If the container has a single element with <code>verticalCenter</code> constraint specified,
 *    then the container's measured height will be equal to the element's preferred height
 *    plus double the value of the <code>verticalCenter</code> constraint.</li>
 *  </ul>
 * </p>
 *
 *  <p>During a call to the <code>updateDisplayList()</code> method, 
 *  the element's size is determined according to
 *  the rules in the following order of precedence (the element's minimum and
 *  maximum sizes are always respected):</p>
 *  <ul>
 *    <li>If the element has <code>percentWidth</code> or <code>percentHeight</code> set, 
 *    then its size is calculated as a percentage of the available size, where the available
 *    size is the container size minus any <code>left</code>, <code>right</code>,
 *    <code>top</code>, or <code>bottom</code> constraints.</li>
 *
 *    <li>If the element has both left and right constraints, it's width is
 *    set to be the container's width minus the <code>left</code> 
 *    and <code>right</code> constraints.</li>
 * 
 *    <li>If the element has both <code>top</code> and <code>bottom</code> constraints, 
 *    it's height is set to be the container's height minus the <code>top</code> 
 *    and <code>bottom</code> constraints.</li>
 *
 *    <li>The element is set to its preferred width and/or height.</li>
 *  </ul>
 *
 *  <p>The BasicLayout class calculates its minimum size as the maximum of the minimum child sizes:</p>
 *
 *  <ol>
 *    <li>For each child in the container, determine the minimum size 
 *        to which the child could shrink:
 *        <ul>
 *          <li>If the child is constrained to its parent's width or height, 
 *              then the child could shrink to its minimum width or height.  
 *              Use the minimum size of the child.</li>
 *          <li>If the child is not constrained to the parent, 
 *              then it remains at its preferred size.  
 *              Use the preferred size of the child.  </li>
 *        </ul></li>
 *     <li>Find the maximum of the sizes from step 1. </li>
 *  </ol>
 *
 *  <p>Therefore, if a child is constrained to its parent, then the layout 
 *  uses the child's minimum size. 
 *  Otherwise, it uses its preferred size of the child to calculate 
 *  the minimum size for the container.</p>
 * 
 *  <p>The element's position is determined according to the rules in the following
 *  order of precedence:</p>
 *  <ul>
 *    <li>The <code>horizontalCenter</code> or <code>verticalCenter</code> constraints 
 *    specify the distance between the container's center and the element's center.
 *    Set the <code>horizontalCenter</code> or <code>verticalCenter</code> constraints 
 *    to zero to center the element within the container in 
 *    the horizontal or vertical direction.</li>
 * 
 *    <li>If element's baseline is specified, then the element is positioned in
 *    the vertical direction such that its <code>baselinePosition</code> (usually the base line
 *    of its first line of text) is aligned with <code>baseline</code> constraint.</li>
 *
 *    <li>If element's <code>top</code> or <code>left</code> constraints 
 *    are specified, then the element is
 *    positioned such that the top-left corner of the element's layout bounds is
{'fraction_non_alphanumeric': 0.1256285689934373, 'fraction_numerical': 0.000767067246228586, 'mean_word_length': 3.3282921431206196, 'pattern_counts': {'":': 0, '<': 267, '<?xml version=': 0, '>': 267, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2978852', 'n_tokens_mistral': 3209, 'n_tokens_neox': 3063, 'n_words': 1314}