public void actionPerformed(ActionEvent e)
{
int kind = gui.kindOfOperation();
AID name = gui.getSelectedAgentInTable();
DFAgentDescription dfd = null;
AID df = gui.myAgent.getDescriptionOfThisDF().getName();;
if (name != null) //something was selected
{
if ( kind == DFGUI.AGENT_VIEW)
try{
dfd = gui.myAgent.getDFAgentDsc(name); //agent registered
}catch(FIPAException fe){
if(logger.isLoggable(Logger.WARNING))
logger.log(Logger.WARNING, "No agent called " + name + " is currently registered with this DF");
return;
}
else
if(kind == DFGUI.LASTSEARCH_VIEW)
{
dfd = gui.getDFAgentSearchDsc(name); // the dsc is maintained in a variable of the gui
df = gui.getLastDF();
}
DFAgentDscDlg dlg = new DFAgentDscDlg((Frame) gui);
DFAgentDescription editedDfd = dlg.ShowDFDGui(dfd,true,true);
if (editedDfd != null)
{
GuiEvent ev = new GuiEvent((Object)gui, DFGUIAdapter.MODIFY);
ev.addParameter(df);