|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmadkit.kernel.AbstractAgent
madkit.kernel.Watcher
turtlekit.kernel.Observer
turtlekit.kernel.Viewer
public class Viewer
Viewer is the simulation default world displayer agent (an specialized Observer, it can be extended to redefine the default representation of patches and turtles (a square fill with the color return by the getColor() method of them).
Field Summary |
---|
Fields inherited from class turtlekit.kernel.Observer |
---|
envHeight, envWidth, patchGrid |
Constructor Summary | |
---|---|
Viewer()
|
Method Summary | |
---|---|
void |
display()
the display itself |
boolean |
getFlash()
|
int |
getFlashStepSize()
|
boolean |
getRedrawAll()
|
boolean |
getShow()
|
void |
initGUI()
MadKit usage, no redefinition |
void |
paintPatch(java.awt.Graphics g,
Patch p,
int x,
int y,
int cellS)
override this method if you want an other patch graphic representation giving an on screen location (x,y), a patch p to draw and a reserved on screen patch size: a square of pixels with a side of cellS. |
void |
paintTurtle(java.awt.Graphics g,
Turtle t,
int x,
int y,
int cellS)
In the same way, you can give a special graphic representation of your turtles. |
void |
setFlash(boolean add)
|
void |
setFlashStepSize(int add)
|
void |
setRedrawAll(boolean b)
|
void |
setShow(boolean add)
|
void |
setup()
init the GUI |
Methods inherited from class turtlekit.kernel.Observer |
---|
activate, getSimulationGroup, watch |
Methods inherited from class madkit.kernel.Watcher |
---|
addProbe, addProbe, end, getProbes, removeAllProbes, removeProbe, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Viewer()
Method Detail |
---|
public void setFlash(boolean add)
public boolean getRedrawAll()
public void setRedrawAll(boolean b)
public boolean getFlash()
public void setShow(boolean add)
public boolean getShow()
public void setFlashStepSize(int add)
public int getFlashStepSize()
public final void initGUI()
initGUI
in class AbstractAgent
public void setup()
setup
in class Observer
public void paintPatch(java.awt.Graphics g, Patch p, int x, int y, int cellS)
public void paintTurtle(java.awt.Graphics g, Turtle t, int x, int y, int cellS)
public void display()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |