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

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

?? guiimageserver.java

?? j2me下的藍牙技術 簡單易懂 直接放到wtk下即可運行
?? JAVA
字號:
/* * @(#)GUIImageServer.java	1.2 04/05/28 * * Copyright (c) 2000-2004 Sun Microsystems, Inc. All rights reserved. * PROPRIETARY/CONFIDENTIAL * Use is subject to license terms */package example.bluetooth.demo;import javax.microedition.lcdui.Alert;import javax.microedition.lcdui.AlertType;import javax.microedition.lcdui.Command;import javax.microedition.lcdui.CommandListener;import javax.microedition.lcdui.Display;import javax.microedition.lcdui.Displayable;import javax.microedition.lcdui.Graphics;import javax.microedition.lcdui.Image;import javax.microedition.lcdui.List;import javax.microedition.lcdui.Ticker;import java.io.IOException;import java.util.Vector;/** * Allows to customize the images list to be published, * creates the corresponding service record to discribe this list * and send the images to clients by request. * * @author Vladimir K. Beliaev * @version 1.2, 05/28/04 */final class GUIImageServer implements CommandListener {    /** Keeps the help message of this demo. */    private final String helpText = "The server is started by default.\n\n"            + "No images are published initially. Change this by corresponding"            + " commands - the changes have an effect immediately.\n\n"            + "If image is removed from the published list, it can't "            + "be download.";    /** This command goes to demo main screen. */    private final Command backCommand = new Command("Back", Command.BACK, 2);    /** Adds the selected image to the published list. */    private final Command addCommand = new Command("Publish image",            Command.SCREEN, 1);    /** Removes the selected image from the published list. */    private final Command removeCommand = new Command("Remove image",            Command.SCREEN, 1);    /** Shows the help message. */    private final Command helpCommand = new Command("Help", Command.HELP, 1);    /** The list control to configure images. */    private final List imagesList = new List("Configure Server", List.IMPLICIT);    /** The help screen for the server. */    private final Alert helpScreen = new Alert("Help");    /** Keeps the parent MIDlet reference to process specific actions. */    private DemoMIDlet parent;    /** The list of images file names. */    private Vector imagesNames;    /** These images are used to indicate the picture is published. */    private Image onImage, offImage;    /** Keeps an information about what images are published. */    private boolean[] published;    /** This object handles the real transmission. */    private BTImageServer bt_server;    /** Constucts images server GUI. */    GUIImageServer(DemoMIDlet parent) {        this.parent = parent;        bt_server = new BTImageServer(this);        setupIdicatorImage();        setupImageList();        published = new boolean[imagesList.size()];        // prepare main screen        imagesList.addCommand(backCommand);        imagesList.addCommand(addCommand);        imagesList.addCommand(removeCommand);        imagesList.addCommand(helpCommand);        imagesList.setCommandListener(this);        // prepare help screen        helpScreen.addCommand(backCommand);        helpScreen.setTimeout(Alert.FOREVER);        helpScreen.setString(helpText);        helpScreen.setCommandListener(this);    }    /**     * Process the command event.     *     * @param c - the issued command.     * @param d - the screen object the command was issued for.     */    public void commandAction(Command c, Displayable d) {        if (c == backCommand && d == imagesList) {            destroy();            parent.show();            return;        }        if (c == backCommand && d == helpScreen) {            Display.getDisplay(parent).setCurrent(imagesList);            return;        }        if (c == helpCommand) {            Display.getDisplay(parent).setCurrent(helpScreen);            return;        }        /*         * Changing the state of base of published images         */        int index = imagesList.getSelectedIndex();        // nothing to do        if ((c == addCommand) == published[index]) {            return;        }        // update information and view        published[index] = c == addCommand;        Image stateImg = c == addCommand ? onImage : offImage;        imagesList.set(index, imagesList.getString(index), stateImg);        // update bluetooth service information        if (!bt_server.changeImageInfo(imagesList.getString(index),                published[index])) {            // either a bad record or SDDB is buzy            Alert al = new Alert("Error", "Can't update base", null,                    AlertType.ERROR);            al.setTimeout(DemoMIDlet.ALERT_TIMEOUT);            Display.getDisplay(parent).setCurrent(al, imagesList);            // restore internal information            published[index] = !published[index];            stateImg = published[index] ? onImage : offImage;            imagesList.set(index, imagesList.getString(index), stateImg);        }    }    /**     * We have to provide this method due to "do not do network     * operation in command listener method" restriction, which     * is caused by crooked midp design.     *     * This method is called by BTImageServer after it is done     * with bluetooth initialization and next screen is ready     * to appear.     */    void completeInitialization(boolean isBTReady) {        // bluetooth was initialized successfully.        if (isBTReady) {            Ticker t = new Ticker("Choose images you want to publish...");            imagesList.setTicker(t);            Display.getDisplay(parent).setCurrent(imagesList);            return;        }        // something wrong        Alert al = new Alert("Error", "Can't inititialize bluetooth", null,                AlertType.ERROR);        al.setTimeout(DemoMIDlet.ALERT_TIMEOUT);        Display.getDisplay(parent).setCurrent(al, parent.getDisplayable());    }    /** Destroys this component. */    void destroy() {        // finilize the image server work        bt_server.destroy();    }    /** Gets the image file name from its title (label). */    String getImageFileName(String imgName) {        if (imgName == null) {            return null;        }        // no interface in List to get the index - should find        int index = -1;        for (int i = 0; i < imagesList.size(); i++) {            if (imagesList.getString(i).equals(imgName)) {                index = i;                break;            }        }        // not found or not published        if (index == -1 || !published[index]) {            return null;        }        return (String) imagesNames.elementAt(index);    }    /**     * Creates the image to idicate the base state.     */    private void setupIdicatorImage() {        // create "on" image        try {            onImage = Image.createImage("/images/st-on.png");        } catch (IOException e) {            // provide off-screen image then            onImage = createIndicatorImage(12, 12, 0, 255, 0);        }        // create "off" image        try {            offImage = Image.createImage("/images/st-off.png");        } catch (IOException e) {            // provide off-screen image then            offImage = createIndicatorImage(12, 12, 255, 0, 0);        }    }    /**     * Gets the description of images from manifest and     * prepares the list to contol the configuration.     * <p>     * The attributes are named "ImageTitle-n" and "ImageImage-n".     * The value "n" must start at "1" and be incremented by 1.     */    private void setupImageList() {        imagesNames = new Vector();        imagesList.setCommandListener(this);        for (int n = 1; n < 100; n++) {            String name = parent.getAppProperty("ImageName-" + n);            // no more images available            if (name == null || name.length() == 0) {                break;            }            String label = parent.getAppProperty("ImageTitle-" + n);            // no lable available - use picture name instead            if (label == null || label.length() == 0) {                label = name;            }            imagesNames.addElement(name);            imagesList.append(label, offImage);        }    }    /**     * Creates the off-screen image with specified size an color.     */    private Image createIndicatorImage(int w, int h, int r, int g, int b) {        Image res = Image.createImage(w, h);        Graphics gc = res.getGraphics();        gc.setColor(r, g, b);        gc.fillRect(0, 0, w, h);        return res;    }} // end of class 'GUIImageServer' definition

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产免费| 欧美日韩一区二区三区在线看| 玉足女爽爽91| 亚洲欧洲av色图| 国产精品国产三级国产普通话99| 欧美成人精品福利| 精品国产成人在线影院| 日韩免费看网站| 久久综合色之久久综合| 国产欧美一区二区精品忘忧草 | 91九色最新地址| 99re这里只有精品首页| 91在线porny国产在线看| 91美女片黄在线观看91美女| 在线观看国产日韩| 日韩一区二区三区视频在线 | 精品一区二区免费在线观看| 日本欧美在线观看| 激情欧美日韩一区二区| 国产成人啪免费观看软件| 风间由美一区二区三区在线观看| 成人动漫一区二区在线| 在线影视一区二区三区| 91精品国产综合久久精品图片 | 国产精品美女久久久久av爽李琼| 国产精品丝袜91| 亚洲小少妇裸体bbw| 天天综合日日夜夜精品| 国产高清精品在线| 欧美最猛性xxxxx直播| 欧美岛国在线观看| 亚洲免费成人av| 美脚の诱脚舐め脚责91| av成人老司机| 7777精品伊人久久久大香线蕉的 | 精品在线观看视频| 成a人片国产精品| 欧美一区二区三区电影| 中文字幕成人在线观看| 亚洲综合av网| 成人一区二区三区中文字幕| 9191国产精品| 亚洲欧美综合网| 国产伦理精品不卡| 欧美区视频在线观看| 国产欧美日产一区| 污片在线观看一区二区| av在线播放成人| 精品久久人人做人人爱| 亚洲狠狠爱一区二区三区| 国产制服丝袜一区| 欧美另类高清zo欧美| 中文字幕亚洲电影| 国产 日韩 欧美大片| 欧美成人video| 日韩激情视频在线观看| 在线这里只有精品| 亚洲三级在线免费| 国产91精品精华液一区二区三区| 91精品婷婷国产综合久久 | 免费三级欧美电影| 色国产精品一区在线观看| 欧美国产97人人爽人人喊| 寂寞少妇一区二区三区| 日韩一区二区三区观看| 日韩福利电影在线| 69堂精品视频| 奇米四色…亚洲| 欧美日本一道本在线视频| 亚洲主播在线观看| 欧美日韩亚洲综合一区二区三区| 有码一区二区三区| 在线免费观看日本欧美| 亚洲精品国产一区二区精华液| 99久久99久久精品免费看蜜桃| 日本一区二区三级电影在线观看| 狠狠色综合播放一区二区| 精品国产三级电影在线观看| 久久精品国产网站| 久久久久免费观看| 成人国产精品免费网站| 亚洲日本欧美天堂| 色婷婷亚洲精品| 亚洲国产精品嫩草影院| 欧美日韩国产美女| 久久国产尿小便嘘嘘| 久久婷婷一区二区三区| 国产99久久久久| 亚洲精品中文在线影院| 欧美偷拍一区二区| 日本亚洲欧美天堂免费| 亚洲精品一区二区三区香蕉 | 国产精品婷婷午夜在线观看| 粉嫩13p一区二区三区| 亚洲欧美一区二区三区极速播放 | 成人av在线资源网站| 最新成人av在线| 欧美日韩国产高清一区二区三区 | 久久午夜电影网| 99re在线视频这里只有精品| 亚洲成人动漫在线免费观看| 欧美v日韩v国产v| 99热这里都是精品| 日韩主播视频在线| 国产拍欧美日韩视频二区| 色噜噜狠狠一区二区三区果冻| 五月综合激情婷婷六月色窝| 精品久久国产字幕高潮| 99久久久精品免费观看国产蜜| 亚洲一区二区三区不卡国产欧美| 日韩你懂的电影在线观看| 99综合影院在线| 黑人巨大精品欧美黑白配亚洲| 国产精品久久久久9999吃药| 欧美电影在线免费观看| 懂色中文一区二区在线播放| 日韩不卡在线观看日韩不卡视频| 久久综合色播五月| 欧美伦理电影网| 91在线观看污| 国产一区 二区| 五月天久久比比资源色| 日本一区免费视频| 精品美女在线播放| 欧美日韩亚州综合| 色呦呦日韩精品| 国产精品99久久久久久久女警 | 日韩一级欧美一级| 日本电影亚洲天堂一区| 韩国三级电影一区二区| 亚瑟在线精品视频| 亚洲欧美福利一区二区| 国产精品视频你懂的| 欧美成人三级电影在线| 欧美日本免费一区二区三区| 色综合天天综合色综合av| 国产69精品久久777的优势| 激情文学综合网| 日本欧美肥老太交大片| 亚洲第一搞黄网站| 亚洲一区二区免费视频| 亚洲色图欧美偷拍| 亚洲啪啪综合av一区二区三区| 国产亚洲欧美日韩在线一区| 精品国产乱码91久久久久久网站| 555夜色666亚洲国产免| 在线观看日韩av先锋影音电影院| www.欧美.com| 成人av电影在线| 成人的网站免费观看| 国产99久久久久| 99视频在线精品| 91蜜桃免费观看视频| 91麻豆精品秘密| 91免费国产视频网站| 日本道精品一区二区三区| 色悠悠久久综合| 在线观看亚洲a| 51午夜精品国产| 精品国产乱码久久久久久影片| 日韩欧美成人一区二区| 精品国产乱码久久久久久老虎| 2019国产精品| 国产精品女同互慰在线看| 亚洲婷婷国产精品电影人久久| 亚洲人成网站在线| 一片黄亚洲嫩模| 青娱乐精品在线视频| 精品一区二区三区不卡 | 亚洲欧洲日产国码二区| 综合色天天鬼久久鬼色| 亚洲在线视频网站| 青青青爽久久午夜综合久久午夜| 日韩国产在线一| 国产一区 二区| 99re8在线精品视频免费播放| 91亚洲精品一区二区乱码| 欧美午夜在线观看| 精品国产百合女同互慰| 亚洲国产精品ⅴa在线观看| 亚洲欧美偷拍卡通变态| 日本欧洲一区二区| 成人精品免费视频| 欧美日韩中文另类| 国产午夜精品理论片a级大结局| 中文字幕日本不卡| 日本亚洲电影天堂| 成人激情校园春色| 666欧美在线视频| 1区2区3区国产精品| 男人的j进女人的j一区| 成人免费视频免费观看| 在线播放91灌醉迷j高跟美女| 精品理论电影在线观看 | 婷婷六月综合亚洲| 国产成人免费视频一区| 欧美无乱码久久久免费午夜一区| 欧美xxxxxxxx| 日韩成人免费在线| 91美女精品福利|