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

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

?? sortitem.java

?? Java樣例程序集合:2D
?? JAVA
字號(hào):
/* * @(#)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[getSize().height / 2];      double f = getSize().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 = getSize().height - 1;      // Erase old lines      g.setColor(Color.lightGray);      for (int i = a.length; --i >= 0; y -= 2) {          g.drawLine(arr[i], y, getSize().width, y);      }      // Draw new lines      g.setColor(Color.black);      y = getSize().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, getSize().width, y);      }      if (h2 >= 0) {          g.setColor(Color.blue);          y = h2 * 2 + 1;          g.drawLine(0, y, getSize().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() {      Thread myThread = Thread.currentThread();       while (kicker == myThread) {          try {          if (algorithm == null) {            algorithm = (SortAlgorithm)Class.forName(algName).newInstance();            algorithm.setParent(this);          }          algorithm.init();          algorithm.sort(arr);          return;         } catch(Exception e) {         }                        }   }    /**     * Stop the applet. Kill any sorting algorithm that     * is still sorting.     */    public synchronized void stop() {      if (kicker != null) {         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;    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩日欧美一区二区三区| 亚洲h动漫在线| 成人av网站在线| 国产精品理论在线观看| 色综合激情五月| 五月天亚洲婷婷| 欧美精品一区二区不卡| 大尺度一区二区| 亚洲精品成人精品456| 在线播放一区二区三区| 国产一区美女在线| 亚洲三级在线免费观看| 欧美伦理电影网| 国产一区中文字幕| 伊人色综合久久天天| 在线播放视频一区| 成人影视亚洲图片在线| 亚洲精品国产成人久久av盗摄| 欧美精品欧美精品系列| 韩国av一区二区三区四区| 国产精品美女久久久久aⅴ| 91久久人澡人人添人人爽欧美| 奇米综合一区二区三区精品视频| 久久精品视频在线免费观看| 色狠狠桃花综合| 激情图区综合网| 一区二区三区 在线观看视频| 日韩色在线观看| 色综合天天天天做夜夜夜夜做| 美国三级日本三级久久99| 亚洲欧美在线视频| 精品国产一区久久| 欧美在线你懂的| 丁香五精品蜜臀久久久久99网站| 亚洲国产cao| 国产精品全国免费观看高清 | www精品美女久久久tv| 91色视频在线| 精品综合免费视频观看| 亚洲一区二三区| 国产精品视频线看| 欧美一区午夜视频在线观看| 91一区二区三区在线观看| 精品影视av免费| 亚洲bt欧美bt精品| 亚洲人xxxx| 国产免费观看久久| 精品国产髙清在线看国产毛片| 91国偷自产一区二区三区成为亚洲经典 | 日韩av不卡在线观看| 亚洲精品乱码久久久久久久久| 精品福利在线导航| 欧美高清精品3d| 色哟哟亚洲精品| www.久久久久久久久| 国产在线视频一区二区| 免费看日韩精品| 亚洲va国产va欧美va观看| 亚洲视频网在线直播| 国产欧美精品日韩区二区麻豆天美| 91精品国产91综合久久蜜臀| 欧美丝袜自拍制服另类| 日本韩国欧美三级| 91蜜桃传媒精品久久久一区二区| 国产黄色成人av| 国产在线精品一区二区不卡了| 欧美a级一区二区| 视频一区二区不卡| 日韩精品国产精品| 日本午夜一区二区| 日本强好片久久久久久aaa| 天堂蜜桃91精品| 首页国产欧美久久| 日韩高清不卡一区二区| 日韩电影在线一区| 久久av资源网| 国产酒店精品激情| 成人三级伦理片| 成人精品一区二区三区四区| 波多野结衣亚洲| 一本色道a无线码一区v| 欧美性猛片xxxx免费看久爱| 在线观看不卡一区| 91精品国产色综合久久久蜜香臀| 91.com在线观看| 精品国内二区三区| 久久蜜桃香蕉精品一区二区三区| 久久午夜免费电影| 亚洲欧洲另类国产综合| 一区二区在线观看视频在线观看| 亚洲成人午夜电影| 久久精品999| 成人18精品视频| 欧美主播一区二区三区| 日韩欧美在线1卡| 久久精品这里都是精品| 亚洲欧美日韩国产中文在线| 亚洲国产另类av| 国模冰冰炮一区二区| 99久久久无码国产精品| 欧美乱熟臀69xxxxxx| 久久影院午夜论| 最新久久zyz资源站| 午夜av一区二区三区| 国产综合久久久久久鬼色| 成人国产精品视频| 欧美日韩国产美女| 欧美激情一区不卡| 亚洲一区二区在线播放相泽 | 紧缚奴在线一区二区三区| 国产盗摄一区二区三区| 在线观看视频一区二区 | 国产亚洲综合av| 亚洲欧美另类在线| 麻豆专区一区二区三区四区五区| 岛国一区二区三区| 精品视频色一区| 国产欧美一区二区三区鸳鸯浴| 一区二区三区四区激情| 成人动漫视频在线| 3atv一区二区三区| 亚洲欧美视频一区| 国精产品一区一区三区mba视频| 成人一区在线观看| 日韩免费高清av| 一区二区在线观看视频在线观看| 美女网站色91| 精品视频在线看| 亚洲欧洲国产日韩| 国产一区二区在线免费观看| 欧美喷潮久久久xxxxx| 中文字幕五月欧美| 国产精品中文字幕一区二区三区| 欧美日韩三级一区| 亚洲色图丝袜美腿| 国产成人av一区二区| 日韩一级精品视频在线观看| 一区二区三区在线视频观看| 成人性视频免费网站| 欧美v国产在线一区二区三区| 亚洲国产wwwccc36天堂| 色综合中文字幕| 国产日韩欧美精品一区| 久久精品国产99国产| 337p亚洲精品色噜噜| 一区二区三区自拍| 波多野结衣一区二区三区| 国产三级三级三级精品8ⅰ区| 老司机免费视频一区二区| 欧美另类一区二区三区| 亚洲一区二区偷拍精品| 一本色道久久加勒比精品| 亚洲欧洲精品一区二区精品久久久| 国产一区二区三区免费| 久久夜色精品国产欧美乱极品| 日韩av一区二| 日韩午夜精品电影| 日本在线播放一区二区三区| 欧美日韩久久不卡| 亚洲成a天堂v人片| 欧美日韩精品是欧美日韩精品| 亚洲综合色自拍一区| 欧美又粗又大又爽| 亚洲一区二区美女| 欧美日韩高清在线播放| 午夜精品久久久久久久久久久| 欧美体内she精视频| 香蕉加勒比综合久久| 欧美日韩一级片网站| 丝瓜av网站精品一区二区| 欧美精品日韩一区| 青青草国产精品97视觉盛宴| 日韩欧美一区二区三区在线| 久久精品国产秦先生| 国产丝袜欧美中文另类| 成人av电影在线观看| 伊人夜夜躁av伊人久久| 欧美三级韩国三级日本一级| 日韩专区在线视频| 久久香蕉国产线看观看99| 成人免费毛片高清视频| 亚洲免费成人av| 欧美日韩成人激情| 久久精品国产99| 国产精品拍天天在线| 91成人网在线| 日韩中文字幕不卡| 久久久久久9999| 色综合久久综合网欧美综合网| 亚洲va国产va欧美va观看| 日韩欧美国产综合| 成人午夜短视频| 亚洲国产一区二区视频| 欧美变态凌虐bdsm| 成人网页在线观看| 天天影视涩香欲综合网 | 亚洲男人天堂av| 欧美久久久久久久久久| 国产精品一区三区| 亚洲一区二区三区自拍|