| <?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. |
| |
| --> |
| <!-- http://blog.flexexamples.com/2009/09/04/setting-the-corner-radius-on-a-spark-border-container-in-flex-4/ --> |
| <s:Module name="Spark_Border_cornerRadius_test" |
| xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:s="library://ns.adobe.com/flex/spark"> |
| |
| <s:Panel title="BorderContainer Sample" width="100%" height="100%"> |
| |
| <s:layout> |
| <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/> |
| </s:layout> |
| |
| <s:VGroup id="mainGroup" width="100%" |
| horizontalCenter="50" top="10"> |
| <s:HGroup gap="50" paddingBottom="15"> |
| <s:VGroup> |
| <s:HGroup verticalAlign="middle"> |
| <s:Label text="Corner Radius:"/> |
| <s:HSlider id="slider" |
| minimum="0" |
| maximum="100" |
| value="2" /> |
| </s:HGroup> |
| <s:HGroup verticalAlign="middle"> |
| <s:Label text="Border Weight:"/> |
| <s:NumericStepper id="weight" value="3"/> |
| </s:HGroup> |
| <s:HGroup verticalAlign="middle"> |
| <s:Label text="Border Color:"/> |
| <mx:ColorPicker id="color" color="0x000000"/> |
| </s:HGroup> |
| <s:HGroup verticalAlign="middle"> |
| <s:Label text="Drop Shadow:"/> |
| <s:CheckBox id="chkShadow" selected="true"/> |
| </s:HGroup> |
| </s:VGroup> |
| |
| <s:BorderContainer id="brdr" width="200" |
| cornerRadius="{slider.value}" borderWeight="{weight.value}" |
| borderColor="{color.selectedColor}" dropShadowVisible="{chkShadow.selected}" |
| backgroundColor="0x3399ff"> |
| </s:BorderContainer> |
| </s:HGroup> |
| |
| <s:Label bottom="10" horizontalCenter="0" width="95%" verticalAlign="justify" |
| text="The Border class provides a container class that can be styled with a border and |
| a background fill or image. It has many of the same styles as HaloBorder and is used in a similar way to the |
| Halo container classes such as Box and Canvas. Examples of styles that are supported are borderWeight, borderColor, |
| backgroundColor, backgroundImage, cornerRadius and dropShadowVisible."/> |
| </s:VGroup> |
| |
| </s:Panel> |
| |
| |
| </s:Module> |