Changeset 423 for gssim_ui/branches
- Timestamp:
- 08/21/12 12:53:20 (13 years ago)
- Location:
- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/charts/GanntChartModel.as
r22 r423 15 15 public var error:String; 16 16 public var allocationList:ArrayCollection; 17 public var imageFileList:ArrayCollection; 17 18 } 18 19 } -
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/gssim/editors/archive/ExperimentStatisticsWindow.mxml
r420 r423 17 17 import gssim.gssimstudio.editor.gssim.topology.file.topologyReader; 18 18 19 import mx.collections.ArrayCollection; 19 20 import mx.controls.Alert; 21 import mx.controls.Image; 20 22 import mx.events.FlexEvent; 21 23 import mx.events.IndexChangedEvent; … … 55 57 //ganntChart.addChild(gannt); 56 58 57 gannt.service.getImageURLs(i); 59 parentApplication.addModelUpdatedSingleCallbacks( 60 gannt.service.getImageURLs(i), initImgGannt); 58 61 } 59 62 … … 71 74 var r : topologyReader = new topologyReader(parentApplication.topologyEditor.objectCanvas, false); 72 75 r.readFromBinary(parentApplication.gsSimStudioModel.currentExperimentNetworkTopology); 76 } 77 78 public function initImgGannt(event : ResultEvent) : void 79 { 80 var expId : int = (experiment != null ? experiment.PK : -1); 81 var array : ArrayCollection = parentApplication.gsSimStudioModel.ganntChartComponents['' + expId].imageFileList; 82 for (var j : Number = 0; j < array.length; j++) 83 { 84 //for (var i : Number = 0; i < 5; i++) 85 { 86 var img : Image = new Image(); 87 img.source = array[j].fileAccessUrl; 88 img.width = 500; 89 img.height = 500; 90 mimg.addImage(img); 91 } 92 //mimg.addRow(); 93 } 94 nav.container = mimg; 73 95 } 74 96 -
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GanntChart.java
r422 r423 154 154 } 155 155 156 //String fileDownloadServletUrl = FileDownloadServlet.getResourceUrl(); 157 158 for (FileLocation fileLocation : fileLocationList) { 159 156 ServletContext servletContext = FlexContext.getServletContext(); 157 158 for (FileLocation fileLocation : fileLocationList) { 160 159 HashMap<String, String> fileLocationItem = new HashMap<String, String>(); 161 160 fileLocationItemList.add(fileLocationItem); … … 194 193 fileLocationItem.put("folderUrl", folderLocation.getUrl()); 195 194 196 // Download url 197 if (fileType.equals(FileType.FILE)) { 198 //fileLocationItem.put("fileDownloadUrl", FileDownloadServlet.getResourceUrlForFileLocation(fileLocation, false)); 195 String contentType = servletContext.getMimeType(fileLocation.getFileName().toLowerCase()); 196 String openUrl = null; 197 if (contentType != null) { 198 openUrl = VineFlexUtilClass.getURL(fileLocation, contentType); 199 } else { 200 openUrl = VineFlexUtilClass.getDownloadURL(fileLocation); 199 201 } 202 fileLocationItem.put("fileAccessUrl", openUrl); 200 203 } 201 204
Note: See TracChangeset
for help on using the changeset viewer.