public class DisplayMap
extends java.lang.Object
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.
Constructor and Description |
---|
DisplayMap() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static void associate(java.lang.String gridObjClassname, GridObjectDisplay displayObj)
gridObjClassname
- the name of a class whose objects might be
in an Grid
displayObj
- object that knows how to display
objects of class gridObjClassname
public static GridObjectDisplay findDisplayFor(GridObject obj)
obj
- the object to display