Changeset 37 for gssim_ui/branches/vine/gssimstudio/src/web/ui/flex
- Timestamp:
- 08/26/11 12:20:13 (14 years ago)
- Location:
- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/charts/GanntChart.mxml
r36 r37 6 6 xmlns:c="gssim.gssimstudio.editor.charts.components.*" 7 7 xmlns:fx="http://ns.adobe.com/mxml/2009" 8 width="100%" creationComplete="init()"8 width="100%" 9 9 height="100%" xmlns:charts="com.iwobanas.charts.*" xmlns:data="gssim.gssimstudio.editor.charting.data.*" xmlns:charts1="gssim.gssimstudio.editor.charts.*" xmlns:code="http://code.google.com/p/flexlib/" 10 10 > … … 53 53 private var zoom : Number; 54 54 [Bindable] 55 p rivatevar scheduleViewerWidth : Number = 635;56 [Bindable] 57 p rivatevar scheduleViewerHeight : Number = 4*50;55 public var scheduleViewerWidth : Number = 635; 56 [Bindable] 57 public var scheduleViewerHeight : Number = 4*50; 58 58 [Bindable] 59 59 private var dataProvider : IList; … … 83 83 { 84 84 date = new Date(); 85 vZoomSliderGroup.visible = false; 86 hZoomSliderGroup.visible = false; 85 87 var k : SaveToPNGCommand = new SaveToPNGCommand(fullChart); 86 88 k.execute(); 89 vZoomSliderGroup.visible = true; 90 hZoomSliderGroup.visible = true; 87 91 } 88 92 89 93 protected function initChart(event : ResultEvent) : void 90 94 { 91 Alert.show("initChart");92 95 initDataProvider(); 93 96 vZoom = 50; … … 100 103 protected function initFake() : void 101 104 { 102 Alert.show("fake!"); 105 dataProvider = new ArrayCollection(); 106 107 var data : ArrayCollection = new ArrayCollection(); 108 data.addItem({unitId : 50, taskId : 1000, begin : new Date(2008, 4, 3), end : new Date(2008, 4, 10)}); 109 110 startDate = new Date(3000, 0, 1); 111 endDate = new Date(0); 112 113 tempDataProvider = new ArrayCollection(); 114 tempRowDataProvider = new ArrayCollection(); 115 var resMap : Object = new Object(); 116 for( var i : Number = 0; i < data.length; i++ ) 117 { 118 if (!resMap.hasOwnProperty(data[i].unitId)) 119 { 120 resMap[data[i].unitId] = new ArrayCollection(); 121 tempRowDataProvider.addItem("Unit " + data[i].unitId); 122 } 123 124 var dummycolor : uint = 0x999999 + randomInt( 0x777777 ); 125 126 resMap[data[i].unitId].addItem(createColoredEntry(data[i].taskId, data[i].begin, data[i].end, dummycolor)); 127 128 if (data[i].begin < startDate) startDate = data[i].begin; 129 if (data[i].end > endDate) endDate = data[i].end; 130 } 131 132 for (var key : String in resMap) 133 { 134 tempDataProvider.addItem(resMap[key]); 135 } 136 137 dataProvider = tempDataProvider; 138 rowDataProvider = tempRowDataProvider; 139 140 scheduleViewer.invalidateDisplayList(); 141 this.validateNow(); 142 rowsList.verticalScrollPosition = lastPosRowList; 143 rowsList.selectedIndex = listIndex; 144 103 145 } 104 146 … … 164 206 dataProvider = tempDataProvider; 165 207 rowDataProvider = tempRowDataProvider; 166 167 Alert.show("finished! " + startDate + " " + endDate);168 208 } 169 209 … … 178 218 /* end of copy */ 179 219 180 protected function init():void 181 { 220 public function init():void 221 { 222 //scheduleViewer.percentHeight = 100; 223 //scheduleViewer.percentWidth = 100; 224 182 225 listIndex = 0; 183 226 zoom = 500; … … 335 378 <mx:List id="rowsList" width="135" height="{ scheduleViewerHeight }" 336 379 dataProvider="{ rowDataProvider }" rowHeight="{ scheduleViewer.rowHeight }" 337 verticalAlign="middle" 380 verticalAlign="middle" verticalScrollPolicy="off" 338 381 itemClick="rowsList_itemClickHandler(event)" selectable="true"> 339 382 … … 380 423 381 424 </s:Group> 382 <s:HGroup width="100%" >425 <s:HGroup width="100%" id="hZoomSliderGroup"> 383 426 <s:Label text="Zoom:" top="5"/> 384 427 <s:HSlider width="100%" id="zoomSlider" change="onZoom( zoomSlider.value );" liveDragging="true" … … 388 431 389 432 </s:VGroup> 390 <s:VGroup width="60" height="100%" >433 <s:VGroup width="60" height="100%" id="vZoomSliderGroup"> 391 434 <mx:Spacer height="{ timeline.height + (scheduleViewer.height - vZoomSlider.height) / 4 }"/> 392 435 <mx:Label text="V Zoom"/> -
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/gssim/editors/archive/ExperimentStatisticsWindow.mxml
r27 r37 6 6 title="{experiment.name} - {resourceManager.getString('ArchiveViewer', 'Details')}" 7 7 xmlns:fx="http://ns.adobe.com/mxml/2009" 8 width="600" height="4 00"8 width="600" height="450" 9 9 xmlns:charts="gssim.gssimstudio.editor.charts.*" 10 10 xmlns:archive="gssim.gssimstudio.editor.gssim.editors.archive.*" … … 47 47 //parentApplication.bindSubmodel(viewer, 'model', parentApplication.gsSimStudioModel, 'resourceChartComponents', '' + i); 48 48 49 var gannt : GanntChart = new GanntChart();49 //var gannt : GanntChart = new GanntChart(); 50 50 gannt.expId = i; 51 51 gannt.expName = (experiment != null ? experiment.name : ""); 52 52 gannt.service = new VineRemoteObjectProxy(parentApplication.service, i); 53 ganntChart.addChild(gannt); 53 gannt.init(); 54 //ganntChart.addChild(gannt); 54 55 } 55 56 … … 124 125 </mx:VBox> 125 126 <mx:VBox width="100%" height="100%" id="ganntChart" label="{resourceManager.getString('ArchiveViewer', 'Task')}"> 127 <charts:GanntChart scheduleViewerHeight="{this.height - 250}" scheduleViewerWidth="{this.width - 250}" id="gannt" /> 126 128 </mx:VBox> 127 129 <!--
Note: See TracChangeset
for help on using the changeset viewer.