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
| public class CalendarStatutRenderer extends Label {
override public function set data(value:Object):void {
if(value != null) {
super.data = value;
var statut:Number = value.AR_STATUT;
switch(statut)
{
case 0: setStyle("fontWeight","bold");
setStyle("color", 0xe41818);
this.text = "Rupture";
break;
case 1: setStyle("fontWeight","bold");
setStyle("color",0x00FF00);
this.text = "Stock";
break;
case 2: setStyle("fontWeight","bold");
setStyle("color",0xFFAA00);
this.text = "Stock si réception";
break;
case 3: setStyle("fontWeight","bold");
setStyle("color",0xe41818);
this.text = "Partiel";
break;
case 4: setStyle("fontWeight","bold");
setStyle("color",0x0000FF);
this.text = "Assemblé";
break;
default:setStyle("fontWeight","normal");
setStyle("color",0x000000);
this.text = "Erreur";
}
}
}
} |
Partager