fr.umlv.lawrence
Class GridModel<E>

java.lang.Object
  extended by fr.umlv.lawrence.GridModel<E>
Type Parameters:
E - type of the elements.
Direct Known Subclasses:
DefaultGridModel

public abstract class GridModel<E>
extends Object

Defines an object that represent a grid whose cells are filled with items of type E.

Author:
Julien Cervelle

Constructor Summary
GridModel()
           
 
Method Summary
abstract  void addGridListener(GridListener listener)
          Register a GridListener to be notified of changes in the model
abstract  int getHeight()
           
abstract  int getWidth()
           
abstract  void removeGridListener(GridListener listener)
          Remove a GridListener notified of changes in the model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridModel

public GridModel()
Method Detail

getHeight

public abstract int getHeight()
Returns:
the height of the grid (number of cells)

getWidth

public abstract int getWidth()
Returns:
the width of the grid (number of cells)

addGridListener

public abstract void addGridListener(GridListener listener)
Register a GridListener to be notified of changes in the model

Parameters:
listener - the GridListener to register

removeGridListener

public abstract void removeGridListener(GridListener listener)
Remove a GridListener notified of changes in the model

Parameters:
listener - the GridListener to remove