-
Notifications
You must be signed in to change notification settings - Fork 0
/
HyperLinkIconColumn.mxml
35 lines (30 loc) · 1.02 KB
/
HyperLinkIconColumn.mxml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" clipAndEnableScrolling="true">
<fx:Script>
<![CDATA[
import flash.net.URLRequest;
private var u:URLRequest;
override public function prepare(hasBeenRecycled:Boolean):void {
if(data){
hyperIcon.source = column.dataTipField;
hyperIcon.toolTip = column.labelFunction( data, column );
}
}
protected function hyperIcon_clickHandler(event:MouseEvent):void
{
if(data[column.dataField] == "defined"){
return;
}
u = new URLRequest(data[column.dataField]);
navigateToURL(u);
}
]]>
</fx:Script>
<s:HGroup width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
<s:Image maxHeight="18" maxWidth="18" id="hyperIcon" buttonMode="true"
useHandCursor="true" click="hyperIcon_clickHandler(event)"
smooth="true"/>
</s:HGroup>
</s:GridItemRenderer>