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

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

?? sortitem.java

?? 北大Java 語言程序設計 ppt課件及源碼
?? JAVA
字號:
/* * @(#)SortItem.java	1.17f 95/04/10 James Gosling * * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved. * * Permission to use, copy, modify, and distribute this software * and its documentation for NON-COMMERCIAL purposes and without * fee is hereby granted provided that this copyright notice * appears in all copies. Please refer to the file "copyright.html" * for further important copyright and licensing information. * * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. */import java.awt.*;import java.io.InputStream;import java.util.Hashtable;import java.net.*;/** * A simple applet class to demonstrate a sort algorithm. * You can specify a sorting algorithm using the "alg" * attribyte. When you click on the applet, a thread is * forked which animates the sorting algorithm. * * @author James Gosling * @version 	1.17f, 10 Apr 1995 */public class SortItem extends java.applet.Applet implements Runnable {    /**     * The thread that is sorting (or null).     */    private Thread kicker;    /**     * The array that is being sorted.     */    int[] arr;    /**     * The high water mark.     */    int h1 = -1;    /**     * The low water mark.     */    int h2 = -1;    /**     * The name of the algorithm.     */    String algName;    /**     * The sorting algorithm (or null).     */    SortAlgorithm algorithm;    /**     * Fill the array with random numbers from 0..n-1.     */    void scramble() {	int[] a = new int[size().height / 2];	double f = size().width / (double) a.length;	for (int i = a.length; --i >= 0;) {	    a[i] = (int)(i * f);	}	for (int i = a.length; --i >= 0;) {	    int j = (int)(i * Math.random());	    int t = a[i];	    a[i] = a[j];	    a[j] = t;	}	arr = a;    }    /**     * Pause a while.     * @see SortAlgorithm     */    void pause() {	pause(-1, -1);    }    /**     * Pause a while, and draw the high water mark.     * @see SortAlgorithm     */    void pause(int H1) {	pause(H1, -1);    }    /**     * Pause a while, and draw the low&high water marks.     * @see SortAlgorithm     */    void pause(int H1, int H2) {	h1 = H1;	h2 = H2;	if (kicker != null) {	    repaint();	}	try {Thread.sleep(20);} catch (InterruptedException e){}    }    /**     * Initialize the applet.     */    public void init() {	String at = getParameter("alg");	if (at == null) {	    at = "BubbleSort";	}	algName = at + "Algorithm";	scramble();        setBackground(Color.white);	resize(100, 100);    }    /**     * Paint the array of numbers as a list     * of horizontal lines of varying lenghts.     */    public void paint(Graphics g) {	int[] a = arr;	int y = size().height - 1;	// Erase old lines	g.setColor(Color.lightGray);	for (int i = a.length; --i >= 0; y -= 2) {	    g.drawLine(arr[i], y, size().width, y);	}	// Draw new lines	g.setColor(Color.black);	y = size().height - 1;	for (int i = a.length; --i >= 0; y -= 2) {	    g.drawLine(0, y, arr[i], y);	}	if (h1 >= 0) {	    g.setColor(Color.red);	    y = h1 * 2 + 1;	    g.drawLine(0, y, size().width, y);	}	if (h2 >= 0) {	    g.setColor(Color.blue);	    y = h2 * 2 + 1;	    g.drawLine(0, y, size().width, y);	}    }    /**     * Update without erasing the background.     */    public void update(Graphics g) {	paint(g);    }    /**     * Run the sorting algorithm. This method is     * called by class Thread once the sorting algorithm     * is started.     * @see java.lang.Thread#run     * @see SortItem#mouseUp     */    public void run() {	try {	    if (algorithm == null) {		algorithm = (SortAlgorithm)Class.forName(algName).newInstance();		algorithm.setParent(this);	    }	    algorithm.init();	    algorithm.sort(arr);	} catch(Exception e) {	}    }    /**     * Stop the applet. Kill any sorting algorithm that     * is still sorting.     */    public synchronized void stop() {	if (kicker != null) {            try {		kicker.stop();            } catch (IllegalThreadStateException e) {                // ignore this exception            }	    kicker = null;	}	if (algorithm != null){            try {		algorithm.stop();            } catch (IllegalThreadStateException e) {                // ignore this exception            }	}    }    /**     * For a Thread to actually do the sorting. This routine makes     * sure we do not simultaneously start several sorts if the user     * repeatedly clicks on the sort item.  It needs to be     * synchronoized with the stop() method because they both     * manipulate the common kicker variable.     */    private synchronized void startSort() {	if (kicker == null || !kicker.isAlive()) {	    scramble();	    repaint();	    kicker = new Thread(this);	    kicker.start();	}    }    /**     * The user clicked in the applet. Start the clock!     */    public boolean mouseUp(java.awt.Event evt, int x, int y) {	startSort();	return true;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91色porny在线视频| 色哟哟在线观看一区二区三区| 国产亚洲一区二区在线观看| 欧美特级限制片免费在线观看| 99久久免费精品高清特色大片| www.欧美.com| 成av人片一区二区| 91热门视频在线观看| 久久综合狠狠综合| 久久亚洲欧美国产精品乐播| 亚洲国产日韩一区二区| 亚洲成av人片一区二区| 六月婷婷色综合| 色屁屁一区二区| 日韩欧美国产1| 国产视频一区二区在线| 蜜芽一区二区三区| 一级精品视频在线观看宜春院| 亚洲视频在线一区| 亚洲在线视频免费观看| 另类小说色综合网站| 欧美日韩国产美| 久久久国产一区二区三区四区小说| 国产精品国产自产拍高清av| 一区二区在线电影| 久久se精品一区二区| 777色狠狠一区二区三区| 久久精品夜色噜噜亚洲a∨| 热久久免费视频| 88在线观看91蜜桃国自产| 亚洲福利一二三区| 欧美日韩在线播| 久久亚洲综合av| 精品在线亚洲视频| 丁香婷婷综合激情五月色| 欧美亚洲国产一区二区三区va| 亚洲色图一区二区| 在线观看日韩av先锋影音电影院| 日韩欧美电影一区| 国模一区二区三区白浆| 成人夜色视频网站在线观看| 日韩欧美综合一区| 亚洲欧美日韩在线播放| 国产麻豆精品视频| 欧美精品久久一区| 亚洲精品中文字幕在线观看| 色婷婷国产精品久久包臀| 亚洲线精品一区二区三区八戒| 欧美午夜免费电影| 麻豆成人综合网| 久久午夜羞羞影院免费观看| 成人午夜av影视| 亚洲免费在线视频| 欧美日韩高清一区| 国产在线乱码一区二区三区| 欧美国产精品v| 精品制服美女久久| 国产精品毛片久久久久久久| 国产高清亚洲一区| 久久夜色精品国产欧美乱极品| 懂色av一区二区三区免费看| 一级做a爱片久久| 精品国产乱码久久久久久浪潮| 天天色 色综合| 欧美日韩一区精品| 国模无码大尺度一区二区三区| 亚洲视频综合在线| 日韩一区二区精品| 91亚洲精品一区二区乱码| 亚洲电影一级片| 中日韩av电影| 在线综合视频播放| 成人黄色小视频| 午夜精品在线看| 国产精品国产三级国产有无不卡| 欧美精品亚洲一区二区在线播放| 高清在线成人网| 三级欧美在线一区| 精品人在线二区三区| 奇米精品一区二区三区四区| 中文字幕一区日韩精品欧美| 99精品视频在线免费观看| 成人av网址在线观看| 亚洲色图在线视频| 久久综合成人精品亚洲另类欧美 | 韩国女主播一区| 亚洲自拍另类综合| 国产精品久久久久久久第一福利| 欧美不卡在线视频| 欧美日韩国产综合一区二区三区 | 91在线一区二区三区| 精品影视av免费| 亚洲午夜精品17c| 亚洲精品v日韩精品| 欧美国产综合色视频| 久久免费美女视频| 日韩欧美一二区| 欧美日本韩国一区二区三区视频| 一本大道久久a久久综合婷婷| 国产成人精品网址| 国产成人亚洲综合a∨猫咪| 免费观看久久久4p| 免费在线视频一区| 日本亚洲天堂网| 国产欧美日韩在线看| 在线精品观看国产| 日本乱码高清不卡字幕| 亚洲高清久久久| 亚洲在线成人精品| 一卡二卡三卡日韩欧美| 亚洲精品视频在线观看免费| 亚洲欧美在线高清| ...中文天堂在线一区| 国产精品国产三级国产普通话蜜臀 | 水蜜桃久久夜色精品一区的特点| 一区二区三区日韩精品| 亚洲精品亚洲人成人网在线播放| 中文字幕亚洲一区二区av在线| 中文字幕精品综合| 一区在线观看视频| 亚洲视频1区2区| 一区二区在线观看视频在线观看| 亚洲一区二区精品3399| 午夜视频一区二区| 美女尤物国产一区| 国产美女久久久久| 成人avav影音| 91久久精品一区二区三区| 欧美主播一区二区三区美女| 欧美美女bb生活片| 精品国产髙清在线看国产毛片| 精品播放一区二区| 国产精品理论在线观看| 一区二区三区在线观看网站| 亚瑟在线精品视频| 国产一区二区三区免费观看| 大桥未久av一区二区三区中文| 成人视屏免费看| 色狠狠色狠狠综合| 欧美一二三区在线| 中文字幕精品综合| 亚洲v中文字幕| 国产精品一二三四区| 蜜桃av噜噜一区二区三区小说| 久久成人精品无人区| av在线综合网| 欧美放荡的少妇| 欧美激情一区在线观看| 亚洲国产中文字幕在线视频综合| 免费三级欧美电影| 99久久精品免费| 欧美一区二区三区性视频| 91精品一区二区三区久久久久久| 久久亚洲一级片| 亚洲综合在线第一页| 极品少妇xxxx精品少妇偷拍| 99久久精品费精品国产一区二区| 欧美精选一区二区| 亚洲桃色在线一区| 精品一区二区三区免费播放 | 日韩精品一区二| 亚洲日本青草视频在线怡红院| 美女一区二区久久| 一本在线高清不卡dvd| 精品毛片乱码1区2区3区| 亚洲午夜免费电影| 不卡视频在线观看| 久久综合成人精品亚洲另类欧美| 亚洲动漫第一页| a级精品国产片在线观看| 精品日韩在线观看| 日韩精品一二区| 色婷婷综合久久久中文一区二区 | 久久亚洲综合av| 日韩精品每日更新| 色先锋久久av资源部| 国产婷婷一区二区| 九九热在线视频观看这里只有精品| 91电影在线观看| 亚洲天堂成人网| 国产成人在线网站| 欧美变态凌虐bdsm| 奇米精品一区二区三区在线观看 | 亚洲欧洲精品一区二区三区| 九九精品视频在线看| 91精品啪在线观看国产60岁| 亚洲日本在线a| 91丨porny丨国产| 国产女同性恋一区二区| 国产一区二区三区免费看 | 国产精品资源网站| 欧美成人伊人久久综合网| 天天av天天翘天天综合网| 在线视频一区二区免费| 亚洲视频在线一区| 在线欧美日韩国产| 亚洲一区免费视频| 欧美另类久久久品| 奇米亚洲午夜久久精品| 日韩一级黄色大片|