| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../override.css" type="text/css"><meta name="keywords" content="LayoutManager,mx.managers.LayoutManager,APPLICATION,COPY,HIGH,LINK,LOW,MEDIUM,MOVE,NONE,NO_CURSOR,PARENT,POPUP,allowDomainsInNewRSLs,allowDomainsInNewRSLs,allowInsecureDomainsInNewRSLs,allowInsecureDomainsInNewRSLs,application,base,childAllowsParent,childAllowsParent,currentCursorID,currentCursorXOffset,currentCursorYOffset,currentTarget,currentToolTip,cursorChildren,cursorChildren,cursorChildren,defaultButton,defaultButton,defaultButton,defaultButtonEnabled,defaultButtonEnabled,document,document,document,embeddedFontList,embeddedFontList,enabled,explicitHeight,explicitWidth,focusEnabled,focusManager,focusPane,focusPane,focusPane,focusPane,focusPane,fragment,groupName,hasFocusableChildren,hasFocusableContent,height,height,hideDelay,hideEffect,initialized,isDragging,isProxy,isProxy,isProxy,loaderInfo,measuredHeight,measuredWidth,mouseFocusEnabled,nestLevel,nextTabIndex,nextTabIndex,numChildren,numChildren,numModalWindows,numModalWindows,numModalWindows,parent,parentAllowsChild,parentAllowsChild,popUpChildren,popUpChildren,popUpChildren,preloadedRSLs,preloaderBackgroundAlpha,preloaderBackgroundColor,preloaderBackgroundImage,preloaderBackgroundSize,processedDescriptors,rawChildren,rawChildren,rawChildren,screen,screen,screen,scrubDelay,selected,showDelay,showEffect,showFocusIndicator,showFocusIndicator,stage,swfBridgeGroup,systemManager,tabFocusEnabled,tabIndex,title,toolTip,toolTipChildren,toolTipChildren,toolTipChildren,toolTipClass,topLevelSystemManager,topLevelSystemManager,topLevelSystemManager,updateCompletePendingFlag,url,usePhasedInstantiation,usePhasedInstantiation,width,width,acceptDragDrop,activate,activate,addChildBridge,addChildToSandboxRoot,addPopUp,addPreloadedRSL,allowDomain,allowInsecureDomain,assignFocus,attachListeners,bringToFront,callInContext,centerPopUp,contains,create,create,createPopUp,createToolTip,deactivate,deactivate,deployMouseShields,deployMouseShields,deployMouseShields,destroyToolTip,dispatchEventFromSWFBridges,doDrag,drawFocus,findFocusManagerComponent,findFocusManagerComponent,getDefinitionByName,getDefinitionByName,getDefinitionByName,getExplicitOrMeasuredHeight,getExplicitOrMeasuredWidth,getFeedback,getFocus,getFocus,getFocus,getInstance,getInstance,getInstance,getNextFocusManagerComponent,getNextFocusManagerComponent,getSWFRoot,getSandboxRoot,getSandboxRoot,getSandboxRoot,getTopLevelRoot,getTopLevelRoot,getTopLevelRoot,getVisibleApplicationRect,getVisibleApplicationRect,getVisibleApplicationRect,hideCursor,hideFocus,hideFocus,init,initForHistoryManager,initialize,invalidateDisplayList,invalidateDisplayList,invalidateParentSizeAndDisplayList,invalidateParentSizeAndDisplayList,invalidateParentSizeAndDisplayList,invalidateProperties,invalidateProperties,invalidateSize,invalidateSize,isDisplayObjectInABridgedApplication,isFontFaceEmbedded,isFontFaceEmbedded,isFontFaceEmbedded,isInvalid,isInvalid,isTopLevel,isTopLevel,isTopLevel,isTopLevelRoot,isTopLevelRoot,isTopLevelRoot,isTopLevelWindow,isTopLevelWindow,loadState,move,register,removeAllCursors,removeBusyCursor,removeChildBridge,removeChildFromSandboxRoot,removeCursor,removePopUp,save,saveState,setActualSize,setBusyCursor,setCursor,setFocus,setFocus,setFocus,setFragment,setTitle,showCursor,showFeedback,showFocus,showFocus,toString,toString,unregister,useSWFBridge,validateClient,validateClient,validateDisplayList,validateNow,validateNow,validateProperties,validateSize"><title>mx.managers.LayoutManager</title></head><body><script language="javascript" type="text/javascript" src="../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../help.js"></script><script language="javascript" type="text/javascript" src="../../cookies.js"></script><script language="javascript" type="text/javascript"><!-- |
| asdocTitle = 'LayoutManager - ApacheFlex API Reference'; |
| var baseRef = '../../'; |
| window.onload = configPage; |
| --></script> |
| <script type="text/javascript"> |
| scrollToNameAnchor(); |
| </script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Apache Flex 4.16.1 API Reference </td><td class="titleTableTopNav" align="right"><a href="../../package-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Packages</a> | <a href="../../class-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Classes</a> | <a href="../../all-index-A.html" onclick="loadClassListFrame('../../index-list.html')">Index</a> | <a id="framesLink1" href="../../index.html?mx/managers/LayoutManager.html&mx/managers/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../images/logo.jpg" class="logoImage" alt="AdobeLogo" title="AdobeLogo"></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">LayoutManager</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#propertySummary">Properties</a> | <a href="#methodSummary">Methods</a></td></tr><tr class="titleTableRow3"><td colspan="3"> </td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve"> |
| <!-- |
| |
| if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("LayoutManager"); titleBar_setSubNav(false,true,false,false,false,false,false,false,true,false,false ,false,false,false,false,false);} |
| --> |
| </script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">mx.managers</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public class LayoutManager</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">LayoutManager <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> flash.events.EventDispatcher</td></tr><tr><td class="classHeaderTableLabel">Implements</td><td> <a href="../../mx/managers/ILayoutManager.html">ILayoutManager</a></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p></p><p></p> |
| The LayoutManager is the engine behind |
| Flex's measurement and layout strategy. |
| Layout is performed in three phases; commit, measurement, and layout. |
| <p>Each phase is distinct from the others and all UIComponents of |
| one phase are processed prior to moving on to the next phase. |
| During the processing of UIComponents in a phase, requests for |
| UIComponents to get re-processed by some phase may occur. |
| These requests are queued and are only processed |
| during the next run of the phase.</p> |
| <p>The <b>commit</b> phase begins with a call to |
| <code>validateProperties()</code>, which walks through a list |
| (reverse sorted by nesting level) of objects calling each object's |
| <a href="../core/UIComponent.html#validateProperties()" target=""> |
| <code>validateProperties()</code> |
| </a>method.</p> |
| <p>The objects in the list are processed in reversed nesting order, |
| with the <b>least</b> deeply nested object accessed first. |
| This can also be referred to as top-down or outside-in ordering.</p> |
| <p>This phase allows components whose contents depend on property |
| settings to configure themselves prior to the measurement |
| and the layout phases. |
| For the sake of performance, sometimes a component's property setter |
| method does not do all the work to update to the new property value. |
| Instead, the property setter calls the <code>invalidateProperties()</code> |
| method, deferring the work until this phase runs. |
| This prevents unnecessary work if the property is set multiple times.</p> |
| <p>The <b>measurement</b> phase begins with a call to |
| <code>validateSize()</code>, which walks through a list |
| (sorted by nesting level) of objects calling each object's |
| <a href="../core/UIComponent.html#validateSize()" target=""> |
| <code>validateSize()</code> |
| </a> |
| method to determine if the object has changed in size.</p> |
| <p>If an object's <a href="../core/UIComponent.html#invalidateSize()" target=""> |
| <code>invalidateSize()</code> |
| </a> method was previously called, |
| then the <code>validateSize()</code> method is called. |
| If the size or position of the object was changed as a result of the |
| <code>validateSize()</code> call, then the object's |
| <a href="../core/UIComponent.html#invalidateDisplayList()" target=""> |
| <code>invalidateDisplayList()</code> |
| </a> method is called, thus adding |
| the object to the processing queue for the next run of the layout phase. |
| Additionally, the object's parent is marked for both measurement |
| and layout phases, by calling |
| <a href="../core/UIComponent.html#invalidateSize()" target=""> |
| <code>invalidateSize()</code> |
| </a> and |
| <a href="../core/UIComponent.html#invalidateDisplayList()" target=""> |
| <code>invalidateDisplayList()</code> |
| </a> respectively.</p> |
| <p>The objects in the list are processed by nesting order, |
| with the <b>most</b> deeply nested object accessed first. |
| This can also be referred to as bottom-up inside-out ordering.</p> |
| <p>The <b>layout</b> phase begins with a call to the |
| <code>validateDisplayList()</code> method, which walks through a list |
| (reverse sorted by nesting level) of objects calling each object's |
| <a href="../core/UIComponent.html#validateDisplayList()" target=""> |
| <code>validateDisplayList()</code> |
| </a> method to request the object to size |
| and position all components contained within it (i.e. its children).</p> |
| <p>If an object's <a href="../core/UIComponent.html#invalidateDisplayList()" target=""> |
| <code>invalidateDisplayList()</code> |
| </a> method was previously called, |
| then <code>validateDisplayList()</code> method for the object is called.</p> |
| <p>The objects in the list are processed in reversed nesting order, |
| with the <b>least</b> deeply nested object accessed first. |
| This can also be referred to as top-down or outside-in ordering.</p> |
| <p>In general, components do not override the <code>validateProperties()</code>, |
| <code>validateSize()</code>, or <code>validateDisplayList()</code> methods. |
| In the case of UIComponents, most components override the |
| <code>commitProperties()</code>, <code>measure()</code>, or |
| <code>updateDisplayList()</code> methods, which are called |
| by the <code>validateProperties()</code>, |
| <code>validateSize()</code>, or |
| <code>validateDisplayList()</code> methods, respectively.</p> |
| <p>At application startup, a single instance of the LayoutManager is created |
| and stored in the <code>UIComponent.layoutManager</code> property. |
| All components are expected to use that instance. |
| If you do not have access to the UIComponent object, |
| you can also access the LayoutManager using the static |
| <code>LayoutManager.getInstance()</code> method.</p> |
| |
| <p></p><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th> </th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#usePhasedInstantiation" class="signatureLink">usePhasedInstantiation</a> : Boolean<div class="summaryTableDescription"> |
| A flag that indicates whether the LayoutManager allows screen updates |
| between phases.</div></td><td class="summaryTableOwnerCol">LayoutManager</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th> </th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#attachListeners()" class="signatureLink">attachListeners</a>(systemManager:<a href="../../mx/managers/ISystemManager.html">ISystemManager</a>):void</div><div class="summaryTableDescription"></div></td><td class="summaryTableOwnerCol">LayoutManager</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getInstance()" class="signatureLink">getInstance</a>():<a href="../../mx/managers/LayoutManager.html">LayoutManager</a></div><div class="summaryTableDescription">[static] |
| Returns the sole instance of this singleton class, |
| creating it if it does not already exist.</div></td><td class="summaryTableOwnerCol">LayoutManager</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#invalidateDisplayList()" class="signatureLink">invalidateDisplayList</a>(obj:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a>):void</div><div class="summaryTableDescription"> |
| Called when a component changes in some way that its layout and/or visuals |
| need to be changed.</div></td><td class="summaryTableOwnerCol">LayoutManager</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#invalidateProperties()" class="signatureLink">invalidateProperties</a>(obj:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a>):void</div><div class="summaryTableDescription"> |
| Adds an object to the list of components that want their |
| validateProperties() method called.</div></td><td class="summaryTableOwnerCol">LayoutManager</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#invalidateSize()" class="signatureLink">invalidateSize</a>(obj:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a>):void</div><div class="summaryTableDescription"> |
| Adds an object to the list of components that want their |
| validateSize() method called.</div></td><td class="summaryTableOwnerCol">LayoutManager</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#isInvalid()" class="signatureLink">isInvalid</a>():Boolean</div><div class="summaryTableDescription"> |
| Returns true if there are components that need validating; |
| false if all components have been validated.</div></td><td class="summaryTableOwnerCol">LayoutManager</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#validateClient()" class="signatureLink">validateClient</a>(target:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a>, skipDisplayList:Boolean = false):void</div><div class="summaryTableDescription"> |
| When properties are changed, components generally do not apply those changes immediately.</div></td><td class="summaryTableOwnerCol">LayoutManager</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#validateNow()" class="signatureLink">validateNow</a>():void</div><div class="summaryTableDescription"> |
| When properties are changed, components generally do not apply those changes immediately.</div></td><td class="summaryTableOwnerCol">LayoutManager</td></tr></table></div><script language="javascript" type="text/javascript"><!-- |
| showHideInherited(); |
| --></script><div class="MainContent"><div class="detailSectionHeader">Property Detail</div><a name="propertyDetail"></a><a name="usePhasedInstantiation"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">usePhasedInstantiation</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>usePhasedInstantiation:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| A flag that indicates whether the LayoutManager allows screen updates |
| between phases. |
| If <code>true</code>, measurement and layout are done in phases, one phase |
| per screen update. |
| All components have their <code>validateProperties()</code> |
| and <code>commitProperties()</code> methods |
| called until all their properties are validated. |
| The screen will then be updated. |
| |
| <p>Then all components will have their <code>validateSize()</code> |
| and <code>measure()</code> |
| methods called until all components have been measured, then the screen |
| will be updated again. </p> |
| <p>Finally, all components will have their |
| <code>validateDisplayList()</code> and |
| <code>updateDisplayList()</code> methods called until all components |
| have been validated, and the screen will be updated again. |
| If in the validation of one phase, an earlier phase gets invalidated, |
| the LayoutManager starts over. |
| This is more efficient when large numbers of components |
| are being created an initialized. The framework is responsible for setting |
| this property.</p> |
| <p>If <code>false</code>, all three phases are completed before the screen is updated.</p> |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get usePhasedInstantiation():Boolean</code><br/><code> public function set usePhasedInstantiation(value:Boolean):void</code><br/></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="attachListeners()"></a><a name="attachListeners(mx.managers.ISystemManager)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">attachListeners</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public function attachListeners(systemManager:<a href="../../mx/managers/ISystemManager.html">ISystemManager</a>):void</code><p></p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">systemManager</span>:<a href="../../mx/managers/ISystemManager.html">ISystemManager</a></code></td></tr></table></p></div><a name="getInstance()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getInstance</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public static function getInstance():<a href="../../mx/managers/LayoutManager.html">LayoutManager</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Returns the sole instance of this singleton class, |
| creating it if it does not already exist. |
| </p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../mx/managers/LayoutManager.html">LayoutManager</a></code> — Returns the sole instance of this singleton class, |
| creating it if it does not already exist. |
| |
| </td></tr></table></div><a name="invalidateDisplayList()"></a><a name="invalidateDisplayList(mx.managers.ILayoutManagerClient)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">invalidateDisplayList</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function invalidateDisplayList(obj:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a>):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Called when a component changes in some way that its layout and/or visuals |
| need to be changed. |
| In that case, it is necessary to run the component's layout algorithm, |
| even if the component's size hasn't changed. For example, when a new child component |
| is added, or a style property changes or the component has been given |
| a new size by its parent. |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">obj</span>:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a></code> — The object that changed. |
| |
| </td></tr></table></p></div><a name="invalidateProperties()"></a><a name="invalidateProperties(mx.managers.ILayoutManagerClient)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">invalidateProperties</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function invalidateProperties(obj:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a>):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Adds an object to the list of components that want their |
| <code>validateProperties()</code> method called. |
| A component should call this method when a property changes. |
| Typically, a property setter method |
| stores a the new value in a temporary variable and calls |
| the <code>invalidateProperties()</code> method |
| so that its <code>validateProperties()</code> |
| and <code>commitProperties()</code> methods are called |
| later, when the new value will actually be applied to the component and/or |
| its children. The advantage of this strategy is that often, more than one |
| property is changed at a time and the properties may interact with each |
| other, or repeat some code as they are applied, or need to be applied in |
| a specific order. This strategy allows the most efficient method of |
| applying new property values. |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">obj</span>:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a></code> — The object whose property changed. |
| |
| </td></tr></table></p></div><a name="invalidateSize()"></a><a name="invalidateSize(mx.managers.ILayoutManagerClient)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">invalidateSize</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function invalidateSize(obj:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a>):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Adds an object to the list of components that want their |
| <code>validateSize()</code> method called. |
| Called when an object's size changes. |
| <p>An object's size can change for two reasons:</p> |
| <ol> |
| <li>The content of the object changes. For example, the size of a |
| button changes when its <code>label</code> is changed.</li> |
| <li>A script explicitly changes one of the following properties: |
| <code>minWidth</code>, <code>minHeight</code>, |
| <code>explicitWidth</code>, <code>explicitHeight</code>, |
| <code>maxWidth</code>, or <code>maxHeight</code>.</li> |
| </ol> |
| <p>When the first condition occurs, it's necessary to recalculate |
| the measurements for the object. |
| When the second occurs, it's not necessary to recalculate the |
| measurements because the new size of the object is known. |
| However, it's necessary to remeasure and relayout the object's |
| parent.</p> |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">obj</span>:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a></code> — The object whose size changed. |
| |
| </td></tr></table></p></div><a name="isInvalid()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">isInvalid</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function isInvalid():Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Returns <code>true</code> if there are components that need validating; |
| <code>false</code> if all components have been validated. |
| </p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Boolean</code> — Returns <code>true</code> if there are components that need validating; |
| <code>false</code> if all components have been validated. |
| |
| </td></tr></table></div><a name="validateClient()"></a><a name="validateClient(mx.managers.ILayoutManagerClient,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">validateClient</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function validateClient(target:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a>, skipDisplayList:Boolean = false):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| When properties are changed, components generally do not apply those changes immediately. |
| Instead the components usually call one of the LayoutManager's invalidate methods and |
| apply the properties at a later time. The actual property you set can be read back |
| immediately, but if the property affects other properties in the component or its |
| children or parents, those other properties may not be immediately updated. |
| <p>To guarantee that the values are updated, |
| you can call the <code>validateClient()</code> method. |
| It updates all properties in all components whose nest level is greater than or equal |
| to the target component before returning. |
| Call this method only when necessary as it is a computationally intensive call.</p> |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">target</span>:<a href="../../mx/managers/ILayoutManagerClient.html">ILayoutManagerClient</a></code> — The component passed in is used to test which components |
| should be validated. All components contained by this component will have their |
| <code>validateProperties()</code>, <code>commitProperties()</code>, |
| <code>validateSize()</code>, <code>measure()</code>, |
| <code>validateDisplayList()</code>, |
| and <code>updateDisplayList()</code> methods called. |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">skipDisplayList</span>:Boolean</code> (default = <code>false</code>)<code></code> — If <code>true</code>, |
| does not call the <code>validateDisplayList()</code> |
| and <code>updateDisplayList()</code> methods. |
| |
| </td></tr></table></p></div><a name="validateNow()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">validateNow</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function validateNow():void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| When properties are changed, components generally do not apply those changes immediately. |
| Instead the components usually call one of the LayoutManager's invalidate methods and |
| apply the properties at a later time. The actual property you set can be read back |
| immediately, but if the property affects other properties in the component or its |
| children or parents, those other properties may not be immediately updated. To |
| guarantee that the values are updated, you can call the <code>validateNow()</code> method. |
| It updates all properties in all components before returning. |
| Call this method only when necessary as it is a computationally intensive call. |
| |
| </p></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Wed Nov 15 2017, 09:50 AM +01:00 </center></div></body></html><!--The Apache Software Foundation<br/>Wed Nov 15 2017, 09:50 AM +01:00 --> |