edu.turtlekit2.tools.chart
Class LineCharter

java.lang.Object
  extended by madkit.kernel.AbstractAgent
      extended by madkit.kernel.Watcher
          extended by edu.turtlekit2.kernel.agents.Observer
              extended by edu.turtlekit2.kernel.agents.Viewer
                  extended by edu.turtlekit2.tools.chart.LineCharter
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, Serializable, EventListener, MouseInputListener, madkit.kernel.ReferenceableAgent

public class LineCharter
extends Viewer

The turtlekit Line Charter Agent. Can be extended or called to trace data on Turtles, Pheromones, or Agents Attributes, etc. To trace multiple charts on a single window, multiple XML Attributes can be given or

XML Attributes :

Pheromone: trace quantities of the given pheromones (Min - Average - Max). i.e.: Pheromone="sugar"

Variable: trace the values (Min - Average - Max) of turtles variables given a role and a variable. i.e.: Variable="prey-age".

Role: trace data on the population for the given role. i.e.:Role="prey,predator"

Version:
0.1 - 2/2010
Author:
G. Beurier
See Also:
PheromoneCharter, PopulationCharter, TkCharter, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.turtlekit2.kernel.agents.Viewer
Viewer.GridCanvas
 
Field Summary
 
Fields inherited from class edu.turtlekit2.kernel.agents.Viewer
cellSize, clickedPoint, onScreen, redrawAll, xDecay, yDecay
 
Fields inherited from class edu.turtlekit2.kernel.agents.Observer
attrib, envHeight, envWidth, flavors, gridValues, patchGrid, probe1, probe2, simulationGroup
 
Constructor Summary
LineCharter()
           
 
Method Summary
static double getValueOf(Object clazz, String lookingForValue)
           
 void setup()
          init the GUI
 void updatePheroCharts(int step)
           
 void watch()
          override this method to observe the state of the world using turtle tables or/and the patchGrid variable
 
Methods inherited from class edu.turtlekit2.kernel.agents.Viewer
display, initGUI, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, paintInfo, paintPatch, paintTurtle, readyToDisplay
 
Methods inherited from class edu.turtlekit2.kernel.agents.Observer
activate, flavorsContains, getAllValues, getAttrib, getBooleanParam, getBooleanParam, getColorParam, getColorParam, getDoubleParam, getDoubleParam, getFlavor, getFlavorName, getFlavors, getFloatParam, getFloatParam, getIntParam, getIntParam, getParam, getParam, getSimulationGroup, getStringParam, getStringParam, setAttrib, setFlavors
 
Methods inherited from class madkit.kernel.Watcher
addProbe, addProbe, end, getProbes, removeAllProbes, removeProbe, update
 
Methods inherited from class madkit.kernel.AbstractAgent
broadcastMessage, broadcastMessage, connectedWithCommunity, createGroup, createGroup, debug, disposeMyGUI, foundGroup, getAddress, getAgentInformation, getAgentsWithRole, getAgentsWithRole, getAgentWithRole, getAgentWithRole, getAvailableCommunities, getBean, getController, getCurrentKernelAddress, getDebug, getExistingGroups, getExistingGroups, getExistingRoles, getExistingRoles, getGroups, getGUIObject, getMessageBoxSize, getMyGroups, getMyGroups, getMyRoles, getMyRoles, getName, getRoles, hasGUI, hashCode, isBelongingToGroup, isBelongingToGroup, isCommunity, isGroup, isGroup, isMemberOf, isMemberOf, isMessageBoxEmpty, isRole, isRole, joinGroup, killAgent, launchAgent, launchAgent, leaveGroup, leaveGroup, leaveRole, leaveRole, nextMessage, print, println, receiveMessage, redisplayMyGUI, requestRole, requestRole, requestRole, restoreAgent, sendMessage, sendMessage, sendMessage, setBean, setController, setDebug, setGUIObject, setName, setOutput, setOutputWriter, toString, windowClosing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineCharter

public LineCharter()
Method Detail

setup

public void setup()
Description copied from class: Viewer
init the GUI

Overrides:
setup in class Viewer

watch

public void watch()
Description copied from class: Observer
override this method to observe the state of the world using turtle tables or/and the patchGrid variable

Overrides:
watch in class Observer

getValueOf

public static double getValueOf(Object clazz,
                                String lookingForValue)
                         throws Exception
Throws:
Exception

updatePheroCharts

public void updatePheroCharts(int step)