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

📄 russian.java

📁 俄罗斯方块源代码
💻 JAVA
字号:
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
/*
 * Created on 2004-10-21
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author Administrator
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class Russian extends MIDlet implements CommandListener
{
    private Display ds;
    private Command exit;
    private Command start;
    private Command stop;
    private Command pause;
    private GameFrm gf;	
        
    /**
     * 
     */
    public Russian() {
        super();
        // TODO Auto-generated constructor stub
        ds = Display.getDisplay(this);
        exit  = new Command("Exit",  Command.SCREEN, 1);
        start = new Command("Start", Command.SCREEN, 0);
        stop  = new Command("Stop",  Command.SCREEN, 2);
        pause = new Command("Pause", Command.SCREEN, 2);
        gf = new GameFrm();
    }

    /* (non-Javadoc)
     * @see javax.microedition.midlet.MIDlet#startApp()
     */
    protected void startApp() throws MIDletStateChangeException {
        // TODO Auto-generated method stub
        gf.addCommand(exit);
        gf.addCommand(start);
        gf.addCommand(stop);
        gf.addCommand(pause);
        gf.setCommandListener(this);
        ds.setCurrent(gf);
    }

    /* (non-Javadoc)
     * @see javax.microedition.midlet.MIDlet#pauseApp()
     */
    protected void pauseApp() {
        // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
     */
    protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
        // TODO Auto-generated method stub

    }

    public void commandAction(Command c, Displayable d)
    {
        if (exit == c)
            this.notifyDestroyed();
        else if (start == c)
            gf.start();
        else if (stop == c)
            gf.stop();
    }
}

⌨️ 快捷键说明

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