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

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

?? list.java

?? 開發j2me 手機程序必須的用到的。文件較小
?? JAVA
字號:
package com.jmobilecore.ui.core;

import java.util.Vector;

/**
 * The <code>List</code> component presents the user with a scrolling list of items.
 *
 * @author Greg Gridin
 */
public class List extends Label {

    /**
     * The event listener to receive events from this list.
     * Events occur when a user pressed one of the soft buttons or shortcuts.
     * If listener is null, no exception is thrown and no action is performed.
     */
    public EventListener eventListener;

    /**
     * This screen displays list of values for the current List.
     */
    public ListScreen listScreen;

    /**
     * A vector created to contain items which will become part of the List.
     */
    protected Vector items;

    /**
     * The index of selected item. If the value is <code>-1</code> then no items is selected
     */
    protected int selected = -1;

    /**
     * The title for the list screen
     *
     * @see com.jmobilecore.ui.core.ListScreen
     */
    protected Label title;

    /**
     * The left soft key for the list screen
     *
     * @see com.jmobilecore.ui.core.SoftKey
     * @see com.jmobilecore.ui.core.ListScreen
     */
    protected SoftKey leftKey;

    /**
     * The right soft key for the list screen
     *
     * @see com.jmobilecore.ui.core.SoftKey
     * @see com.jmobilecore.ui.core.ListScreen
     */
    protected SoftKey rightKey;

    /**
     * Creates a new scrolling list.
     */
    public List() {
        this(null);
    }

    /**
     * Creates a new scrolling list with the specified description
     *
     * @see #setText
     * @see #getText
     */
    public List(String label) {
        super(label);
        items = new Vector(8);
        focusable = true;
    }

    public void setListScreen(String titleText, String backKeyText, String selectKeyText) {
        this.title = Label.createTitleLabel(titleText);
        this.leftKey = new SoftKey(backKeyText) {
            public void performAction() {
                ScreenManager.goBack();
                if (eventListener!=null) {
                    eventListener.actionPerformed(EventListener.EVENT_ESCAPE);
                }
            }
        };
        this.rightKey = new SoftKey(selectKeyText) {
            public void performAction() {
                ScreenManager.goBack();
                select(listScreen.getFocusedIndex());
                if (eventListener!=null) {
                    eventListener.actionPerformed(EventListener.EVENT_OK);
                }
                if (parentScreen != null) {
                    parentScreen.repaint();
                }
            }
        };
    }

    public void setListScreen(Label title, SoftKey leftKey, SoftKey rightKey) {
        this.title = title;
        this.leftKey = leftKey;
        this.rightKey = rightKey;
    }

    /**
     * Adds the specified string as <code>ListLabel</code> to the end of scrolling list.
     *
     * @param text the string to be added
     */
    public void add(String text) {

        items.addElement(new ListLabel(text, font, PlatformCanvas.KEY_UNDEFINED));
    }

    /**
     * Adds the specified string as <code>ListLabel</code> to the the scrolling list
     * at the position indicated by the index. The index is zero-based.
     *
     * @param text  the string to be added
     * @param index the position at which to add the item
     */
    public void add(String text, int index) {

        items.insertElementAt(new ListLabel(text, font, PlatformCanvas.KEY_UNDEFINED), index);
    }

    /**
     * Adds the specified item to the end of scrolling list.
     *
     * @param item the item to be added
     */
    public void add(ListComponent item) {

        items.addElement(item);
    }

    /**
     * Adds the specified string as <code>ListLabel</code> to the the scrolling list
     * at the position indicated by the index. The index is zero-based.
     *
     * @param item  the item to be added
     * @param index the position at which to add the item
     */
    public void add(ListComponent item, int index) {

        items.insertElementAt(item, index);
    }

    /**
     * Deselects the item at the specified index.
     *
     * @param index the position of the item to deselect
     */
    public void deselect(int index) {

        selected = -1;
    }

    /**
     * Gets the textual representation of an item associated with the specified index.
     *
     * @param index the position of the item
     * @return an item that is associated with the specified index
     */
    public String getItem(int index) {

        return getComponent(index).getText();
    }

    /**
     * Gets the item associated with the specified index.
     *
     * @param index the position of the item
     * @return an item that is associated with the specified index
     */
    public ListComponent getComponent(int index) {

        return (ListComponent) items.elementAt(index);
    }

    /**
     * Gets the number of items in the list.
     *
     * @return the number of items in the list
     */
    public int getItemCount() {

        return items.size();
    }

    /**
     * Gets the index of the selected item on the list,
     *
     * @return the index of the selected item
     * @see #select
     * @see #deselect
     * @see #isIndexSelected
     */
    public int getSelectedIndex() {
        return selected;
    }

    /**
     * Gets the selected item on this scrolling list.
     *
     * @return the selected item on the list,
     *         or <code>null</code> if no item is selected
     * @see #select
     * @see #deselect
     * @see #isIndexSelected
     */
    public String getSelectedItem() {
        int sel = getSelectedIndex();
        if (sel < 0 || sel >= items.size()) {
            return null;
        }
        return getItem(sel);
    }

    /**
     * Gets the selected item on this scrolling list.
     *
     * @return the selected item on the list,
     *         or <code>null</code> if no item is selected
     * @see #select
     * @see #deselect
     * @see #isIndexSelected
     */
    public ListComponent getSelectedComponent() {
        int sel = getSelectedIndex();
        if (sel < 0 || sel >= items.size()) {
            return null;
        }
        return getComponent(sel);
    }

    /**
     * Determines if the specified item in this scrolling list is selected.
     *
     * @param index the item to be checked
     * @return <code>true</code> if the specified item has been
     *         selected; <code>false</code> otherwise
     * @see #select
     * @see #deselect
     */
    public boolean isIndexSelected(int index) {
        return getSelectedIndex() == index;
    }

    /**
     * Remove the item at the specified position from this scrolling list.
     *
     * @param index the index of the item to delete
     */
    public void remove(int index) {
        items.removeElementAt(index);
    }

    /**
     * Removes the first occurrence of an item from the list.
     *
     * @param item the item to remove from the list
     */
    public void remove(ListComponent item) {
        items.removeElement(item);
    }

    /**
     * Removes all items from this list.
     */
    public void removeAll() {
        items.removeAllElements();
    }

    /**
     * Replaces the item at the specified index in the scrolling list
     * with the new string.
     *
     * @param newValue a new string to replace an existing item
     * @param index    the position of the item to replace
     */
    public void replaceItem(String newValue, int index) {
        items.setElementAt(newValue, index);
    }

    /**
     * Selects the item at the specified index in the scrolling list.
     *
     * @param index the position of the item to select
     * @see #getSelectedItem
     * @see #deselect
     * @see #isIndexSelected
     */
    public void select(int index) {
        if (index < 0 || index >= items.size()) return;
        selected = index;
    }

    /**
     * Responds to key presses when the list has focus.
     * When <code>PlatformCanvas.KEY_ENTER</code> button is pressed creates new screen
     * that displays the list of list values
     *
     * @param keyCode The pressed key.
     */
    protected boolean keyPressed(int keyCode) {

        if (keyCode == PlatformCanvas.KEY_ENTER) {
            if (listScreen==null) listScreen = createListScreen();
            listScreen.changeFocus((selected==-1)?0:selected);
            ScreenManager.goForward(listScreen);
            return true;
        }
        return false;
    }

    /**
     * Creates new screen cantaining the list of list values.
     * Sets to focus state the currently selected item
     */
    public ListScreen createListScreen() {

        ListScreen listScreen = new ListScreen(title, leftKey, rightKey);
        final int size = this.getItemCount();
        for (int i = 0; i < size; i++) {
            listScreen.add((Component) this.getComponent(i));
        }
        if (selected < 0 || selected >= items.size())
            listScreen.changeFocus(0);
        else
            listScreen.changeFocus(selected);
        return listScreen;
    }

    /**
     * Default destructor. Helps VM to perform garbage collection
     */
    public void destructor() {
        removeAll();
        eventListener = null;
        items = null;
        title.destructor();
        title = null;
        leftKey = rightKey = null;
        listScreen.destructor();
        listScreen = null;
    }

} // class List

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
九九国产精品视频| 国产xxx精品视频大全| 欧美区一区二区三区| 成人高清免费观看| 视频一区视频二区中文| 一区二区中文视频| 国产欧美一区二区三区鸳鸯浴 | 奇米精品一区二区三区在线观看一 | 色婷婷亚洲综合| 国产在线播精品第三| 日本午夜精品视频在线观看| 亚洲精品视频一区二区| 成人欧美一区二区三区视频网页| 樱桃国产成人精品视频| 激情综合五月天| 欧美日韩大陆一区二区| 亚洲丝袜另类动漫二区| 欧美国产精品专区| 一区二区三区在线视频免费 | 香蕉久久一区二区不卡无毒影院 | 91福利资源站| 欧美日韩一区不卡| 日韩一级黄色片| 国产片一区二区| 狠狠色综合日日| 99精品黄色片免费大全| 欧洲一区二区三区在线| 日韩免费观看2025年上映的电影 | 精品国产一区二区三区久久影院| 日韩三级视频在线观看| 日韩在线一二三区| 91精品国产一区二区| 中文字幕一区二区日韩精品绯色| 国产一区高清在线| 国产精品视频yy9299一区| 亚洲444eee在线观看| 91精品啪在线观看国产60岁| 国产精品久久久久桃色tv| 琪琪一区二区三区| 久久精品一区二区三区不卡牛牛| 亚洲国产美国国产综合一区二区| 成av人片一区二区| 亚洲一二三区不卡| 国产丝袜欧美中文另类| 欧美探花视频资源| 香蕉成人伊视频在线观看| 日韩亚洲欧美在线观看| 99精品国产热久久91蜜凸| 捆绑紧缚一区二区三区视频| 91麻豆精品国产91久久久更新时间| 裸体一区二区三区| 精品88久久久久88久久久| 99精品久久只有精品| 久草热8精品视频在线观看| 亚洲一区二区高清| 欧美日韩免费一区二区三区视频| 国产成人av电影在线观看| 久久看人人爽人人| 91蜜桃在线观看| 亚洲成av人影院| 一区二区三区四区在线播放| 国产日韩精品一区二区三区在线| 在线观看91精品国产麻豆| 久久精品99久久久| 一区二区三区精品视频在线| 国产精品午夜在线| 中文字幕一区免费在线观看| 欧美国产欧美综合| **性色生活片久久毛片| 夜夜夜精品看看| 午夜视频在线观看一区二区三区| 亚洲精品一区二区三区在线观看 | 亚洲国产另类精品专区| 亚洲少妇最新在线视频| 一区二区高清视频在线观看| 亚洲午夜久久久久| 老汉av免费一区二区三区| 福利视频网站一区二区三区| av网站一区二区三区| 麻豆国产精品一区二区三区| 精品一区二区三区影院在线午夜| 国产在线精品国自产拍免费| 97久久超碰精品国产| 8x8x8国产精品| 亚洲婷婷在线视频| 韩国av一区二区三区| 91国偷自产一区二区使用方法| 欧美一级精品在线| 伊人婷婷欧美激情| jizzjizzjizz欧美| 日韩精品一区二区三区在线| 日本一二三四高清不卡| 日本成人在线网站| 欧美日韩一区二区三区视频| 久久一夜天堂av一区二区三区| 在线一区二区三区四区五区| 日韩欧美一区中文| 亚洲视频一区二区免费在线观看| 喷水一区二区三区| 91在线码无精品| 久久色成人在线| 日本亚洲天堂网| 色狠狠桃花综合| 国产精品福利一区| 美国十次综合导航| 制服丝袜亚洲精品中文字幕| 国产精品婷婷午夜在线观看| 天堂va蜜桃一区二区三区漫画版| 粉嫩av一区二区三区| 中文字幕精品一区二区精品绿巨人| 亚洲高清免费在线| 欧美一卡二卡在线| 图片区日韩欧美亚洲| 欧美性色综合网| 午夜精品久久久| 欧美精品乱码久久久久久按摩| 亚洲精品乱码久久久久久黑人| av在线一区二区三区| 国产精品久久午夜| 91美女在线视频| 午夜婷婷国产麻豆精品| 日韩欧美www| 久久精品久久久精品美女| 精品国产免费人成在线观看| 国内外成人在线| 一区二区久久久久| 久久免费看少妇高潮| 99精品国产热久久91蜜凸| 午夜精品久久久久久久久久久| 欧美一区二区视频免费观看| 蜜桃一区二区三区在线观看| 精品国内二区三区| 91黄色在线观看| 处破女av一区二区| 日韩一区二区精品在线观看| 国产一区二区视频在线| 亚洲人精品午夜| 91免费看片在线观看| 日韩高清在线一区| 亚洲色图制服丝袜| www一区二区| 欧美一级艳片视频免费观看| 成人av在线网| 国产精品亚洲一区二区三区在线| 97精品国产露脸对白| 久久电影国产免费久久电影 | 久久精品一级爱片| 日韩欧美一区中文| 欧美色图免费看| 色综合天天视频在线观看| 国产jizzjizz一区二区| 国产中文字幕精品| 东方欧美亚洲色图在线| 国产精品一品二品| 成人免费毛片高清视频| 国产精品综合二区| 欧美三级一区二区| 久久毛片高清国产| 亚洲黄色片在线观看| 久久er99精品| 欧美综合亚洲图片综合区| 91精品婷婷国产综合久久| 国产精品入口麻豆九色| 一区二区三区在线视频播放| 五月激情丁香一区二区三区| 精品制服美女久久| 99久久亚洲一区二区三区青草| 欧美伦理视频网站| 亚洲综合偷拍欧美一区色| 国产成人午夜视频| 欧美一级xxx| 性久久久久久久久久久久 | 亚洲免费观看高清| 丁香啪啪综合成人亚洲小说 | 色综合av在线| 亚洲欧洲国产专区| 国产一区二区精品在线观看| 欧美肥妇bbw| 天天综合色天天综合| 欧美探花视频资源| 一区二区三区四区国产精品| 91一区在线观看| 一区二区三区欧美在线观看| 波多野结衣精品在线| 中文字幕在线观看不卡视频| 成人免费视频免费观看| 中文av一区二区| 欧美影院一区二区| 免费成人在线观看| 久久精品一级爱片| 91在线丨porny丨国产| 午夜在线电影亚洲一区| 日韩亚洲欧美一区| 激情综合网天天干| 亚洲色图在线看| 精品国产99国产精品| 91在线视频在线| 韩日精品视频一区| 亚洲曰韩产成在线| 91精品久久久久久久99蜜桃 |