blob: ce53b2e33ef508c091d66cc3acf7632f74193636 [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.
-->
<!-- Christophe Coenraets, http://coenraets.org -->
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:charts="charts.*"
xmlns:views="views.*"
destructionPolicy="never" xmlns:components="components.*">
<fx:Script>
<![CDATA[
import mx.core.FlexGlobals;
override public function setCurrentState(stateName:String, playTransition:Boolean=true):void
{
if (stateName == "landscape")
{
if (FlexGlobals.topLevelApplication.height<500)
super.setCurrentState("landscapeSmall", playTransition);
else if (FlexGlobals.topLevelApplication.height<600)
super.setCurrentState("landscapeMedium", playTransition);
else
super.setCurrentState("landscapeLarge", playTransition);
}
else
{
super.setCurrentState(stateName, playTransition);
}
}
]]>
</fx:Script>
<fx:Declarations>
<s:CurrencyFormatter id="cf" useCurrencySymbol="true" fractionalDigits="0" />
<s:NumberFormatter id="nf" fractionalDigits="2" />
</fx:Declarations>
<s:states>
<s:State name="portrait"/>
<s:State name="landscape"/>
<s:State name="landscapeLarge"/>
<s:State name="landscapeMedium"/>
<s:State name="landscapeSmall"/>
<s:State name="landscapeHistory"/>
</s:states>
<s:Label text="Summary" top="16" left="20" fontSize="24" excludeFrom="landscapeMedium"
color="#646464"
color.landscapeHistory="#999999"
click.landscapeHistory="currentState='landscapeSmall'"/>
<components:AssetsSummary id="assetsSummary" top="50" top.landscapeMedium="16" left="20" right="20" excludeFrom="landscapeHistory"/>
<s:Label text="Performance History" top="240" left="20" fontSize="24" excludeFrom="landscapeMedium"
color="#646464"
color.landscapeSmall="#999999"
mouseDown.landscapeSmall="currentState='landscapeHistory'"
top.landscapeSmall="16" left.landscapeSmall="170"
top.landscapeHistory="16" left.landscapeHistory="170" />
<charts:PortfolioChart id="chart" top="280" top.landscapeMedium="200" left="20" right="20" bottom="28"
excludeFrom="landscapeSmall" top.landscapeHistory="50" bottom.landscapeMedium="10"/>
<s:Label bottom="4" text="Swipe/zoom to navigate chart. Rotate device for bigger chart" fontSize="16" color="#AAAAAA" horizontalCenter="0" includeIn="portrait"/>
<s:Label bottom="4" text="Swipe/zoom to navigate chart." fontSize="16" color="#AAAAAA" horizontalCenter="0" includeIn="landscapeLarge,landscapeHistory"/>
<s:Label bottom="4" text="Rotate device for combined view." fontSize="16" color="#AAAAAA" horizontalCenter="0" includeIn="landscapeSmall"/>
</s:View>