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

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

?? 好.txt

?? 這是一個不錯的程序 值得亦看 可以仔細研究研究
?? TXT
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Copyright (c) 2002 Sun Microsystems, Inc. All  Rights Reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 
 * -Redistributions of source code must retain the above copyright
 *  notice, this list of conditions and the following disclaimer.
 * 
 * -Redistribution in binary form must reproduct the above copyright
 *  notice, this list of conditions and the following disclaimer in
 *  the documentation and/or other materials provided with the distribution.
 * 
 * Neither the name of Sun Microsystems, Inc. or the names of contributors
 * may be used to endorse or promote products derived from this software
 * without specific prior written permission.
 * 
 * This software is provided "AS IS," without a warranty of any kind. ALL
 * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
 * ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
 * OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT
 * BE LIABLE FOR ANY DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT
 * OF OR RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR ITS
 * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
 * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
 * INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
 * OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN
 * IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 * 
 * You acknowledge that Software is not designed, licensed or intended for
 * use in the design, construction, operation or maintenance of any nuclear
 * facility.
 */

/*
 * @(#)Animator.java	1.8 02/06/13
 */

import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
import java.applet.AudioClip;
import java.util.Vector;
import java.util.Hashtable;
import java.util.Enumeration;
import java.net.URL;
import java.net.MalformedURLException;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;

/**
 * An applet that plays a sequence of images, as a loop or a one-shot.
 * Can have a soundtrack and/or sound effects tied to individual frames.
 * See the <a href="http://java.sun.com/applets/applets/Animator/">Animator
 * home page</a> for details and updates.
 *
 * @author Herb Jellinek
 * @version 1.8, 06/13/02
 */
public class Animator extends Applet implements Runnable, MouseListener {
    int appWidth = 0;                // Animator width
    int appHeight = 0;               // Animator height
    Thread engine = null;            // Thread animating the images
    boolean userPause = false;       // True if thread currently paused by user
    boolean loaded = false;          // Can we paint yet?
    boolean error = false;           // Was there an initialization error?
    Animation animation = null;      // Animation this animator contains
    String hrefTarget = null;        // Frame target of reference URL if any
    URL hrefURL = null;              // URL link for information if any
 
    static final String sourceLocation = 
                          "http://java.sun.com/applets/applets/Animator/";
    static final String userInstructions = "shift-click for errors, info";
    static final int STARTUP_ID    = 0;
    static final int BACKGROUND_ID = 1;
    static final int ANIMATION_ID  = 2;

    /**
     * Applet info.
     */
    public String getAppletInfo() {
	return "Animator v1.10 (02/05/97), by Herb Jellinek";
    }

    /**
     * Parameter info.
     */
    public String[][] getParameterInfo() {
	String[][] info = {
	    {"imagesource", 	"URL", 	       "a directory"},
	    {"startup", 	"URL", 	       "image displayed at start-up"},
	    {"backgroundcolor", "int", "background color (24-bit RGB number)"},
	    {"background", 	"URL", 	      "image displayed as background"},
	    {"startimage", 	"int", 	       "index of first image"},
	    {"endimage", 	"int", 	       "index of last image"},
	    {"namepattern",     "URL",         "generates indexed names"},
	    {"images",          "URLs",        "list of image indices"},
	    {"href",		"URL",	       "page to visit on mouse-click"},
	    {"target",		"name",	       "frame to put that page in"},
	    {"pause", 	        "int", 	       "global pause, milliseconds"},
	    {"pauses", 	        "ints",     "individual pauses, milliseconds"},
	    {"repeat", 	        "boolean",     "repeat? true or false"},
	    {"positions",       "coordinates", "path images will follow"},
	    {"soundsource",	"URL", 	       "audio directory"},
	    {"soundtrack",	"URL", 	       "background music"},
	    {"sounds",		"URLs",	       "list of audio samples"},
	};
	return info;
    }

    /**
     * Show a crude "About" box.  Displays credits, errors (if any), and
     * parameter values and documentation.
     */
    void showDescription() {
	DescriptionFrame description = new DescriptionFrame();	    
	description.tell("\t\t"+getAppletInfo()+"\n");
	description.tell("Updates, documentation at "+sourceLocation+"\n\n");
	description.tell("Document base: "+getDocumentBase()+"\n");
	description.tell("Code base: "+getCodeBase()+"\n\n");
	
	Object errors[] = animation.tracker.getErrorsAny();
	if (errors != null) {
	    description.tell("Applet image errors:\n");
	    for (int i = 0; i < errors.length; i++) {
		if (errors[i] instanceof Image) {
		    AnimationFrame frame = (AnimationFrame) 
                                              animation.frames.get(i);
                    URL url = frame.imageLocation;
		    if (url != null) {
			description.tell(" "+url+" not loaded\n");
		    }
		}
	    }
	    description.tell("\n");
	}
	if (animation.frames == null || animation.frames.size() == 0)
	    description.tell("\n** No images loaded **\n\n");
	description.tell("Applet parameters:\n");
	description.tell(" width = "+getParameter("WIDTH")+"\n");
	description.tell(" height = "+getParameter("HEIGHT")+"\n");
	String params[][] = getParameterInfo();
	for (int i = 0; i < params.length; i++) {
	    String name = params[i][0];
	    description.tell(" "+name+" = "+getParameter(name)+
			     "\t ["+params[i][2]+"]\n");
	}
	description.show();
    }

    /**
     * Local version of getParameter for debugging purposes.
     */
    public String getParam(String key) {
	String result = getParameter(key);
	return result;
    }

    /**
     * Get parameters and parse them
     */
    public void handleParams() {
        try {
	    String param = getParam("IMAGESOURCE");
	    animation.imageSource = (param == null) ? getDocumentBase() :
                new URL(getDocumentBase(), param + "/");
	
	    String href = getParam("HREF");
	    if (href != null) {
		try {
		    hrefURL = new URL(getDocumentBase(), href);
		} catch (MalformedURLException e) {
		    showParseError(e);
		}
	    }

	    hrefTarget = getParam("TARGET");
	    if (hrefTarget == null)
		hrefTarget = "_top";
	    param = getParam("PAUSE");
            if (param != null)
                animation.setGlobalPause(Integer.parseInt(param));
	    param = getParam("REPEAT");
	    animation.repeat = (param == null) ? true :
                (param.equalsIgnoreCase("yes") ||
                 param.equalsIgnoreCase("true"));
	    int startImage = 1;
	    int endImage = 1;
	    param = getParam("ENDIMAGE");
	    if (param != null) {
		endImage = Integer.parseInt(param);
		param = getParam("STARTIMAGE");
		if (param != null) {
		    startImage = Integer.parseInt(param);
		}
                param = getParam("NAMEPATTERN");
                animation.prepareImageRange(startImage, endImage, param);
	    } else {
		param = getParam("STARTIMAGE");
		if (param != null) {
		    startImage = Integer.parseInt(param);
		    param = getParam("NAMEPATTERN");
		    animation.prepareImageRange(startImage, endImage, param);
		} else {
		    param = getParam("IMAGES");
		    if (param == null) {
			showStatus("No legal IMAGES, STARTIMAGE, or ENDIMAGE "+
				   "specified.");
			error = true;
			return;
		    } else {
			animation.parseImages(param, getParam("NAMEPATTERN"));
		    }
		}
	    }

	    param = getParam("BACKGROUND");
	    if (param != null)
		animation.backgroundImageURL = new URL(animation.imageSource,
                                                       param);
	    param = getParam("BACKGROUNDCOLOR");
	    if (param != null)
		animation.backgroundColor = decodeColor(param);
	    param = getParam("STARTUP");
	    if (param != null)
		animation.startUpImageURL = new URL(animation.imageSource, 
                                                    param);
	    param = getParam("SOUNDSOURCE");
	    animation.soundSource = (param == null) ? animation.imageSource :
                new URL(getDocumentBase(), param + "/");	
	    param = getParam("SOUNDS");
	    if (param != null)
		animation.parseSounds(param);
	    param = getParam("PAUSES");
	    if (param != null)
		animation.parseDurations(param);
	    param = getParam("POSITIONS");
	    if (param != null) 
		animation.parsePositions(param);
	    param = getParam("SOUNDTRACK");
	    if (param != null)
		animation.soundTrackURL = new URL(
                                          animation.soundSource, param);
	} catch (MalformedURLException e) {
	    showParseError(e);
	} catch (ParseException e) {
	    showParseError(e);
	}
    }

    private Color decodeColor(String s) {
	int val = 0;
	try {
	    if (s.startsWith("0x")) {
		val = Integer.parseInt(s.substring(2), 16);
	    } else if (s.startsWith("#")) {
		val = Integer.parseInt(s.substring(1), 16);
	    } else if (s.startsWith("0") && s.length() > 1) {
		val = Integer.parseInt(s.substring(1), 8);
	    } else {
		val = Integer.parseInt(s, 10);
	    }
	    return new Color(val);
	} catch (NumberFormatException e) {
	    return null;
	}
    }
    
    /**
     * Initialize the applet.  Get parameters.
     */
    public void init() {
        
        //animation.tracker = new MediaTracker(this);
	appWidth = getSize().width;
	appHeight = getSize().height;
        animation = new Animation(this);
        handleParams();
        animation.init();
	addMouseListener(this);
        Thread me = Thread.currentThread();
        me.setPriority(Thread.MIN_PRIORITY);
        userPause = false;
    }

    public void destroy() {
        removeMouseListener(this);
    }

    void tellLoadingMsg(String file, String fileType) {
	showStatus("Animator: loading "+fileType+" "+file);
    }

    void tellLoadingMsg(URL url, String fileType) {
	tellLoadingMsg(url.toExternalForm(), fileType);
    }

    void clearLoadingMessage() {
	showStatus("");
    }
    
    void loadError(String fileName, String fileType) {
	String errorMsg = "Animator: Couldn't load "+fileType+" "+
	    fileName;
	showStatus(errorMsg);
	System.err.println(errorMsg);
	error = true;
	repaint();
    }

    void loadError(URL badURL, String fileType) {
	loadError(badURL.toExternalForm(), fileType);
    }

    void showParseError(Exception e) {
	String errorMsg = "Animator: Parse error: "+e;
	showStatus(errorMsg);
	System.err.println(errorMsg);
	error = true;
	repaint();
    }

    /**
     * Run the animation. This method is called by class Thread.
     * @see java.lang.Thread
     */
    public void run() {
        Thread me = Thread.currentThread();
        if (animation.frames == null)
            return;
        if ((appWidth <= 0) || (appHeight <= 0))
            return;
	try {
            while (engine == me) {
                // Get current frame and paint it, play its sound
                AnimationFrame thisFrame = (AnimationFrame) 
                               animation.frames.get(animation.currentFrame);
                repaint();
                if (thisFrame.sound != null)
                    thisFrame.sound.play();

                animation.currentFrame++;
                 // Check if we are done
                if (animation.currentFrame >= animation.frames.size()) {
                    if (animation.repeat)
                        animation.currentFrame = 0;
                    else return;
                }

                // Pause for duration or longer if user paused
                try {        
                    Thread.sleep(thisFrame.duration);
                    synchronized(this) {
                        while (userPause) {
                            animation.stopPlaying();
                            wait();
                        }
                    }
                }
                catch (InterruptedException e) {
                }
            }
        } finally {
            synchronized(this) {
            if (engine == me)
                animation.stopPlaying();
            }
        }
    }

    /**
     * No need to clear anything; just paint.
     */
    public void update(Graphics g) {
	paint(g);
    }

    /**
     * Paint the current frame
     */
    public void paint(Graphics g) {
        if (error || ! loaded) {
            if (animation.startUpImage != null) {
		if (animation.tracker.checkID(STARTUP_ID)) {
		    if (animation.backgroundColor != null) {
			g.setColor(animation.backgroundColor);
			g.fillRect(0, 0, appWidth, appHeight);
		    }
		    g.drawImage(animation.startUpImage, 0, 0, this);
		}
	    } else {
		if ((animation.backgroundImage != null) &&
		     (animation.tracker.checkID(BACKGROUND_ID)))
			g.drawImage(animation.backgroundImage, 0, 0, this);
		else 
		    g.clearRect(0, 0, appWidth, appHeight);
	    }
        } else {
            animation.paint(g);
        }
    }

    /**
     * Start the applet by forking an animation thread.
     */
    public void start() {
	engine = new Thread(this);
	engine.start();
	showStatus(getAppletInfo());
    }

    /**
     * Stop the insanity, um, applet.
     */
    public synchronized void stop() {
	engine = null;
        animation.stopPlaying();
         if (userPause) {
            userPause = false;
            notify();
        }
    }

    /**
     * Pause the thread when the user clicks the mouse in the applet.
     * If the thread has stopped (as in a non-repeat performance),
     * restart it.
     */
    public synchronized void mousePressed(MouseEvent event) {
        event.consume();
	if ((event.getModifiers() & InputEvent.SHIFT_MASK) != 0) {
	    showDescription();
	    return;
	} else if (hrefURL != null) {
            //Let mouseClicked handle this.
            return;
        } else if (loaded) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本久久a久久精品亚洲 | 成人丝袜视频网| 精品久久久久久久久久久院品网| 天天综合网天天综合色| 717成人午夜免费福利电影| 免费观看在线色综合| 日韩精品一区二区三区视频播放 | 26uuu精品一区二区三区四区在线| 美女脱光内衣内裤视频久久影院| 欧美一级黄色录像| 国产寡妇亲子伦一区二区| 国产精品免费看片| 欧美最猛性xxxxx直播| 日韩主播视频在线| 久久久不卡网国产精品一区| 99久久国产综合精品女不卡| 一区二区三国产精华液| 91精品国产一区二区三区香蕉| 久久99国产精品久久| 中文字幕亚洲精品在线观看| 欧美日韩在线直播| 国产成人综合视频| 亚洲精品欧美在线| 亚洲精品在线免费播放| 99精品国产91久久久久久| 免播放器亚洲一区| 亚洲图片激情小说| 欧美成人精品1314www| 96av麻豆蜜桃一区二区| 日本视频中文字幕一区二区三区| 中文字幕精品综合| 欧美精品在线观看一区二区| 国产成人精品综合在线观看| 亚洲一区二区视频在线观看| 精品国产青草久久久久福利| 99视频精品全部免费在线| 丝袜国产日韩另类美女| 久久午夜老司机| 在线免费亚洲电影| 精品系列免费在线观看| 奇米色777欧美一区二区| 欧美一区二区三区人| 成人在线综合网| 午夜视频一区在线观看| 久久精品一区蜜桃臀影院| 日本道免费精品一区二区三区| 日韩av一区二区在线影视| 国产三级精品视频| 欧美日韩亚洲综合一区二区三区| 国内国产精品久久| 成人激情免费网站| 久久精品国产亚洲高清剧情介绍 | 亚洲美女屁股眼交| 欧美成人三级电影在线| 色悠悠久久综合| 久久电影网站中文字幕| 亚洲国产aⅴ成人精品无吗| 久久综合九色综合欧美98| 日本精品一级二级| 国产一区二区精品久久99| 午夜精品久久久久久久99樱桃 | 蜜臀久久99精品久久久久久9| 国产欧美一区在线| 日韩亚洲欧美在线| 日本精品一区二区三区高清| 国产成人精品亚洲777人妖| 视频在线在亚洲| 一区二区三区欧美日韩| 国产欧美精品日韩区二区麻豆天美| 欧美少妇一区二区| 日本乱人伦一区| 99免费精品在线观看| 国产在线播放一区三区四| 日韩极品在线观看| 亚洲国产精品一区二区尤物区| 中文字幕精品在线不卡| 久久精品视频免费| 日韩女优电影在线观看| 欧美少妇一区二区| 欧美日韩在线精品一区二区三区激情| www.一区二区| 精品久久久久一区二区国产| 欧美日韩黄色影视| 欧美日韩一区高清| 欧美午夜精品一区二区三区 | 久久嫩草精品久久久精品| 日韩一区二区三区电影| 欧美人妖巨大在线| 欧美人体做爰大胆视频| 欧美日韩在线三区| 在线观看av一区| 99re视频这里只有精品| www.亚洲免费av| 97久久人人超碰| 97久久精品人人爽人人爽蜜臀| 高清不卡一区二区| 成人午夜精品在线| www..com久久爱| 色婷婷久久久久swag精品| 91在线视频播放| 色八戒一区二区三区| 91久久线看在观草草青青| 91麻豆产精品久久久久久| 在线视频观看一区| 欧美精品一级二级三级| 欧美精品自拍偷拍动漫精品| 日韩美女主播在线视频一区二区三区| 日韩欧美成人一区二区| 国产亚洲一二三区| 中文字幕制服丝袜成人av| 亚洲欧美日韩一区| 亚洲成人综合网站| 蜜臀av在线播放一区二区三区| 久久精品国产网站| 成人av电影在线观看| 一本久久精品一区二区| 91麻豆精品国产91久久久使用方法| 在线不卡一区二区| 久久影音资源网| 国产精品久久看| 性做久久久久久久免费看| 美女诱惑一区二区| 99国产精品久久| 337p亚洲精品色噜噜| 久久精品欧美日韩精品| 亚洲精品国产第一综合99久久| 天天色天天爱天天射综合| 国产制服丝袜一区| 91在线看国产| 6080国产精品一区二区| 日韩免费福利电影在线观看| 国产精品成人一区二区艾草| 一区二区三区中文在线| 91精品国产综合久久久蜜臀粉嫩| 欧美精品一区二区在线播放| 一区二区三区四区视频精品免费| 久久99精品久久只有精品| 99视频一区二区| 精品国产乱码久久久久久图片| 国产午夜久久久久| 日韩av不卡在线观看| 成人精品免费看| 51精品视频一区二区三区| 国产精品黄色在线观看| 日韩av在线播放中文字幕| 波多野结衣精品在线| 日韩欧美在线123| 亚洲欧美一区二区三区极速播放| 美日韩一级片在线观看| 成人黄色小视频| 日韩一区二区精品在线观看| 亚洲视频电影在线| 国产美女主播视频一区| 91精品国产美女浴室洗澡无遮挡| 中文字幕在线观看不卡视频| 奇米四色…亚洲| 欧美精品tushy高清| 亚洲精品水蜜桃| 国产91丝袜在线观看| 欧美成人免费网站| 日韩激情视频网站| 在线观看av一区| 亚洲欧洲国产日本综合| 国产成人免费视频一区| 久久影院视频免费| 国内精品国产成人国产三级粉色| 欧美日韩精品三区| 一区二区三区四区蜜桃| heyzo一本久久综合| 国产欧美一区二区在线观看| 久久国产尿小便嘘嘘尿| 欧美亚洲综合久久| 亚洲444eee在线观看| 欧美日韩在线不卡| 亚洲图片欧美色图| 欧美伊人久久久久久久久影院 | 日本一区二区三区在线观看| 麻豆国产精品视频| 欧美一区二区三区视频在线观看| 亚洲va欧美va人人爽午夜| 豆国产96在线|亚洲| 中文字幕不卡在线| 日韩欧美一二区| 毛片不卡一区二区| 日韩三级在线观看| 国内精品久久久久影院薰衣草 | 国产98色在线|日韩| 国产午夜亚洲精品不卡| 成人免费看视频| 国产精品麻豆一区二区| 国产99久久久国产精品潘金| 国产精品久久久久婷婷| 91丝袜呻吟高潮美腿白嫩在线观看| 综合电影一区二区三区 | 色呦呦日韩精品| 一区二区三区中文字幕在线观看| 色综合久久99| 亚洲一二三专区| 欧美视频自拍偷拍| 欧美a一区二区|