/** * ToolkitDataInfo returns all properties available from * the Toolkit class. * * Copyright &copy; 1996-1998 Martin Minow. All Rights Reserved.<p> * * Permission to use, copy, modify, and redistribute this software and its * documentation for personal, non-commercial use is hereby granted provided that * this copyright notice and appropriate documentation appears in all copies. This * software may not be distributed for fee or as part of commercial, "shareware," * and/or not-for-profit endevors including, but not limited to, CD-ROM collections, * online databases, and subscription services without specific license.<p> * * @author <a href="mailto:minow@apple.com">Martin Minow</a> * @version 1.0 * Set tabs every 4 characters. */import java.applet.Applet;import java.awt.*;public class ToolkitDataInfo extends SystemInfo{	Toolkit			toolkit			= Toolkit.getDefaultToolkit();		public ToolkitDataInfo(			EtchedBorder		border		)	{		super(border);		String[]	fontList		= toolkit.getFontList();		append("*** System Fonts ***\n");		for (int i = 0; i < fontList.length; i++) {			Font			font	= new Font(fontList[i], Font.PLAIN, 12);			FontMetrics		fm		= toolkit.getFontMetrics(font);			append(fontList[i] + ": " + fm.toString() + "\n");		}		int			resolution		= toolkit.getScreenResolution();		Dimension	size			= toolkit.getScreenSize();		double		screenWidth		= ((double) size.width) / (double) resolution;		double		screenHeight	= ((double) size.height) / (double) resolution;		append("*** Display Configuration ***\n");		append("Screen size"				+ ": width = "			+ size.width				+ ", height = "			+ size.height				+ ", resolution = "	+ resolution				+ ", screen width = "	+ Format.format(screenWidth, 1) + " inches"				+ ", screen height = "	+ Format.format(screenHeight, 1) + " inches"				+ "\n"			);	}}