Flash Builder 4 and Flex 4 Bible- P11
Thông tin tài liệu:
Nội dung trích xuất từ tài liệu:
Flash Builder 4 and Flex 4 Bible- P11 Chapter 16: Managing Application Navigation recalculated and rendered anew on each visit to the page. The browser offers caching of image and other assets to speed up this process, but graphical presentation in a Web page is necessarily limited. l HTML and JavaScript aren’t interpreted identically by every Web browser. In fact, one of the most costly and time-consuming aspects of classic Web application develop- ment is testing, because you must test your application on each combination of operating system, browser, and version that you want to support. Some Web application vendors handle this issue by limiting the platforms on which an application is supported. For example, Intuit’s QuickBooks Online, while a powerful and reliable Web application, is supported only on Microsoft Internet Explorer on Windows and Safari on Mac — no Firefox users allowed! Understanding Flex Navigation Navigation in Flex applications is handled at two levels with navigator containers and view states. The difference between these strategies can be described as one of the amount of visual change during a move from one presentation to another: l Navigator containers. Use these when you want to replace a rectangular region of a Flex application (a view) with a completely different visual presentation. l View states. Use these when you want to modify an existing view, by adding or removing visual components or by changing components’ properties, styles, or event listeners. In some cases, either a navigator container or a view state can get the job done, but for the most part the choice is clear: Use a navigator container to move from one view to another, and use a view state to change an existing view.Cross-ReferenceDetailed information about view states is available in Chapter 13. n Using Navigator Containers You create a stack of views using one of the navigator containers provided in the Flex framework. The ViewStack class is the simplest of these navigator containers. You declare the ViewStack container as a parent container that nests a collection of view components and displays only one of its nested views at any given time. The ViewStack container doesn’t have any user interface controls that enable the user to select a current view, so it’s typically controlled either with ActionScript code or with navigator bar com- ponents that use the ViewStack as a data provider and dynamically generate interactive compo- nents to control navigation. 471Part II: Designing Flex Applications Declaring a ViewStack in MXML To create a ViewStack in MXML, declare an tag set. Then declare each nested container within the tag set. You can nest either pre-built containers from the Flex framework or your own custom components. The containers you nest within the ViewStack can be either layout or navigator containers.New FeatureThe ViewStack, TabNavigator, and Accordion navigator containers were originally designed so theycould only contain instances of the original MX container classes such as VBox, HBox, and Panel. This rule isenforced via the nested object’s inheritance hierarchy: Each of the components nested directly within aViewStack must include mx.core.Container as one of its superclasses. If you nest most Spark compo-nents directly in a ViewStack, a type coercion error is generated at runtime when the framework tries to castthe object as Container.To solve this, nest the Spark component inside a new component named NavigatorContent. This containerimplements a new interface named INavigatorContent, making it compatible with the MX navigator con-tainers. To use Spark containers in a ViewStack (or in its related navigator containers, TabNavigator andAccordion), nest them in an instance of NavigatorContent. n Each container nested within a navigator container, whether implemented as a ViewStack, TabNavigator, or Accordion, should have a label property. The label is an arbitrary String that’s used in many circumstances to describe the container’s purpose to the user. You don’t always need the label property, but if you bind the stack to a navigator container that gen- erates interactive components such as Buttons, or if you use the TabNavigator or Accordion containers, the v ...
Tìm kiếm theo từ khóa liên quan:
thiết kế web giáo trình flash cơ bản kỹ năng cắt html photoshop căn bản giáo trình CS3Gợi ý tài liệu liên quan:
-
Báo cáo thực tập: Đề tài thiết kế Web
77 trang 568 2 0 -
Đề thi thực hành môn Thiết kế Web - Trường Cao đẳng nghề Vĩnh Phúc
3 trang 267 2 0 -
MỘT SỐ ĐIỂM CẦN CHÚ Ý KHI THIẾT KẾ WEB
5 trang 113 0 0 -
GIÁO TRÌNH LẬP TRÌNH WEB_PHẦN 2_BÀI 3
3 trang 103 0 0 -
Giáo trình Nhập môn thiết kế website
58 trang 83 0 0 -
Tài liệu giảng dạy Thiết kế giao diện Web - Trường CĐ Kinh tế - Kỹ thuật Vinatex TP. HCM
88 trang 72 0 0 -
81 trang 68 0 0
-
112 trang 64 0 0
-
Hướng dân sử dụng Navicat để Create , Backup , Restore Database
7 trang 63 0 0 -
Giáo trình môn Kỹ thuật vi điều khiển: Thiết kế web và vi điều khiển - Chương 2
39 trang 59 0 0 -
0 trang 46 0 0
-
GIÁO TRÌNH THIẾT KẾ WEB: TỰ HỌC MACROMEDIA FLASH 5.0
18 trang 40 0 0 -
111 trang 39 1 0
-
giáo trình html và thiết kế web: phần 2 - Đh công nghệ
119 trang 39 0 0 -
Bài giảng Thiết kế và lập trình Web - Bài 5: PHP cơ bản
137 trang 39 0 0 -
Giáo Trình về Thiết Kế trang Web
176 trang 34 0 0 -
Bài giảng môn Thiết kế web - Phần 2: Ngôn ngữ kịch bản JavaScript
29 trang 33 0 0 -
Giáo trình Thiết kế Web - Thạc Bình Cường, Vũ Thị Hậu
249 trang 33 0 0 -
Cơ bản về Microsoft Frontpage part 9
5 trang 32 0 0 -
Bài giảng Thiết kế và lập trình Web - Bài 8: PHP - MySQL
59 trang 32 0 0