Interface ModelDisplay

All Known Implementing Classes:
World

public interface ModelDisplay

Interface to used to communicate between a model and its display Copyright Georgia Institute of Technology 2004

Author:
Barb Ericson ericson@cc.gatech.edu

Method Summary
 void addModel(java.lang.Object model)
          method to add the model to the world
 void clearBackground()
          Method to clear the background
 java.awt.Graphics getGraphics()
          Method that returns the graphics context for this model display
 int getHeight()
          Method to get the height of the display
 int getWidth()
          Method to get the width of the display
 void modelChanged()
          method to notify the thing that displays that the model has changed
 void remove(java.lang.Object model)
          Method to remove the model from the world
 

Method Detail

modelChanged

public void modelChanged()
method to notify the thing that displays that the model has changed


addModel

public void addModel(java.lang.Object model)
method to add the model to the world

Parameters:
model - the model object to add

remove

public void remove(java.lang.Object model)
Method to remove the model from the world

Parameters:
model - the model object to remove

getGraphics

public java.awt.Graphics getGraphics()
Method that returns the graphics context for this model display

Returns:
the graphics context

clearBackground

public void clearBackground()
Method to clear the background


getWidth

public int getWidth()
Method to get the width of the display

Returns:
the width in pixels of the display

getHeight

public int getHeight()
Method to get the height of the display

Returns:
the height in pixels of the display