|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmadkit.kernel.AbstractAgent
madkit.kernel.Agent
madkit.linechart.LineChartAgent
public class LineChartAgent
This Agent is dedicated to create linecharts. Send a LineChartMessage to it to create a new linechart or add a point to an existing linechart. To DOs : implementation is not completed (modify scale, space between point, etc... with messages
| Field Summary | |
|---|---|
int |
height
|
LineChartGUI |
myGUI
|
int |
width
|
| Constructor Summary | |
|---|---|
LineChartAgent()
|
|
| 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. |
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 |
live()
This method defines the main behavior of threaded agents. |
void |
setLineChartTitle(java.lang.String title)
|
void |
setScaleX(int scale)
|
void |
setScaleY(int scale)
|
void |
setXAxisName(java.lang.String xAxisName)
|
void |
setYAxisName(java.lang.String yAxisName)
|
| 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 |
| Field Detail |
|---|
public LineChartGUI myGUI
public int width
public int height
| Constructor Detail |
|---|
public LineChartAgent()
| Method Detail |
|---|
public void initGUI()
AbstractAgent
initGUI in class AbstractAgentpublic 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()
AbstractAgent
end in class AbstractAgentpublic void live()
Agent
live in class Agentpublic void setScaleX(int scale)
public void setScaleY(int scale)
public void setLineChartTitle(java.lang.String title)
public void setXAxisName(java.lang.String xAxisName)
public void setYAxisName(java.lang.String yAxisName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||