一个很好的flex主页面

 
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" initialize="application1_initializeHandler(event)">
	<fx:Script>
		<![CDATA[
			import mx.events.FlexEvent;
			import mx.formatters.DateFormatter;
			private var timer:Timer;//定义时钟组件,以显示时间
			protected function application1_initializeHandler(event:FlexEvent):void
			{
			this.showTime(null);
			this.timer=new Timer(1000);
		     timer.addEventListener(TimerEvent.TIMER,showTime);
			timer.start();
			
			}
			
			//该函数用于实时显示系统当前时间
			private function showTime(evt:TimerEvent):void
			{
			var df:DateFormatter=new DateFormatter();
			var now:Date=new Date();
			df.formatString="YYYY年MM月DD日 JJ:NN:SS";
			this.lblDateTime.text=df.format(now);
			
			}
		]]>
	</fx:Script>
	<fx:Declarations>
		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
		<fx:XMLList id="treeData">
			<root title="业务操作">
				<node title="会员增加"/>
				<node title="商品增加"/>
				<node title="会员查询"/>
				<node title="会员消费"/>
			</root>
			
			<root title="决策分析">
				<node title="会员信息柱形图"/>
				<node title="会员信息折线图"/>
			</root>
		</fx:XMLList>
	</fx:Declarations>
	<s:Panel x="166" y="31" width="950" height="521" title="会员管理系统">
		<mx:Accordion x="0" y="-1" width="200" height="488">
			<s:NavigatorContent label="导航栏" width="100%" height="100%">
				<mx:Tree width="100%" height="425" labelField="@title" dataProvider="{treeData}" borderStyle="outset">
				
				
				</mx:Tree>
			</s:NavigatorContent>
		</mx:Accordion>
		<mx:Accordion x="199" y="0" width="748" height="446">
			<s:NavigatorContent label="操作区" width="100%" height="100%">
			</s:NavigatorContent>
			
		</mx:Accordion>
		<mx:LinkButton x="871" y="-25" label="注销"/>
		<mx:LinkButton x="907" y="-24" label="退出"/>
		<s:Rect height="40" width="948" x="1" y="447">
			<s:fill>
				<s:SolidColor color="#e2edf7"/>
			</s:fill>
		</s:Rect>
		<s:Label id="lblDateTime" x="780" y="466" text=""/>
	</s:Panel>
</s:Application>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值