| <?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:View xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" title="Touch Delay"> |
| |
| <fx:Script> |
| <![CDATA[ |
| /** |
| * Changes the touchDelay style value on a few components. |
| */ |
| private function touchDelaySlider_changeHandler(event:Event):void { |
| btn.setStyle("touchDelay", touchDelaySlider.value); |
| chk.setStyle("touchDelay", touchDelaySlider.value); |
| |
| // setting touchDelay on the List isn't good enough, because it will |
| // be overridden by the Scroller's default value in it, so here we dig |
| // down deeper into the DataGroup skin part. |
| target.dataGroup.setStyle("touchDelay", touchDelaySlider.value); |
| } |
| ]]> |
| </fx:Script> |
| |
| <s:layout> |
| <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10" /> |
| </s:layout> |
| |
| <s:Label text="touchDelay" /> |
| <s:HSlider id="touchDelaySlider" minimum="0" maximum="3000" width="100%" change="touchDelaySlider_changeHandler(event)"/> |
| |
| <s:Button id="btn" label="Button" width="100%" height="100" /> |
| <s:CheckBox id="chk" label="CheckBox" width="100%" height="100" /> |
| <s:List id="target" width="100%" height="250"> |
| <s:dataProvider> |
| <s:ArrayList> |
| <fx:Array> |
| ["item 0", "item 1", "item 2", "item 3"] |
| </fx:Array> |
| </s:ArrayList> |
| </s:dataProvider> |
| </s:List> |
| |
| </s:View> |