FontCanvas.java
资源名称:J2ME&Game.rar [点击查看]
上传用户:gyyuli
上传日期:2013-07-09
资源大小:3050k
文件大小:1k
源码类别:
J2ME
开发平台:
Java
- package fonttest;
- import javax.microedition.lcdui.Canvas;
- import javax.microedition.lcdui.Graphics;
- class FontCanvas extends Canvas {
- FontTestlet myTestlet;
- /**
- * Construct a new canvas
- */
- FontCanvas(FontTestlet fontTestlet) {
- myTestlet = fontTestlet;
- }
- /**
- * Initialize self.
- */
- void init() {
- // no setup stuff yet
- }
- /**
- * Cleanup and destroy.
- */
- void destroy() {
- // can't really get rid of mTestlet here
- }
- /*
- * Ask MemTestlet to paint itself
- */
- protected void paint(Graphics g) {
- myTestlet.paint(g);
- }
- }