FontCanvas.java
上传用户:gyyuli
上传日期:2013-07-09
资源大小:3050k
文件大小:1k
源码类别:

J2ME

开发平台:

Java

  1. package fonttest;
  2. import javax.microedition.lcdui.Canvas;
  3. import javax.microedition.lcdui.Graphics;
  4. class FontCanvas extends Canvas {
  5.   
  6.     FontTestlet myTestlet;
  7.     /**
  8.      * Construct a new canvas
  9.      */
  10.     FontCanvas(FontTestlet fontTestlet) {
  11. myTestlet = fontTestlet;
  12.     }
  13.   
  14.     /**
  15.      * Initialize self.
  16.      */
  17.     void init() {
  18. // no setup stuff yet
  19.     }
  20.     /**
  21.      * Cleanup and destroy.
  22.      */
  23.     void destroy() {
  24. // can't really get rid of mTestlet here
  25.     }
  26.     /*
  27.      * Ask MemTestlet to paint itself
  28.      */
  29.     protected void paint(Graphics g) {
  30. myTestlet.paint(g);
  31.     }