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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? settingslist.java

?? J2ME MIDP_Example_Applications
?? JAVA
字號:
// Copyright 2004 Nokia Corporation.
//
// THIS SOURCE CODE IS PROVIDED 'AS IS', WITH NO WARRANTIES WHATSOEVER,
// EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS
// FOR ANY PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE
// OR TRADE PRACTICE, RELATING TO THE SOURCE CODE OR ANY WARRANTY OTHERWISE
// ARISING OUT OF ANY PROPOSAL, SPECIFICATION, OR SAMPLE AND WITH NO
// OBLIGATION OF NOKIA TO PROVIDE THE LICENSEE WITH ANY MAINTENANCE OR
// SUPPORT. FURTHERMORE, NOKIA MAKES NO WARRANTY THAT EXERCISE OF THE
// RIGHTS GRANTED HEREUNDER DOES NOT INFRINGE OR MAY NOT CAUSE INFRINGEMENT
// OF ANY PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OWNED OR CONTROLLED
// BY THIRD PARTIES
//
// Furthermore, information provided in this source code is preliminary,
// and may be changed substantially prior to final release. Nokia Corporation
// retains the right to make changes to this source code at
// any time, without notice. This source code is provided for informational
// purposes only.
//
// Nokia and Nokia Connecting People are registered trademarks of Nokia
// Corporation.
// Java and all Java-based marks are trademarks or registered trademarks of
// Sun Microsystems, Inc.
// Other product and company names mentioned herein may be trademarks or
// trade names of their respective owners.
//
// A non-exclusive, non-transferable, worldwide, limited license is hereby
// granted to the Licensee to download, print, reproduce and modify the
// source code. The licensee has the right to market, sell, distribute and
// make available the source code in original or modified form only when
// incorporated into the programs developed by the Licensee. No other
// license, express or implied, by estoppel or otherwise, to any other
// intellectual property rights is granted herein.


package example.btsppecho;


import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.List;

import javax.bluetooth.DiscoveryAgent;


class SettingsList
     extends List
     implements CommandListener
{
    // UI strings
    private static final String SERVER = "Server";
    private static final String CLIENT = "Client";
    // (I abbreviated the strings "Authentication",
    // "Authorization" and "Encryption" because they are a
    // bit long on some MIDP device's List items. Another
    // MIDlet might hard code its preference anyways.)
    private static final String AUTHENTICATION_TRUE =
                                "Authen.: true";
    private static final String AUTHENTICATION_FALSE =
                                "Authen.: false";
    private static final String AUTHORIZATION_TRUE =
                                "Authoriz.: true";
    private static final String AUTHORIZATION_FALSE =
                                "Authoriz.: false";
    private static final String ENCRYPTION_TRUE =
                                "Encrypt: true";
    private static final String ENCRYPTION_FALSE =
                                "Encrypt: false";
    private static final String RETRIEVE_DEVICES_TRUE =
                                "Use known devices";
    private static final String RETRIEVE_DEVICES_FALSE =
                                "Use inquiry";
    private static final String INQUIRY_TYPE_LIAC = "LIAC";
    private static final String INQUIRY_TYPE_GIAC = "GIAC";
    private static final String INQUIRY_TYPE_NOT_DISCOVERABLE =
                                "not discoverable";
    private static final String INQUIRY_TYPE_CACHED = "cached";
    private static final String INQUIRY_TYPE_PREKNOWN = "preknown";

    // settings
    private int inquiryType;
    private int protocol;
    private boolean isServer;
    private boolean useAuthorization;  // client-only
    private boolean useAuthentication;
    // when useAuthenication is false, useEncryption is also false
    private boolean useEncryption;

    // MIDlet stuff
    private final MIDletApplication midlet;
    private final Command startCommand;
    private final Command propCommand;
    private final Command exitCommand;


    SettingsList(MIDletApplication midlet)
    {
        super("Settings", List.IMPLICIT);
        this.midlet = midlet;

        // default setting values


        // You should think about what is the preferred
        // default inquiry type used to make your service
        // discoverable. This MIDlet uses LIAC as the default,
        // but you might want to use GIAC.
        inquiryType = DiscoveryAgent.LIAC;

        isServer = false; // client by default
        useAuthentication = false;
        useEncryption = false; // false when auth. not used
        useAuthorization = false; // false when auth. not used
        updateListElements();

        // add screen commands
        startCommand = new Command("Start application",
                                   Command.SCREEN,
                                   0);
        propCommand = new Command("BT properties",
                                  Command.SCREEN,
                                  1);
        exitCommand = new Command("Exit", Command.EXIT, 0);
        addCommand(startCommand);
        addCommand(propCommand);
        addCommand(exitCommand);
        setCommandListener(this);
    }


    private void updateListElements()
    {
        // remove all old list items
        while(size() > 0)
        {
            delete(0);
        }

        // Index 0: Server / Client
        String string;
        if (isServer)
        {
            string = SERVER;
        }
        else
        {
            string = CLIENT;
        }
        append(string, null);

        // Index 3: LIAC / GIAC
        if (inquiryType == DiscoveryAgent.LIAC)
        {
            append(makeInquiryLabel(isServer, INQUIRY_TYPE_LIAC),
                   null);
        }
        else if (inquiryType == DiscoveryAgent.GIAC)
        {
            append(makeInquiryLabel(isServer, INQUIRY_TYPE_GIAC),
                   null);
        }
        else if (inquiryType == DiscoveryAgent.PREKNOWN)
        {
            append(makeInquiryLabel(isServer,
                                    INQUIRY_TYPE_PREKNOWN),
                   null);
        }
        else if (inquiryType == DiscoveryAgent.CACHED)
        {
            append(makeInquiryLabel(isServer, INQUIRY_TYPE_CACHED),
                   null);
        }
        else if (inquiryType == DiscoveryAgent.NOT_DISCOVERABLE)
        {
            append(makeInquiryLabel(isServer, INQUIRY_TYPE_CACHED),
                   null);
        }


        // Index 2: use authentication true / false
        //          (encryption and authorization can only be
        //           used if authentication is used)
        if (useAuthentication)
        {
            append(AUTHENTICATION_TRUE, null);

            // Index 3: use encryption true / false
            if (useEncryption)
            {
                append(ENCRYPTION_TRUE, null);
            }
            else
            {
               append(ENCRYPTION_FALSE, null);
            }

            // Index 4: ConnectionService only : use auth. true / false
            if (!isServer)
            {
                if (useAuthorization)
                {
                    append(AUTHORIZATION_TRUE, null);
                }
                else
                {
                    append(AUTHORIZATION_FALSE, null);
                }
            }
        }
        else
        {
            useAuthentication = false;
            useEncryption = false;

            append(AUTHENTICATION_FALSE, null);
        }
    }


    private String makeInquiryLabel(boolean searching, String string)
    {
        if (searching)
        {
            // we are searching
            return "Discover: " + string;
        }
        else
        {
            // we will be searched for
            return "Discoverable: " + string;
        }
    }


    public void commandAction(Command command, Displayable d)
    {
        if (command == startCommand)
        {
            midlet.settingsListStart(isServer,
                                     inquiryType,
                                     useAuthentication,
                                     useAuthorization,
                                     useEncryption);
        }
        else if (command == propCommand)
        {
            midlet.settingsListPropertiesRequest();
        }
        else if (command == exitCommand)
        {
            midlet.settingsListExitRequest();
        }
        else if (command == List.SELECT_COMMAND)
        {
            int index = getSelectedIndex();
            switch(index)
            {
                // Index 0: "Server client" (isServer=true) or
                //          "Client server" (isServer=false)
                case 0:
                  isServer = !isServer;
                  break;


                // Index 1: "Discovery mode: LIAC" or
                //          "Discovery mode: GIAC"
                case 1:
                    // toggle between LIAC and GIAC
                    if (inquiryType == DiscoveryAgent.LIAC)
                    {
                       inquiryType = DiscoveryAgent.GIAC;
                    }
                    else
                    {
                        inquiryType = DiscoveryAgent.LIAC;
                    }
                    break;


                // Index 2: "Authentication: true" or
                //          "Authentication: false"
                case 2:
                    // toggle
                    useAuthentication = !useAuthentication;
                    if (!useAuthentication)
                    {
                        // Authorization and encryption are only
                        // settable if authentication is true, otherwise
                        // they are false and we should remove them.
                        // (The order of removal is important.)

                        // Only a client has this setting option
                        // and not a server, thus the size check.
                        if (size() == 5)
                        {
                            delete(4); // remove authorization from List
                            useAuthorization = false;
                        }

                        this.delete(3); // remove encryption from List
                        useEncryption = false;
                    }
                    break;


                // Index 3: "Encryption: true" or
                //          "Encryption: false"
                case 3:
                    useEncryption = !useEncryption;  // toggle
                    break;


                // Index 4: "Authorization: true" or
                //          "Authorization: false"
                case 4:
                    // toggle
                    useAuthorization = !useAuthorization;
                    break;

            }
            updateListElements();
            setSelectedIndex(index, true);
        }
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品第一页| 欧美三级乱人伦电影| 中文字幕精品一区二区精品绿巨人 | 久久久久综合网| 精品日产卡一卡二卡麻豆| 色综合婷婷久久| 国产亚洲综合在线| 国产精品久久久久一区二区三区| 一区二区三区日韩| 精品制服美女丁香| 欧美日韩一卡二卡三卡 | 亚洲自拍与偷拍| 久久成人免费网站| 成人免费一区二区三区视频| 日本不卡高清视频| 一区二区三区欧美亚洲| 欧美二区在线观看| 综合欧美亚洲日本| 久久精品男人的天堂| 在线国产亚洲欧美| 久久久久久久久97黄色工厂| 制服丝袜日韩国产| 天天爽夜夜爽夜夜爽精品视频| 日本一区二区三级电影在线观看| 青青草97国产精品免费观看| 欧美精品三级日韩久久| 欧美体内she精高潮| 欧美自拍丝袜亚洲| 国产精品亚洲一区二区三区在线| 亚洲成人av一区| 欧美大片在线观看| 美女一区二区三区在线观看| 国产亚洲综合av| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 精品国产亚洲在线| 国产一区免费电影| 一区二区成人在线| 天堂一区二区在线免费观看| 国产精品一色哟哟哟| 青青草97国产精品免费观看 | 午夜伦理一区二区| 中文一区二区在线观看| 欧美自拍偷拍一区| 亚洲成人免费影院| 精品在线免费观看| 成人avav影音| 成人在线综合网站| 欧美日韩国产另类一区| 久久99精品国产| 国产视频在线观看一区二区三区| 国产精品一级黄| 日韩一级视频免费观看在线| 国产乱码精品一区二区三区忘忧草 | 久久久久久久综合日本| 国产激情视频一区二区三区欧美 | 欧美日韩色一区| 青青国产91久久久久久| 国产欧美日韩中文久久| 欧美人xxxx| 日本亚洲电影天堂| 欧美激情一区二区| 精品污污网站免费看| 黄色日韩网站视频| 亚洲天堂免费看| 日韩一区二区三区在线| voyeur盗摄精品| 蜜桃av一区二区| 中文字幕字幕中文在线中不卡视频| 欧美日韩一级黄| 国产成人在线观看| 亚洲一区二区高清| 久久精品综合网| 欧美日韩综合在线| 成人一二三区视频| 免费视频最近日韩| 亚洲男同性恋视频| 久久综合狠狠综合久久激情| 欧美中文字幕一区二区三区亚洲| 久久精品国产免费| 一区二区三区中文字幕精品精品| 精品99一区二区| 欧美色涩在线第一页| 国产成人8x视频一区二区 | 国产麻豆精品在线| 亚洲成av人片观看| 综合久久久久综合| 国产肉丝袜一区二区| 欧美一区二区在线视频| 91搞黄在线观看| 国产麻豆精品theporn| 首页亚洲欧美制服丝腿| 亚洲欧美一区二区三区久本道91| 久久网站热最新地址| 欧美一级久久久久久久大片| 日本韩国欧美三级| 91猫先生在线| 成av人片一区二区| 国产精品一区二区久久精品爱涩 | 亚洲综合偷拍欧美一区色| 国产精品女人毛片| 欧美精品一区二区三区在线播放| 欧美一区二区三区白人| 欧美喷水一区二区| 欧美日韩亚洲国产综合| 欧美性三三影院| 欧美写真视频网站| 欧美日韩在线免费视频| 欧美曰成人黄网| 欧美影院一区二区| 欧美性生活久久| 欧美三级午夜理伦三级中视频| 在线区一区二视频| 欧美日韩五月天| 欧美高清你懂得| 日韩一区二区三区电影在线观看| 欧美精品三级在线观看| 日韩视频免费观看高清完整版 | 欧美日韩综合在线| 在线电影院国产精品| 91麻豆精品国产91久久久资源速度 | 91免费观看在线| 欧美性猛片xxxx免费看久爱| 欧美视频自拍偷拍| 欧美国产一区视频在线观看| 久久女同精品一区二区| 国产日韩亚洲欧美综合| 国产精品国产自产拍高清av| 成人欧美一区二区三区在线播放| 亚洲免费观看在线视频| 亚洲一区在线看| 免费在线观看一区| 国内精品国产成人| 91在线小视频| 欧美人与禽zozo性伦| 精品动漫一区二区三区在线观看| 国产亚洲综合在线| 亚洲精品国久久99热| 伊人开心综合网| 天天色天天操综合| 久久99这里只有精品| 成人一道本在线| 欧美日韩精品一区二区天天拍小说 | 国产精品白丝在线| 一区二区三区蜜桃网| 久久99精品国产麻豆婷婷| av在线播放不卡| 欧美一区二区精品在线| 中文字幕欧美激情一区| 亚洲国产另类av| 国产一区二区调教| 欧美性大战久久久久久久| 日韩美女在线视频| √…a在线天堂一区| 日产国产欧美视频一区精品 | 91啪九色porn原创视频在线观看| 91国产视频在线观看| 日韩欧美成人一区| 亚洲精品欧美激情| 久久疯狂做爰流白浆xx| 91亚洲精品乱码久久久久久蜜桃| 99精品国产视频| 精品国产制服丝袜高跟| 亚洲六月丁香色婷婷综合久久| 人妖欧美一区二区| 色噜噜狠狠色综合中国| 欧美成人乱码一区二区三区| 一区二区三区国产豹纹内裤在线| 九一久久久久久| 欧美成人vps| 午夜精品一区二区三区三上悠亚| 丁香激情综合五月| 欧美一区二区在线看| 一区二区三区不卡视频| 国产成人欧美日韩在线电影| 日韩欧美在线影院| 亚洲午夜视频在线观看| 韩国成人精品a∨在线观看| 精品视频免费在线| 亚洲精品国产精华液| 成人免费视频播放| 国产三级欧美三级日产三级99 | 欧美mv日韩mv国产网站| 午夜视频在线观看一区二区三区 | 国产成人精品影视| 日韩欧美中文字幕精品| 亚洲.国产.中文慕字在线| 91麻豆精品秘密| 国产精品久久久久久久岛一牛影视| 精品一区二区三区不卡| 欧美一级欧美一级在线播放| 午夜精品久久久久影视| 欧美色图第一页| 国产精品护士白丝一区av| 成人高清在线视频| 亚洲国产精品精华液2区45| 国产v综合v亚洲欧| 中文字幕第一区| 国产盗摄女厕一区二区三区| 久久久久高清精品| 风流少妇一区二区|