|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmadkit.kernel.AbstractAgent
madkit.kernel.Agent
dynamicbees.BeeLauncher
public class BeeLauncher
Constructor Summary | |
---|---|
BeeLauncher()
|
Method Summary | |
---|---|
void |
activate()
This method is initially called when the micro-kernel registers the agent. |
void |
end()
This method is called by the agent micro-kernel at the end of the agent lifecycle. |
boolean |
getActive()
|
int |
getBeenumber()
|
int |
getDelay()
|
int |
getHeight()
|
int |
getWidth()
|
boolean |
getwithSwing()
|
void |
initGUI()
This method is called by the specific external graphic system (as the G-Box) to ask the agent to prepare a graphical interface. |
void |
killBees(boolean queen,
int number)
|
void |
launchBees(int numberOfBees)
|
void |
launchQueens(int numberOfQueens)
|
void |
live()
This method defines the main behavior of threaded agents. |
void |
setActive(boolean v)
|
void |
setBeenumber(int v)
|
void |
setDelay(int v)
|
void |
setHeight(int add)
|
void |
setWidth(int add)
|
void |
setwithSwing(boolean v)
|
Methods inherited from class madkit.kernel.Agent |
---|
connectAgencyToAgency, createPlace, createPlace, enableMobility, enableMobility, exitImmediatlyOnKill, getAgencyNamed, joinPlace, joinPlace, joinPlace, pause, receiveMessage, run, waitNextMessage, waitNextMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BeeLauncher()
Method Detail |
---|
public void setWidth(int add)
public int getWidth()
public void setHeight(int add)
public int getHeight()
public int getDelay()
public void setDelay(int v)
public void setBeenumber(int v)
public int getBeenumber()
public boolean getActive()
public void setActive(boolean v)
public boolean getwithSwing()
public void setwithSwing(boolean v)
public void launchBees(int numberOfBees)
public void launchQueens(int numberOfQueens)
public void killBees(boolean queen, int number)
public void activate()
AbstractAgent
Here is a typical example (taken from the PingPong
agent of MadKit (plugin demos)) :
public void activate() { try { createGroup(true,"ping-pong",null,null); println ("No ping-pong group : I created one"); creator=true; } catch (OrganizationRequestException e) { // the group already exists creator=false; println ("A ping-pong group already exists : I will join"); } requestRole("ping-pong","player",null); }
activate
in class AbstractAgent
public void live()
Agent
live
in class Agent
public void end()
AbstractAgent
end
in class AbstractAgent
public void initGUI()
AbstractAgent
initGUI
in class AbstractAgent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |