package com.xt.hb.utils
{
	import avmplus.getQualifiedClassName;
	
	import flash.display.DisplayObject;
	import flash.net.registerClassAlias;
	import flash.utils.ByteArray;
	import flash.utils.getDefinitionByName;
	
	import mx.charts.ColumnChart;
	import mx.collections.ArrayCollection;
	import mx.collections.ArrayList;
	import mx.containers.Grid;
	import mx.containers.GridItem;
	import mx.containers.GridRow;
	import mx.containers.utilityClasses.ConstraintColumn;
	import mx.controls.Alert;
	import mx.controls.Label;
	import mx.core.FlexGlobals;
	import mx.effects.Fade;
	import mx.formatters.DateFormatter;
	import mx.managers.PopUpManager;
	
	import spark.components.BorderContainer;
	import spark.components.TitleWindow;
	import spark.effects.Scale;
	
	public class CommonUtility
	{
		public function CommonUtility()
		{
		}
		
		
		public static function showTitleWindow(win:TitleWindow,model:Boolean = true,x:Number = -1,y:Number = -1):void
		{
			PopUpManager.addPopUp(win,DisplayObject(FlexGlobals.topLevelApplication),model);
			PopUpManager.centerPopUp(win);
			if(x > 0 && y > 0)
			{
				win.x = x;
				win.y = y;
			}
			//			window.x=FlexGlobals.topLevelApplication.stage.stageWidth/2-window.width/2;  
			//			window.y=FlexGlobals.topLevelApplication.stage.stageHeight/2-window.height/2;
			var scale:Scale = new Scale();
			//scale.autoCenterTransform = true;    //设置以中心点缩放
			scale.target = win;　　　　//设置Scale的作用对象为windowView
//			scale.duration = 500;　　　　　　//设置效果的持续时间
//			scale.scaleXFrom = 0;　　　　　　//设置scaleX和scaleY的起始，终点大小
//			scale.scaleXTo = 1;
//			scale.scaleYFrom = 0;
//			scale.scaleYTo = 1;
			scale.play();
			//scale.addEventListener(EffectEvent.EFFECT_END,函数名) 
		}
	}
}