PageRenderTime 19ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/org/ishafoundation/archives/transcript/components/studio/session/SessionMetadataEditorDialog.mxml

http://transcriptstudio4isha.googlecode.com/
Macromedia eXtensible Markup Language | 45 lines | 38 code | 7 blank | 0 comment | 0 complexity | 4e2761b5464372f5469507ee5f080bc0 MD5 | raw file
 1<?xml version="1.0" encoding="utf-8"?>
 2<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="470" height="600" horizontalAlign="center" title="Edit Session Properties" creationComplete="init()" xmlns:session="org.ishafoundation.archives.transcript.components.studio.session.*">
 3	<mx:Script>
 4	<![CDATA[
 5		import mx.events.FlexEvent;
 6		import mx.managers.PopUpManager;
 7		import org.ishafoundation.archives.transcript.model.SessionMetadata;
 8		import org.ishafoundation.archives.transcript.model.ReferenceManager;
 9		import org.ishafoundation.archives.transcript.db.XMLRetriever;
10		
11	   	public static const SESSION_PROPS_EDITED:String = "SESSION_PROPS_EDITED";
12	   	
13		public static function display(parent:DisplayObject, xmlRetriever:XMLRetriever, referenceMgr:ReferenceManager, sessionMetadata:SessionMetadata):SessionMetadataEditorDialog {
14			var result:SessionMetadataEditorDialog = new SessionMetadataEditorDialog();
15			PopUpManager.addPopUp(result, parent, true);
16			result.sessionMetadataPane.addEventListener(FlexEvent.CREATION_COMPLETE, function(evt:FlexEvent):void {
17				result.sessionMetadataPane.referenceMgr = referenceMgr;
18			}, true);
19			result.sessionMetadataPane.addEventListener(FlexEvent.CREATION_COMPLETE, function(evt:FlexEvent):void {
20				result.sessionMetadataPane.sessionMetadata = sessionMetadata;
21			});
22			return result;
23		}
24	
25		private function init():void {
26		}
27		
28		private function okClicked():void {
29			closeMe();
30			dispatchEvent(new Event(SESSION_PROPS_EDITED));
31		}
32		
33		private function closeMe():void {
34			PopUpManager.removePopUp(this);
35		}
36	]]>
37	</mx:Script>
38	
39	<session:SessionMetadataPane id="sessionMetadataPane" label="Session Properties" width="100%" height="100%"/>
40	<mx:HBox id="buttonBox">
41		<mx:Button label="OK" click="okClicked()" />
42		<mx:Button label="Cancel" click="closeMe()"/>
43	</mx:HBox>
44	
45</mx:TitleWindow>