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

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

?? textreader.java

?? JAVA手機的電子書編輯器以及閱讀器
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
    /**
     * Generate the options form with image title and progress gauge.
     * 
     * @param name
     *            the title of the Image to be loaded.
     * @return the generated progress screen
     */
    private Screen genProgress(String name)
    {
        if (progressForm == null)
        {
            progressForm = new Form(name);
            progressForm.addCommand(cancelCommand);
            progressForm.setCommandListener(this);

            progressGauge = new javax.microedition.lcdui.Gauge("Loading file...", false, 9, 0);

            progressForm.append(progressGauge);
        }
        else
        {
            progressGauge.setValue(0);
            progressForm.setTitle(name);
        }
        return progressForm;
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.microedition.lcdui.ItemStateListener#itemStateChanged(javax.microedition.lcdui.Item)
     */
    public void itemStateChanged(Item item)
    {
        if (item == backColorChoice)
        {
            frame.setBackgroundColor(backColorChoice.getSelectedIndex());
        }
        else if (item == forColorChoice)
        {
            frame.setForgroundColor(forColorChoice.getSelectedIndex());
        }

    }

    /**
     * Generate the options form with speed and style choices. Speed choices are
     * stop, slow, medium, and fast. Style choices for borders are none, plain,
     * fancy.
     * 
     * @return the generated options Screen
     */
    private Screen genOptions()
    {
        if (optionsForm == null)
        {
            optionsForm = new Form("選項");
            optionsForm.addCommand(okCommand);
            optionsForm.setCommandListener(this);
            optionsForm.setItemStateListener(this);

            forColorChoice = new ChoiceGroup("字體顏色", Choice.EXCLUSIVE);
            forColorChoice.append("Black", null);
            forColorChoice.append("Green", null);
            forColorChoice.append("Blue", null);
            forColorChoice.append("White", null);
            forColorChoice.append("Red", null);
            forColorChoice.setSelectedIndex(frame.getForgroundColor(), true);
            optionsForm.append(forColorChoice);

            backColorChoice = new ChoiceGroup("背景顏色", Choice.EXCLUSIVE);
            backColorChoice.append("Black", null);
            backColorChoice.append("Green", null);
            backColorChoice.append("Blue", null);
            backColorChoice.append("White", null);
            backColorChoice.append("Red", null);

            backColorChoice.setSelectedIndex(frame.getBackgroundColor(), true);
            optionsForm.append(backColorChoice);
        }
        return optionsForm;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Runnable#run()
     */
    public void run()
    {
        Thread mythread = Thread.currentThread();
        /* Free images and resources used by current frame. */
        frame.reset();

        //       byte[] content = new byte[102400];
        //       int bufLen = 102400;

        StringBuffer buffer = new StringBuffer();
        try
        { // Catch OutOfMemory Errors

            System.out.println("load content of : " + fileName);

            InputStream in = this.getClass().getResourceAsStream(fileName);

            InputStreamReader sr = new InputStreamReader(in, "UTF-8");

            char[] tmp = new char[1024];
            int len = in.available() / 2;
            //		    byte[] content = new byte[len];
            this.progressGauge.setMaxValue(len);
            int offset = 0;
            int readLen;
            while (true)
            {
                readLen = sr.read(tmp); //sr.read(tmp);            //in.read(content, offset, bufLen - offset );
                if (readLen <= 0)
                    break;

                buffer.append(tmp, 0, readLen);
                offset += readLen;
                progressGauge.setValue(offset);
            }

            //     sr.close();
            in.close();

            System.out.println("Content len:" + offset);

            frame.setContent(buffer.toString()); //new String(content, 0, offset, "UTF-8"));

            if (chapterList.getSelectedIndex() == this.curChapter)
            {
                frame.setCurrentParagraph(this.curPagraph);
            }
            else
            {
                frame.setCurrentParagraph(0);
                curPagraph = 0;
            }

            display.setCurrent(frame);

        } catch (OutOfMemoryError err)
        {

            err.printStackTrace();

            System.out.println(err);

            // If cancelled, discard images and return immediately
            if (thread != mythread)
            {
                return;
            }

            alert.setString("Not enough memory for the chapter.");
        } catch (Exception e)
        {
            alert.setString("failed to read file.");
            frame.setContent("failed to read file." + e);
            display.setCurrent(frame);

        }

    }

    /**
     * Open the store that holds the saved options. If an error occurs, put up
     * an Alert.
     */
    void openOptions()
    {
        try
        {
            optionsStore = RecordStore.openRecordStore(optionsName, true);
        } catch (RecordStoreException ex)
        {
            alert.setString("Could not access options storage");
            display.setCurrent(alert);
            optionsStore = null;
        }
    }

    /**
     * Save the options to persistent storage. The options are retrieved
     * ChoiceGroups and stored in Record 1 of the store which is reserved for
     * it. The two options are stored in bytes 0 and 1 of the record.
     */
    void saveOptions()
    {
        if (optionsStore != null)
        {
            byte[] options = new byte[5];
            options[0] = (byte) frame.getBackgroundColor();
            options[1] = (byte) frame.getForgroundColor();
            short curParagraph = (short) frame.getCurrentParagraph();
            options[2] = (byte) curParagraph;
            options[3] = (byte) (curParagraph / 256);

            options[4] = (byte) this.chapterList.getSelectedIndex();
            try
            {
                optionsStore.setRecord(1, options, 0, options.length);
            } catch (InvalidRecordIDException ridex)
            {
                // Record 1 did not exist, create a new record (Should be 1)
                try
                {
                    int rec = optionsStore.addRecord(options, 0, options.length);
                } catch (RecordStoreException ex)
                {
                    alert.setString("Could not add options record");
                    display.setCurrent(alert);
                }
            } catch (RecordStoreException ex)
            {
                alert.setString("Could not save options");
                display.setCurrent(alert);
            }
        }
    }

    /**
     * Restore the options from persistent storage. The options are read from
     * record 1 and set in the frame and if the optionsForm has been created in
     * the respective ChoiceGroups.
     */
    void restoreOptions()
    {
        if (optionsStore != null)
        {
            try
            {
                byte[] options = optionsStore.getRecord(1);
                if (options.length == 5)
                {
                    frame.setBackgroundColor(options[0]);
                    frame.setForgroundColor(options[1]);

                    int pH = options[3] & 0xff;
                    int pL = options[2] & 0xff;
                    curPagraph = pL + pH * 256;

                    this.curChapter = options[4];

                    System.out.println("Restored curChapter: " + curChapter);
                    if (optionsForm != null)
                    {
                        backColorChoice.setSelectedIndex(options[0], true);
                        forColorChoice.setSelectedIndex(options[1], true);
                    }
                    if (this.chapterList != null)
                        chapterList.setSelectedIndex(curChapter, true);
                    return; // Return all set
                }
            } catch (RecordStoreException ex)
            {
                // Ignore, use normal defaults
            }
        }
    }

    /**
     * Close the options store.
     */
    void closeOptions()
    {
        if (optionsStore != null)
        {
            try
            {
                optionsStore.closeRecordStore();
                optionsStore = null;
            } catch (RecordStoreException ex)
            {
                alert.setString("Could not close options storage");
                display.setCurrent(alert);
            }
        }
    }

    public static void main(String[] args)
    {
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品亚洲一区二区三区在线 | 国产精品的网站| 亚洲永久免费视频| 国产91高潮流白浆在线麻豆| 欧美日韩三级视频| 亚洲人快播电影网| 成人性生交大片免费看中文网站| 91精品国产手机| 亚洲一区国产视频| 91免费观看在线| 国产欧美一区二区三区网站| 另类综合日韩欧美亚洲| 欧美人成免费网站| 亚洲成人自拍一区| 在线一区二区视频| 亚洲激情自拍视频| 91色|porny| 中文字幕欧美一区| 不卡的看片网站| 国产精品蜜臀av| 成人av在线网站| 国产精品久久久久久久久快鸭| 国产精品综合二区| 国产亚洲欧美色| 国产精品888| 国产亚洲精品资源在线26u| 国产一区在线观看视频| 久久久久亚洲蜜桃| 91老师片黄在线观看| 国产精品久久久久久久第一福利| 国产成人在线网站| 国产精品乱码人人做人人爱 | 久久人人97超碰com| 激情成人综合网| 国产网红主播福利一区二区| 国产成人精品影视| 国产精品美女久久久久久久久| 成人av在线播放网站| 亚洲欧美区自拍先锋| 欧美午夜一区二区三区| 亚洲成人av福利| 欧美成人精品1314www| 国产呦萝稀缺另类资源| 欧美激情综合五月色丁香 | 日韩一区二区三区在线观看| 亚洲va韩国va欧美va精品 | 国内精品国产成人国产三级粉色| 精品免费国产二区三区| 国产成人综合视频| 亚洲色图视频网| 欧美亚洲图片小说| 麻豆精品一二三| 久久亚洲春色中文字幕久久久| 成人av免费在线播放| 一区二区欧美国产| 精品国产在天天线2019| 99久久久免费精品国产一区二区| 一区二区三区在线视频免费 | 捆绑变态av一区二区三区| 国产亚洲综合在线| 欧美日韩精品三区| 国产精品一级在线| 亚洲高清免费一级二级三级| 久久一夜天堂av一区二区三区 | 一区二区三区欧美视频| 欧美一区二区三区视频免费播放 | 国产乱人伦偷精品视频不卡| 亚洲猫色日本管| 日韩免费成人网| 日本国产一区二区| 国产一区二区三区电影在线观看| 亚洲美女淫视频| 国产亚洲短视频| 欧美男人的天堂一二区| 成人毛片老司机大片| 人禽交欧美网站| 亚洲啪啪综合av一区二区三区| 日韩精品一区二区三区视频| 在线视频中文字幕一区二区| 国产乱码精品一区二区三区忘忧草 | 免费的国产精品| 亚洲视频一二区| 久久久.com| 欧美一区二区三区在线观看| 精品国产免费久久| 欧美性大战xxxxx久久久| 福利一区二区在线观看| 日本三级亚洲精品| 亚洲一区二区三区四区不卡| 亚洲欧美综合在线精品| 国产午夜精品一区二区三区四区| 欧美一区二区精品久久911| 在线视频你懂得一区| 国产成都精品91一区二区三| 久久er99热精品一区二区| 亚洲成av人片在www色猫咪| 日韩毛片视频在线看| 日本一区二区成人| 久久婷婷成人综合色| 日韩一区二区精品| 欧美精品欧美精品系列| 欧美私人免费视频| 色香色香欲天天天影视综合网| 成人深夜在线观看| 国产精品18久久久久久久久 | 亚洲一区二区三区爽爽爽爽爽| 中文字幕中文字幕一区| 国产精品美女久久久久aⅴ国产馆| 精品福利一二区| 欧美xxxx老人做受| 久久亚洲捆绑美女| 久久久久久久综合狠狠综合| 精品蜜桃在线看| 国产三级精品三级| 国产精品美日韩| 亚洲激情中文1区| 亚洲国产日韩一区二区| 五月婷婷久久综合| 久久精品国产99国产精品| 极品少妇一区二区三区精品视频 | 美女视频黄免费的久久| 日本sm残虐另类| 国产美女在线观看一区| 懂色av一区二区三区免费看| 成人福利视频在线| 91久久精品国产91性色tv| 欧美日韩一区二区在线观看视频 | 国产精品成人免费在线| 亚洲欧美国产77777| 亚洲图片欧美一区| 青青青爽久久午夜综合久久午夜| 久久国内精品视频| 成人中文字幕电影| 欧美在线三级电影| 精品国产网站在线观看| 中文字幕不卡在线| 亚洲国产成人av网| 国产一区二区看久久| 91欧美一区二区| 欧美一区二区福利视频| 亚洲国产精品国自产拍av| 一区二区三区蜜桃网| 另类调教123区| 99re成人在线| 制服丝袜中文字幕亚洲| 久久品道一品道久久精品| 伊人性伊人情综合网| 精品亚洲aⅴ乱码一区二区三区| www.亚洲国产| 日韩欧美国产精品一区| 亚洲人成7777| 激情小说欧美图片| 色香色香欲天天天影视综合网| 欧美不卡123| 亚洲激情欧美激情| 国产精品一线二线三线精华| 欧美性生活大片视频| 久久久高清一区二区三区| 国产精品一二三区在线| 7777精品伊人久久久大香线蕉的| 国产精品少妇自拍| 日韩高清在线电影| 91久久一区二区| 2020国产精品久久精品美国| 亚洲最新视频在线观看| 国产成人精品aa毛片| 7777精品久久久大香线蕉| 最新不卡av在线| 国产成+人+日韩+欧美+亚洲| 91精品国产综合久久香蕉麻豆| 中文字幕在线不卡一区二区三区| 久久99精品一区二区三区| 欧美亚洲综合色| 亚洲色图都市小说| 懂色av中文字幕一区二区三区 | 欧美福利电影网| 亚洲精品一二三| 成人性生交大片免费看中文网站| 日韩一区二区三区三四区视频在线观看 | 国产精品视频你懂的| 精品一区二区在线播放| 欧美一区二区免费| 日韩在线一二三区| 91黄视频在线观看| 亚洲图片你懂的| 成人av电影在线观看| 国产精品欧美经典| 丁香激情综合五月| 国产欧美一区二区三区网站| 国产乱子轮精品视频| 欧美sm美女调教| 久久99精品视频| 欧美tk丨vk视频| 国产做a爰片久久毛片| 精品国产亚洲在线| 国产精品原创巨作av| 欧美国产欧美亚州国产日韩mv天天看完整| 狠狠色丁香久久婷婷综合_中| 日韩欧美在线1卡| 激情图片小说一区|