- 浏览: 784544 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (360)
- Java (101)
- JPA/Hibernate (10)
- Spring (14)
- Flex/BlazeDS (37)
- Database (30)
- Lucene/Solr/Nutch (0)
- Maven/Ant (25)
- CXF/WebService (3)
- RPC/RMI/SOAP/WSDL (1)
- REST (6)
- TDD/BDD/JUnit (1)
- Servlet/JSP (2)
- AI/MachineLearning (3)
- Resource (1)
- 字符编码 (2)
- OOA/OOPS/UML (5)
- DesignPattern (8)
- 算法与数据结构 (11)
- Web&App Server (13)
- 并发&异步&无阻塞 (7)
- Entertainment (4)
- JavaScript/ExtJS (45)
- CodeStyle&Quality (1)
- svn/git/perforce (8)
- JSON (2)
- JavaScriptTesting (4)
- Others (6)
- RegularExpression (2)
- Linux/Windows (12)
- Protocal (2)
- Celebrities (1)
- Interview (1)
- 计算机语言 (1)
- English (2)
- Eclipse (5)
- TimeZone/时区 (1)
- Finance (1)
- 信息安全 (1)
- JMS/MQ (2)
- XSD/XML/DTD (3)
- Android (4)
- 投资 (3)
- Distribution (3)
- Excel (1)
最新评论
-
qdujunjie:
如果把m换成具体的数字,比如4或者5,会让读者更明白
m阶B树中“阶”的含义 -
java-admin:
不错,加油,多写点文章
关于Extjs的mixins和plugin -
xiehuaidong880827:
你好,我用sencha cmd打包完本地工程后,把app.js ...
ExtJS使用Sencha Cmd合并javascript文件为一个文件 -
KIWIFLY:
lwpan 写道inverse = "true&qu ...
Hibernate中什么时候使用inverse=true -
luedipiaofeng:
good
消除IE stop running this script弹出框
If you define a style in only one place in a document, Flex uses that definition to set a property’s value. However, an application can have several style sheets, local style definitions, external style properties, and style properties set directly on component instances. In such a situation, Flex determines the value of a property by looking for its definition in all these places in a specific order.
Lower-level styles take precedence over higher-level or external styles. If you set a style on an instance, and then set the style globally, the global style does not override the local style, even if you set it after you set the local style.
Style inheritance order
The order in which Flex looks for styles is important to understand so that you know which style properties apply to which controls.
Flex looks for a style property that was set inline on the component instance. If no style was set on the instance using an inline style, Flex checks if a style was set using an instance’s setStyle() method. If it did not directly set the style on the instance, Flex examines the styleName property of the instance to see if a style declaration is assigned to it.
If you did not assign the styleName property to a style declaration, Flex looks for the property on type selector style declarations. If there are no type selector declarations, Flex checks the global selector. If all of these checks fail, the property is undefined, and Flex applies the default style.
In the early stages of checking for a style, Flex also examines the control’s parent container for style settings. If the style property is not defined and the property is inheritable, Flex looks for the property on the instance’s parent container. If the property isn’t defined on the parent container, Flex checks the parent’s parent, and so on. If the property is not inheritable, Flex ignores parent container style settings.
The order of precedence for style properties, from first to last, is as follows:
If you later call the setStyle() method on a component instance, that method takes precedence over all style settings, including inline.
Style definitions in <fx:Style> tags, external style sheets, and the defaults.css style sheet follow an order of precedence. The same style definition in defaults.css is overridden by an external style sheet that is specified by an <fx:Style source="stylesheet"/> tag, which is overridden by a style definition within an <fx:Style> tag.
注意点,如果你用styleManager.loadStyleDeclarations("assets/dynamicStyle.swf",true)的方式动态加载样式,那么动态加载的样式在生命周期内将会覆盖上述定义的样式,当然如果某些样式并没有出现在动态加载的样式里面,当然是不会被覆盖的,可以多次动态加载样式。
Lower-level styles take precedence over higher-level or external styles. If you set a style on an instance, and then set the style globally, the global style does not override the local style, even if you set it after you set the local style.
Style inheritance order
The order in which Flex looks for styles is important to understand so that you know which style properties apply to which controls.
Flex looks for a style property that was set inline on the component instance. If no style was set on the instance using an inline style, Flex checks if a style was set using an instance’s setStyle() method. If it did not directly set the style on the instance, Flex examines the styleName property of the instance to see if a style declaration is assigned to it.
If you did not assign the styleName property to a style declaration, Flex looks for the property on type selector style declarations. If there are no type selector declarations, Flex checks the global selector. If all of these checks fail, the property is undefined, and Flex applies the default style.
In the early stages of checking for a style, Flex also examines the control’s parent container for style settings. If the style property is not defined and the property is inheritable, Flex looks for the property on the instance’s parent container. If the property isn’t defined on the parent container, Flex checks the parent’s parent, and so on. If the property is not inheritable, Flex ignores parent container style settings.
The order of precedence for style properties, from first to last, is as follows:
- Inline
- Class selector
- Type selectors (most immediate class takes precedence when multiple selectors apply the same style property)
- Ancestor class’s type selector
- Parent chain (inheriting styles only)
- Theme defaults.css file
- global selector
If you later call the setStyle() method on a component instance, that method takes precedence over all style settings, including inline.
Style definitions in <fx:Style> tags, external style sheets, and the defaults.css style sheet follow an order of precedence. The same style definition in defaults.css is overridden by an external style sheet that is specified by an <fx:Style source="stylesheet"/> tag, which is overridden by a style definition within an <fx:Style> tag.
注意点,如果你用styleManager.loadStyleDeclarations("assets/dynamicStyle.swf",true)的方式动态加载样式,那么动态加载的样式在生命周期内将会覆盖上述定义的样式,当然如果某些样式并没有出现在动态加载的样式里面,当然是不会被覆盖的,可以多次动态加载样式。
发表评论
-
Panel高度为0但里面的组件依旧显示
2013-04-24 14:34 1082解决办法: 把Panel中的内容组件用<s:Scroll ... -
约束布局constraint layout
2013-03-01 14:02 1786约束布局constraint layout要点: 1)只有支持 ... -
根据屏幕分辨率动态调整组件大小
2013-02-22 17:34 1514将代码写在组件的preInitialize事件监听器里面 简化 ... -
设置Flex组件的尺寸大小
2013-02-21 16:17 1530深红色部分标明了需注意的地方 另外要注意组件和容器的生命周 ... -
Flex minWidth minHeight
2013-02-04 16:17 1516minWidth 这个值并不是给组件自己用的,而是给组件的父容 ... -
ActionScript遍历绑定(BindProperty,BindSetter,ChangeWatcher)
2013-02-01 10:11 2444注意: 为防止内存益处,记得调用watcherInstance ... -
Flex程序适应不同屏幕尺寸和分辨率(滚动条)
2013-01-31 15:02 9760FlashBuilder编译后自动生成的xx.html里面定义 ... -
FlexContext, FlexClient,FlexSession
2013-01-15 15:05 2367使用了BlazeDS后,可以从FlexContext中获取一系 ... -
防止RemoteObject批处理AMF消息
2013-01-14 17:01 1254问题描述: 如果你在短时内调用同一个java对象上的两个方法, ... -
自动检测http和https的RemoteObject
2013-01-13 10:30 1729package { import util.Bro ... -
flex浏览器相关辅组类
2012-12-06 13:39 1247package util { import flash. ... -
Flex可变参数带来的问题
2012-12-06 13:34 1486当你在flex的方法中用了可变参数后,你会发现这些参数传到ja ... -
flex如何通过类名称实例化对象
2012-11-30 13:52 2728Getting the class from an objec ... -
flexlib的treeGrid用法
2012-11-30 13:46 1263为了使用treeGrid,通常你需要定义自己的DataDesc ... -
自定义flex tree的DataDescriptor
2012-11-30 13:42 1399public class EnvironmentDataDes ... -
关于Boolean类型在flex与java中间传递的问题
2012-11-30 13:38 1251/** *为简化,只列举两个字段 */ publi ... -
给Flex的Tree赋值方式(XML和ArrayCollection)
2012-11-30 09:33 40181)方式一,mxml内嵌xml数据赋值方式,Embedded ... -
Custom Alert
2012-11-26 19:21 0<?xml version="1.0&qu ... -
Flex服务端分页
2012-11-14 17:00 1046Structure: model event ... -
Flex可携带数据的Aler组件(DataCarriableAlert)
2012-11-14 16:52 1308package component.alert { ...
相关推荐
flex类继承关系图 flex类继承关系图
Flex Style Explorer V2.0.1 和 V3.0 版 Flex Style Explorer V2.0.1 和 V3.0 版
Flex Style Explorer 3 是flex 开发中重要的样式所及即所得的工具,不会写样式的朋友可以用它来修改自己控件的样式,达到满意的风格。
时刻需要对容器、组件等显示样式进行定义,以达到美观的目的 ,flex bulider自己本身也支持 所见即所得的开发方式,但是支持力度不够对容器、组件的样式定义,我们常用的就是Flex3 Style Explorer. 这是adobe官方的...
flex的样式使用,该实例的应用,为以后实际应用开发中起了承上启下的作用,即作为入门材料。初学者可以很好的接收。
Flex Style很酷例子,来下载! Flex Style很酷例子,来下载!
flex style 很酷的例子,快来下载吧
flash build4.0继承实例源代码,该例子演示了flex中类的继承关系,应用程序还演示了is 和as 关键字的用法 备注:1.该项目名为Ztest6, 2.mxml应用程序为t1_extends.mxml,
Flex Style Exlplorer plugin for flash MX
flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图flex 地图...
可视化编辑样式,Flex 3 CSS style 设计器Flex 3 CSS style 设计器
FLEX特效FLEX特效FLEX特效FLEX特效 FLEX特效FLEX特效FLEX特效FLEX特效 FLEX特效FLEX特效FLEX特效FLEX特效 FLEX特效FLEX特效FLEX特效FLEX特效
Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex Flex ...
Flex简介Flex简介Flex简介Flex简介Flex简介
flex事件flex事件flex事件flex事件flex事件
flex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex 精通 flexflex学习的好资源啊
flex样式定义器flex样式定义器flex样式定义器flex样式定义器
Flex3.Style.Explorer.V3.0.Beta
很强大的flex_css工具集,详细介绍FLEX中各种组件样式及演示。