| <?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:local="Assets.*" |
| width="500" height="500"> |
| |
| <fx:Script> |
| <![CDATA[ |
| |
| import Assets.*; |
| import mx.graphics.*; |
| import spark.components.Button; |
| import spark.components.Label; |
| import spark.components.supportClasses.TextBase; |
| import mx.controls.ComboBox; |
| |
| public function addHaloCB(c:MyContainer):void{ |
| var b:ComboBox = new ComboBox(); |
| c.addElement(b); |
| } |
| |
| public function addRect(c:MyContainer):void{ |
| var r:MyRect = new MyRect(); |
| c.addElement(r); |
| } |
| |
| public function addSparkBtn(c:MyContainer):void{ |
| var b:Button = new Button(); |
| b.setStyle('skinClass', MyButtonSkin); |
| c.addElement(b); |
| } |
| |
| public function addSimpleText(c:MyContainer):void{ |
| var t:Label = new Label(); |
| t.maxWidth=10000; |
| c.addElement(t); |
| } |
| |
| public function addTextGraphic(c:MyContainer):void{ |
| var t:TextBase = new TextBase(); |
| c.addElement(t); |
| } |
| |
| ]]> |
| </fx:Script> |
| |
| <fx:Style> |
| @namespace s "library://ns.adobe.com/flex/spark"; |
| @namespace mx "library://ns.adobe.com/flex/mx"; |
| @font-face{ |
| src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf"); |
| fontFamily: myArial; |
| embedAsCFF: true; |
| } |
| |
| |
| @font-face{ |
| src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf"); |
| fontWeight: bold; |
| fontFamily: myArial; |
| embedAsCFF: true; |
| } |
| |
| @font-face{ |
| src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf"); |
| fontStyle: italic; |
| fontFamily: myArial; |
| embedAsCFF: true; |
| |
| } |
| |
| global{ |
| fontAntiAliasType: "normal"; |
| fontFamily: myArial; |
| fontSize: 12; |
| fontLookup: "embeddedCFF"; |
| kerning: "off"; |
| } |
| |
| .redText { |
| color: #FF0000; |
| fontWeight: "bold"; |
| } |
| |
| .greenFill { |
| fillColors: #FFFFFF, #0022DD; |
| } |
| |
| .redFill { |
| fillColors: #FFFFFF, #DD2200; |
| cornerRadius: 6; |
| } |
| |
| </fx:Style> |
| <local:MyContainer id="cont"/> |
| |
| <local:MyContScroller id="myScroll"/> |
| |
| <s:Button id="bindBtn" label="{cont.vl.firstIndexInView}" visible="false"/> |
| <s:Button id="lastViewBtn" label="{cont.vl.lastIndexInView}" visible="false"/> |
| <s:Button id="rowCountBtn" label="{myScroll.cont.vl.rowCount}" visible="false"/> |
| |
| <s:Button id="bindScroll" label="{myScroll.cont.vl.horizontalScrollPosition}" visible="false"/> |
| <s:Button id="bindVScroll" label="{myScroll.cont.vl.verticalScrollPosition}" visible="false"/> |
| |
| </s:Application> |