home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / dxma.exe / DXMA05.cab / samples / da / java / apps / chess / ChessCanvas.java < prev    next >
Encoding:
Java Source  |  1997-11-13  |  503 b   |  25 lines

  1. import com.ms.dxmedia.*;
  2. import ChessModel;
  3.  
  4.  
  5. // AWT component that displays the animation
  6. public class ChessCanvas extends DXMCanvas
  7. {
  8.   
  9.   protected ChessModel m_model = null;
  10.  
  11.   ChessCanvas(ChessModel model) {
  12.     m_model = model;
  13.     setModel(m_model);
  14.   }
  15.   
  16.   // This method allows the model to know about the size of the canvas. 
  17.   public void reshape(int x, int y, int width, int height) {
  18.     super.reshape(x,y,width,height);
  19.     m_model.SetSize(width,height);
  20.   }
  21.  
  22.  
  23. }
  24.  
  25.