blob: a78e0ff0cfd779adcb04c90922456362a9fb7cca [file] [log] [blame]
{ "type": "class",
"qname": "spark.layouts.ConstraintLayout",
"baseClassname": "spark.layouts.supportClasses.LayoutBase"
,
"description": "The ConstraintLayout class arranges the layout elements based on their individual settings and a set of constraint regions defined by constraint columns and constraint rows. Although you can use all of the properties and constraints from BasicLayout to position and size elements, ConstraintLayout gives you the ability to create sibling-relative layouts by constraining elements to the specified columns and rows. <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 ConstraintLayout class. Do not use ConstraintLayout 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>baseline</code>, <code>percentWidth</code>, and <code>percentHeight</code>. Element's minimum and maximum sizes will always be respected.</p> <p>Columns and rows may have an explicit size or content size (no explicit size). Explicit size regions will be fixed at their specified size, while content size regions will stretch to fit only the elements constrained to them. If multiple content size regions are spanned by an element, the space will be divided equally among the content size regions.</p> <p>The measured size of the container is calculated from the elements, their constraints, their preferred sizes, and the sizes of the rows and columns. The size of each row and column is just big enough to hold all of the elements constrained to it at their preferred sizes with constraints satisfied. The measured size of the container is big enough to hold all of the columns and rows as well as any other elements left at their preferred sizes with constraints satisfied. </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 region or 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 region's or 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>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 offset from the top-left corner of the container by the specified values.</li> <li>If element's <code>bottom</code> or <code>right</code> constraints are specified, then the element is positioned such that the bottom-right corner of the element's layout bounds is offset from the bottom-right corner of the container by the specified values.</li> <li>When no constraints determine the position in the horizontal or vertical direction, the element is positioned according to its x and y coordinates.</li> </ul> <p>The content size of the container is calculated as the maximum of the coordinates of the bottom-right corner of all the layout elements and constraint regions.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "spark.layouts.ConstraintLayout",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "Array",
"qname": "constraintColumns",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "A Vector of ConstraintColumn instances that partition the target container. The ConstraintColumn instance at index 0 is the left-most column; indices increase from left to right.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Array",
"qname": "constraintRows",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "A Vector of ConstraintRow instances that partition the target container. The ConstraintRow instance at index 0 is the top-most column; indices increase from top to bottom.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "spark.components.supportClasses.GroupBase",
"qname": "target",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "The GroupBase container whose elements are measured, sized and positioned by this layout. <p>Subclasses may override the setter to perform target specific actions. For example a 3D layout may set the target's <code>maintainProjectionCenter</code> property here.</p>",
"tags": [
{ "tagName": "default",
"values": ["null", "null"]},
{ "tagName": "see",
"values": ["#updateDisplayList()", "#measure()", "#updateDisplayList()", "#measure()"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5", "Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4", "Flex 4"]},
{ "tagName": "langversion",
"values": ["3.0", "3.0"]} ]},
{ "type": "method",
"qname": "layoutContent",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Lays out the elements of the layout target using the current widths and heights of the columns and rows. Used by FormItemLayout after setting new column widths to lay elements using those new widths. in the component's coordinates, regardless of the value of the <code>scaleX</code> property of the component. in the component's coordinates, regardless of the value of the <code>scaleY</code> property of the component.",
"tags": [
{ "tagName": "param",
"values": ["unscaledWidth Specifies the width of the component, in pixels,", "unscaledHeight Specifies the height of the component, in pixels,"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "unscaledWidth", "type": "Number"},
{ "name": "unscaledHeight", "type": "Number"}]}
,
{ "type": "method",
"qname": "measureAndPositionColumnsAndRows",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Used by FormItemLayout to measure and set new column widths and row heights before laying out the elements. or shrink their percent width columns. If NaN, percent width columns are unconstrained and fit to their content. or shrink their percent height rows. If NaN, percent height rows are unconstrained and fit to their content.",
"tags": [
{ "tagName": "param",
"values": ["constrainedWidth The total width available for columns to stretch", "constrainedHeight The total height available for rows to stretch"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "constrainedWidth", "type": "Number"},
{ "name": "constrainedHeight", "type": "Number"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "virtualLayoutSupported",
"namespace": "mx_internal",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]}]
}