| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" |
| xmlns:styleTest="assets.styleTest.*" xmlns:assets="assets.*"> |
| |
| <fx:Style> |
| @namespace s "library://ns.adobe.com/flex/spark"; |
| @namespace mx "library://ns.adobe.com/flex/mx"; |
| @namespace styleTest "assets.styleTest.*"; |
| @namespace assets "assets.*"; |
| |
| /* Type selector */ |
| styleTest|ADVStyleTestClass { |
| teststyle_1_string_noinh : "testStr"; |
| teststyle_3_uint_inh : 34; |
| } |
| |
| styleTest|ADVStyleTestExtendClass { |
| testextstyle_1_string_noinh : "testextString"; |
| testextstyle_3_uint_inh : 431; |
| } |
| |
| </fx:Style> |
| |
| <fx:Script> |
| <![CDATA[ |
| import assets.styleTest.ADVStyleTestConstants; |
| import assets.styleTest.ADVStyleTestEvent; |
| import assets.styleTest.ADVStyleTestExtendClass; |
| import assets.styleTest.ADVStyleTestVo; |
| |
| import mx.events.FlexEvent; |
| |
| private var cssStyleDecl_0:String; |
| |
| public function getCssStyleDecl_0():String { |
| return this.cssStyleDecl_0; |
| } |
| |
| private var cssStyleDecl_1:String; |
| |
| public function getCssStyleDecl_1():String { |
| return this.cssStyleDecl_1; |
| } |
| |
| public function setAdvStyle():void |
| { |
| advStyleTest_method.setStyle('teststyle_1_string_noinh','testString'); |
| advStyleTest_method.setStyle('teststyle_3_uint_inh',123); |
| } |
| |
| public function clearAdvStyle():void |
| { |
| clearStyleTest.clearStyle("teststyle_1_string_noinh"); |
| clearStyleTest.clearStyle("teststyle_3_uint_inh"); |
| } |
| |
| public function testStyleDeclaration():void |
| { |
| var stylArray:Array = advextStyle.getClassStyleDeclarations(); |
| |
| cssStyleDecl_0 = (stylArray[0] as CSSStyleDeclaration).subject; |
| cssStyleDecl_1 = (stylArray[1] as CSSStyleDeclaration).subject; |
| |
| } |
| |
| ]]> |
| </fx:Script> |
| |
| <fx:Declarations> |
| <styleTest:ADVStyleTestClass id="advStyleTest_method"/> |
| |
| <styleTest:ADVStyleTestClass id="clearStyleTest" |
| teststyle_1_string_noinh="clearStr" |
| teststyle_2_number_noinh="12" |
| teststyle_3_uint_inh="345" /> |
| |
| <styleTest:ADVStyleTestExtendClass id="advextStyle"/> |
| </fx:Declarations> |
| |
| <s:Label id="label" text="{getStyle('teststyle_12_enum_string_inh')}" /> |
| |
| </s:Application> |