blob: 78c8d5bf3f49b020e50b3edcaeae0df9a9e52f5c [file] [log] [blame]
<?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:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:comps="comps.*"
xmlns:c="*"
backgroundColor="0xFFFFFF"
width="800" height="700">
<s:layout>
<s:VerticalLayout />
</s:layout>
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@font-face {
src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
fontFamily: "MyVerdana";
embedAsCFF: true;
}
@font-face {
src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
fontFamily: "MyVerdana";
fontWeight: bold;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
fontFamily: "MyVerdana";
fontStyle: italic;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-BoldItalic.ttf");
fontFamily: "MyVerdana";
fontWeight: bold;
fontStyle: italic;
embedAsCFF: true;
}
s|RichText {
fontFamily: "MyVerdana";
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
</fx:Style>
<fx:Script>
<![CDATA[
import mx.managers.PopUpManager;
import mx.core.IFlexDisplayObject;
import comps.EverythingGraphicComp;
import flash.events.MouseEvent;
public var GraphicPopUp:IFlexDisplayObject;
public function openPopUp(modalSetting:Boolean):void {
GraphicPopUp = PopUpManager.createPopUp(this, comps.EverythingGraphicComp, modalSetting);
}
public function closePopUp():void {
PopUpManager.removePopUp(GraphicPopUp);
}
public function test(event:MouseEvent):void {
text1.text = "click triggered.";
}
]]>
</fx:Script>
<s:states>
<s:State name="default" />
<s:State name="addRect" />
<s:State name="addLine" />
<s:State name="addEllipse" />
<s:State name="addPath" />
<s:State name="addGroup" />
<s:State name="setPropGraphic" />
<s:State name="setPropGroup" />
<s:State name="setPropElement" />
</s:states>
<c:GraphicModule id="module1" />
<comps:GraphicStatesComp id="hbox1" />
<mx:VBox id="vbox2">
<mx:HBox>
<s:Graphic includeIn="addRect,setPropGraphic">
<s:Rect height="200" width="300" width.setPropGraphic="200">
<s:fill>
<mx:SolidColor color="0xFFDD99" />
</s:fill>
</s:Rect>
</s:Graphic>
<s:Graphic id="imageGraphic" rotation="15">
<s:Rect id="imageRect" width="200" height="200">
<s:fill>
<s:BitmapFill source="@Embed('../../../../../Assets/Images/bluerect.jpg')" />
</s:fill>
<s:filters>
<s:DropShadowFilter quality="3" />
</s:filters>
</s:Rect>
</s:Graphic>
</mx:HBox>
<s:Graphic includeIn="addLine">
<s:Line xFrom="0" yFrom="0" xTo="120" yTo="100">
<s:stroke>
<mx:SolidColorStroke color="0xFFDD99" />
</s:stroke>
</s:Line>
</s:Graphic>
<s:Graphic includeIn="addEllipse">
<s:Ellipse width="350" height="270">
<s:fill>
<mx:SolidColor color="0xFFDD99" />
</s:fill>
</s:Ellipse>
</s:Graphic>
<s:Graphic includeIn="addPath,setPropElement">
<s:Path data="M 50,50 Q -30,100 50,150 100,230 150,150 230,100 150,50 100,-30 50,50" x.setPropElement="70" >
<s:stroke>
<mx:SolidColorStroke color="0xFFDD99" />
</s:stroke>
</s:Path>
</s:Graphic>
<s:Graphic includeIn="addGroup,setPropGroup">
<s:Group rotation.setPropGroup="-45">
<s:Rect width="200" height="130">
<s:fill>
<mx:SolidColor color="0xFFDD99" />
</s:fill>
</s:Rect>
<s:Path data="M 50,50 Q -30,100 50,150 100,230 150,150 230,100 150,50 100,-30 50,50" >
<s:stroke>
<mx:SolidColorStroke color="0xFF0000" />
</s:stroke>
</s:Path>
</s:Group>
</s:Graphic>
</mx:VBox>
<mx:TextInput id="text1" />
</s:Application>