edu.kzoo.grid.display
Class DisplayMap

java.lang.Object
  |
  +--edu.kzoo.grid.display.DisplayMap

public class DisplayMap
extends java.lang.Object

Grid Display Package:
DisplayMap is a collection that maps grid object classes to objects that know how to display them.

The DisplayMap class is based on the College Board's DisplayMap class, as allowed by the GNU General Public License.

Version:
13 December 2003
Author:
Alyce Brady, Jeff Raab, Northeastern University

Constructor Summary
DisplayMap()
           
 
Method Summary
static void associate(java.lang.String gridObjClassname, GridObjectDisplay displayObj)
          Associates a display object with a grid object class.
static GridObjectDisplay findDisplayFor(GridObject obj)
          Finds a display class that knows how to display the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayMap

public DisplayMap()
Method Detail

associate

public static void associate(java.lang.String gridObjClassname,
                             GridObjectDisplay displayObj)
Associates a display object with a grid object class. If no class can be found for that name, an error message is printed.

Parameters:
gridObjClassname - the name of a class whose objects might be in an Grid
displayObj - object that knows how to display objects of class gridObjClassname

findDisplayFor

public static GridObjectDisplay findDisplayFor(GridObject obj)
Finds a display class that knows how to display the given object.

Parameters:
obj - the object to display