|
Darrell Loverin (Dev)
Jody Zhang (QA)
Functional and Design Specification
Glossary
- Flex Chrome - Application chrome drawn using Flex/Flash instead of the native operating system. The Flex Chrome consists of a title bar, a border, and a gripper for resizing the window.
- System Chrome - Application chrome drawn by the native operating system using its native widgets. The chrome consists of a title bar and a window frame for resizing the window.
Summary and Background
The Spark Window component is a skinnable version of the Halo Window component. The Spark Window has most of the properties and methods of the Halo Window. The main difference between the Spark and Halo versions of Window is the Spark component does not support the styles on the Halo component. Instead, the styles are embedded into the component's skin. If a developer wants to use different styles, they can easily create a custom skin.
The Spark Window component is designed to be used with the Spark WindowedApplication.
Usage Scenarios
Use spark.components.Window to create additional native windows in an AIR application. The first window will always be a WindowedApplication. The advantage of using a Spark Window over a Halo Window is the Spark Window can be easily skinned and Spark graphic elements may be placed directly in the application without the need to wrap them in a Group tag.
Detailed Description
Most of the properties and methods are the same as the Halo component. All the styles on the Halo component are not available in the Spark component.
API change to Halo Window, mx.core.Window
Changed getWindow to return IWindow.
With the addition of the Spark Window, there are now two kinds of Window components, Spark and Halo. The getWindow API used to return a Halo Window. The API has been changed to return IWindow so the actual type can be either a Spark Window or a Halo Window.
Differences between Spark and Halo Window Components
Properties
Added backgroundColor:uint
The backgroundColor of the Window. Same implementation as in spark.components.Application.
Added colorCorrection:uint
The value of the stage's colorCorrection property. Same implementation as in spark.components.Application.
Added resizeAffordance
The number of pixels from the edge of the application where a mouse click can initiate a resize of the application.
Changed statusBar:UIComponent
The type of the status bar was changed from UIComponent to IVisualElement.
Removed statusBarFactory:IFactory
Used for Halo custom status bars. Not needed in Spark.
Removed statusBarStyleFilters:Object
Spark styles are created within the skin.
Changed titleBar:UIComponent
The type of titleBar has changed from UIComponent to TitleBar.
Removed titleBarFactory:IFactory
The titleBar will be created by the Spark infrastructure.
Removed titleBarStyleFilters:Object
The titleBar does not support any external styles.
Methods
No changes.
Events
No changes.
Styles
All REMOVED:
buttonAlignment="auto"
buttonPadding="2"
closeButtonSkin="mx.skins.halo.windowCloseButtonSkin"
gripperPadding="3"
gripperStyleName="gripperStyle"
headerHeight="<i>undefined</i>"
maximizeButtonSkin="mx.skins.halo.WindowMaximizeButtonSkin"
minimizeButtonSkin="mx.skins.halo.WindowMinimizeButtonSkin"
restoreButtonSkin="mx.skins.halo.WindowRestoreButtonSkin"
showFlexChrome="true"
statusBarBackgroundColor="0xC0C0C0"
statusBarBackgroundSkin="mx.skins.halo.StatusBarBackgroundSkin"
statusTextStyleName="<i>undefined</i>"
titleAlignment="auto"
titleBarBackgroundSkin="mx.skins.halo.ApplicationTitleBarBackgroundSkin"
titleBarButtonPadding="5"
titleBarColors="[ 0x000000, 0x000000 ]"
titleTextStyleName="<i>undefined</i>"
Effects
No changes.
Skins
The Window component can use the same skins as the WindowedApplication component. The shared skins are the spark.skins.default.WindowedApplicationSkin and spark.skins.default.FlexChromeSkin skins. The skin sharing is accomplished by declaring the HostComponent to be of type Object. The backgroundColor property is then accessed thru the hostComponent member.
The default skin is spark.skins.default.WindowedApplicationSkin. If you want to use the Flex Chrome, then override the skinClass style and set it to the Flex Chrome Skin. One way to do this is to add a Style block to your application. For example:
API Description
Parts of the API that are the same are not shown.
Backwards Compatibility
API change to Halo Window, mx.core.Window
Changed getWindow to return IWindow
There are two kinds of Window components, Spark and Halo. The API used to return a Halo Window. The API has been changed to return IWindow so the actual type can be either a Spark Window or a Halo Window.
QA
Run the same tests as run against the Halo Window. Then test creating new skins for the Spark Window. Test adding Spark components to the Spark Window.
|