@@ -0,0 +1,1892 @@
+/*****************************************************************%0AJADE - Java Agent DEvelopment Framework is a framework to develop %0Amulti-agent systems in compliance with the FIPA specifications.%0ACopyright (C) 2000 CSELT S.p.A. %0A%0AGNU Lesser General Public License%0A%0AThis library is free software; you can redistribute it and/or%0Amodify it under the terms of the GNU Lesser General Public%0ALicense as published by the Free Software Foundation, %0Aversion 2.1 of the License. %0A%0AThis library is distributed in the hope that it will be useful,%0Abut WITHOUT ANY WARRANTY; without even the implied warranty of%0AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0ALesser General Public License for more details.%0A%0AYou should have received a copy of the GNU Lesser General Public%0ALicense along with this library; if not, write to the%0AFree Software Foundation, Inc., 59 Temple Place - Suite 330,%0ABoston, MA  02111-1307, USA.%0A*****************************************************************/%0A%0Apackage jade.tools.rma;%0A%0Aimport java.awt.Frame;%0Aimport jade.gui.AgentTree;%0Aimport jade.core.AID;%0A%0A/**%0A   %0A   @author Tiziana Trucco - CSELT S.p.A.%0A   @version $Date$ $Revision$%0A */%0Aclass MoveAgentAction extends AgentAction %7B%0A %0A private rma myRMA;%0A private Frame mainWnd;%0A %0A MoveAgentAction(rma anRMA, ActionProcessor act,Frame f)%0A %7B%0A %09super (%22MoveAgentActionIcon%22,%22Migrate Agent%22,act);%0A %09myRMA = anRMA;%0A %09mainWnd = f;%0A %7D%0A %0A public void doAction(AgentTree.AgentNode node ) %7B%0A%0A   String agentName  = node.getName();%0A   int result = MoveDialog.showMoveDialog(agentName, mainWnd,false);%0A   %0A   if (result == MoveDialog.OK_BUTTON) %7B%0A     %0A      String container = MoveDialog.getContainer();%0A      if(container.trim().length() %3E 0)%0A      %7B%0A      %09AID agentAid = new AID();%0A      %09agentAid.setName(agentName);%0A      %09myRMA.moveAgent(agentAid,container);%0A      %7D%0A    %7D%0A    %0A%0A  %7D%0A%0A%7D  // End of MoveAgentAction

move action