blob: 054faf5048828f26f8080da85d7a054e282c9e10 [file] [log] [blame]
<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:local="Comps.*"
backgroundColor="0xFFFFFF"
height="800" width="800">
<fx:Declarations>
<mx:Fade id="myFade1" alphaFrom="1" alphaTo="0" duration="1000" />
<mx:Fade id="myFade2" alphaFrom="0" alphaTo="1" duration="2000"/>
</fx:Declarations>
<s:layout><s:VerticalLayout/></s:layout>
<fx:Script>
<![CDATA[
import spark.components.TitleWindow;
import mx.core.IFlexDisplayObject;
import mx.managers.PopUpManager;
import spark.components.Label;
import mx.events.FlexEvent;
import comps.*;
public var defaultTW:TitleWindow, twObject:TitleWindow;
public var childWindowList:Array=new Array();
public function createDefault():void
{
defaultTW = new TitleWindow();
defaultTW.title="From PopUpManager...";
defaultTW.width = 250;
defaultTW.height = 150;
defaultTW.x = 300;
defaultTW.y = 10;
PopUpManager.addPopUp(defaultTW, this, false);
defaultTW.addEventListener("close", closeHandler);
defaultTW.addEventListener("creationComplete", handleTWCreationComplete);
}
public function createTitleWindowByClass(c:Class, title:String,yPos:Number=100):TitleWindow
{
var win:TitleWindow=new c();
c(win).y=yPos;
c(win).x=100;
win.title=title;
win.width=400;
win.height=400;
win.addEventListener("creationComplete", handleTWCreationComplete);
win.addEventListener("close", closeHandler);
PopUpManager.addPopUp(win, this, false);
return win;
}
public function createTitleWindowByClass2(c:Class, title:String,creationPolicy:String):TitleWindow
{
var win:TitleWindow=new c();
win.title=title;
win.width=400;
win.x=100;
win.height=400;
if (c is TitleWindowWithDeferredContent)
{
TitleWindowWithDeferredContent(win).policy=creationPolicy;
}
win.addEventListener("creationComplete", handleTWCreationComplete);
win.addEventListener("close", closeHandler);
PopUpManager.addPopUp(win, this, false);
return win;
}
public function createTitleWindowNoSize(c:Class, title:String,yPos:Number=100):TitleWindow
{
var win:TitleWindow=new c();
c(win).y=yPos;
c(win).x=100;
win.title=title;
win.addEventListener("creationComplete", handleTWCreationComplete);
win.addEventListener("close", closeHandler);
PopUpManager.addPopUp(win, this, false);
return win;
}
public function createTitleWindowNoPopUp(c:Class, title:String,yPos:Number=100):TitleWindow
{
var win:TitleWindow=new c();
c(win).y=yPos;
c(win).x=100;
win.title=title;
win.addEventListener("creationComplete", handleTWCreationComplete);
win.addEventListener("close", closeHandler);
return win;
}
public function addPopUp(tw:TitleWindow, x:Number=100, y:Number=100):void
{
tw.x=x;
tw.y=y;
tw.addEventListener("creationComplete", handleTWCreationComplete);
tw.addEventListener("close", closeHandler);
PopUpManager.addPopUp(tw, this, false);
}
public function handleTWCreationComplete(e:FlexEvent):void
{
childWindowList.push(e.currentTarget);
e.currentTarget.removeEventListener("creationComplete", handleTWCreationComplete);
dispatchEvent(new FlexEvent("TitleWindowComplete"));
}
public function closeHandler(event:Event):void
{
event.target.removeEventListener("close", closeHandler);
PopUpManager.removePopUp(event.target as IFlexDisplayObject);
}
public function closePopUPs():void
{
var win:TitleWindow=null;
while(childWindowList.length>0)
{
win=TitleWindow(childWindowList.pop());
PopUpManager.removePopUp(win);
win=null;
}
}
]]>
</fx:Script>
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace c "comps.*";
@font-face {
src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
fontFamily: MyVera;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
fontFamily: MyVera;
fontStyle: italic;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
fontFamily: MyVera;
fontWeight: bold;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
fontFamily: MyArialHalo;
embedAsCFF: false;
}
@font-face {
src: url("../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
fontFamily: MyArialHalo;
fontStyle: italic;
embedAsCFF: false;
}
@font-face {
src: url("../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
fontFamily: MyArialHalo;
fontWeight: bold;
embedAsCFF: false;
}
@font-face {
src: url("../../../../../Assets/Fonts/Cousine/Cousine-Regular.ttf");
fontFamily: EmbeddedMeiryo;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../Assets/Fonts/Cousine/Cousine-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedMeiryo;
embedAsCFF: true;
}
.dbFont1{
fontFamily: "EmbeddedMeiryo";
fontLookup: embeddedCFF;
fontSize: 12;
fontAntiAliasType: normal;
}
mx|Accordion,
mx|RadioButton,
mx|CheckBox,
mx|List,
mx|DataGrid,
mx|Button,
mx|Text,
mx|TextInput,
mx|Label,
mx|NumericStepper,
mx|Form,
mx|ToolTip{
fontAntiAliasType: "normal";
fontFamily: MyArialHalo;
fontSize: 12;
}
s|TitleWindow,
s|Panel,
s|HSlider,
s|VSlider,
s|Label,
s|CheckBox,
s|TextInput
s|NumericStepper,
s|Button,
s|TextArea,
s|DropDownList,
s|List{
fontAntiAliasType: "normal";
fontFamily: MyVera;
fontSize: 12;
fontLookup: "embeddedCFF";
}
</fx:Style>
</s:Application>