TonttuMIDlet.java
上传用户:kyckim
上传日期:2007-12-11
资源大小:332k
文件大小:1k
- package Tonttu;
- import javax.microedition.lcdui.Display;
- import javax.microedition.lcdui.Displayable;
- import javax.microedition.media.Player;
- import javax.microedition.midlet.MIDlet;
- public class TonttuMIDlet extends MIDlet {
-
- static TonttuMIDlet tonttuMIDlet;
- static PlayerCanvas playerCanvas;
- static FilerForm filerForm;
-
- public TonttuMIDlet() {
- tonttuMIDlet = this;
- playerCanvas = new PlayerCanvas();
- filerForm = new FilerForm();
- Display.getDisplay(this).setCurrent(playerCanvas);
- }
-
- public void startApp() {
- }
-
- public void pauseApp() {
- if(playerCanvas.player != null) {
- if(playerCanvas.player.getState() == Player.STARTED) {
- try {
- playerCanvas.player.stop();
- playerCanvas.repaint();
- } catch(Exception e) {
- playerCanvas.closePlayer();
- }
- }
- }
- }
-
- public void destroyApp(boolean flag) {
- }
-
- public void exitApp() {
- try {
- destroyApp(true);
- notifyDestroyed();
- } catch(Exception e) {
- }
- }
- }