DataGrid按钮列

package uisystem.view.faction
{
 import fl.controls.listClasses.ICellRenderer;
 import fl.controls.listClasses.ListData;

 import flash.events.MouseEvent;

 import publiccomponents.CustomButton;

 import uisystem.UISystemApplicationFacade;
 import uisystem.util.NotificationNameUISystem;

 public class AcceptCellRenderer extends CustomButton implements ICellRenderer
 {
  private var _listData:ListData;
  private var _data:Object;


  public function AcceptCellRenderer()
  {
   this.label="接受";
   this.skinStyle=1;
   this.addEventListener(MouseEvent.CLICK, clickHandler);
  }
  
  /**
   *   * @param evt
   * 
   */  
  public function clickHandler(evt:MouseEvent):void
  {
   if (CommonParameter.factionId == null)
    return;
   var obj:Object=new Object();
   obj.factionId=CommonParameter.factionId;
   obj.roleId=data.id;
   obj.pass=true;
   UISystemApplicationFacade.getInstance().sendNotification(NotificationNameUISystem.FACTION_COMMAND_UISYSTEM, obj, CommonParameter.FACTION_PASSJOIN);
  }

  public function set data(d:Object):void
  {
   _data=d;
  }

  public function get data():Object
  {
   return _data;
  }

  public function set listData(ld:ListData):void
  {
   _listData=ld;
  }

  public function get listData():ListData
  {
   return _listData;
  }
 }

}

 

你可能感兴趣的:(Flash)