| <?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:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" alpha.disabled="0.5"> |
| |
| <fx:Metadata> |
| [HostComponent("spark.components.ButtonBar")] |
| </fx:Metadata> |
| |
| <fx:Script> |
| <![CDATA[ |
| |
| import mx.events.StateChangeEvent; |
| |
| /** |
| * Any test case could start out in any state, depending on how the |
| * previous test failed. Therefore, we cannot switch to a state and |
| * then wait, since we may already be in that state. |
| **/ |
| public function ensureNormalState():void{ |
| if(currentState == "normal"){ |
| dispatchEvent(new Event("manualResetComplete")); |
| }else{ |
| addEventListener("currentStateChange", handleCurrentStateChange); |
| currentState = "normal"; |
| } |
| } |
| |
| private function handleCurrentStateChange(e:StateChangeEvent):void{ |
| dispatchEvent(new Event("manualResetComplete")); |
| } |
| |
| ]]> |
| </fx:Script> |
| |
| <s:states> |
| <s:State name="normal" /> |
| <s:State name="disabled" /> |
| <s:State name="state1a" /> |
| <s:State name="state1b" /> |
| </s:states> |
| |
| <fx:Declarations> |
| <fx:Component id="firstButton" > |
| <s:ButtonBarButton skinClass="spark.skins.spark.ButtonBarFirstButtonSkin" |
| width="100%" height="100%" /> |
| </fx:Component> |
| |
| <fx:Component id="middleButton" > |
| <s:ButtonBarButton skinClass="spark.skins.spark.ButtonBarMiddleButtonSkin" |
| width="100%" height="100%" /> |
| </fx:Component> |
| |
| <fx:Component id="lastButton" > |
| <s:ButtonBarButton skinClass="spark.skins.spark.ButtonBarLastButtonSkin" |
| width="100%" height="100%" /> |
| </fx:Component> |
| </fx:Declarations> |
| |
| <s:DataGroup id="dataGroup" width="100%" height="100%"> |
| <s:layout> |
| <s:TileLayout requestedColumnCount.state1a="10" requestedColumnCount.state1b="1" requestedRowCount.state1a="1" requestedRowCount.state1b="10" /> |
| </s:layout> |
| </s:DataGroup> |
| |
| </s:Skin> |