| <?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. |
| |
| --> |
| |
| <!-- TODO |
| Move the indicator tooltip string to a resource bundle |
| Change mx:Image to s:Image once it is ready |
| --> |
| |
| <!--- The default skin class for the Spark FormItem component. |
| |
| @see spark.components.FormItem |
| |
| @langversion 3.0 |
| @playerversion Flash 10 |
| @playerversion AIR 1.5 |
| @productversion Flex 4.5 |
| --> |
| <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:fb="http://ns.adobe.com/flashbuilder/2009" |
| alpha.disabledStates=".5"> |
| |
| <!-- host component --> |
| <fx:Metadata> |
| <![CDATA[ |
| /** |
| * @copy spark.skins.spark.ApplicationSkin#hostComponent |
| */ |
| [HostComponent("spark.components.FormItem")] |
| ]]> |
| </fx:Metadata> |
| |
| <fx:Style> |
| .labelStyle |
| { |
| fontWeight : "bold"; |
| color : #333333; |
| } |
| |
| .helpTextStyle |
| { |
| fontStyle : "italic"; |
| color : #666666; |
| } |
| |
| .errorTextStyle |
| { |
| fontStyle : "italic"; |
| color : #FE0000; |
| } |
| </fx:Style> |
| |
| <fx:Script fb:purpose="styling"> |
| <![CDATA[ |
| /** |
| * @private |
| */ |
| override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void |
| { |
| // Push backgroundColor and backgroundAlpha directly. |
| // Handle undefined backgroundColor by hiding the background object. |
| if (isNaN(getStyle("backgroundColor"))) |
| { |
| background.visible = false; |
| } |
| else |
| { |
| background.visible = true; |
| bgFill.color = getStyle("backgroundColor"); |
| bgFill.alpha = getStyle("backgroundAlpha"); |
| } |
| |
| super.updateDisplayList(unscaledWidth, unscaledHeight); |
| } |
| ]]> |
| </fx:Script> |
| |
| <s:states> |
| <s:State name="normal" /> |
| <s:State name="disabled" stateGroups="disabledStates"/> |
| <s:State name="error" stateGroups="errorStates"/> |
| <s:State name="required" stateGroups="requiredStates"/> |
| <s:State name="requiredAndDisabled" stateGroups="requiredStates, disabledStates"/> |
| <s:State name="requiredAndError" stateGroups="requiredStates, errorStates"/> |
| </s:states> |
| |
| <s:layout> |
| <s:FormItemLayout> |
| <s:constraintColumns> |
| <s:ConstraintColumn id="sequenceCol" /> |
| <s:ConstraintColumn id="labelCol" width="100"/> |
| <s:ConstraintColumn id="contentCol"/> |
| <s:ConstraintColumn id="helpCol" width="200"/> |
| </s:constraintColumns> |
| <s:constraintRows> |
| <s:ConstraintRow id="row1" height="100"/> |
| <s:ConstraintRow id="row2"/> |
| </s:constraintRows> |
| </s:FormItemLayout> |
| </s:layout> |
| |
| <!--- Defines the appearance of the FormItem's background. --> |
| <s:Rect id="background" left="0" right="0" top="0" bottom="0"> |
| <s:fill> |
| <!--- @private --> |
| <s:SolidColor id="bgFill" color="#FFFFFF"/> |
| </s:fill> |
| </s:Rect> |
| |
| <s:Label id="sequenceLabelDisplay" styleName="labelStyle" |
| left="sequenceCol:4" right="sequenceCol:4" |
| bottom="row1:4" |
| baseline="row1:0"/> |
| <s:Label id="labelDisplay" styleName="labelStyle" |
| height="100" |
| top="row1:5" |
| bottom="row1:5"/> |
| <s:Label id="rowLabel" height="150" top="row2:0" bottom="row2:0"/> |
| <!-- Don't show the error tip on the content elements --> |
| <s:Group id="contentGroup" left="contentCol:0" right="contentCol:0" > |
| </s:Group> |
| <s:Group id="helpContentGroup" styleName="helpTextStyle" excludeFrom="errorStates" |
| left="helpCol:27" right="helpCol:4" |
| top="row1:4" bottom="row1:4"/> |
| <s:RichText id="errorTextDisplay" styleName="errorTextStyle" includeIn="errorStates" |
| left="helpCol:27" right="helpCol:4" |
| bottom="row1:4" |
| baseline="row1:0" maxDisplayedLines="-1"/> |
| </s:Skin> |