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

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

?? eventtestpane.java

?? 共有164個java源程序
?? JAVA
字號:
/* * Copyright (c) 2000 David Flanagan.  All rights reserved. * This code is from the book Java Examples in a Nutshell, 2nd Edition. * It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied. * You may study, use, and modify it for any non-commercial purpose. * You may distribute it non-commercially as long as you retain this notice. * For a commercial use license, or to purchase the book (recommended), * visit http://www.davidflanagan.com/javaexamples2. */package com.davidflanagan.examples.gui;import java.awt.*;import java.awt.event.*;import javax.swing.*;import java.util.*;/** A program that displays all the event that occur in its window */public class EventTestPane extends JPanel {    /** The constructor: register the event types we are interested in */    public EventTestPane() {	// We're interested in all types of events	this.enableEvents(AWTEvent.MOUSE_EVENT_MASK |			  AWTEvent.MOUSE_MOTION_EVENT_MASK |			  AWTEvent.KEY_EVENT_MASK |			  AWTEvent.FOCUS_EVENT_MASK |			  AWTEvent.COMPONENT_EVENT_MASK |			  AWTEvent.WINDOW_EVENT_MASK);	this.setPreferredSize(new Dimension(500, 400));    }        /**     * Display mouse events that don't involve mouse motion.  The mousemods()     * method prints modifiers, and is defined below.  The other methods     * return additional information about the mouse event.  showLine()     * displays a line of text in the window.  It is defined at the end of     * this class, along with the paintComponent() method.     **/    public void processMouseEvent(MouseEvent e) {	String type = null;	switch(e.getID()) {	case MouseEvent.MOUSE_PRESSED:   type = "MOUSE_PRESSED"; break;	case MouseEvent.MOUSE_RELEASED:  type = "MOUSE_RELEASED"; break;	case MouseEvent.MOUSE_CLICKED:   type = "MOUSE_CLICKED"; break;	case MouseEvent.MOUSE_ENTERED:   type = "MOUSE_ENTERED"; break;	case MouseEvent.MOUSE_EXITED:    type = "MOUSE_EXITED"; break;	}	showLine(mousemods(e) + type +		 ": [" + e.getX() + "," + e.getY() + "] " +		 "num clicks = " + e.getClickCount() +		 (e.isPopupTrigger()?"; is popup trigger":""));	// When the mouse enters the component, request keyboard focus so	// we can receive and respond to keyboard events	if (e.getID() == MouseEvent.MOUSE_ENTERED)	    requestFocus();    }        /**     * Display mouse moved and dragged mouse event.  Note that MouseEvent is     * the only event type that has two methods, two EventListener interfaces     * and two adapter classes to handle two distinct categories of events.     * Also, as seen in init(), mouse motion events must be requested     * separately from other mouse event types.     **/    public void processMouseMotionEvent(MouseEvent e) {	String type = null;	switch(e.getID()) {	case MouseEvent.MOUSE_MOVED:   type = "MOUSE_MOVED"; break;	case MouseEvent.MOUSE_DRAGGED: type = "MOUSE_DRAGGED"; break;	}	showLine(mousemods(e) + type +		 ": [" + e.getX() + "," + e.getY() + "] " +		 "num clicks = " + e.getClickCount() +		 (e.isPopupTrigger()?"; is popup trigger":""));    }        /**     * Return a string representation of the modifiers for a MouseEvent.     * Note that the methods called here are inherited from InputEvent.     **/    protected String mousemods(MouseEvent e) {	int mods = e.getModifiers();	String s = "";	if (e.isShiftDown()) s += "Shift ";	if (e.isControlDown()) s += "Ctrl ";	if ((mods & InputEvent.BUTTON1_MASK) != 0) s += "Button 1 ";	if ((mods & InputEvent.BUTTON2_MASK) != 0) s += "Button 2 ";	if ((mods & InputEvent.BUTTON3_MASK) != 0) s += "Button 3 ";	return s;    }    /**     * Display keyboard events.     *     * Note that there are three distinct types of key events, and that key     * events are reported by key code and/or Unicode character.  KEY_PRESSED     * and KEY_RELEASED events are generated for all key strokes.  KEY_TYPED     * events are only generated when a key stroke produces a Unicode     * character; these events do not report a key code.  If isActionKey()     * returns true, then the key event reports only a key code, because the     * key that was pressed or released (such as a function key) has no     * corresponding Unicode character.  Key codes can be interpreted by using     * the many VK_ constants defined by the KeyEvent class, or they can be     * converted to strings using the static getKeyText() method as we do     * here.     **/    public void processKeyEvent(KeyEvent e) {	String eventtype, modifiers, code, character;	switch(e.getID()) {	case KeyEvent.KEY_PRESSED:  eventtype = "KEY_PRESSED"; break;	case KeyEvent.KEY_RELEASED: eventtype = "KEY_RELEASED"; break;	case KeyEvent.KEY_TYPED:    eventtype = "KEY_TYPED"; break;	default: eventtype = "UNKNOWN";	}		// Convert the list of modifier keys to a string	modifiers = KeyEvent.getKeyModifiersText(e.getModifiers());		// Get string and numeric versions of the key code, if any.	if (e.getID() == KeyEvent.KEY_TYPED) code = "";	else code = "Code=" + KeyEvent.getKeyText(e.getKeyCode()) +		 " (" + e.getKeyCode() + ")";		// Get string and numeric versions of the Unicode character, if any.	if (e.isActionKey()) character = "";	else character = "Character=" + e.getKeyChar() +		 " (Unicode=" + ((int)e.getKeyChar()) + ")";		// Display it all.	showLine(eventtype + ": " + modifiers + " " + code + " " + character);    }        /**     * Display keyboard focus events.  Focus can be permanently gained or     * lost, or temporarily transferred to or from a component.     **/    public void processFocusEvent(FocusEvent e) {	if (e.getID() == FocusEvent.FOCUS_GAINED)	    showLine("FOCUS_GAINED" + (e.isTemporary()?" (temporary)":""));	else	    showLine("FOCUS_LOST" + (e.isTemporary()?" (temporary)":""));    }        /** Display Component events.  */    public void processComponentEvent(ComponentEvent e) {	switch(e.getID()) {	case ComponentEvent.COMPONENT_MOVED:	    showLine("COMPONENT_MOVED"); break;	case ComponentEvent.COMPONENT_RESIZED:	    showLine("COMPONENT_RESIZED");break;	case ComponentEvent.COMPONENT_HIDDEN:	    showLine("COMPONENT_HIDDEN"); break;	case ComponentEvent.COMPONENT_SHOWN:	    showLine("COMPONENT_SHOWN"); break;	}    }        /** Display Window events.  Note the special handling of WINDOW_CLOSING */    public void processWindowEvent(WindowEvent e) {	switch(e.getID()) {	case WindowEvent.WINDOW_OPENED: showLine("WINDOW_OPENED"); break;	case WindowEvent.WINDOW_CLOSED: showLine("WINDOW_CLOSED"); break;	case WindowEvent.WINDOW_CLOSING: showLine("WINDOW_CLOSING"); break;	case WindowEvent.WINDOW_ICONIFIED: showLine("WINDOW_ICONIFIED"); break;	case WindowEvent.WINDOW_DEICONIFIED:	    showLine("WINDOW_DEICONIFIED"); break;	case WindowEvent.WINDOW_ACTIVATED:	    showLine("WINDOW_ACTIVATED"); break;	case WindowEvent.WINDOW_DEACTIVATED:	    showLine("WINDOW_DEACTIVATED"); break;	}		// If the user requested a window close, quit the program.	// But first display a message, force it to be visible, and make	// sure the user has time to read it.	if (e.getID() == WindowEvent.WINDOW_CLOSING) {	    showLine("WINDOW_CLOSING event received.");	    showLine("Application will exit in 5 seconds");	    // Force the updates to appear now.	    update(this.getGraphics());	    // Wait five seconds	    try {Thread.sleep(5000);} catch (InterruptedException ie) { ; }	    // Exit now	    System.exit(0);	}    }        /** The list of lines to display in the window */    protected Vector lines = new Vector();        /** Add a new line to the list of lines, and request redisplay */    protected void showLine(String s) {	if (lines.size() == 20) lines.removeElementAt(0);	lines.addElement(s);	repaint();    }    /** This method repaints the text in the window */    public void paintComponent(Graphics g) {	for(int i = 0; i < lines.size(); i++)	    g.drawString((String)lines.elementAt(i), 20, i*16 + 50);    }    public boolean isOpaque() { return false; }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av电影在线观看不卡| 性做久久久久久久免费看| 亚洲宅男天堂在线观看无病毒| 亚洲国产精品一区二区www在线| 美洲天堂一区二卡三卡四卡视频 | 欧美色区777第一页| 91精品在线观看入口| 久久婷婷色综合| 亚洲欧美日韩精品久久久久| 免费在线观看一区二区三区| www.欧美亚洲| 日韩视频一区二区三区在线播放| 国产精品麻豆一区二区| 视频一区二区三区中文字幕| 成人午夜又粗又硬又大| 欧美高清精品3d| 国产日韩一级二级三级| 日韩国产欧美在线视频| 成人av网站在线观看免费| 7777精品伊人久久久大香线蕉超级流畅 | 国产日本亚洲高清| 天天综合日日夜夜精品| jiyouzz国产精品久久| 日韩欧美国产一区二区在线播放| 亚洲少妇最新在线视频| 国产一区二区美女诱惑| 欧美午夜寂寞影院| 国产精品电影一区二区三区| 美国十次了思思久久精品导航| 91视频在线看| 国产欧美一区二区精品性色超碰 | 日韩一区二区精品葵司在线| 亚洲美女视频一区| 国产精品一卡二| 日韩片之四级片| 亚洲一区二区三区四区中文字幕| 成人av一区二区三区| 2021国产精品久久精品| 婷婷久久综合九色国产成人| 色爱区综合激月婷婷| 国产精品免费视频网站| 国产综合色视频| 欧美一区二区国产| 亚洲chinese男男1069| 色网站国产精品| 中文字幕成人网| 国内精品久久久久影院色| 欧美电影在线免费观看| 亚洲午夜在线电影| 色视频一区二区| 亚洲欧美偷拍三级| 成人app网站| 国产精品国产三级国产有无不卡 | 国产偷国产偷亚洲高清人白洁| 天天色图综合网| 在线欧美日韩精品| 最好看的中文字幕久久| 北条麻妃国产九九精品视频| 国产日韩精品一区| 国产激情偷乱视频一区二区三区 | 成人国产精品免费观看视频| 久久久久久一级片| 国产精品18久久久久久久网站| 欧美不卡一二三| 麻豆成人久久精品二区三区小说| 欧美丰满嫩嫩电影| 日本欧美一区二区三区乱码| 777xxx欧美| 免费黄网站欧美| 欧美成人在线直播| 国产一区 二区| 欧美激情在线看| 成人午夜视频福利| 亚洲欧美综合在线精品| 91视频在线观看免费| 一区二区三区鲁丝不卡| 欧美性一级生活| 日日骚欧美日韩| 日韩美女天天操| 国产一区二区不卡老阿姨| 久久综合狠狠综合久久综合88| 国产麻豆午夜三级精品| 国产日韩精品一区二区三区在线| 成人高清免费观看| 亚洲精品视频在线观看免费| 欧美色图一区二区三区| 日韩高清不卡在线| 26uuu国产日韩综合| 成人小视频在线观看| 亚洲乱码精品一二三四区日韩在线 | 久久久精品免费观看| 大胆欧美人体老妇| 亚洲黄色小视频| 欧美一区日韩一区| 精品一区二区成人精品| 中文字幕不卡在线| 日本精品一级二级| 免费人成精品欧美精品| 久久亚洲影视婷婷| 99久精品国产| 亚洲成人av资源| 26uuu亚洲| 色综合夜色一区| 五月天中文字幕一区二区| 久久天堂av综合合色蜜桃网| 不卡电影免费在线播放一区| 亚洲18女电影在线观看| www国产亚洲精品久久麻豆| 99国产欧美另类久久久精品| 亚洲成人福利片| 国产欧美视频在线观看| 色综合久久天天| 久久精品国产色蜜蜜麻豆| 中文字幕亚洲在| 日韩午夜av电影| www.激情成人| 强制捆绑调教一区二区| 国产精品久久久一本精品 | 麻豆成人久久精品二区三区红| 国产精品妹子av| 制服丝袜激情欧洲亚洲| 波多野洁衣一区| 伦理电影国产精品| 自拍偷拍国产亚洲| 精品国产伦一区二区三区免费| 不卡一区二区在线| 久久99精品久久久久久国产越南 | 欧美探花视频资源| 国产精品白丝av| 亚洲1区2区3区4区| 国产精品视频在线看| 欧美伦理电影网| 99精品在线免费| 国产综合成人久久大片91| 亚洲国产综合人成综合网站| 国产日韩欧美精品在线| 91精品欧美福利在线观看| www..com久久爱| 国产精品正在播放| 天天色天天爱天天射综合| 亚洲女爱视频在线| 国产色一区二区| 欧美成人女星排名| 欧美精品粉嫩高潮一区二区| 色综合中文字幕国产| 激情成人综合网| 肉丝袜脚交视频一区二区| 最新日韩av在线| 国产日产欧美精品一区二区三区| 欧美一区二区三区播放老司机| 色视频一区二区| av激情成人网| 高清久久久久久| 国产裸体歌舞团一区二区| 日韩av网站在线观看| 亚洲在线视频网站| 亚洲激情图片一区| 亚洲色图在线看| 国产精品女人毛片| 亚洲国产精品传媒在线观看| 精品国产a毛片| 精品国产伦一区二区三区免费| 7777女厕盗摄久久久| 欧美日韩国产高清一区二区三区 | 午夜在线成人av| 亚洲一区二区三区美女| 亚洲黄色尤物视频| 亚洲欧美日韩国产另类专区| 国产精品嫩草99a| 国产精品久久国产精麻豆99网站| 国产日韩欧美制服另类| 国产亚洲精品7777| 久久久亚洲国产美女国产盗摄| 精品国产第一区二区三区观看体验| 欧美一区二区人人喊爽| 5月丁香婷婷综合| 欧美疯狂性受xxxxx喷水图片| 欧美在线播放高清精品| 在线观看日韩国产| 欧洲一区二区三区在线| 欧美撒尿777hd撒尿| 欧美在线观看一区二区| 欧美日韩国产三级| 欧美高清精品3d| 欧美一级生活片| 日韩精品一区二区三区在线观看| 日韩欧美色电影| 久久夜色精品一区| 中文字幕欧美区| 亚洲欧美色综合| 亚洲宅男天堂在线观看无病毒 | 91精品视频网| 精品久久一区二区三区| 久久久久久亚洲综合| 中文字幕欧美日韩一区| 亚洲美女一区二区三区| 天堂av在线一区| 极品销魂美女一区二区三区| 国产v综合v亚洲欧| 91视频在线看|