博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2010年8月22日周日_StylingAndSkinning-Overview_6.10

Posted on 2010-08-22 10:30  星尘的天空  阅读(231)  评论(0编辑  收藏  举报

/****************************************************************************/

//2010822周日

//Styling and skinning compomnets

//versiong 2.0

/****************************************************************************/

Overview

Creating alternate(交互) visual appearance to components gives a unique branding(商标) value to your application. Styling and skinning are two approaches for changing the look of Flex components. Styles are used to change the appearance of a single component, or apply them across all components. The appearance of components is changed using CSS. In Flex 4, the skins control all visual elements of a component including layout. The new skinning model gives developers greater control over the appearance and the layout of their components. With custom skins(皮肤、外壳) you can change the look of your application including adding background colors and images, borders, etc. The decoupling 去耦合装置, 退耦 of display logic with skins is one of the most valuable architectural enhancements in Flex 4. This decoupling allows you to create an unlimited number of skins for each of the Spark-based components. You can then declare a different default skin for each instance of the same component or even swap skins on the fly.

概述

为组件创建一个交互的可视化的外观会给你的应用程序一个唯一的商标。Stylingskinning是两种改变Flex组件外观的方式。 Styles用于改变一个单独组件的的外观,或者将他们应用到所有的组件。使用CSS可以改变组件的外观。 Flex4.0中,skin控制着组件的所有可视化元素,包括布局。新的Skinning模型给了开发者对他们的组件的外观和布局更大的控制。 使用自定义的skins你可以改变你应用程序的外观包括:添加背景颜色和图片,边框等等。去耦显示逻辑和皮肤是Flex4.0中最有价值的风格增强。Decoupling允许你为每一个Spark-based组件创建在数量上没有限制的skins。你可以为一些组件的每一个实例都生命一个不同的默认皮肤。

The skin class of a component defines the visual appearance of a component. Modifying the skin class of a component enables you to change just the visual appearance of a component without affecting the business logic or behavior of the component. Creating a unique appearance for components involves creating a new skin class or modifying an existing skin class. The source code for the default skins used by all the components in ArcGIS API for Flex such as navigation, scale bar, editor, attribute inspector, template picker, etc are provided with the API download. These skins can be used as starting point to create custom look and feel for your application. There are some alternate skins available in the download that can readily be used in your applications. The source code for the skin classes can be found under the "<Extracted_API_Download_Location>/skins/src" folder

组件的skin类定义了一个可视化组件的外观。重定义组件的skin类能够让你改变组件的可视化外观而不会影响组件的业务逻辑或者组件的行为。 为组件创建一个唯一的外观涉及到创建一个新的skinclass或者重新定义一个已经存在的skin类。在ArcGIS API for Flex中所有组件使用的skin的源代码都包含在和API一起下载的内容里面,使用这些skin源码的组件包括:navigation, scale bar, editor, attribute inspector, template picker,等等。 可以以这些Skin作为出发点创建自定义的skin应用到你的应用程序中。在你下载的文件里面有一些可以交互使用的的皮肤,你你可以在你的应用程序里面使用这些skin。这些skin类的源代码你可以在"<Extracted_API_Download_Location>/skins/src”路径下找到

 

(refer image below).

To get a better understanding of the Adobe Flex framework's styling and skinning architecture read Adobe's Enhancing the user interface .

 

For specific information on how to change the appearance of the different ArcGIS API for Flex components, go to Navigation  or ScaleBar .

 

为了更好的理解Adobo FLEX 框架的样式架构和skin更个,阅读AdobeEnhancing the user interface.

对与如何改变ArcGIS API FOR FLEX中不同组件外观的信息,查看Navigation or ScaleBar.

Adobe References

Adobe 引用。

Landing page for Flex 4 documentation

Using Flex 4

Using Flash Builder 4

ActionScript 3.0 Reference

Learning ActionScript 3

ActionScript 3.0 Developers Guide