当前位置: 首页 > news >正文

网站快速收录教程中国建设银行网站查询密码是什么意思

网站快速收录教程,中国建设银行网站查询密码是什么意思,计划网站搭建,windows怎么做网站在上一篇 中#xff0c;定义了一个最简单的SkinnableComponent并为其定义了两个Skin。 对于TransitionSkin#xff0c;需要在enable时有不同的展现方式#xff0c;这可以通过Skin State实现。 对自定义的SkinnableComponent的修改 首先在组件中定义isEnabled属性#xff1a… 在上一篇 中定义了一个最简单的SkinnableComponent并为其定义了两个Skin。 对于TransitionSkin需要在enable时有不同的展现方式这可以通过Skin State实现。   对自定义的SkinnableComponent的修改   首先在组件中定义isEnabled属性 private var _isEnabled:Boolean false; public function get isEnabled():Boolean { return _isEnabled; } public function set isEnabled(value:Boolean):void { _isEnabled value; }   然后定义SkinState元标签 [SkinState(normal)] [SkinState(enable)]   最后需要将属性值和组件状态关联起来这是通过覆盖SkinnableComponent的getCurrentSkinState方法实现的。 该方法的最初定义如下 /** * Returns the name of the state to be applied to the skin. For example, a * Button component could return the String up, down, over, or disabled * to specify the state. * * pA subclass of SkinnableComponent must override this method to return a value./p * * return A string specifying the name of the state to apply to the skin. * * langversion 3.0 * playerversion Flash 10 * playerversion AIR 1.5 * productversion Flex 4 */ protected function getCurrentSkinState():String { return null; }   在Node中需要覆盖该方法 override protected function getCurrentSkinState():String { if(isEnabled) return enable; return normal; }   完整的Node代码如下 Node.as package skinsample { [SkinState(normal)] [SkinState(enable)] import spark.components.supportClasses.SkinnableComponent; public class Node extends SkinnableComponent { public function Node() { super(); } private var _isEnabled:Boolean false; public function get isEnabled():Boolean { return _isEnabled; } public function set isEnabled(value:Boolean):void { _isEnabled value; } override protected function getCurrentSkinState():String { if(isEnabled) return enable; return normal; } } } 对Skin的修改 Skin中首先需要增加状态的声明 s:states s:State namenormal / s:State nameenable / /s:states 接下来可以指定Skin元素在哪个状态中出现默认是在所有状态中出现。XML节点和属性都可以进行指定。 对于XML节点增加includeIn属性如 s:Button top0 right0 bottom0 left0 alpha0 includeInenable,normal / 对于XML属性增加 属性名称.状态名称 指定特定状态下的属性值如 s:SolidColor color0x131313 color.enable0xff0000 /   完整的Skin代码如下 TransitionSkin.mxml ?xml version1.0 encodingutf-8? s:Skin xmlns:fxhttp://ns.adobe.com/mxml/2009 xmlns:slibrary://ns.adobe.com/flex/spark xmlns:mxlibrary://ns.adobe.com/flex/halo width400 height300 s:states s:State namenormal / s:State nameenable / /s:states s:Rect idrect radiusX4 radiusY4 top0 right0 bottom0 left0 s:fill s:SolidColor color0x131313 color.enable0xff0000 / /s:fill s:stroke s:SolidColorStroke color0x131313 weight2/ /s:stroke /s:Rect s:Button top0 right0 bottom0 left0 alpha0 includeInenable,normal/ /s:Skin   PlaceSkin.mxml ?xml version1.0 encodingutf-8? s:Skin xmlns:fxhttp://ns.adobe.com/mxml/2009 xmlns:slibrary://ns.adobe.com/flex/spark xmlns:mxlibrary://ns.adobe.com/flex/halo width400 height300 s:states s:State namenormal / s:State nameenable / /s:states s:Ellipse idellipse top0 right0 bottom0 left0 s:fill s:SolidColor color0x77CC22 / /s:fill s:stroke s:SolidColorStroke color0x131313 weight2/ /s:stroke /s:Ellipse /s:Skin   使用具有状态的组件和Skin 定义好组件和Skin后就可以使用了 NodeSample.mxml ?xml version1.0 encodingutf-8? s:WindowedApplication xmlns:fxhttp://ns.adobe.com/mxml/2009 xmlns:slibrary://ns.adobe.com/flex/spark xmlns:mxlibrary://ns.adobe.com/flex/halo xmlns:skinsampleskinsample.* fx:Script !--[CDATA[ import skinsample.TransitionSkin; ]]-- /fx:Script skinsample:Node skinClassskinsample.TransitionSkin x10 y30 width50 height50/ skinsample:Node skinClassskinsample.PlaceSkin x80 y30 width50 height50/ skinsample:Node skinClassskinsample.TransitionSkin x150 y30 width50 height50 isEnabledtrue/ /s:WindowedApplication   运行效果     转载于:https://www.cnblogs.com/holbrook/archive/2009/10/06/2357375.html
http://www.sadfv.cn/news/214942/

相关文章:

  • 销售网站平台搭建广告策划方案范文
  • 网站开发师是属于IT主体职业lnmp wordpress 500
  • 做网站的流量怎么算钱外贸开发网站开发
  • 个人网站服务器推荐白银市建设局网站王浩
  • 怎么做点击图片跳转网站电子商务网站建设与维护李建忠
  • 网站会员整合申请网站建设费用的请示
  • pc门户网站是什么意思做网站的策划书
  • 昆山做网站好的建网站与建网页的区别
  • 邙山郑州网站建设wordpress打包app
  • 网站建设经验交流材料平顶山高端网站建设
  • 农业网站建设公司wordpress4.5.3中文版
  • 大连市建设学校网站做写手一般上什么网站
  • 苏州网站开发培训专业团队口号
  • 网站开发哪里安全外发加工网app
  • 太原做网站制作wordpress怎么使用阿里图标
  • 荆门网站建设网络推广外包代理
  • 厦门市建设局网站摇号网页空间免费申请
  • 普宁做网站个人网站备案取消
  • 制作网站需要哪些技术人员wordpress api 中文文档
  • 网站建设文化平台建网站麻烦拍照备案审核多久
  • WordPress建立电商网站营销型网站.
  • 常州网站建设哪家好wordpress myqaptcha
  • 杭州建设厅网站企业建站公司排名为什么不好做
  • 网站概要设计模板wordpress.3.5
  • 在线看视频网站怎么做石家庄企业网络推广
  • 个人网站设计论文下载wordpress二维码手工
  • 网站欢迎界面设计运城市住房与城乡建设厅网站
  • 做头像的网站空白中国网站建设
  • 十堰网站推广查看网站建设工作
  • 网站初期推广淘宝客优惠券网站建设加盟官网