Rev | Line | |
---|
[1240] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
---|
| 2 | <mx:HBox
|
---|
| 3 | xmlns:mx="http://www.adobe.com/2006/mxml"
|
---|
| 4 | horizontalScrollPolicy="off" verticalScrollPolicy="off">
|
---|
| 5 |
|
---|
| 6 | <mx:Script>
|
---|
| 7 | <![CDATA[
|
---|
| 8 | import mx.controls.listClasses.AdvancedListBase;
|
---|
| 9 | import mx.controls.listClasses.ListBase;
|
---|
| 10 | import gov.va.med.edp.model.TrackingModelLocator;
|
---|
| 11 |
|
---|
| 12 | private var model: TrackingModelLocator = TrackingModelLocator.getInstance();
|
---|
| 13 |
|
---|
| 14 | override public function set data(value:Object):void
|
---|
| 15 | {
|
---|
| 16 | super.data = value;
|
---|
| 17 |
|
---|
| 18 | nmImg.visible = false;
|
---|
| 19 | nmLbl.text = "";
|
---|
| 20 | if (value != null)
|
---|
| 21 | {
|
---|
| 22 | nmImg.visible = value.similar;
|
---|
| 23 | nmLbl.text = value.name;
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
|
---|
| 28 | {
|
---|
| 29 | super.updateDisplayList(unscaledWidth, unscaledHeight);
|
---|
| 30 |
|
---|
| 31 | if(owner is mx.controls.DataGrid && mx.controls.DataGrid(owner).isItemSelected(data)) { //figure out if this itemRenderer is selected
|
---|
| 32 | setStyle('color', 0xFFFFFF); // FIXME: anyway to discover this value from the theme?
|
---|
| 33 | } else { //otherwise, return the label to its regular state
|
---|
| 34 | setStyle('color', 0x000000); // FIXME: anyway to discover this value from the theme?
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
| 37 | ]]>
|
---|
| 38 | </mx:Script>
|
---|
| 39 | <mx:Image
|
---|
| 40 | id="nmImg"
|
---|
| 41 | left="2" top="0"
|
---|
| 42 | toolTip="{nmLbl.text + ' is similar to another patient name.'}"
|
---|
| 43 | source="@Embed(source='kuser.png')" />
|
---|
| 44 | <mx:Label
|
---|
| 45 | id="nmLbl"
|
---|
| 46 | left="18" verticalCenter="0" />
|
---|
| 47 | </mx:HBox>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.