MeasureView.mxml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:HBox
  3. xmlns:mx="http://www.adobe.com/2006/mxml"
  4. xmlns:code="http://code.google.com/p/flexlib/"
  5. xmlns:helpers="com.imt.intimamedia.helpers.Utils"
  6. horizontalAlign="center" verticalAlign="top"
  7. verticalScrollPolicy="auto" horizontalScrollPolicy="auto"
  8. creationComplete="creationCompleteHandler()"
  9. paddingLeft="50" paddingRight="10"
  10. horizontalGap="1"
  11. show="showView()">
  12. <mx:NumberFormatter id="formatNumber" precision="3"
  13. thousandsSeparatorFrom="," thousandsSeparatorTo=" "
  14. decimalSeparatorFrom="." decimalSeparatorTo=","
  15. rounding="nearest" />
  16. <mx:NumberFormatter id="formatImtNumber" precision="3"
  17. thousandsSeparatorFrom="," thousandsSeparatorTo=" "
  18. decimalSeparatorFrom="." decimalSeparatorTo=","
  19. rounding="nearest" />
  20. <mx:NumberFormatter id="formatInt" precision="0"
  21. thousandsSeparatorFrom="," thousandsSeparatorTo=" "
  22. rounding="nearest" />
  23. <mx:Glow
  24. id="glowOn" color="#edc5c8"
  25. target="{canvas}" duration="500"
  26. effectEnd="glowOffScale(event)"
  27. alphaFrom="0" alphaTo="1"
  28. blurXFrom="0" blurXTo="5"
  29. blurYFrom="0" blurYTo="5" />
  30. <mx:Glow
  31. id="glowOff" color="#edc5c8"
  32. target="{canvas}" duration="500"
  33. alphaFrom="1" alphaTo="0"
  34. blurXFrom="5" blurXTo="0"
  35. blurYFrom="5" blurYTo="0" />
  36. <mx:Glow
  37. id="glowOnManual" color="#bf4f57"
  38. target="{manualScale}" duration="500"
  39. effectEnd="glowOffManualScale(event)"
  40. alphaFrom="0" alphaTo="1"
  41. blurXFrom="0" blurXTo="15"
  42. blurYFrom="0" blurYTo="15" />
  43. <mx:Glow
  44. id="glowOffManual" color="#bf4f57"
  45. target="{manualScale}" duration="500"
  46. alphaFrom="1" alphaTo="0"
  47. blurXFrom="15" blurXTo="0"
  48. blurYFrom="15" blurYTo="0" />
  49. <mx:Zoom id="zoomHelpAdd" startDelay="50"/>
  50. <mx:Parallel id="zoomHelpRemove">
  51. <mx:Zoom />
  52. <mx:Fade />
  53. </mx:Parallel>
  54. <mx:Script source="../../../scripts/physician/measure/measureView.as" />
  55. <mx:VBox id="dividerOne" width="170" height="83%" resizeEffect="Resize" styleName="containerZoneWithTitle" verticalScrollPolicy="auto" horizontalScrollPolicy="off">
  56. <mx:Canvas>
  57. <mx:Image source="@Embed('images/measure/leftTitle.png')" />
  58. <mx:Label text="{resourceManager.getString( 'labels', 'measures.label.images' )}" styleName="titlePanel" />
  59. <mx:Image source="@Embed('images/general/question_mark.png')" right="5" click="HelpUtils.loadMeasuresHelp(measuresThumbnailHelp)" buttonMode="true" useHandCursor="true" />
  60. <mx:Image id="measuresThumbnailHelp" visible="false" includeInLayout="false" />
  61. </mx:Canvas>
  62. <mx:HBox width="100%" height="100%" horizontalAlign="center" paddingBottom="5">
  63. <mx:TileList
  64. id="listImages"
  65. dataProvider="{_model.measuresList}"
  66. itemRenderer="com.imt.intimamedia.views.physician.measure.TileListMeasureItemRenderer"
  67. verticalScrollPolicy="auto"
  68. horizontalScrollPolicy="auto"
  69. direction="horizontal"
  70. selectedIndex="0"
  71. width="160"
  72. height="100%"
  73. styleName="containerZoneRectangle" />
  74. </mx:HBox>
  75. </mx:VBox>
  76. <!--mx:VBox height="100%" width="15" verticalAlign="middle">
  77. <mx:SWFLoader source="@Embed('swf/divider.swf')" buttonMode="true" useHandCursor="true" />
  78. </mx:VBox-->
  79. <mx:Spacer height="20" width="5" />
  80. <mx:VBox width="100%" height="100%" verticalScrollPolicy="off">
  81. <mx:VBox width="100%" height="85%" paddingBottom="5" styleName="containerZoneWithTitle" horizontalScrollPolicy="off">
  82. <mx:Canvas width="100%">
  83. <mx:Image source="@Embed('images/general/leftTitle.png')" />
  84. <mx:Label text="{resourceManager.getString( 'labels', 'measures.label.image' )}" styleName="titlePanel" />
  85. <mx:Label text="{_model.patientSelected.firstName} {_model.patientSelected.lastName}, {_model.getSelectedPatientGender()}, {_model.getSelectedPatientBirthDate()}, ({resourceManager.getString( 'labels', 'label.visit')} {_model.appointmentSelected.number})" left="300" styleName="blackText" />
  86. <mx:Image source="@Embed('images/general/question_mark.png')" top="10" right="10" click="HelpUtils.loadMeasuresHelp(measuresHelp)" buttonMode="true" useHandCursor="true" />
  87. <mx:Image id="measuresHelp" visible="false" includeInLayout="false" />
  88. </mx:Canvas>
  89. <mx:HBox width="100%" paddingBottom="0" height="16" horizontalAlign="center">
  90. <mx:Label id="selectedZoneLabel" text="" paddingBottom="0" styleName="redText"></mx:Label>
  91. <!--mx:Label id="scannerUsed" text="" paddingBottom="0" styleName="blackText"></mx:Label-->
  92. </mx:HBox>
  93. <mx:HBox width="100%">
  94. <mx:VBox
  95. height="100%" width="130" verticalScrollPolicy="off" horizontalScrollPolicy="off"
  96. verticalAlign="middle" paddingLeft="5" paddingTop="0"
  97. visible="{imtFarWallAverage.text.length > 0 || imtNearWallAverage.text.length > 0 || distanceValue.text.length > 0 || areaValue.text.length > 0 || ctpaValue.text.length > 0}"
  98. includeInLayout="{imtFarWallAverage.text.length > 0 || imtNearWallAverage.text.length > 0 || distanceValue.text.length > 0 || areaValue.text.length > 0}">
  99. <mx:VBox width="100%" visible="{imtFarWallAverage.text.length > 0}" includeInLayout="{imtFarWallAverage.text.length > 0}">
  100. <mx:Label id="imtFarWall" text="{resourceManager.getString('labels', 'measures.label.fw.imt')}" height="15" styleName="redText" />
  101. <mx:HBox height="15">
  102. <mx:Label id="imtFarWallAverageItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.average' )}" />
  103. <mx:Label id="imtFarWallAverage" />
  104. </mx:HBox>
  105. <mx:HBox height="15">
  106. <mx:Label id="imtFarWallMaximumItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.maximum' )}" />
  107. <mx:Label id="imtFarWallMaximum" />
  108. </mx:HBox>
  109. <mx:HBox height="15">
  110. <mx:Label id="imtFarWallDeviationItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.deviation' )}" />
  111. <mx:Label id="imtFarWallDeviation" />
  112. </mx:HBox>
  113. <mx:HBox height="15">
  114. <mx:Label id="imtFarWallQualityItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.quality' )}" />
  115. <mx:Label id="imtFarWallQuality" />
  116. </mx:HBox>
  117. <mx:HBox height="15">
  118. <mx:Label id="imtFarWallDistanceItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.distance' )}" />
  119. <mx:Label id="imtFarWallDistance" />
  120. </mx:HBox>
  121. <mx:HBox height="15">
  122. <mx:Label id="imtFarWallPointsItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.points' )}" />
  123. <mx:Label id="imtFarWallPoints" />
  124. </mx:HBox>
  125. <mx:Spacer height="20" />
  126. </mx:VBox>
  127. <mx:VBox width="100%" visible="{imtNearWallAverage.text.length > 0}" includeInLayout="{imtNearWallAverage.text.length > 0}">
  128. <mx:Label id="imtNearWall" text="{resourceManager.getString('labels', 'measures.label.nw.imt')}" height="15" styleName="redText" />
  129. <mx:HBox height="15">
  130. <mx:Label id="imtNearWallAverageItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.average' )}" />
  131. <mx:Label id="imtNearWallAverage" />
  132. </mx:HBox>
  133. <mx:HBox height="15">
  134. <mx:Label id="imtNearWallMaximumItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.maximum' )}" />
  135. <mx:Label id="imtNearWallMaximum" />
  136. </mx:HBox>
  137. <mx:HBox height="15">
  138. <mx:Label id="imtNearWallDeviationItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.deviation' )}" />
  139. <mx:Label id="imtNearWallDeviation" />
  140. </mx:HBox>
  141. <mx:HBox height="15">
  142. <mx:Label id="imtNearWallQualityItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.quality' )}" />
  143. <mx:Label id="imtNearWallQuality" />
  144. </mx:HBox>
  145. <mx:HBox height="15">
  146. <mx:Label id="imtNearWallDistanceItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.distance' )}" />
  147. <mx:Label id="imtNearWallDistance" />
  148. </mx:HBox>
  149. <mx:HBox height="15">
  150. <mx:Label id="imtNearWallPointsItem" width="70" paddingLeft="5" text="{resourceManager.getString( 'labels', 'measures.datagrid.points' )}" />
  151. <mx:Label id="imtNearWallPoints" />
  152. </mx:HBox>
  153. <mx:Spacer height="20" />
  154. </mx:VBox>
  155. <mx:VBox visible="{distanceValue.text.length > 0 || areaValue.text.length > 0}" includeInLayout="{distanceValue.text.length > 0 || areaValue.text.length > 0}">
  156. <mx:Spacer height="20" />
  157. <mx:Label id="distanceLabel" height="15" visible="{distanceValue.text.length > 0}" includeInLayout="{distanceValue.text.length > 0}" styleName="redText" text="{resourceManager.getString('labels', 'measures.label.distance')}" />
  158. <mx:Label id="distanceValue" paddingLeft="10" />
  159. <mx:Spacer height="10" />
  160. <mx:Label id="areaLabel" height="15" visible="{areaValue.text.length > 0}" includeInLayout="{areaValue.text.length > 0}" styleName="redText" text="{resourceManager.getString('labels', 'measures.label.area')}" />
  161. <mx:Label id="areaValue" paddingLeft="10" />
  162. <mx:Label id="areaValue2" paddingLeft="10" />
  163. </mx:VBox>
  164. <mx:VBox id="ctpaBox" visible="{(affCTPA == true)}" includeInLayout="{(affCTPA == true)}">
  165. <mx:Spacer height="10" />
  166. <mx:Label id="ctpaLabel" height="15" styleName="redText" text="{resourceManager.getString('labels', 'measures.label.ctpa')} :" />
  167. <mx:Label id="ctpaValue" text="{formatNumber.format(_model.CTPA) + ' ' + resourceManager.getString( 'labels', 'label.unitmm2' )}" paddingLeft="10"/>
  168. </mx:VBox>
  169. </mx:VBox>
  170. <mx:VBox
  171. width="100%" height="100%" horizontalAlign="center" verticalAlign="top"
  172. paddingLeft="5" paddingRight="5" paddingBottom="5" paddingTop="0">
  173. <mx:Canvas id="imageZoom"
  174. mouseOver="changeCursor()" mouseOut="resetCursor()" paddingTop="0" paddingBottom="10"
  175. horizontalScrollPolicy="off" verticalScrollPolicy="off" horizontalCenter="0" />
  176. </mx:VBox>
  177. </mx:HBox>
  178. </mx:VBox>
  179. <!--mx:HBox height="15" width="100%" horizontalAlign="center">
  180. <mx:SWFLoader source="@Embed('swf/divider.swf')" buttonMode="true" useHandCursor="true" />
  181. </mx:HBox-->
  182. <mx:Spacer height="20" width="5" />
  183. <mx:HBox height="100" width="100%" horizontalAlign="center">
  184. <mx:Label text="" visible="false" includeInLayout="true"/>
  185. </mx:HBox>
  186. </mx:VBox>
  187. <!--mx:VBox height="100%" width="15" verticalAlign="middle">
  188. <mx:SWFLoader source="@Embed('swf/divider.swf')" buttonMode="true" useHandCursor="true" />
  189. </mx:VBox-->
  190. <mx:Spacer height="20" width="5" />
  191. <mx:VBox id="dividerTwo" width="170" maxWidth="170" height="100%" resizeEffect="Resize" verticalScrollPolicy="off" horizontalScrollPolicy="off">
  192. <mx:VBox width="170" height="70" styleName="containerZoneWithTitle" verticalAlign="middle" verticalScrollPolicy="off" horizontalScrollPolicy="off">
  193. <mx:Canvas>
  194. <mx:Image source="@Embed('images/measure/leftTitle.png')" />
  195. <mx:Label text="{resourceManager.getString( 'labels', 'measures.label.tools' )}" styleName="titlePanel" />
  196. <mx:Image source="@Embed('images/general/question_mark.png')" click="HelpUtils.loadMeasuresHelp(measuresCalibrationHelp)" right="5" buttonMode="true" useHandCursor="true" />
  197. <mx:Image id="measuresCalibrationHelp" visible="false" includeInLayout="false" />
  198. <mx:Image id="measuresEndingCalibrationHelp" visible="false" includeInLayout="false" />
  199. </mx:Canvas>
  200. <mx:VBox width="100%" height="100%" horizontalAlign="center">
  201. <mx:Button id="manualScale" toggle="true" selected="true" width="150" label="{resourceManager.getString( 'labels', 'measures.button.calibration' )}" click="manualScaleAction()" />
  202. </mx:VBox>
  203. </mx:VBox>
  204. <mx:VBox width="170" height="150" styleName="containerZoneWithTitle" verticalScrollPolicy="off" horizontalScrollPolicy="off">
  205. <mx:Canvas>
  206. <mx:Image source="@Embed('images/measure/leftTitle.png')" />
  207. <mx:Label text="{resourceManager.getString( 'labels', 'measures.label.measure' )}" styleName="titlePanel" />
  208. <mx:Image source="@Embed('images/general/question_mark.png')" click="HelpUtils.loadMeasuresHelp(measuresImtButtonHelp)" right="5" buttonMode="true" useHandCursor="true" />
  209. <mx:Image id="measuresImtButtonHelp" visible="false" includeInLayout="false" />
  210. <mx:Image id="measuresDistanceButtonHelp" visible="false" includeInLayout="false" />
  211. <mx:Image id="measuresAreaButtonHelp" visible="false" includeInLayout="false" />
  212. </mx:Canvas>
  213. <mx:VBox width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
  214. <mx:Button id="imtButton" toggle="true" enabled="false" width="150" label="{resourceManager.getString( 'labels', 'measures.button.imt' )}" click="imtMeasure()" />
  215. <mx:Button id="distanceButton" toggle="true" enabled="false" width="150" label="{resourceManager.getString( 'labels', 'measures.button.distance' )}" click="distanceMeasure()" />
  216. <mx:Button id="areaButton" toggle="true" enabled="false" width="150" label="{resourceManager.getString( 'labels', 'measures.button.area' )}" click="areaMeasure()" />
  217. </mx:VBox>
  218. </mx:VBox>
  219. <mx:VBox
  220. width="170" height="100%" styleName="containerZoneWithTitle"
  221. verticalScrollPolicy="off" paddingBottom="7" horizontalScrollPolicy="off">
  222. <mx:Canvas>
  223. <mx:Image source="@Embed('images/measure/leftTitle.png')" />
  224. <mx:Label text="{resourceManager.getString( 'labels', 'measures.label.zone' )}" styleName="titlePanel" />
  225. </mx:Canvas>
  226. <mx:Canvas id="miniature" width="100%" >
  227. </mx:Canvas>
  228. </mx:VBox>
  229. <mx:VBox width="170" height="70" styleName="containerZoneWithTitle" verticalScrollPolicy="off" horizontalScrollPolicy="off" verticalAlign="middle" >
  230. <mx:Canvas>
  231. <mx:Image source="@Embed('images/measure/leftTitle.png')" />
  232. <mx:Label text="{resourceManager.getString( 'labels', 'measures.label.data' )}" styleName="titlePanel" />
  233. </mx:Canvas>
  234. <mx:VBox width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
  235. <mx:Button width="150" label="{resourceManager.getString( 'labels', 'measures.button.data' )}" click="displayDatagrid()" />
  236. </mx:VBox>
  237. </mx:VBox>
  238. <mx:Spacer height="100%" />
  239. <!--mx:Button id="save" icon="@Embed(source='images/acquire/save.png')" width="170" height="50" label="{resourceManager.getString( 'labels', 'measures.button.save' )}" click="saveMeasures()" /-->
  240. </mx:VBox>
  241. </mx:HBox>