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

📄 splashcanvas.java

📁 充气球的j2me代码,可以自由的部署在eclipse,netbeas里面.希望大家喜欢.
💻 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 
// Source File Name:   SplashCanvas.java

import com.nokia.mid.sound.Sound;
import com.nokia.mid.ui.FullCanvas;
import java.util.Timer;
import java.util.TimerTask;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

public class SplashCanvas extends FullCanvas
{

    private TwirlEmUpMIDlet parent;
    private MainMenu menu;
    private Timer timer;
    private Sound splashSound;
    private byte splashSoundByte[] = {
        2, 74, 58, 64, 4, 0, 21, 28, 69, -120, 
        45, 3, 76, 34, -61, 12, 56, -60, -106, 96, 
        0
    };

    public SplashCanvas(TwirlEmUpMIDlet parent)
    {
        this.parent = null;
        timer = null;
        splashSound = null;
        this.parent = parent;
        if(menu == null)
            menu = new MainMenu(Resources.getString(12), 3, parent);
        startTimer();
        try
        {
            splashSound = new Sound(splashSoundByte, 1);
            splashSound.setGain(200);
            splashSound.play(1);
        }
        catch(Exception e) { }
    }

    protected void paint(Graphics g)
    {
        try
        {
            g.setColor(0xfff568);
            g.fillRect(0, 0, 176, 208);
            g.setClip(0, 0, 176, 208);
            g.drawImage(Image.createImage("/res/splash.png"), 0, 0, 20);
            g.setClip(0, 0, 176, 208);
        }
        catch(Exception e) { }
    }

    protected void keyPressed(int keyCode)
    {
        timer.cancel();
        timer = null;
        parent.setDisplayable(menu);
    }

    private void startTimer()
    {
        TimerTask task = new TimerTask() {

            public void run()
            {
                parent.setDisplayable(menu);
            }

        };
        timer = new Timer();
        timer.schedule(task, 5000L);
    }


}

⌨️ 快捷键说明

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