All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaBotSim.SimulationCanvas

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----JavaBotSim.SimulationCanvas

public class SimulationCanvas
extends Canvas
implements Runnable
Used within JavaBotSim to control and draw a simulation.

For more detailed information, see the JavaBotSim page.

Copyright (c)1997 Georgia Tech Research Corporation

Version:
$Revision: 1.8 $
Author:
Tucker Balch

Variable Index

 o MAX_SIM_OBJS
The maximum number of objects in a simulation.

Constructor Index

 o SimulationCanvas(Frame, int, int, String)
Set up the SimulationCanvas.

Method Index

 o descriptionLoaded()
Provide info about whether we have successufully loaded the file.
 o load(String)
Handle a load request.
 o pause()
Handle a pause event.
 o quit()
Handle a quit event.
 o reset()
Handle a reset event.
 o run()
Run the simulation.
 o setDrawIDs(boolean)
Handle setDrawIDs
 o setDrawState(boolean)
Handle setDrawState
 o setDrawTrails(boolean)
Handle setDrawTrails
 o setGraphics(boolean)
Handle setGraphics
 o setSize(int, int)
Resize the SimulationCanvas.
 o showRuntimeStats()
Handle a Runtime Stats event
 o start()
Handle a start/resume event.
 o update(Graphics)
Handle a drawing request.

Variables

 o MAX_SIM_OBJS
 public static final int MAX_SIM_OBJS
The maximum number of objects in a simulation.

Constructors

 o SimulationCanvas
 public SimulationCanvas(Frame p,
                         int w,
                         int h,
                         String dscfile)
Set up the SimulationCanvas.

Methods

 o descriptionLoaded
 public boolean descriptionLoaded()
Provide info about whether we have successufully loaded the file.

Returns:
true if a file is loaded, false otherwise.
 o run
 public void run()
Run the simulation.

 o update
 public synchronized void update(Graphics g)
Handle a drawing request.

Overrides:
update in class Component
 o setSize
 public void setSize(int h,
                     int w)
Resize the SimulationCanvas.

Overrides:
setSize in class Component
 o quit
 public void quit()
Handle a quit event.

 o reset
 public void reset()
Handle a reset event.

 o start
 public void start()
Handle a start/resume event.

 o showRuntimeStats
 public void showRuntimeStats()
Handle a Runtime Stats event

 o pause
 public void pause()
Handle a pause event.

 o setDrawIDs
 public void setDrawIDs(boolean v)
Handle setDrawIDs

 o setGraphics
 public void setGraphics(boolean v)
Handle setGraphics

 o setDrawState
 public void setDrawState(boolean v)
Handle setDrawState

 o setDrawTrails
 public void setDrawTrails(boolean v)
Handle setDrawTrails

 o load
 public void load(String df)
Handle a load request.


All Packages  Class Hierarchy  This Package  Previous  Next  Index