|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmadkit.kernel.AbstractAgent
madkit.kernel.Watcher
dynamicbees.BeeWorldViewer
public class BeeWorldViewer
| Constructor Summary | |
|---|---|
BeeWorldViewer()
|
|
BeeWorldViewer(boolean b,
int w,
int h)
|
|
| Method Summary | |
|---|---|
void |
activate()
This method is initially called when the micro-kernel registers the agent. |
void |
end()
the end method will remove all the probes which have been used by the scheduler. |
boolean |
getShow()
|
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 |
observe()
|
void |
paintBees(java.awt.Graphics g)
|
void |
paintQueenBees(java.awt.Graphics g)
|
void |
setShow(boolean add)
|
| Methods inherited from class madkit.kernel.Watcher |
|---|
addProbe, addProbe, getProbes, removeAllProbes, removeProbe, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BeeWorldViewer()
public BeeWorldViewer(boolean b,
int w,
int h)
| Method Detail |
|---|
public void setShow(boolean add)
public boolean getShow()
public void initGUI()
AbstractAgent
initGUI in class AbstractAgentpublic void paintBees(java.awt.Graphics g)
public void paintQueenBees(java.awt.Graphics g)
public void observe()
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 AbstractAgentpublic void end()
Watchersuper.end() first in order to ease the removal of simulated agents which will be killed.
Doing so can greatly improved the "killing time" of simulation engines
end in class WatcherAbstractAgent.end()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||