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

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

?? gametimerpanel.java

?? chess 一個beguanyu國際象棋的一個Java源碼
?? JAVA
字號:
/*  GameTimerPanel - A component to display a game timer.  Copyright (C) 2003 The Java-Chess team <info@java-chess.de>  This program is free software; you can redistribute it and/or  modify it under the terms of the GNU General Public License  as published by the Free Software Foundation; either version 2  of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License for more details.  You should have received a copy of the GNU General Public License  along with this program; if not, write to the Free Software  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/package de.java_chess.javaChess.renderer2d;import de.java_chess.javaChess.timer.*;import java.awt.*;import java.awt.event.*;import java.util.*;import javax.swing.*;/** * A timer for a chess game. */public class GameTimerPanel extends JPanel implements GameTimer, ActionListener {    // Instance variables    /**     * A timer for the player with the white pieces.     */    private TimerPanel _white;    /**     * A timer for the player with the black pieces.black     */    private TimerPanel _black;    /**     * A flag to indicate, if the white timer is current active.     */    boolean _whiteActive;    private JLabel jlWhite = new JLabel();    private JLabel jlBlack = new JLabel();    /**     * A flag to indicate if the timer is running.     */    boolean _running;    /**     * The action listeners, waiting for events from this timer.     */    private ArrayList _actionListeners;    // Constructors    /**     * Create a new timer instance for a game.     */    public GameTimerPanel() {	super();	// Create a new array for the action listeners.	_actionListeners = new ArrayList();	try {	    jbInit();	} catch(Exception e)			{				e.printStackTrace();			}		}/** * Construction a la JBuilder to be able to use JBuilder designer * * @throws Exception */    private void jbInit() throws Exception {	_white = new TimerPanel( false);	_white.addActionListener( this);	_black = new TimerPanel( false);	_black.addActionListener( this);		_white.setBackground( Color.white );	_white.alignText();	_black.setBackground( Color.white );	_black.alignText();	_white.setBorder(BorderFactory.createLineBorder(Color.black));	_black.setBorder(BorderFactory.createLineBorder(Color.black));		this.jlWhite.setText( "White: " );	this.jlWhite.setForeground( Color.white );	jlWhite.setHorizontalAlignment(SwingConstants.CENTER);	this.jlBlack.setText( "Black: " );	this.jlBlack.setForeground( Color.black );	jlBlack.setHorizontalAlignment(SwingConstants.CENTER);	// Layout the entire timer.	setLayout( new GridLayout( 1, 4));	// Add the timers with a label for each of them	this.add( jlWhite, null );	add( _white);	this.add( jlBlack, null );	add( _black);    }    /**     * Create a given game timer with a countdown time.     *     * @param maxTime The remaining time.     */    public GameTimerPanel( int maxTime) {	this();	setCountdown( maxTime);    }    // Methods    /**     * Reset to a given time.     *     * @param time The time to reset to.     */    public void reset( int time) {	stop();  // Stop the timer.	setCountdown( time);	setNoClockRunning();    }    /**     * Set the remaining time for each timer.     *     * @param time The remaining time for each time.     */    public void setCountdown( int time) {	_white.setCountdown( time);	_black.setCountdown( time);    }    /**     * Start the game     */    public void start() {	_black.start();	_whiteActive = false;	setBlackClockRunning();	setRunning( true);    }    /**     * Toggle the timer for one player to the other.     */    public void toggle() {	if( _whiteActive) {            setBlackClockRunning();	    _white.stop();	    _black.start();	} else {            setWhiteClockRunning();	    _black.stop();	    _white.start();	}	_whiteActive = !_whiteActive;    }    /**     * Stop the entire timer.     */    public void stop() {	_white.stop();	_black.stop();	setRunning( false);    }    /**     * Get a event from one of the timers.     *     * ActionEvent event The event.     */    public void actionPerformed( ActionEvent event) {	if( ! "interrupted".equals( event.getActionCommand())) {	    // This event means, that the timer sending the event has stopped,	    // so stop the entire timer for now.	    stop();	    notifyListeners( new ActionEvent( this, 					      ActionEvent.ACTION_PERFORMED,  					      ( event.getSource() == _white) ? "timeout white" : "timeout black"));	}    }    /**     * Add a action listener to this timer.     *     * @param listener The action listener to add.     */    public void addActionListener( ActionListener listener) {	_actionListeners.add( listener);    }    /**     * Notify the waiting action listeners.     *     * @param event The action event to send.     */    private void notifyListeners( ActionEvent event) {	// Iterate over all the listeners and send them the event.	for( Iterator iterator = _actionListeners.iterator(); iterator.hasNext(); ) {	    ActionListener listener = (ActionListener)iterator.next();	    listener.actionPerformed( event);	}    }    /**     * Get the active state of this timer.     *     * @return The active state of this timer.     */    public boolean isRunning() {	return _running;    }    /**     * Set the new running state of the timer.     *     * @param active The new state of the timer panel.     */    public void setRunning( boolean active) {	_running = active;    }        /**     * Set both timers inactive.     */    public void setNoClockRunning() {	_white.setBackground(Color.white);	_black.setBackground(Color.white);    }    public void setWhiteClockRunning() {      _white.setBackground(Color.white);      _black.setBackground(Color.lightGray);    }    public void setBlackClockRunning() {      _white.setBackground(Color.lightGray);      _black.setBackground(Color.white);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区免费看视频| 日韩天堂在线观看| 亚洲视频一区二区在线| 91色综合久久久久婷婷| 一区二区在线免费观看| 欧美在线观看你懂的| 亚洲成人av免费| 欧美成人欧美edvon| 国产盗摄女厕一区二区三区 | 精品视频免费在线| 午夜久久久久久电影| 日韩欧美色电影| 国产91精品一区二区麻豆亚洲| 国产精品日日摸夜夜摸av| 欧美性一二三区| 国产中文字幕一区| 综合欧美亚洲日本| 欧美一级欧美三级| 国产成人综合在线| 亚洲一线二线三线久久久| 日韩精品综合一本久道在线视频| 国产成人综合在线| 亚洲国产精品久久人人爱蜜臀| 欧美一区二区不卡视频| 成人免费视频视频| 午夜精品一区二区三区免费视频| 久久免费精品国产久精品久久久久| 99国内精品久久| 奇米影视7777精品一区二区| 国产精品看片你懂得| 欧美一区中文字幕| 91伊人久久大香线蕉| 国内一区二区在线| 午夜欧美电影在线观看| 国产欧美一区二区在线| 欧美日韩一区不卡| eeuss鲁片一区二区三区在线观看| 亚洲成人7777| 综合久久一区二区三区| www国产精品av| 欧美三级日韩在线| av激情综合网| 狠狠色狠狠色综合日日91app| 亚洲一二三四区| 亚洲国产成人私人影院tom| 欧美一区二区成人6969| 欧美在线三级电影| 成人福利视频在线| 国产资源精品在线观看| 午夜国产精品影院在线观看| 亚洲日韩欧美一区二区在线| 国产午夜精品久久久久久免费视| 欧美精品xxxxbbbb| 欧美优质美女网站| 99久久夜色精品国产网站| 韩国毛片一区二区三区| 日韩不卡手机在线v区| 一区二区三区日本| 日韩理论片在线| 国产亚洲一二三区| www国产精品av| 精品国产乱码久久久久久牛牛 | 国产成人精品一区二| 久久精品国产精品青草| 日本v片在线高清不卡在线观看| 亚洲婷婷综合久久一本伊一区| 国产亲近乱来精品视频| 久久综合色一综合色88| 欧美一区二区三区免费在线看 | 午夜精品久久久久久久蜜桃app| 亚洲天堂福利av| 最新成人av在线| 国产欧美视频在线观看| 久久久久久一级片| 久久综合色婷婷| 精品不卡在线视频| 国产欧美日韩激情| 中文字幕欧美日韩一区| 中文字幕一区av| 亚洲免费av观看| 亚洲影视资源网| 视频一区二区三区中文字幕| 天堂av在线一区| 麻豆国产一区二区| 国产成人在线视频网站| 成人精品gif动图一区| 97精品国产露脸对白| 在线观看视频91| 91精品国产欧美日韩| 日韩免费电影一区| 国产欧美精品国产国产专区| 国产精品毛片a∨一区二区三区 | 精品美女一区二区| 久久久久久久精| 一区在线观看视频| 亚洲高清免费视频| 久久99精品国产| 成人性生交大片免费看中文网站| 成人app软件下载大全免费| 一本大道久久a久久精品综合| 欧美日韩日本视频| 久久亚区不卡日本| 亚洲少妇30p| 日本91福利区| 国产999精品久久久久久| 91伊人久久大香线蕉| 在线播放一区二区三区| 精品久久久久av影院| 欧美韩日一区二区三区| 亚洲一区二区四区蜜桃| 免费成人在线观看| 99久久国产综合精品女不卡| 欧美日韩高清一区二区| 日本一区二区三级电影在线观看| 亚洲图片激情小说| 久久精品国产一区二区三| 国产激情精品久久久第一区二区| 在线免费亚洲电影| 久久众筹精品私拍模特| 樱花影视一区二区| 国产麻豆日韩欧美久久| 在线观看成人小视频| 久久久久国产一区二区三区四区| 一区二区三区在线视频免费 | 国产精品电影院| 蜜桃视频一区二区三区在线观看| caoporn国产精品| 日韩一区二区电影| 一区二区欧美在线观看| 成人免费视频国产在线观看| 91精品国模一区二区三区| 亚洲天堂精品视频| 国产精品一二三在| 91精品国产综合久久精品app | 欧美日韩国产系列| 国产精品美女久久久久aⅴ| 免费观看日韩电影| 欧美在线观看18| 亚洲色图欧洲色图婷婷| 国产精品中文有码| 欧美电影免费观看高清完整版在 | 成人亚洲精品久久久久软件| 日韩精品综合一本久道在线视频| 亚洲精品欧美激情| www..com久久爱| 久久―日本道色综合久久| 青青草伊人久久| 欧美日韩免费视频| 亚洲精品乱码久久久久| 成人精品小蝌蚪| 欧美国产精品v| 国产伦精一区二区三区| 欧美精品一级二级三级| 亚洲图片欧美视频| 色狠狠av一区二区三区| 国产精品高清亚洲| www.亚洲色图| 亚洲视频中文字幕| 99精品国产91久久久久久| 中文字幕精品综合| 成人听书哪个软件好| 欧美国产精品劲爆| av在线一区二区| 自拍偷拍国产亚洲| 在线免费亚洲电影| 亚洲成人第一页| 69堂国产成人免费视频| 天天色综合成人网| 日韩一区二区免费在线电影| 蜜桃精品在线观看| 久久亚洲精品小早川怜子| 国产最新精品免费| 亚洲国产高清不卡| 成人av高清在线| 亚洲人成精品久久久久久| 91福利在线看| 婷婷综合久久一区二区三区| 91精品婷婷国产综合久久竹菊| 七七婷婷婷婷精品国产| 欧美成人一级视频| 国产精品白丝jk黑袜喷水| 国产精品久久久久永久免费观看 | 蜜桃久久av一区| 久久蜜桃香蕉精品一区二区三区| 国产经典欧美精品| 亚洲少妇30p| 91精品欧美福利在线观看| 国产综合色精品一区二区三区| 欧美激情综合五月色丁香| 色综合视频一区二区三区高清| 亚洲午夜精品在线| 欧美tickling挠脚心丨vk| 国产a级毛片一区| 亚洲精品v日韩精品| 91精品国产91热久久久做人人 | 91 com成人网| 国产精品综合一区二区三区| 亚洲欧美另类小说| 日韩欧美的一区二区| 波多野结衣在线一区|