Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## turtlekit.simulations.diffusion
Class FlavorViewer

    java.lang.Object
      madkit.kernel.AbstractAgent
          madkit.kernel.Watcher
              turtlekit.kernel.Observer
                  turtlekit.kernel.Viewer
                      turtlekit.simulations.diffusion.FlavorViewer

All Implemented Interfaces:
  java.io.Serializable, ReferenceableAgent

    public class FlavorViewer

extends Viewer

FlavorViewer overrides the paintPatch method in order to adjust the onscreen color of a patch to the flavor's value and then make the diffusion visible

Version:
  1.2 4/1/2000
Author:
  Fabien MICHEL
See Also:
  Serialized Form

Field Summary

Fields inherited from class turtlekit.kernel.Observer
`envHeight, envWidth, patchGrid`

Constructor Summary
`FlavorViewer()`

Method Summary
`void` | `paintPatch(java.awt.Graphics g, Patch p, int x, int y, int CellSize)` 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.

Methods inherited from class turtlekit.kernel.Viewer
`display, getFlash, getFlashStepSize, getRedrawAll, getShow, initGUI, paintTurtle, setFlash, setFlashStepSize, setRedrawAll, setShow, setup`

Methods inherited from class turtlekit.kernel.Observer
`activate, end, getSimulationGroup, watch`

Methods inherited from class madkit.kernel.Watcher
`addProbe, addProbe, getProbes, removeAllProbes, removeProbe, update`

Methods inherited from class madkit.kernel.AbstractAgent
`broadcastMessage, broadcastMessage, connectedWithCommunity, createGroup, createGroup, debug, destroyGroup, disposeMyGUI, foundGroup, getAddress, getAgentsWithRole, getAgentsWithRole, getAgentWithRole, getAgentWithRole, getAvailableCommunities, getBean, getController, getCurrentKernelAddress, getDebug, getExistingGroups, getExistingGroups, getExistingRoles, getExistingRoles, getGroups, getGUIObject, getMessageBoxSize, getMyGroups, getMyGroups, getMyRoles, getMyRoles, getName, getRoles, hasGUI, hashCode, hideMyGUI, 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

### FlavorViewer

    public FlavorViewer()

Method Detail

### paintPatch

    public void paintPatch(java.awt.Graphics g,
                           Patch p,
                           int x,
                           int y,
                           int CellSize)

  Description copied from class: `Viewer`
  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. As the simulation display is optimized, be sure that you draw a figure that is contained in the reserved square or set the redrawAll variable to true (in the property box or in constructor so the patches are all repainted first, then the turtles (avoid to leave turtle trace on the floor, but realy slow down the simulation). By example you can use the patch access methods to decide the color to display for this. default: g.setColor(p.getColor()); g.fillRect(x,y,cellS,cellS);

  Overrides:
    `paintPatch` in class `Viewer`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.