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

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

?? xeomenu.java

?? XeoMenu是一個圖形菜單
?? JAVA
字號:
/*     Copyright: Sun Microsystems 1997.  All rights reserved.    Author: Patrick Chan (www.xeo.com)   7/19/96    Version: 1.1*/    import java.applet.*;import java.awt.*;import java.util.*;import java.net.*;public class XeoMenu extends Applet {    // The background image.  This had better not be null.    Image image;    // These two fields are used to do double-buffering.    // The dimensions of bbuf is exactly the dimensions of the applet.    Image bbuf;    Graphics bbufG;    // This field is set to true only when the background image has    // completely loaded.    boolean imageDone;    /* Menu data */    Rectangle[] hitArea;    Rectangle[] srcRect;    Point[] dstPt;    boolean[] down;    String[] url;    /* Submenu data */    String[][] itemUrl;    String[][] item;    // If >= 0, this fields holds the index of the current menu.    // If -1, no menu is current.    int curMenu;    // If >= 0, this fields holds the index of the current menu item.    // If -1, no menu item is current.    int curMenuItem;    // This is an array of rectangles - one rectangle for each menu item.      // Each rectangle specifies the    // location (relative to the left-corner of the applet) of a menu item.    //    // menuItemRect is null when curMenu is -1.    // It becomes non-null when curMenu >= 0.    //    // Note: it would have been better programming to define classes for     // the menu and menu items.  However, I decided for this little applet    // to keep the number of class files to a minimum to minimize the download    // time.      Rectangle[] menuItemRect;    // This is the color to paint "behind" the image.    Color bgColor;    // [0] is the text color of a menu item; [1] is the text color of a highlighted    // menu item.    Color fgMenuColor[] = new Color[2];    // This is the background of a menu item; [1] is the background color of a    // highlighted menu item.    Color bgMenuColor[] = new Color[2];    // marginH is the number of pixels on the left and right edges of the menu.    // marginV is the number of pixels on the top and bottom edges of the menu.    int marginH, marginV;    // This is the font used to display the menu item labels.    Font f;    // This is the font metrics of 'f'.      FontMetrics fm;    public void init() {	int[] ints;        // Grab applet parameters.        image = getImage(getCodeBase(), getParameter("image"));        marginH = Integer.parseInt(getParameter("marginh"));        marginV = Integer.parseInt(getParameter("marginv"));        // Get color parameters.	ints = parseInt(getParameter("bg-color"), " ");        bgColor = new Color(ints[0], ints[1], ints[2]);	ints = parseInt(getParameter("fg-menu-color"), " ");        fgMenuColor[0] = new Color(ints[0], ints[1], ints[2]);	ints = parseInt(getParameter("fg-hi-menu-color"), " ");        fgMenuColor[1] = new Color(ints[0], ints[1], ints[2]);	ints = parseInt(getParameter("bg-menu-color"), " ");        bgMenuColor[0] = new Color(ints[0], ints[1], ints[2]);	ints = parseInt(getParameter("bg-hi-menu-color"), " ");        bgMenuColor[1] = new Color(ints[0], ints[1], ints[2]);        // Create back buffer for double-buffering.        bbuf = createImage(size().width, size().height);        bbufG = bbuf.getGraphics();        // Determine the font from the font-height.        int fh = Integer.parseInt(getParameter("font-height"));        int i = fh;        while (i > 10) {            f = new Font(getParameter("font"), Font.PLAIN, i);            fm = getFontMetrics(f);            if (fm.getHeight() <= fh) {                break;            }            i--;        }         // Get the menu parameters.        for (i=0; ; i++) {            if (getParameter("menu"+i) == null) {                hitArea = new Rectangle[i];                srcRect = new Rectangle[i];                dstPt = new Point[i];                url = new String[i];		down = new boolean[i];                itemUrl = new String[i][];		item = new String[i][];                break;            }        }        for (i=0; i<hitArea.length; i++) {	    String[] fields = parse(getParameter("menu"+i), getParameter("separator"));                        // Get the hit area.            ints = parseInt(fields[0], " ");            hitArea[i] = new Rectangle(ints[0], ints[1], ints[2], ints[3]);            // Get the source image.            ints = parseInt(fields[1], " ");            srcRect[i] = new Rectangle(ints[0], ints[1], ints[2], ints[3]);            // Get the destination point.            ints = parseInt(fields[2], " ");            dstPt[i] = new Point(ints[0], ints[1]);	    down[i] = fields[3].equals("d");	    url[i] = fields[4];            item[i] = new String[(fields.length-5)/2];            itemUrl[i] = new String[(fields.length-5)/2];            for (int j=0; j<item [i].length; j++) {                item[i][j] = fields[j*2+5];                itemUrl[i][j] = fields[j*2+6];            }        }    }        // s is a string containing 'sep' separators.  This method    // breaks up the string at the separators and returns the resulting    // strings in an array.  The result may have zero length but is never null.    String[] parse(String s, String sep) {	StringTokenizer st = new StringTokenizer(s, sep);        String result[] = new String[st.countTokens()];	for (int i=0; i<result.length; i++) {            result[i] = st.nextToken();	}        return result;    }    // This method is similar to parse() except that the strings are     // assumed to be decimal integers.  This method coverts these integer    // strings into integers and returns them in an array.    // The result may have zero length but is never null.    int[] parseInt(String s, String sep) {	StringTokenizer st = new StringTokenizer(s, sep);        int[] result = new int[st.countTokens()];	for (int i=0; i<result.length; i++) {            result[i] = Integer.parseInt(st.nextToken());	}        return result;    }    public void paint(Graphics g) {        imageDone = false;        update(g);    }    public void update(Graphics g) {        Graphics g2;        if (!imageDone) {            imageDone = g.drawImage(image, 0, 0, this);            return;        }                bbufG.setColor(bgColor);	bbufG.fillRect(0, 0, size().width, size().height);        bbufG.drawImage(image, 0, 0, this);                if (curMenu >= 0) {            g2 = bbuf.getGraphics();            // Paint the overlay image            g2.clipRect(dstPt[curMenu].x, dstPt[curMenu].y,                srcRect[curMenu].width, srcRect[curMenu].height);            g2.drawImage(image, dstPt[curMenu].x-srcRect[curMenu].x,                dstPt[curMenu].y-srcRect[curMenu].y, this);            g2.dispose();	    g2 = bbuf.getGraphics();	    for (int i=0; i<menuItemRect.length; i++) {		drawMenuItem(g2, i);	    }	    g2.dispose();        }        g.drawImage(bbuf, 0, 0, this);    }    void drawMenuItem(Graphics g, int i) {        int x, y, w, height;        // break the menu item label into lines.        String[] line = parse(item[curMenu][i], getParameter("newline"));        int hi = 0;        if (i == curMenuItem) {	    hi = 1;	    getAppletContext().showStatus(itemUrl[curMenu][i]);        }	g.setColor(bgMenuColor[hi]);	g.fillRect(menuItemRect[i].x, menuItemRect[i].y,	    menuItemRect[i].width, menuItemRect[i].height);        // set color for text and box	g.setColor(fgMenuColor[hi]);        // draw box around menu item.	g.drawRect(menuItemRect[i].x, menuItemRect[i].y,	    menuItemRect[i].width, menuItemRect[i].height);        // draw label        g.setFont(f);        y = menuItemRect[i].y + marginV;        for (i=0; i<line.length; i++) {            g.drawString(line[i],                 menuItemRect[i].x+menuItemRect[i].width-fm.stringWidth(line[i])-marginH,                y + fm.getAscent());            y += fm.getHeight();        }    }    public boolean mouseExit(Event evt, int x, int y) {        curMenuItem = curMenu = -1;	repaint();        return true;    }    public boolean mouseEnter(Event evt, int x, int y) {        return mouseMove(evt, x, y);    }        public boolean mouseDown(Event evt, int x, int y) {        try {            String u = null;            if (curMenuItem >= 0 && itemUrl[curMenu].length > 0) {                u = itemUrl[curMenu][curMenuItem];            } else if (curMenu >= 0) {                u = url[curMenu];            }            if (u != null) {                URL url = new URL (getDocumentBase(), u);                if (getParameter("target") != null) {	            getAppletContext().showDocument(url, getParameter("target"));                } else {	            getAppletContext().showDocument(url);                }            }        } catch (Exception e) {            e.printStackTrace();        }        return true;    }    public boolean mouseMove(Event evt, int x, int y) {        if (curMenu >= 0) {            int sm = inMenu(menuItemRect, x, y);	    if (curMenuItem != sm) {		curMenuItem = sm;		repaint();	    }            if (sm >= 0) {                return true;            }            curMenu = -1;        }        int m = inMenu(hitArea, x, y);        if (m != curMenu) {            curMenu = m;            // A new menu is now active so compute menuItemRect.            if (m >= 0) {                // Minimum width                int maxWidth = 50;                    int maxHeight = 0;                    menuItemRect = new Rectangle[item[curMenu].length];                for (int i=0; i<menuItemRect.length; i++) {                    String[] line = parse(item[curMenu][i], "^");                    for (int j=0; j<line.length; j++) {                        int w = fm.stringWidth(line[j]);                        if (w > maxWidth) {                            maxWidth = w;                        }                    }                    menuItemRect[i] = new Rectangle();                    menuItemRect[i].height =                         parse(item[curMenu][i], "^").length * fm.getHeight()                        + 2 * marginV;                    maxHeight += menuItemRect[i].height;                }	        // Determine domain of submenus                // Add one extra pixel for the left edge.		maxWidth +=  2 * marginH + 1;                if (down[m]) {                    y = Math.max(0, Math.min(size().height-maxHeight-1,                         dstPt[curMenu].y + srcRect[curMenu].height-1));                } else {                    y = Math.max(0, Math.min(size().height-maxHeight-1,                         dstPt[curMenu].y - maxHeight));                }		x = dstPt[curMenu].x + srcRect[curMenu].width-maxWidth-1;	        for (int i=0; i<item[curMenu].length; i++) {                    menuItemRect[i].x = x;                    menuItemRect[i].y = y;                    menuItemRect[i].width = maxWidth;                    y += menuItemRect[i].height;	        }	        getAppletContext().showStatus(url[curMenu]);            }            repaint();        }        return true;    }    // Returns the index of the rectangle in rs containing x and y.    // Returns -1 if either rs is null or x and y is not in rs.    int inMenu(Rectangle[] rs, int x, int y) {        if (rs != null) {            for (int i=0; i<rs.length; i++) {                if (rs[i].inside(x, y)) {                    return i;                }            }        }        return -1;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品情趣| 色八戒一区二区三区| 精品裸体舞一区二区三区| 免费高清视频精品| 精品免费一区二区三区| 精品一区二区三区久久久| 欧美白人最猛性xxxxx69交| 精品一区二区三区免费观看| 欧美精品一区二区三区在线播放 | 久久国产福利国产秒拍| 日韩视频一区二区在线观看| 久久国产福利国产秒拍| 国产亚洲精品福利| 国产精一品亚洲二区在线视频| 日韩免费在线观看| 国产一区二区中文字幕| 国产女人18毛片水真多成人如厕 | 久久精品在线免费观看| 成人精品视频一区| 亚洲免费三区一区二区| 欧美精品aⅴ在线视频| 美国毛片一区二区| 欧美激情在线一区二区三区| 99久久99久久综合| 亚洲成人你懂的| 日韩午夜精品视频| 久久国产三级精品| 欧美精彩视频一区二区三区| 91首页免费视频| 婷婷综合久久一区二区三区| www欧美成人18+| 成人aaaa免费全部观看| 亚洲综合在线电影| 欧美一区三区二区| 国产黄人亚洲片| 一卡二卡欧美日韩| 欧美成人伊人久久综合网| 国产一区二区不卡在线 | 国产精品青草综合久久久久99| av成人老司机| 午夜视频在线观看一区二区三区| 日韩欧美久久久| 不卡的电视剧免费网站有什么| 亚洲永久免费av| 精品1区2区在线观看| 色综合色综合色综合 | 国产精品色呦呦| 欧美人xxxx| 国产成人免费视频网站高清观看视频| 国产无一区二区| 欧美色男人天堂| 国产一二精品视频| 亚洲综合无码一区二区| 精品免费一区二区三区| 在线这里只有精品| 精品一区二区在线观看| 中文av一区二区| 4438亚洲最大| 波多野结衣精品在线| 亚洲成人av在线电影| 欧美激情一区在线观看| 欧美美女激情18p| 成人午夜电影久久影院| 亚洲图片欧美综合| 欧美高清在线视频| 91精品福利在线一区二区三区| 成人白浆超碰人人人人| 日韩国产高清影视| 中文字幕亚洲电影| 欧美成人女星排名| 丁香五精品蜜臀久久久久99网站| 日本不卡视频在线观看| 1000精品久久久久久久久| 欧美成人一区二区三区片免费| 色婷婷精品久久二区二区蜜臂av| 极品少妇一区二区三区精品视频| 亚洲男人的天堂在线aⅴ视频| 亚洲精品一区二区在线观看| 欧美色综合久久| 成人黄色电影在线| 久久99在线观看| 亚洲国产成人av网| 国产精品久久久久久久久免费樱桃| 91精品国产91热久久久做人人| 色综合色综合色综合| 国产不卡免费视频| 日韩av电影天堂| 亚洲人成影院在线观看| 日本一区二区综合亚洲| 欧美刺激脚交jootjob| 欧美丰满美乳xxx高潮www| 91在线观看地址| 国产不卡视频在线观看| 国产在线视频一区二区三区| 日本午夜精品一区二区三区电影| 国产精品久久久一本精品| 久久网站最新地址| 日韩女同互慰一区二区| 欧美精品粉嫩高潮一区二区| 在线观看亚洲精品视频| 福利一区在线观看| 精彩视频一区二区三区| 免费在线观看成人| 日一区二区三区| 亚洲综合一区在线| 又紧又大又爽精品一区二区| 国产精品网站在线播放| 国产情人综合久久777777| 2023国产精品视频| 日韩美女视频在线| 欧美一区二区网站| 欧美乱妇23p| 欧美理论在线播放| 欧美综合欧美视频| 在线看日本不卡| 在线看不卡av| 91麻豆免费看| 色中色一区二区| 97超碰欧美中文字幕| www.亚洲国产| av激情成人网| 97se狠狠狠综合亚洲狠狠| 在线欧美日韩精品| 91.xcao| 日韩一区二区精品| 久久婷婷久久一区二区三区| 国产欧美日韩激情| 亚洲欧美国产高清| 午夜成人免费电影| 久久精品av麻豆的观看方式| 国产精品一区二区三区99| gogo大胆日本视频一区| 欧美性猛交xxxx乱大交退制版| 欧美日韩大陆一区二区| 精品久久久久香蕉网| 欧美激情一区二区| 一区av在线播放| 久久不见久久见免费视频1| 国产精品996| 91在线国产福利| 欧美二区乱c少妇| 久久亚洲私人国产精品va媚药| 国产精品福利一区二区| 亚洲国产成人精品视频| 韩国一区二区在线观看| 99热在这里有精品免费| 欧美剧情片在线观看| 国产亚洲自拍一区| 亚洲视频一区二区在线观看| 亚洲成a人在线观看| 国产一区二区主播在线| 91蜜桃视频在线| 777xxx欧美| 国产女主播在线一区二区| 亚洲一区二区三区四区在线| 久久国产尿小便嘘嘘| 99国内精品久久| 日韩午夜激情视频| 亚洲欧洲成人精品av97| 日韩国产精品大片| 播五月开心婷婷综合| 欧美精品久久天天躁| 欧美激情一区不卡| 日韩电影在线免费观看| 国产91精品露脸国语对白| 欧美日韩在线播放一区| 久久午夜色播影院免费高清| 一个色在线综合| 国产九色sp调教91| 欧美日韩精品一区二区| 国产三级精品视频| 天天色图综合网| www.欧美日韩| 欧美成人高清电影在线| 亚洲精品成人悠悠色影视| 国产曰批免费观看久久久| 欧美三级资源在线| 国产精品乱码一区二区三区软件 | 国产欧美日韩另类视频免费观看| 亚洲 欧美综合在线网络| 成人午夜视频在线观看| 日韩一级二级三级| 亚洲欧美日韩中文播放| 国内精品免费**视频| 欧美三级日韩在线| 中文字幕日韩一区| 欧美综合亚洲图片综合区| 久久久久久久网| 天天色天天爱天天射综合| 91色婷婷久久久久合中文| 亚洲精品在线观| 五月天久久比比资源色| 91蜜桃婷婷狠狠久久综合9色| 久久久久97国产精华液好用吗| 免费看日韩精品| 欧美丝袜丝nylons| 亚洲免费毛片网站| 成人av综合在线| 久久久99精品免费观看| 蜜桃久久av一区|