⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdigimidlet.java

📁 魂斗罗游戏的原码(j2me) 是学习j2me很好的方法
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 

package mdigi;

import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;

// Referenced classes of package mdigi:
//            e

public class MdigiMIDlet extends MIDlet
    implements CommandListener
{

    public static MdigiMIDlet b = null;
    public static e c = null;
    public Command a[];

    public MdigiMIDlet()
    {
        a = new Command[6];
        b = this;
        a[0] = new Command("确定", 1, 1);
        a[1] = new Command("菜单", 1, 2);
        a[2] = new Command("切换", 1, 1);
        a[3] = new Command("返回", 1, 2);
        a[4] = new Command("返回", 1, 1);
        a[5] = new Command("确定", 1, 1);
    }

    public void startApp()
    {
        if(c == null)
            c = new e(this);
        f().setCurrent(c);
    }

    public static Display f()
    {
        return Display.getDisplay(b);
    }

    public void pauseApp()
    {
    }

    public void destroyApp(boolean flag)
    {
    }

    public static void g()
    {
        b.destroyApp(true);
        b.notifyDestroyed();
        b = null;
    }

    public void commandAction(Command command, Displayable displayable)
    {
        if(command == a[0])
            c.j();
        else
        if(command == a[1])
            c.h();
        else
        if(command == a[2])
            c.n();
        else
        if(command == a[3])
            c.d();
        else
        if(command == a[4])
            c.g();
        else
        if(command == a[5])
            c.l();
    }

    public void d()
    {
        e();
        c.addCommand(a[0]);
        c.setCommandListener(this);
    }

    public void a()
    {
        e();
        c.addCommand(a[1]);
        c.setCommandListener(this);
    }

    public void b()
    {
        e();
        c.addCommand(a[4]);
        c.setCommandListener(this);
    }

    public void c()
    {
        e();
        c.addCommand(a[2]);
        c.addCommand(a[3]);
        c.setCommandListener(this);
    }

    public void e()
    {
        for(int i = 0; i < 6; i++)
            c.removeCommand(a[i]);

    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -