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

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

?? sortitem.java

?? java程序設計
?? 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[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;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
6080国产精品一区二区| 日韩欧美国产1| 成人午夜电影网站| 国产精品资源在线观看| 国产精品自拍网站| 成人三级伦理片| 99在线热播精品免费| 91黄视频在线| 在线播放视频一区| 日韩丝袜情趣美女图片| 精品国产凹凸成av人导航| 欧美国产丝袜视频| 一区二区三区在线免费观看| 伊人色综合久久天天| 天天影视网天天综合色在线播放| 丝袜美腿亚洲一区| 国产一区日韩二区欧美三区| 成人av在线资源网| 欧美日韩黄视频| 久久综合久久久久88| 中文字幕亚洲欧美在线不卡| 亚洲一级二级三级在线免费观看| 日韩精品免费专区| 高清国产一区二区| 欧美性色aⅴ视频一区日韩精品| 欧美剧情电影在线观看完整版免费励志电影 | yourporn久久国产精品| 99国产欧美久久久精品| 欧美电影一区二区三区| 日本一区二区在线不卡| 亚洲成人av在线电影| 青娱乐精品在线视频| 99久久国产综合精品色伊| 欧美在线一区二区| 久久久久国产精品免费免费搜索| 亚洲精品伦理在线| 国产精品系列在线播放| 欧美日韩在线免费视频| 中文字幕的久久| 日本少妇一区二区| 色女孩综合影院| 26uuu国产在线精品一区二区| 亚洲精品中文字幕在线观看| 国产一区二区不卡老阿姨| 欧美日韩性生活| 国产精品美女视频| 激情伊人五月天久久综合| 欧美午夜精品一区二区蜜桃| 国产精品久久久久影视| 麻豆91免费观看| 欧美日韩精品福利| 一区二区在线观看视频 | 久久婷婷国产综合国色天香| 亚洲精品国产一区二区精华液| 国产传媒久久文化传媒| 日韩一级免费一区| 亚洲电影视频在线| 99re热这里只有精品免费视频| 久久久亚洲精品一区二区三区| 天堂av在线一区| 欧美综合视频在线观看| 一区二区在线观看免费| 色综合天天狠狠| 中文字幕一区二区三区乱码在线| 国产98色在线|日韩| 国产性色一区二区| 国内成人免费视频| 欧美变态凌虐bdsm| 久久福利资源站| 日韩你懂的电影在线观看| 免费成人在线观看| 欧美一级片在线观看| 亚洲一区在线观看免费观看电影高清 | 风间由美一区二区av101| 欧美mv日韩mv国产网站app| 久久66热re国产| 欧美成人性战久久| 国产成人在线视频网站| 国产女人18水真多18精品一级做 | 亚洲国产另类av| 欧美亚洲动漫制服丝袜| 亚洲午夜久久久久| 精品视频在线看| 免费日韩伦理电影| 久久精品一区蜜桃臀影院| 成人精品免费网站| 亚洲女与黑人做爰| 欧美三级在线看| 美女免费视频一区| 国产欧美中文在线| av中文一区二区三区| 亚洲黄色小说网站| 91精品蜜臀在线一区尤物| 久草中文综合在线| 国产精品国产精品国产专区不片| 一本色道久久综合狠狠躁的推荐| 亚洲国产欧美在线人成| 精品久久久久久久久久久久久久久久久| 免费在线看一区| 国产精品三级在线观看| 在线观看www91| 精彩视频一区二区| 亚洲美腿欧美偷拍| 欧美刺激午夜性久久久久久久 | 色综合久久久久综合| 亚洲国产精品一区二区久久| 日韩无一区二区| 色综合一区二区| 麻豆精品一区二区| 亚洲视频1区2区| 欧美一级高清片| 99九九99九九九视频精品| 日韩在线卡一卡二| 国产精品国产馆在线真实露脸| 欧美肥胖老妇做爰| 成人美女视频在线看| 青娱乐精品视频| 亚洲精品视频免费看| 亚洲精品在线免费播放| 欧美日韩一区在线| proumb性欧美在线观看| 久久69国产一区二区蜜臀| 亚洲国产一区二区a毛片| 国产精品乱人伦一区二区| 欧美一级理论性理论a| 99在线精品观看| 国产成人精品亚洲777人妖| 日本在线不卡一区| 一级中文字幕一区二区| 中文字幕在线一区二区三区| 久久亚区不卡日本| 日韩女优电影在线观看| 4hu四虎永久在线影院成人| 一本大道av伊人久久综合| 成人综合婷婷国产精品久久蜜臀| 免费高清不卡av| 偷窥少妇高潮呻吟av久久免费| 日韩美女久久久| 国产精品色婷婷久久58| 国产亚洲欧洲997久久综合| 欧美一区二区三区公司| 欧美日韩一区二区在线观看| 不卡的看片网站| jlzzjlzz亚洲日本少妇| 成人午夜电影小说| 成人免费观看av| 99久久99久久免费精品蜜臀| 成人h动漫精品一区二| 成人午夜在线播放| 成人自拍视频在线观看| 成人动漫一区二区| 成人sese在线| 91色.com| 欧美视频在线不卡| 欧美麻豆精品久久久久久| 91.com在线观看| 日韩精品一区二区三区四区视频| 欧美一区三区四区| 欧美精品一区二区精品网| 精品国产3级a| 国产精品区一区二区三| 国产精品卡一卡二卡三| 亚洲日本韩国一区| 亚洲五码中文字幕| 免费成人在线播放| 国产成人免费视频网站| 99精品视频一区| 欧美色区777第一页| 欧美一区二区三区公司| 国产亚洲欧美日韩俺去了| 欧美高清在线精品一区| 亚洲精品水蜜桃| 蜜桃视频免费观看一区| 国产成人精品免费网站| 欧洲精品视频在线观看| 日韩三级免费观看| 中文字幕精品在线不卡| 亚洲网友自拍偷拍| 国产一区二区免费看| 色悠悠亚洲一区二区| 国产精品午夜电影| 亚洲精品综合在线| 精品一区二区在线视频| 91在线精品一区二区三区| 欧美一级久久久久久久大片| 国产亚洲一区二区三区| 亚洲一区二区三区国产| 国产一区999| 欧美日韩国产中文| 国产免费成人在线视频| 日韩影院精彩在线| 97久久精品人人做人人爽50路| 欧美性感一区二区三区| 一区二区国产视频| 久久国产精品99精品国产| 91老师国产黑色丝袜在线| 欧美zozo另类异族| 亚洲一区免费在线观看| 成人av网站在线观看| 精品国精品国产|