FrameWorkMidlet.java
资源名称:src.zip [点击查看]
上传用户:luxiaowei
上传日期:2022-06-06
资源大小:58k
文件大小:1k
源码类别:
J2ME
开发平台:
Java
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.framework;
- import javax.microedition.lcdui.Display;
- import javax.microedition.midlet.*;
- /**
- * @author Swaroop Kumar
- */
- public abstract class FrameWorkMidlet extends MIDlet {
- private static Display display;
- private static FrameWorkMidlet instance;
- public final void startApp() {
- display = Display.getDisplay(this);
- display.setCurrent(DisplayManager.getInst());
- instance = this;
- init();
- }
- public static Display getDisplay() {
- return display;
- }
- public static FrameWorkMidlet getInstance() {
- return instance;
- }
- public void pauseApp() {
- }
- public void destroyApp(boolean unconditional) {
- display = null;
- notifyDestroyed();
- }
- public abstract void init();
- }