/*****************************************************************
JADE - Java Agent DEvelopment Framework is a framework to develop 
multi-agent systems in compliance with the FIPA specifications.
Copyright (C) 2000 CSELT S.p.A. 

GNU Lesser General Public License

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, 
version 2.1 of the License. 

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA  02111-1307, USA.
*****************************************************************/


package jade.tools.rma;

import jade.lang.acl.ACLMessage;

/**
   
   @author Francisco Regi, Andrea Soracchi - Universita` di Parma
   @version $Date$ $Revision$
 */
class ShowDFGuiAction extends FixedAction
{

  private rma myRMA;

  ShowDFGuiAction(rma anRMA,ActionProcessor actPro ) {

     // Note: this class uses the DummyAgentActionIcon just because it
     // never displays an icon, but a parameter must anyway be passed.

     super ("DummyAgentActionIcon","Show the DF GUI",actPro);
     myRMA = anRMA;
  }

   public void doAction() {

     ACLMessage msg = new ACLMessage(ACLMessage.REQUEST);
     msg.clearAllReceiver();
     msg.addReceiver(myRMA.getDefaultDF());
     msg.setOntology("jade-extensions");
     msg.setProtocol("fipa-request");
     msg.setContent("(action df (SHOWGUI))");
     myRMA.send(msg);
  }

}  // End of ShowDFGuiAction




@@ -1043,16 +1043,278 @@
 Message;
+%0Aimport jade.domain.JADEAgentManagement.JADEAgentManagementOntology;%0Aimport jade.domain.JADEAgentManagement.ShowGui;%0Aimport jade.lang.sl.SL0Codec;%0Aimport jade.onto.basic.Action;%0Aimport jade.domain.FIPAException;%0Aimport java.util.List;%0Aimport java.util.ArrayList;
 %0A%0A/**%0A  
@@ -1481,16 +1481,44 @@
  myRMA;%0A
+  private ACLMessage msg;%0A  
 %0A  ShowD
@@ -1797,55 +1797,10 @@
 ;%0A  
-%7D%0A%0A   public void doAction() %7B%0A%0A     ACLMessage
+  
  msg
@@ -1842,37 +1842,8 @@
 T);%0A
-     msg.clearAllReceiver();%0A
     
@@ -1907,111 +1907,401 @@
 ogy(
-%22jade-extensions%22);%0A     msg.setProtocol(%22fipa-request%22);%0A     msg.setContent(%22(action df (SHOWGUI))%22);
+JADEAgentManagementOntology.NAME);%0A     msg.setLanguage(SL0Codec.NAME);%0A     msg.setProtocol(%22fipa-request%22);%0A     Action a = new Action();%0A     a.set_0(myRMA.getDefaultDF());%0A     a.set_1(new ShowGui());%0A     List l = new ArrayList();%0A     l.add(a);%0A     try %7B%0A     %09myRMA.fillContent(msg,l);%0A     %7D catch (FIPAException e) %7B%0A     %09e.printStackTrace();%0A     %7D%0A  %7D%0A%0A   public void doAction() %7B
 %0A   

modify in order to use the ontology