📄 registeredmidlet.java.bak
字号:
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public abstract class RegisteredMIDlet extends MIDlet
implements CommandListener
{
public static RegisteredMIDlet midlet;
protected boolean verifyLicence;
public String appName;
public Display display;
static final int UNLOCK_CODE_KEY = 1;
static final int USER_ID_KEY = 2;
static final int PASSWORD_KEY = 3;
private String unlockCode;
public static final Command cmdExit = new Command("Exit", 7, 1);
public static final Command cmdFatalExit = new Command("Exit", 7, 1);
public static final Command cmdFinalExit = new Command("Exit", 7, 1);
public RegisteredMIDlet()
{
verifyLicence = true;
display = Display.getDisplay(this);
}
protected final void startApp()
throws MIDletStateChangeException
{
startRegisteredApp();
}
protected abstract void startRegisteredApp()
throws MIDletStateChangeException;
public void pauseApp()
{
}
public void destroyApp(boolean flag)
{
}
public void exit()
{
finalExit();
}
private void finalExit()
{
destroyApp(true);
notifyDestroyed();
}
private void registerApp()
{
}
private void getUnlockCode()
{
}
private void confirmedGetUnlockCode()
{
}
private void checkUnlockCode(String s)
throws MIDletStateChangeException
{
startRegisteredApp();
}
public void errorAlert(String s)
{
}
public void fatalErrorAlert(String s)
{
Form form = new Form("Fatal Error!", new Item[] {
new StringItem(null, s)
});
form.addCommand(cmdFinalExit);
form.setCommandListener(this);
display.setCurrent(form);
}
public void billingEvent(String s, String s1)
{
}
public void postUserData(String s, String s1)
{
}
public void commandAction(Command command, Displayable displayable)
{
if(command == cmdExit)
exit();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -