<?xml version="1.0" encoding="utf-8"?>
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" 
			   xmlns:tree="com.tree.*"
			   skinClass="com.skins.tdt.TitleWinSkin"
			   title="图层控制"   close="{PopUpManager.removePopUp(this);}"
			   width="260" height="410" xmlns:common="port.common.*">

	<fx:Style>
		.infoStyleName
		{
			backgroundColor:#f8facb;
		}
		
	</fx:Style>
	
	<fx:Declarations>
		<!-- 将非可视元素（例如服务、值对象）放在此处 -->
	</fx:Declarations>
	
	<fx:Script>
		<![CDATA[
			
			import mx.events.FlexEvent;
			
			[Bindable]
			[Embed(source="flexResources/views/folderClosed.png")]
			private var myFolderClosedIcon:Class;
			
			[Bindable]
			[Embed(source="flexResources/views/FolderOpened.png")]
			private var myFolderOpenedIcon:Class;
			
			import com.supermap.framework.events.BaseEventDispatcher;
			import com.xt.hb.events.TCKZCheckBoxClickEvent;
			import mx.managers.PopUpManager;
			import spark.events.IndexChangeEvent;
			import mx.events.FlexEvent;
			import mx.core.FlexGlobals;
			
			public var  checkBoxClickHandler:Function = null;
			
			
			/* private function resetGridHeight(event:Event):void
			{
				changeHeight(event.target);
			} */
			
			/* public function changeHeight(data:Object):void
			{
				if(data is Canvas)
				{
					var can:Canvas = data as Canvas;
					if(can.getChildren().length > 0)
					{
					
						 if(can.id == "grid_ZYMTBW")
						 {
							 this.tree_ZYMTBW.callLater(expandBWTreeNodes);
						 }
					
					}
				}
			}  */
			
			private function expandAXTreeNodes():void
			{
				//this.tree_AXZY.expandChildrenOf(FlexGlobals.topLevelApplication.M_ZYZS_AX_XML,true);
			}
			
			/* private function expandBWTreeNodes():void
			{
				this.tree_ZYMTBW.expandChildrenOf(FlexGlobals.topLevelApplication.M_ZYZS_BW_XML,true);
			} */
	
			private function checkBox_click(event:Event):void
			{
//				BaseEventDispatcher.getInstance().dispatchEvent(new TCKZCheckBoxClickEvent(TCKZCheckBoxClickEvent.TCKZ_TreeNodeCheckBox_Click,event.currentTarget));
				if(null != checkBoxClickHandler)
				{
					checkBoxClickHandler(event);
				}
			}
		
			
			
		
			
		]]>
	</fx:Script>
	<s:VGroup width="100%" height="100%" >
		<tree:CheckLegendTree width="100%" height="100%" borderVisible="false" checkBoxStateField="@checkState"
							  dataProvider="{FlexGlobals.topLevelApplication.M_ZYZS_TCKZ_XML}" defaultLeafIcon="{null}"
							  disclosureClosedIcon="{myFolderClosedIcon}" disclosureOpenIcon="{myFolderOpenedIcon}" folderClosedIcon="{null}" contentBackgroundColor="#F5FAFE"
							  folderOpenIcon="{null}" itemClick="checkBox_click(event)" labelField="@cdmc" legendField="@cdtb"
							  legendHeight="32" legendType="ICON" legendWidth="50" rowHeight="32" showRoot="false"/>
	</s:VGroup>
	
	<!--<mx:Accordion id="accordion" visible="true" width="100%" height="100%" accentColor="0" borderVisible="false" backgroundColor="#F5FAFE"
				  headerHeight="32" historyManagementEnabled="false" includeInLayout="true">
		
		<mx:Canvas id="grid_GQFB" width="100%" height="100%" label="港区、作业区" creationComplete="resetGridHeight(event);" horizontalScrollPolicy="off" backgroundColor="#F5FAFE"
				   verticalScrollPolicy="auto">
			<tree:CheckLegendTree width="100%" height="100%" borderVisible="false" checkBoxStateField="@STATE"
								  dataProvider="{FlexGlobals.topLevelApplication.M_ZYZS_GQFB_XML}" defaultLeafIcon="{null}"
								  disclosureClosedIcon="{myFolderClosedIcon}" disclosureOpenIcon="{myFolderOpenedIcon}" folderClosedIcon="{null}" contentBackgroundColor="#F5FAFE"
								  folderOpenIcon="{null}" itemClick="checkBox_click(event)" labelField="@CDMC" legendField="@CDTB"
								  legendHeight="32" legendType="ICON" legendWidth="32" rowHeight="32" showRoot="false"/>
		</mx:Canvas>
	<mx:Canvas id="grid_AXZY" width="100%" height="100%" label="岸线资源" creationComplete="resetGridHeight(event);" horizontalScrollPolicy="off" backgroundColor="#F5FAFE"
				   verticalScrollPolicy="auto">
			<tree:CheckLegendTree id="tree_AXZY" width="100%" height="100%" borderVisible="false" checkBoxStateField="@STATE"
								  dataProvider="{FlexGlobals.topLevelApplication.M_ZYZS_AX_XML}" defaultLeafIcon="{null}"
								  disclosureClosedIcon="{myFolderClosedIcon}" disclosureOpenIcon="{myFolderOpenedIcon}" folderClosedIcon="{null}"  contentBackgroundColor="#F5FAFE"
								  folderOpenIcon="{null}" itemClick="checkBox_click(event)" labelField="@CDMC" legendField="@CDTB"
								  legendHeight="32" legendRight="18" legendType="ICON" legendWidth="32" rowHeight="32" showRoot="false"/>
		</mx:Canvas>
		<mx:Canvas id="grid_MDZY" width="100%" height="100%" label="锚地资源" creationComplete="resetGridHeight(event);" horizontalScrollPolicy="off"  backgroundColor="#F5FAFE"
				   verticalScrollPolicy="auto">
			<tree:CheckLegendTree width="100%" height="100%" borderVisible="false" checkBoxStateField="@STATE"
								  dataProvider="{FlexGlobals.topLevelApplication.M_ZYZS_MD_XML}" defaultLeafIcon="{null}"
								  disclosureClosedIcon="{myFolderClosedIcon}" disclosureOpenIcon="{myFolderOpenedIcon}" folderClosedIcon="{null}" contentBackgroundColor="#F5FAFE"
								  folderOpenIcon="{null}" itemClick="checkBox_click(event)" labelField="@CDMC" legendField="@CDTB"
								  legendHeight="32" legendType="ICON" legendWidth="32" rowHeight="32" showRoot="false"/>
		</mx:Canvas>
		<mx:Canvas id="grid_ZYMTBW" width="100%" height="100%" label="码头泊位" creationComplete="resetGridHeight(event);" horizontalScrollPolicy="off" backgroundColor="#F5FAFE"
				   verticalScrollPolicy="auto">
			<tree:CheckLegendTree id="tree_ZYMTBW" width="100%" height="100%" borderVisible="false" checkBoxStateField="@STATE"
								  dataProvider="{FlexGlobals.topLevelApplication.M_ZYZS_BW_XML}" defaultLeafIcon="{null}"
								  disclosureClosedIcon="{myFolderClosedIcon}" disclosureOpenIcon="{myFolderOpenedIcon}" folderClosedIcon="{null}" contentBackgroundColor="#F5FAFE"
								  folderOpenIcon="{null}" itemClick="checkBox_click(event)" labelField="@CDMC" legendField="@CDTB"
								  legendHeight="32" legendRight="18" legendType="ICON" legendWidth="32" rowHeight="32" showRoot="false"/>
			
		</mx:Canvas>
		
		<mx:Canvas id="grid_MTHF" width="100%" height="100%" label="港口经营人" creationComplete="resetGridHeight(event);" horizontalScrollPolicy="off" backgroundColor="#F5FAFE"
				   verticalScrollPolicy="auto">
			<tree:CheckLegendTree width="100%" height="100%" borderVisible="false" checkBoxStateField="@STATE"
								  dataProvider="{FlexGlobals.topLevelApplication.M_ZYZS_MTHF_XML}" defaultLeafIcon="{null}"
								  disclosureClosedIcon="{myFolderClosedIcon}" disclosureOpenIcon="{myFolderOpenedIcon}" folderClosedIcon="{null}" contentBackgroundColor="#F5FAFE"
								  folderOpenIcon="{null}" itemClick="checkBox_click(event)" labelField="@CDMC" legendField="@CDTB"
								  legendHeight="32" legendType="ICON" legendWidth="32" rowHeight="32" showRoot="false"/>
		</mx:Canvas>
		<mx:Canvas id="grid_AQXTTC" width="100%" height="100%" label="安全系统" creationComplete="resetGridHeight(event);" horizontalScrollPolicy="off"  backgroundColor="#F5FAFE"
				   verticalScrollPolicy="auto">
			<tree:CheckLegendTree width="100%" height="100%" borderVisible="false" checkBoxStateField="@STATE"
								  dataProvider="{FlexGlobals.topLevelApplication.M_ZYZS_AQXTTC_XML}" defaultLeafIcon="{null}"
								  disclosureClosedIcon="{myFolderClosedIcon}" disclosureOpenIcon="{myFolderOpenedIcon}" folderClosedIcon="{null}" contentBackgroundColor="#F5FAFE"
								  folderOpenIcon="{null}" itemClick="checkBox_click(event)" labelField="@CDMC" legendField="@CDTB"
								  legendType="ICON" showRoot="false"/>
		</mx:Canvas>
		<mx:Canvas id="grid_JYXTTC" width="100%" height="100%" label="经营系统" creationComplete="resetGridHeight(event);" horizontalScrollPolicy="off"  backgroundColor="#F5FAFE"
				   verticalScrollPolicy="auto">
			<tree:CheckLegendTree width="100%" height="100%" borderVisible="false" checkBoxStateField="@STATE"
								  dataProvider="{FlexGlobals.topLevelApplication.M_ZYZS_JYXTTC_XML}" defaultLeafIcon="{null}"
								  disclosureClosedIcon="{myFolderClosedIcon}" disclosureOpenIcon="{myFolderOpenedIcon}" folderClosedIcon="{null}" contentBackgroundColor="#F5FAFE"
								  folderOpenIcon="{null}" itemClick="checkBox_click(event)" labelField="@CDMC" legendField="@CDTB"
								  legendHeight="32" legendType="ICON" legendWidth="32" rowHeight="32" showRoot="false"/>
		</mx:Canvas>
		
		<mx:Canvas id="grid_SP" width="100%" height="100%" label="视频" creationComplete="resetGridHeight(event);" horizontalScrollPolicy="off"
				   verticalScrollPolicy="auto">
			<tree:CheckLegendTree id="tree_SP" width="100%" height="100%" borderVisible="false" checkBoxStateField="@STATE"
								  dataProvider="{FlexGlobals.topLevelApplication.M_ZYZS_SP_XML}" defaultLeafIcon="{null}"
								  disclosureClosedIcon="{myFolderClosedIcon}" disclosureOpenIcon="{myFolderOpenedIcon}" folderClosedIcon="{null}"
								  folderOpenIcon="{null}" itemClick="checkBox_click(event)" labelField="@CDMC" legendField="@CDTB"
								  legendHeight="32" legendRight="18" legendType="ICON" legendWidth="32" rowHeight="32" showRoot="false"/>
		</mx:Canvas>
	</mx:Accordion>-->
</s:TitleWindow>
