亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? textreader.java

?? JAVA手機的電子書編輯器以及閱讀器
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Created on 2004-10-21
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package com.zmc.ebook.reader;

import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Vector;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.Choice;
import javax.microedition.lcdui.ChoiceGroup;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.Gauge;
import javax.microedition.lcdui.Item;
import javax.microedition.lcdui.ItemStateListener;
import javax.microedition.lcdui.List;
import javax.microedition.lcdui.Screen;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.rms.InvalidRecordIDException;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreException;

/**
 * TextReader <br>
 * Copyright (c) 2000, 2004 e-Channels Corporation <br>
 * <br>
 * Created on 2004-10-21 <br>
 * 
 * @author ZHONGMC <br>
 *         <br>
 *         Last modified on 2004-10-21 <br>
 *         Last modified by ZHONGMC <br>
 * 
 * <p>
 * Comment here
 * </p>
 *  
 */
public class TextReader extends MIDlet implements CommandListener, ItemStateListener, Runnable
{

    /** The Command object for the About command */
    private Command aboutCommand;

    /** The Command object for the Exit command */
    private Command exitCommand;

    /** The Command object for the Ok command */
    private Command okCommand;

    /** The Command object for the Options command */
    private Command optionsCommand;

    /** The Command object for the Back command */
    private Command backCommand;

    /** The Command object for the Cancel command */
    private Command cancelCommand;

    /** The Form object for the Progress form */
    private Form progressForm;

    /** The Gauge object for the Progress gauge */
    private Gauge progressGauge;

    /** The Form object for the Options command */
    private Form optionsForm;

    /** Set of choices for the border styles */
    private ChoiceGroup forColorChoice;

    /** Set of choices for the speeds */
    private ChoiceGroup backColorChoice;

    /** The current display for this MIDlet */
    private Display display;

    /** The PhotoFrame that displays images */
    private ReaderFrame frame;

    /** The Alert for messages */
    private Alert alert;

    /** Contains Strings with the file names */
    private Vector fileNames;

    /** List of Image titles for user to select */
    private List chapterList;

    /** Name of current image, may be null */
    private String fileName;

    /** Current thread loading images, may be null */
    private Thread thread;

    /** Name of persistent storage */
    private final String optionsName = "PhotoAlbum";

    /** Persistent storage for options */
    private RecordStore optionsStore;

    private boolean firstTime = true;

    private int curChapter = 0;

    private int curPagraph = 0;

    public TextReader()
    {
        display = Display.getDisplay(this);

        exitCommand = new Command("Exit", Command.EXIT, 1);
        optionsCommand = new Command("選項", Command.SCREEN, 1);
        okCommand = new Command("確認", Command.OK, 3);
        backCommand = new Command("返回", Command.BACK, 3);
        cancelCommand = new Command("取消", Command.CANCEL, 1);
        aboutCommand = new Command("About", Command.HELP, 30);

        frame = new ReaderFrame();
        //        frame.setStyle(2);
        //        frame.setSpeed(2);
        frame.addCommand(optionsCommand);
        frame.addCommand(backCommand);
        frame.setCommandListener(this);
        alert = new Alert("Warning");
        setupChapterList();
        firstTime = true;

    }

    /**
     * Check the attributes in the descriptor that identify chapter files and
     * titles and initialize the lists of file and imageList.
     * <P>
     * The attributes are named "Chapter-n" and "ChapterTitle-n". The value "n"
     * must start at "1" and increment by 1.
     */
    private void setupChapterList()
    {
        fileNames = new Vector();
        chapterList = new List("chapters", List.IMPLICIT);
        chapterList.addCommand(exitCommand);
        chapterList.addCommand(aboutCommand);
        chapterList.setCommandListener(this);

        for (int n = 1; n < 20; n++)
        {
            String nthChapter = "Chapter-" + n;
            String file = getAppProperty(nthChapter);
            if (file == null || file.length() == 0)
                break;

            String nthTitle = "ChapterTitle-" + n;
            String title = getAppProperty(nthTitle);
            if (title == null || title.length() == 0)
                title = file;

            fileNames.addElement(file.trim());
            chapterList.append(title, null);
        }
        
        System.out.println("Set to curChapter:" + curChapter);
        chapterList.setSelectedIndex(curChapter, true);
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.microedition.midlet.MIDlet#startApp()
     */
    protected void startApp() throws MIDletStateChangeException
    {
        if (firstTime)
        {
            if (chapterList.size() > 0)
            {
                display.setCurrent(chapterList);
                openOptions();
                restoreOptions();
            }
            else
            {
                alert.setString("No chapters configured.");
                display.setCurrent(alert, chapterList);
            }
            firstTime = false;
        }

        openOptions();
        restoreOptions();

    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.microedition.midlet.MIDlet#pauseApp()
     */
    protected void pauseApp()
    {
        saveOptions();

    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
     */
    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
    {
        saveOptions();
        closeOptions();
        frame.reset(); // Discard images cached in the frame.

    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.microedition.lcdui.CommandListener#commandAction(javax.microedition.lcdui.Command,
     *      javax.microedition.lcdui.Displayable)
     */
    public void commandAction(Command c, Displayable s)
    {
        if (c == exitCommand)
        {
            // Cleanup and notify that the MIDlet has exited
            try
            {
                destroyApp(false);
                notifyDestroyed();
            } catch (Exception e)
            {

            }
        }
        else if (c == optionsCommand)
        {
            // Display the options form
            display.setCurrent(genOptions());
        }
        else if (c == okCommand && s == optionsForm)
        {
            // Return to the PhotoFrame, the option values have already
            // been saved by the item state listener
            display.setCurrent(frame);
        }
        else if (c == List.SELECT_COMMAND)
        {
            // Display the progress screen and
            // start the thread to read the images
            int i = chapterList.getSelectedIndex();
            fileName = (String) fileNames.elementAt(i);
            display.setCurrent(genProgress(chapterList.getString(i)));
            thread = new Thread(this);
            thread.start();
        }
        else if (c == backCommand)
        {
            // Display the list of chapters.
            display.setCurrent(chapterList);
        }
        else if (c == cancelCommand)
        {
            // Signal thread to stop and put an alert.
            thread = null;
            alert.setString("Loading File cancelled.");
            display.setCurrent(alert, chapterList);
        }
        else if (c == aboutCommand)
        {
            About.showAbout(display);
        }

    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线视频免费观看| 不卡的av电影在线观看| 亚洲激情欧美激情| 欧美国产欧美综合| 久久久三级国产网站| 欧美不卡在线视频| 久久综合网色—综合色88| 日韩一区二区三| 日韩一区二区三区视频| 日韩精品一区二区三区在线播放| 欧美日本在线视频| 日韩免费一区二区| 精品人在线二区三区| 国产日韩欧美a| 成人免费一区二区三区视频 | 午夜精品免费在线| 亚洲一区视频在线| 亚洲1区2区3区4区| 日日夜夜精品视频免费| 精品一区二区三区视频| 国产精品夜夜嗨| 97se亚洲国产综合自在线不卡| 色哟哟一区二区在线观看 | 日韩1区2区日韩1区2区| 日韩1区2区日韩1区2区| 国产一本一道久久香蕉| av网站一区二区三区| 一本色道a无线码一区v| 欧美情侣在线播放| 久久久综合九色合综国产精品| 最新久久zyz资源站| 亚洲国产视频直播| 精品一区二区三区在线观看| 99riav一区二区三区| 欧美日韩一二区| 久久久久久一二三区| 亚洲欧美色一区| 日本成人中文字幕| 99re6这里只有精品视频在线观看| 欧美精品欧美精品系列| 日本一区二区电影| 爽好久久久欧美精品| 懂色av一区二区三区免费观看| 91福利社在线观看| 国产午夜精品一区二区三区四区| 亚洲综合av网| 成人av网在线| 日韩一级黄色大片| 樱花草国产18久久久久| 国产69精品久久99不卡| 日韩欧美电影在线| 一区二区三区日韩| 懂色av噜噜一区二区三区av| 欧美性xxxxxxxx| 自拍偷拍欧美精品| 国产精品996| 精品av久久707| 视频一区欧美精品| 在线观看免费视频综合| 国产午夜精品理论片a级大结局| 日韩电影免费在线观看网站| 91官网在线观看| **欧美大码日韩| 99久久久久久| 亚洲国产高清aⅴ视频| 韩国在线一区二区| 精品欧美一区二区三区精品久久| 视频一区免费在线观看| 欧美久久久久久蜜桃| 亚洲一区二区三区四区五区中文 | 91网站最新网址| 国产亚洲一本大道中文在线| 久久99精品久久久| 欧美一级免费大片| 奇米在线7777在线精品| 欧美日韩国产成人在线91| 一区二区三区成人在线视频| 99这里都是精品| 国产精品久久久久久久久搜平片| 国产一区二区在线观看视频| www国产精品av| 免费人成精品欧美精品| 欧美日韩午夜影院| 亚洲国产sm捆绑调教视频| 色欧美片视频在线观看在线视频| 亚洲精品视频在线看| 日本高清无吗v一区| 亚洲韩国一区二区三区| 欧美日韩国产免费| 天天色天天操综合| 日韩欧美一区二区三区在线| 黄色资源网久久资源365| 欧美精品一区二区三区一线天视频 | 亚洲精品久久久久久国产精华液| 成人激情小说网站| 亚洲蜜桃精久久久久久久| 欧美视频中文字幕| 久久成人免费网| 久久精品视频免费观看| 一本久久a久久免费精品不卡| 亚洲最新视频在线播放| 日韩精品专区在线影院重磅| 99久久久免费精品国产一区二区| 亚洲欧美aⅴ...| 7777精品伊人久久久大香线蕉完整版 | 精品国产91乱码一区二区三区| 国产麻豆日韩欧美久久| 中文字幕亚洲精品在线观看 | 一区二区三区 在线观看视频| 在线视频国内自拍亚洲视频| 水野朝阳av一区二区三区| 久久精品亚洲乱码伦伦中文| av成人动漫在线观看| 亚洲成人免费电影| 久久久国产一区二区三区四区小说 | 国产福利一区二区三区视频| 国产亚洲欧美日韩日本| 在线视频观看一区| 国产不卡一区视频| 亚洲午夜免费福利视频| 久久毛片高清国产| 在线一区二区三区四区五区 | 91久久奴性调教| 国内精品在线播放| 亚洲综合在线五月| 国产欧美va欧美不卡在线| 欧美一区二区三区四区五区| av成人免费在线| 久久精品国产亚洲5555| 一区二区三区成人在线视频| 国产午夜精品一区二区| 日韩欧美成人午夜| 欧美日韩一区视频| av网站免费线看精品| 国产一区二区电影| 久久成人免费网| 天天免费综合色| 亚洲国产成人av网| 一区二区三区在线播| 成人免费一区二区三区在线观看| 久久久久久久久免费| 日韩精品一区在线| 91精品久久久久久久91蜜桃| 在线视频一区二区三区| 成人午夜免费av| 国产很黄免费观看久久| 精品一区二区三区在线观看国产| 三级欧美韩日大片在线看| 亚洲va天堂va国产va久| 亚洲欧美日韩国产成人精品影院| 国产精品久久久久影院色老大| 国产亚洲精品7777| 国产午夜精品久久久久久免费视 | 在线亚洲精品福利网址导航| 成人免费毛片片v| 丁香激情综合五月| 成人禁用看黄a在线| 97久久精品人人做人人爽50路| 成人激情免费网站| 欧美日韩亚洲另类| 欧美日韩激情一区| 91官网在线观看| 欧美猛男男办公室激情| 制服丝袜一区二区三区| 日韩欧美国产午夜精品| 日韩午夜中文字幕| 精品国一区二区三区| 国产日韩欧美高清| 国产精品家庭影院| 亚洲一区二区三区自拍| 免费日韩伦理电影| 国产成人在线视频免费播放| 国产91精品一区二区麻豆亚洲| 91亚洲资源网| 欧美日韩小视频| 久久新电视剧免费观看| 亚洲国产精品激情在线观看| 亚洲欧美综合色| 亚洲va中文字幕| 国产美女精品人人做人人爽| 成人精品高清在线| 欧美日韩国产不卡| 久久久.com| 亚洲美女在线国产| 九一九一国产精品| 成人精品视频一区二区三区尤物| 色嗨嗨av一区二区三区| 欧美精品粉嫩高潮一区二区| 精品播放一区二区| 亚洲精品国产第一综合99久久| 亚洲午夜私人影院| 国产精品一二三| 日本道在线观看一区二区| 精品国产亚洲在线| 亚洲日本青草视频在线怡红院| 麻豆精品一区二区综合av| 成人一区在线看| 欧美一级日韩不卡播放免费| 国产欧美一区二区三区鸳鸯浴| 亚洲动漫第一页|