| <?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. |
| |
| --> |
| <!--- The default skin class for the Spark DropDownList component. |
| The skin for the anchor button for a DropDownList component |
| is defined by the DropDownListButtonSkin class. |
| |
| @see spark.components.DropDownList |
| @see spark.skins.spark.DropDownListButtonSkin |
| |
| @langversion 3.0 |
| @playerversion Flash 10 |
| @playerversion AIR 1.5 |
| @productversion Flex 4 |
| --> |
| <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled=".5"> |
| |
| <!-- host component --> |
| <fx:Metadata> |
| <![CDATA[ |
| /** |
| * @copy spark.skins.spark.ApplicationSkin#hostComponent |
| */ |
| [HostComponent("spark.components.DropDownList")] |
| ]]> |
| </fx:Metadata> |
| |
| <fx:Script fb:purpose="styling"> |
| <![CDATA[ |
| |
| /** |
| * @private |
| */ |
| override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void |
| { |
| if (getStyle("borderVisible") == false) |
| { |
| if (border) |
| border.visible = false; |
| if (background) |
| { |
| background.left = background.top = background.right = background.bottom = 0; |
| } |
| if (scroller) |
| scroller.minViewportInset = 0; |
| } |
| else |
| { |
| if (border) |
| border.visible = true; |
| if (background) |
| { |
| background.left = background.top = background.right = background.bottom = 1; |
| } |
| if (scroller) |
| scroller.minViewportInset = 1; |
| } |
| |
| if (dropShadow) |
| dropShadow.visible = getStyle("dropShadowVisible"); |
| |
| openButton.setStyle("cornerRadius", getStyle("cornerRadius")); |
| |
| if (borderStroke) |
| { |
| borderStroke.color = getStyle("borderColor"); |
| borderStroke.alpha = getStyle("borderAlpha"); |
| } |
| super.updateDisplayList(unscaledWidth, unscaledHeight); |
| } |
| ]]> |
| </fx:Script> |
| |
| <s:states> |
| <s:State name="normal" /> |
| <s:State name="open" /> |
| <s:State name="disabled" /> |
| </s:states> |
| |
| <!--- |
| The PopUpAnchor control that opens the drop-down list. |
| --> |
| <s:PopUpAnchor id="popUp" displayPopUp.normal="false" displayPopUp.open="true" includeIn="open" |
| left="0" right="0" top="0" bottom="0" itemDestructionPolicy="auto" |
| popUpPosition="below" popUpWidthMatchesAnchorWidth="true"> |
| |
| <!--- |
| The drop down area of the skin. |
| This includes borders, background colors, scrollers, and filters. |
| --> |
| <s:Group id="dropDown" maxHeight="134" minHeight="22" > |
| |
| <!-- drop shadow --> |
| <s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.6" distance="5" |
| angle="90" color="#000000" left="0" top="0" right="0" bottom="0"/> |
| |
| <!-- border --> |
| <s:Rect id="border" left="0" right="0" top="0" bottom="0"> |
| <s:stroke> |
| <s:SolidColorStroke id="borderStroke" weight="1" color="0x82826b" /> |
| </s:stroke> |
| </s:Rect> |
| |
| <!-- fill --> |
| <!--- |
| Defines the appearance of drop-down list's background fill. |
| --> |
| <s:Rect id="background" left="1" right="1" top="1" bottom="1" > |
| <s:fill> |
| <!--- |
| The color of the drop down's background fill. |
| The default color is 0xFFFFFF. |
| --> |
| <s:SolidColor id="bgFill" color="0xf3f4de" /> |
| </s:fill> |
| </s:Rect> |
| |
| <s:Scroller id="scroller" left="0" top="0" right="0" bottom="0" hasFocusableChildren="false" minViewportInset="1"> |
| <!--- |
| The container for the data items in the drop-down list. |
| --> |
| <s:DataGroup id="dataGroup" itemRenderer="zen.skins.DefaultItemRenderer"> |
| <s:layout> |
| <s:VerticalLayout gap="0" horizontalAlign="contentJustify"/> |
| </s:layout> |
| </s:DataGroup> |
| </s:Scroller> |
| </s:Group> |
| </s:PopUpAnchor> |
| |
| <!--- The anchor button used by the DropDownList. The default skin is DropDownListButtonSkin. --> |
| <s:Button id="openButton" left="0" right="0" top="0" bottom="0" focusEnabled="false" |
| skinClass="zen.skins.DropDownListButtonSkin" /> |
| <!--- The prompt area of the DropDownList. --> |
| <s:Label id="labelDisplay" verticalAlign="middle" maxDisplayedLines="1" |
| mouseEnabled="false" mouseChildren="false" |
| left="7" right="30" top="2" bottom="2" width="75" verticalCenter="1" color="0xEEEFC4"/> |
| |
| </s:Skin> |