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

📄 mainmenu.java

📁 GPS Track connects to a GPS and records the path that you travel. Tracks can be uploaded to a web s
💻 JAVA
字号:
// J2ME GPS Track
// Copyright (C) 2006 Dana Peters
// http://www.qcontinuum.org/gpstrack

package org.qcontinuum.gpstrack;

import javax.microedition.lcdui.*;
import javax.microedition.rms.*;

public class MainMenu extends Form implements CommandListener {
    
    private Command mStartCommand, mTracksCommand, mOptionsCommand, mDescriptionCommand, mAboutCommand, mExitCommand;

    public MainMenu() {
        super("GPS Track");
        append(new StringItem(null, "GPS Track\n"));
        append(new StringItem(null, "Version 1.1\n"));
        addCommand(mStartCommand = new Command("Start", Command.SCREEN, 0));
        addCommand(mTracksCommand = new Command("Tracks", Command.SCREEN, 1));
        addCommand(mOptionsCommand = new Command("Options", Command.SCREEN, 1));
        addCommand(mDescriptionCommand = new Command("Description", Command.SCREEN, 1));
        addCommand(mAboutCommand = new Command("About", Command.SCREEN, 1));
        addCommand(mExitCommand = new Command("Exit", Command.EXIT, 0));
        setCommandListener(this);
    }

    public void commandAction(Command c, Displayable d)  {
        if (c == mTracksCommand) {
            if (RecordStore.listRecordStores().length < 2)
                GpsTrack.display("No tracks have been recorded.", 3, this);
            else
                GpsTrack.display(new TrackMenu(this));
        } else if (c == mOptionsCommand) {
            GpsTrack.display(new OptionsMenu(this));
        } else if (c == mDescriptionCommand) {
            GpsTrack.display(
                "GPS Track connects to a GPS and records the path that you travel. "
                + "Tracks can be uploaded to a web site, sent by email, transferred via Bluetooth, or written to a flash memory card. "
                + "Google Maps and Google Earth are used to view the tracks. "
                + "File formats such as GPX and CSV are also supported.", this);
        } else if (c == mAboutCommand) {
            GpsTrack.display("GPS Track\n"
                + "

⌨️ 快捷键说明

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