⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aboutdialog.java

📁 與 unix 上相似的syslog daemon, 沒有 log4j 複雜
💻 JAVA
字号:
/*** Copyright (c) 1997 by Timothy Gerard Endres** ** This program is free software.** ** You may redistribute it and/or modify it under the terms of the GNU** General Public License as published by the Free Software Foundation.** Version 2 of the license should be included with this distribution in** the file LICENSE, as well as License.html. If the license is not** included	with this distribution, you may find a copy at the FSF web** site at 'www.gnu.org' or 'www.fsf.org', or you may write to the** Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139 USA.**** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR** REDISTRIBUTION OF THIS SOFTWARE. ** */package com.ice.syslogd;import java.awt.*;import java.awt.event.*;import java.lang.*;import java.applet.*;import com.ice.util.AWTUtilities;import com.ice.util.UserProperties;import com.ice.widget.BorderPanel;/** * Shows the application's "About" dialog box. * * @version $Revision: 1.2 $ * @author Timothy Gerard Endres, *    <a href="mailto:time@ice.com">time@ice.com</a>. */public classAboutDialog extends Dialog		implements ActionListener, WindowListener	{	public static final String		RCS_ID = "$Id: AboutDialog.java,v 1.2 1998/07/29 02:15:09 time Exp $";	public static final String		RCS_REV = "$Revision: 1.2 $";	public static final String		RCS_NAME = "$Name:  $";	private String		messageString;	private TextArea	messageText;	public	AboutDialog( Frame parent )		{		super( parent, "About SyslogD", true );		this.messageString = null;		this.establishDialogContents();		this.pack();		int width =			UserProperties.getProperty				( "aboutDialog.width", 540 );		int height =			UserProperties.getProperty				( "aboutDialog.height", 320 );		this.setSize( width, height );		Point location =			AWTUtilities.computeDialogLocation				( this, width, height );		this.setLocation( location.x, location.y );		this.addWindowListener( this );		}    public void    actionPerformed( ActionEvent evt )        {	    String command = evt.getActionCommand();		if ( command.compareTo( "OK" ) == 0 )			{			this.dispose();			}        }	public void	establishDialogContents() 		{		Button			button;		BorderPanel		controlPanel; 		this.messageText = new TextArea( 12, 64 );		this.messageText.setEditable( false );		this.messageText.setFont(			UserProperties.getFont(				"aboutDialog.font",				new Font( "Serif", Font.BOLD, 12 ) ) );		this.messageText.setText(			"SyslogD, version " +			SyslogD.VERSION_STR +			", a Unix Syslog Server\n" +			"\n" +			"Written by Tim Endres, time@ice.com\n" +			"Copyright (c) 1997 by Timothy Gerard Endres\n" +			"\n" +			"SyslogD is free software, which is licensed to you under the\n" +			"GNU General Public License, version 2. Please see the file\n" +			"LICENSE for more details, or visit 'www.gnu.org'.\n" +			"\n" +			"This software is provided AS-IS, with ABSOLUTELY NO WARRANTY.\n" +			"\n" +			"YOU ASSUME ALL RESPONSIBILITY FOR ANY AND ALL CONSEQUENCES\n" +			"THAT MAY RESULT FROM THE USE OF THIS SOFTWARE!"			); 		controlPanel = new BorderPanel				( 7, 2, 5, BorderPanel.RIDGE );		controlPanel.setLayout( new GridLayout( 1, 1, 20, 20 ) );		button = new Button( "Ok" );		button.addActionListener( this );		button.setActionCommand( "OK" );		controlPanel.add( button );		this.setLayout( new GridBagLayout() );		AWTUtilities.constrain(			this, this.messageText,			GridBagConstraints.BOTH,			GridBagConstraints.CENTER,			0, 0, 1, 1, 1.0, 1.0 );		AWTUtilities.constrain(			this, controlPanel,			GridBagConstraints.HORIZONTAL,			GridBagConstraints.CENTER,			0, 1, 1, 1, 1.0, 0.0 );		}	public void	windowOpened(WindowEvent e)		{		}	public void	windowClosing(WindowEvent e)		{		this.dispose();		}	public void	windowClosed(WindowEvent e)		{		}	public void	windowActivated(WindowEvent e)		{		}	public void	windowDeactivated(WindowEvent e)		{		}	public void	windowIconified(WindowEvent e)		{		}	public void	windowDeiconified(WindowEvent e)		{		}	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -