<s:Window>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:Window Properties alwaysInFront="false" backgroundColor="white" colorCorrection="default" maxHeight="2880 less the height of the system chrome" maximizable="true" maxWidth="2880 less the width of the system chrome" menu="null" minHeight="dependent on the operating system and the AIR systemChrome setting" minimizable="true" minWidth="dependent on the operating system and the AIR systemChrome setting" resizable="true" showStatusBar="true" status="" systemChrome="standard" title="" titleIcon="null" transparent="false" type="normal" visible="true" width="100" Effects closeEffect="No default" minimizeEffect="No default" unminimizeEffect="No default" Events applicationActivate="No default" applicationDeactivate="No default" close="No default" closing="No default" displayStateChange="No default" displayStateChanging="No default" moving="No default" networkChange="No default" resizing="No default" windowActivate="No default" windowComplete="No default" windowDeactivate="No default" windowMove="No default" windowResize="No default" />]]>
Window 容器无法在其它布局容器中使用,在这个意义上来说,它是一种特殊容器。spark.components.Window 组件必须是其 MXML 文档中的顶级组件。
使用 Window 组件定义本机窗口的最简便方法是创建一个 MXML 文档,并在该文档中使用
在应用程序代码中,要在屏幕上显示 Window 子类的实例,请首先在代码中创建类的实例(通过定义变量并调用
请注意,Window 类的部分属性仅可以在调用
只有将 WindowedApplicationSkin 类或 SparkChromeWindowedApplicationSkin 类用作应用程序或任何应用程序窗口的外观时,才会显示状态栏。
打开窗口后,此属性将立即变为只读模式。
默认值为
此属性在窗口打开后是只读的。
打开窗口后,此属性将立即变为只读模式。
默认值为
<mx:WindowedApplication>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<mx:WindowedApplication Properties alwaysInFront="false" autoExit="true" backgroundFrameRate="1" dockIconMenu="null" maxHeight="2880 less the height of the system chrome" maxWidth="2880 less the width of the system chrome" menu="null" minHeight="dependent on the operating system and the AIR systemChrome setting" minWidth="dependent on the operating system and the AIR systemChrome setting" showStatusBar="true" status="" systemTrayIconMenu="null" title="" titleIcon="null" Effects closeEffect="No default" minimizeEffect="No default" unminimizeEffect="No default" Events applicationActivate="No default" applicationDeactivate="No default" close="No default" closing="No default" displayStateChange="No default" displayStateChanging="No default" invoke="No default" moving="No default" networkChange="No default" resizing="No default" windowActivate="No default" windowComplete="No default" windowDeactivate="No default" windowMove="No default" windowResize="No default" />]]>
WindowedApplication 有两个作用。它可以替换 <mx:WindowedApplication> 标签,与基于 Flex 的 AIR 应用程序的入口点具有相同的作用。此外,作为容器,WindowedApplication 可定义 Flex AIR 应用程序初始窗口的布局,在 WindowedApplication 中定义的任何可见控件都将成为 AIR 应用程序加载的初始窗口中的内容。
WindowedApplication 是基于 Flex 的 AIR 应用程序的顶层应用程序。该应用程序没有设计为由其它 Flex 应用程序进行加载。如果 WindowedApplication 需要加载其它应用程序,请使用 Application 类作为这些应用程序的容器。如果需要其它窗口,请使用 Window 类作为这些窗口的容器。
请注意,由于 WindowedApplication 只表示单个窗口(而不是多窗口应用程序中的所有窗口)中的可见内容,因此 WindowedApplication 实例只为自己的舞台和窗口分派与显示相关的事件(WindowedApplication 类从显示对象的 InteractiveObject 和 UIComponent 等基类继承的事件),而不为在应用程序中其它窗口上发生的事件分派这些事件。这与基于浏览器的应用程序不同。在后者中,FxApplication 容器会为应用程序中的所有窗口分派这些事件(因为从技术角度而言,这些窗口都是在单个 Application 舞台上呈现的显示对象)。
只有将 WindowedApplicationSkin 类或 SparkChromeWindowedApplicationSkin 类用作应用程序或任何应用程序窗口的外观时,才会显示状态栏。