/* * Created on Feb 2, 2005 */ package towerHw3.tview; import java.awt.Graphics; import javax.swing.JPanel; import mvc373Hw3.ITowerModel; import mvc373Hw3.ITowerView; /** Test implementation of a TowerView. */ public class TowerView extends JPanel implements ITowerView { public static final String AUTHOR = "Martin D."; public static final String SHORT_DESCRIPTION = "a stub"; public static final String LONG_DESCRIPTION = "A simple, mostly incorrect " + " version just for verifying that the pieces fit together."; private ITowerModel theModel; private int refreshCount = 0; /** Required constructor. * * @param towerModel a non-null model. */ public TowerView(ITowerModel towerModel) { assert towerModel != null; this.theModel = towerModel; } /* * @see tower.ITowerView#paint(java.awt.Graphics2D, javax.swing.JPanel) */ public void paint(Graphics g) { super.paint(g); g.drawString("tower paint refresh count=" + refreshCount++, 10,20); } }