Flex :所有容器都继承UIComponent和Container的所有属性
作为 Continaer 的子类(又是 UIComponent 的子类),Flex 中的所有容器是否“继承 UIComponent 和 Container 的所有属性”?这条规则有什么例外吗?
请帮我解决这个问题。
提前致谢。
Being subclasses of Continaer which is again subclass of UIcomponent, do all container in flex 'inherit all properties of UIcomponent and Container' ? Is there any exception to this rule ?
Please help me on this.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的!当然,假设所讨论的容器实际上是 UIComponent 和/或 Container 的子容器。例如,我制作了仅扩展 UIComponent 的组件。它们不会有任何容器特定的属性[除非它们是独立于容器实现而自己实现的]。
但是,子类可以重写属性并以不同的方式实现它们。他们还可以使用元数据从 mxml 代码提示中删除属性。您仍然可以在 ActionScript 中设置这些属性,尽管如果它们被排除,则可能有与组件功能相关的原因。
Yes! Assuming of course that the container in question is actually a child of UIComponent and/or Container. I have made components that only extend UIComponent, for example. They would not have any container specific properties [unless they were implemented on their own independent of the container implementation].
No, however, subclasses can override properties and implement them differently. They can also use metadata to remove properties from mxml code hinting. You can still set these propeties in ActionScript, although if they are being excluded there is probably a reason why that relates tot he component's functionality.