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

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

?? notationpanel.java

?? chess 一個beguanyu國際象棋的一個Java源碼
?? JAVA
字號:
/*	NotationPanel - A panel to display the game notation.	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.JavaChess;import de.java_chess.javaChess.notation.*;import de.java_chess.javaChess.util.Tools;import javax.swing.border.BevelBorder;import java.awt.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.*;import de.java_chess.javaChess.dialogs.PlayerDialog;///////////////////////////////////////////////////////////////////////////////** * Class for the display of the game notation */public class NotationPanel extends JPanel implements ActionListener {		/**		 * The notation object.		 */		GameNotation _gameNotation;		/**		 * The layout		 */		private GridBagLayout gridBagText = new GridBagLayout();		/**		 * The JScrollPane contains the JTextArea		 */		private JScrollPane jScrollPane;		/**		 * The notation will be displayed in a JTextArea		 */		private JTextArea jtNotation = new JTextArea();		/**		 * The Headline "Notation and game details" does not need to be contained in the TextArea		 */		private JLabel jlHeadline;		/**		 * The panel for the players names		 */		private JPanel jpPlayers = new JPanel();		/**		 * Label for the white player		 */		private JLabel jlWhite = new JLabel();		/**		 * The name for the white player		 */		private JButton jbWhite = new JButton();		/**		 * Label for the black player		 */		private JLabel jlBlack = new JLabel();		/**		 * The name for the black player		 */		private JButton jbBlack = new JButton();		/**		 * The layout for this panel		 */		private GridBagLayout gridBagLayout1 = new GridBagLayout();		/**		 * Standardconstructor		 */		public NotationPanel( GameNotation gameNotation) {	super();	// Store the game notation in this instance.	setGameNotation( gameNotation);	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 {	this.setLayout(gridBagText);	this.jtNotation.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED, Color.white,									Color.white, new Color(148, 145, 140),									new Color(103, 101, 98)));	this.jtNotation.setEditable( false );	this.jtNotation.setLineWrap( true );	this.jtNotation.setWrapStyleWord( true );	this.jScrollPane = new JScrollPane( this.jtNotation );	this.jlHeadline = new JLabel( "Notation and game details:" );	jlHeadline.setFont(new java.awt.Font("Dialog", 1, 12));	jpPlayers.setLayout(gridBagLayout1);	jlWhite.setText("White:");	try {			// Get the account of the user.			String username = System.getProperty( "user.name");			// Capitalize the name.			username = Character.toUpperCase( username.charAt(0)) + username.substring( 1);			// Use it as the default player name.			setWhitePlayerName( username);	} catch( Exception e) {			setWhitePlayerName( "white player name");	}	// jbWhite.setText("white player name");	jbWhite.setBackground( Color.white );	jbWhite.setForeground( Color.black );	jbWhite.setFocusPainted( false);	jbWhite.addActionListener( this );	jlBlack.setText("Black:");	// jbBlack.setText("black player name");	setBlackPlayerName( "Java-Chess");	jbBlack.setBackground( Color.black );	jbBlack.setForeground( Color.white );	jbBlack.setFocusPainted( false);	jbBlack.addActionListener( this );	this.add(jScrollPane,      new GridBagConstraints(0, 2, 1, 1, 1.0, 1.0								,GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));	this.add(jlHeadline,      new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0							 ,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));	this.add(jpPlayers,    new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0									,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));	jpPlayers.add(jlWhite,  new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0									 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 4));	jpPlayers.add(jbWhite,    new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0							 ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0));	jpPlayers.add(jlBlack,   new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0							,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 0), 0, 0));	jpPlayers.add(jbBlack,   new GridBagConstraints(3, 0, 1, 1, 1.0, 0.0							,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0));		}		/**		 * Adds the given text to the existing		 *		 * @param newText The text to add		 */	public void modifyText(String newText)	{		String sCurrentText = this.jtNotation.getText();		if ( sCurrentText.equals( "" ) == false )		{			this.jtNotation.setText( sCurrentText + "\n" + newText );			Point point = new Point( 0, (int)(this.jtNotation.getSize().getHeight()) );			this.jScrollPane.getViewport().setViewPosition( point );		}		else{			this.jtNotation.setText( newText );		}	}		/**		 * Set a new notation object.		 *		 * @param gameNotation The new game notation.		 */		public void setGameNotation( GameNotation gameNotation) {	_gameNotation = gameNotation;		}		/**		 * Set a new notation.		 *		 * @param newNotation The new notation.		 */		 public void setText(String newNotation) {	 this.jtNotation.setText( newNotation);		 }		/**		 * Returns the white player's name		 *		 * @return The String for the white player		 */		public String getWhitePlayerName() {	return ( this.jbWhite.getText() );		}		/**		 * Sets the white player's name		 *		 * @param newName The new string for the white player		 */		public void setWhitePlayerName(String newName) {	this.jbWhite.setText( newName );	// If there's a notation object, pass the new name to it.	if( _gameNotation != null) {			_gameNotation.setPlayerInfo( newName, true);	}		}		/**		 * Returns the black player's name		 *		 * @return The String for the black player		 */		public String getBlackPlayerName() {	return ( this.jbBlack.getText() );		}		/**		 * Sets the black player's name		 *		 * @param newName The new string for the black player		 */		public void setBlackPlayerName(String newName) {	this.jbBlack.setText( newName );	// If there's a notation object, pass the new name to it.	if( _gameNotation != null) {			_gameNotation.setPlayerInfo( newName, false);	}		}		public void actionPerformed(ActionEvent e)		{			boolean bWhiteOrBlack = true;			PlayerDialog playerDialog = null;			if (e.getSource().equals(jbWhite))			{				playerDialog = new PlayerDialog(1, getWhitePlayerName());				bWhiteOrBlack = true;			}			else if (e.getSource().equals(jbBlack))			{					playerDialog = new PlayerDialog(2, getBlackPlayerName());					bWhiteOrBlack = false;			}			if ( playerDialog != null )			{				Tools.setDialogToCenter( playerDialog );				playerDialog.show();				if (bWhiteOrBlack == true) {					jbWhite.setText(playerDialog.getNewName());				}				else {					jbBlack.setText(playerDialog.getNewName());				}			}		}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级理论片| 石原莉奈在线亚洲三区| 日韩精品亚洲专区| 99精品国产99久久久久久白柏 | 一本到不卡免费一区二区| 欧美一区二区三区免费视频| 亚洲欧美日韩国产手机在线 | 久久只精品国产| 三级不卡在线观看| 91美女在线视频| 国产精品久久久久久久岛一牛影视 | 精品第一国产综合精品aⅴ| 亚洲欧美日韩中文字幕一区二区三区| 精品亚洲porn| 日韩视频一区在线观看| 午夜精品福利在线| 欧美日韩一区高清| 一区二区三区日本| 99久久伊人精品| 欧美激情在线看| 极品少妇xxxx精品少妇偷拍| 91精品国产免费久久综合| 亚洲综合av网| 欧美亚洲综合一区| 亚洲一二三四在线| 欧美在线小视频| 亚洲黄色尤物视频| 欧洲激情一区二区| 午夜亚洲国产au精品一区二区| 欧美三级一区二区| 亚洲高清免费视频| 91精品啪在线观看国产60岁| 午夜视频一区在线观看| 欧美高清www午色夜在线视频| 天堂av在线一区| 日韩欧美一卡二卡| 久久99精品久久久| 日本一区二区在线不卡| 成a人片国产精品| 亚洲日本在线天堂| 欧美日本不卡视频| 日韩av电影免费观看高清完整版在线观看 | 欧美成人精精品一区二区频| 日本欧美一区二区三区乱码| 欧美成人一区二区| 国产成人久久精品77777最新版本| 国产午夜亚洲精品不卡| 99久久久国产精品| 香蕉乱码成人久久天堂爱免费| 777奇米四色成人影色区| 另类综合日韩欧美亚洲| 日本一区二区三区高清不卡| av不卡在线播放| 亚洲图片一区二区| 精品久久久久久久久久久久久久久 | 在线影视一区二区三区| 一区二区三区成人在线视频 | 91美女蜜桃在线| 日日摸夜夜添夜夜添精品视频| 日韩欧美色综合网站| 福利一区二区在线| 午夜精品福利在线| 久久久久国产精品麻豆| 91成人网在线| 国产一区二三区| 亚洲午夜三级在线| 国产视频一区不卡| 欧美偷拍一区二区| 国产福利精品一区| 亚洲成人免费视频| 国产精品美女久久久久久久久| 欧美无乱码久久久免费午夜一区 | 麻豆专区一区二区三区四区五区| 国产欧美一区二区精品忘忧草 | 美国av一区二区| 亚洲精品五月天| 久久综合九色综合97婷婷| 色综合天天综合网国产成人综合天| 五月婷婷综合在线| 综合久久国产九一剧情麻豆| 欧美一区二区三区公司| 91国产视频在线观看| 国产一区二区三区免费在线观看| 亚洲一区在线免费观看| 国产精品久久久久精k8| 精品日韩av一区二区| 欧美日韩精品欧美日韩精品一综合| av网站免费线看精品| 久久爱另类一区二区小说| 午夜精品视频在线观看| 亚洲视频一二三区| 亚洲国产成人私人影院tom| 日韩免费看的电影| 欧美日韩色一区| 在线免费观看视频一区| 不卡一二三区首页| 国产成人精品一区二区三区四区 | 久久九九全国免费| 日韩欧美的一区| 欧美一区二区三区播放老司机| 色综合色综合色综合色综合色综合 | 亚洲欧美日韩国产中文在线| 国产精品午夜春色av| 久久午夜羞羞影院免费观看| 日韩三级视频在线看| 欧美一卡2卡三卡4卡5免费| 91精品国产综合久久精品图片| 欧美亚洲综合色| 在线视频欧美精品| 欧美这里有精品| 欧美图区在线视频| 欧美麻豆精品久久久久久| 欧美日韩一级二级| 91精品国产日韩91久久久久久| 欧美片网站yy| 日韩欧美一区电影| 精品999在线播放| 久久久久久9999| 欧美国产一区在线| 亚洲欧美成aⅴ人在线观看| 亚洲欧洲国产专区| 亚洲精品免费在线观看| 亚洲精品福利视频网站| 亚洲国产精品视频| 琪琪久久久久日韩精品| 日本不卡一区二区三区高清视频| 日本伊人精品一区二区三区观看方式| 婷婷六月综合网| 久久99精品国产麻豆婷婷洗澡| 国产一区高清在线| 色综合视频在线观看| 欧美年轻男男videosbes| 欧美videos中文字幕| 国产精品女同一区二区三区| 亚洲美女淫视频| 麻豆国产欧美一区二区三区| 国产精品99久久久久久久女警| 成人av免费在线观看| 91香蕉视频污在线| 7777精品伊人久久久大香线蕉的| 亚洲精品在线观| 亚洲欧美日韩国产综合| 免费观看在线综合色| 国产激情91久久精品导航 | 精品国产亚洲一区二区三区在线观看| 久久亚洲二区三区| 一区二区三区精密机械公司| 精品一区二区免费视频| 一本一本久久a久久精品综合麻豆| 欧美日韩在线一区二区| 久久一区二区三区四区| 一区二区在线观看视频在线观看| 日本不卡视频一二三区| 91污片在线观看| 日韩欧美一级精品久久| 一区二区三区欧美久久| 国产一区在线看| 9191成人精品久久| 国产精品久久久久久福利一牛影视 | 美女一区二区视频| 91一区二区三区在线播放| 欧美va亚洲va香蕉在线| 亚洲激情五月婷婷| 国产ts人妖一区二区| 欧美一区二区福利在线| 亚洲视频综合在线| 国产精品一级黄| 91精品国产91久久久久久一区二区| 国产精品乱人伦一区二区| 日本aⅴ亚洲精品中文乱码| 91片在线免费观看| 国产婷婷色一区二区三区| 青青草97国产精品免费观看无弹窗版| 成人ar影院免费观看视频| 精品久久久久久久久久久久久久久| 亚洲一区二区四区蜜桃| 成人av动漫在线| 国产夜色精品一区二区av| 日本不卡视频在线| 欧美美女一区二区在线观看| 亚洲黄色录像片| 99re成人在线| 中文字幕国产一区| 国产一区二区三区四区五区入口| 欧美精品777| 午夜av电影一区| 欧美日韩国产首页在线观看| 亚洲人成人一区二区在线观看| 国产·精品毛片| 国产免费观看久久| 成人一区二区三区| 国产日韩视频一区二区三区| 黄色成人免费在线| 欧美成人免费网站| 极品少妇xxxx偷拍精品少妇| 精品久久久久99| 国产乱人伦精品一区二区在线观看| 日韩欧美中文一区| 久久99精品国产.久久久久| 精品国产乱码久久久久久老虎 |