Commitproperties =>*commitProperties() processes the properties set on the component. You do not call this method directly. Flex calls the commitProperties() method when you use the addChild() method to add a component to a container, or when you call the invalidateProperties() method of the component. Calls to the commitProperties() method occur before calls to the measure() method. This lets you set property values that might be used by the measure() method.*
updateDisplayList => *The **updateDisplayList() method sizes and positions the children of your component based on all previous property and style settings, and draws any skins or graphic elements that the component uses. The parent container for the component determines the size of the component itself. *
本文深入探讨了Flex框架中组件属性管理和更新显示列表的过程。解释了commitProperties()方法在添加组件到容器或调用组件的invalidateProperties()方法时的自动执行,以及updateDisplayList()方法如何根据所有先前的属性和样式设置来调整组件的大小和位置,并绘制组件使用的任何皮肤或图形元素。重点阐述了这两个核心方法在确保组件正确渲染和响应变化的重要性。
577

被折叠的 条评论
为什么被折叠?



