1 | <?xml version="1.0" encoding="utf-8"?>
|
---|
2 | <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" implements="mx.controls.listClasses.IDropInListItemRenderer" horizontalScrollPolicy="off" verticalScrollPolicy="off">
|
---|
3 | <mx:Script>
|
---|
4 | <![CDATA[
|
---|
5 | import mx.controls.listClasses.BaseListData;
|
---|
6 | import gov.va.med.edp.model.TrackingModelLocator;
|
---|
7 |
|
---|
8 |
|
---|
9 | [Bindable]
|
---|
10 | private var model: TrackingModelLocator = TrackingModelLocator.getInstance();
|
---|
11 |
|
---|
12 | // Internal variable for the property value.
|
---|
13 | private var _listData: BaseListData;
|
---|
14 |
|
---|
15 | [Bindable("dataChange")] // Make the listData property bindable.
|
---|
16 | public function get listData():BaseListData {return _listData;}
|
---|
17 | public function set listData(value:BaseListData):void {_listData = value;}
|
---|
18 |
|
---|
19 | override public function set data(value: Object): void {
|
---|
20 | super.data = value;
|
---|
21 | if (value != null) {
|
---|
22 | if (int(value.@visit) > 0) {
|
---|
23 | chkImg.visible = true;
|
---|
24 | chkImg.toolTip = "Visit Created";
|
---|
25 | } else {
|
---|
26 | chkImg.visible = false;
|
---|
27 | chkImg.toolTip = "No Visit Created";
|
---|
28 | }
|
---|
29 | }
|
---|
30 |
|
---|
31 | }
|
---|
32 |
|
---|
33 |
|
---|
34 | override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
|
---|
35 | {
|
---|
36 | super.updateDisplayList(unscaledWidth, unscaledHeight);
|
---|
37 |
|
---|
38 | if (data != null) {
|
---|
39 | var backColor: uint = model.boardSpec.cellColor(_listData["dataField"], data).back;
|
---|
40 | var g:Graphics = graphics;
|
---|
41 | g.clear();
|
---|
42 | g.beginFill(backColor);
|
---|
43 | //g.drawRect(0, -2, unscaledWidth, unscaledHeight+4);
|
---|
44 | g.drawRect(0, 0, unscaledWidth, unscaledHeight);
|
---|
45 | g.endFill();
|
---|
46 | }
|
---|
47 | }
|
---|
48 |
|
---|
49 |
|
---|
50 | ]]>
|
---|
51 | </mx:Script>
|
---|
52 |
|
---|
53 | <mx:Image
|
---|
54 | id="chkImg"
|
---|
55 | visible="false"
|
---|
56 | verticalCenter="0" horizontalCenter="0"
|
---|
57 | source="@Embed(source='visitCheck.png')" />
|
---|
58 |
|
---|
59 | </mx:Canvas>
|
---|