blob: 46f634e4f4262b8cc8c326e4b7929874a298790e [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.
-->
<mx:Application height="600" width="700"
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.*"
backgroundColor="0xFFFFFF" initialize="loadCSS()">
<fx:Script>
<![CDATA[
import mx.core.IFlexDisplayObject;
import mx.events.StyleEvent;
import mx.managers.PopUpManager;
import mx.styles.StyleManager;
import mx.core.EmbeddedFontRegistry; EmbeddedFontRegistry;
public var iPopUp:IFlexDisplayObject;
public var newBox:HBox;
public function openWindow(modalSetting:Boolean):void
{
iPopUp = PopUpManager.createPopUp(this, comps.HBoxComp, modalSetting, "popup");
}
public function closeWindow():void
{
PopUpManager.removePopUp(iPopUp);
}
public var eventDispatcher:IEventDispatcher;
public function loadCSS(): void
{
if (moduleLoaded)
{
dispatchEvent(new Event("moduleReady"));
return;
}
eventDispatcher = StyleManager.loadStyleDeclarations("assets/classStyles.swf");
eventDispatcher.addEventListener(StyleEvent.COMPLETE, completeHandler);
}
private var moduleLoaded:Boolean = false;
private function completeHandler(event:Event):void
{
moduleLoaded = true;
dispatchEvent(new Event("moduleReady"));
}
]]>
</fx:Script>
<mx:HBox id="hbox1" width="20" height="30" styleName="pinkBox" />
<mx:HBox id="hbox2" width="20" height="30" />
<mx:VBox id="vbox1" width="20" height="30" styleName="pinkBox" />
<mx:Canvas id="canvas1" width="20" height="30" styleName="blueBox" />
<mx:VBox>
<mx:Panel>
<mx:HBox id="hbox3" width="20" height="30" styleName="pinkBox" />
</mx:Panel>
</mx:VBox>
<mx:Module>
<comps:HBoxComp id="hbox_module" />
</mx:Module>
<mx:Tile>
<mx:Button id="button2" label="button two" styleName="submitButton" />
<mx:Button id="button1" label="button one" />
<mx:Button id="button3" label="button three" styleName="submitButton" />
</mx:Tile>
<mx:HBox>
<mx:Button label="What color am I?" id="main_button1"/>
<mx:Button label="What color am I?" id="main_button2" styleName="submitButton" />
<mx:DateField id="myDateField" styleName="redDate" creationComplete="myDateField.selectedDate=new Date(2008, 5, 1)"/>
<mx:DateField id="myDateField2" styleName="redDate" creationComplete="myDateField2.selectedDate=new Date(2008, 6, 1)"/>
</mx:HBox>
<s:Button id="openButton" label="open pop up" click="openWindow(false)"/>
<s:Button id="closeButton" label="close pop up" click="closeWindow()"/>
<mx:VBox>
<mx:HBox id="greenContainer">
<mx:Canvas id="greenCanvas" width="10" height="10" styleName="greenBox" />
<mx:Box id="greenBox" width="10" height="10" styleName="greenBox" />
<mx:VBox id="greenVBox" width="10" height="10" styleName="greenBox" />
<mx:VBox id="whiteVBox" width="10" height="10" />
</mx:HBox>
<mx:HBox>
<mx:Text id="text1" text="I am not red" />
<mx:Label id="label1" text="I am not red" />
<mx:Text id="text2" text="I am red" styleName="italicFont" />
<mx:Label id="label2" text="I am red" styleName="italicFont" />
</mx:HBox>
</mx:VBox>
<mx:Canvas id="canvas2" width="10" height="10" styleName="greenBox" borderStyle="solid"/>
<mx:ApplicationControlBar horizontalGap="5" styleName="iconAdditionStyle">
<mx:Button label="snowman" id="acb_button1" />
<mx:Button label="trees" id="acb_button2" styleName="iconAdditionStyle2" />
<mx:Button label="toys" id="acb_button3" />
</mx:ApplicationControlBar>
</mx:Application>