/** * ColorTestSwatch draws samples of all system color instances.<p> * * Copyright &copy; 1997 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.util.*;import java.awt.*;/* * This class requires Java 1.1 */class ColorTestCell extends Panel{					public ColorTestCell(			SystemColor		color,			String			name		)	{		super();		setLayout(new BorderLayout(1, 1));		String		nameHex		= Long.toString(				((long) color.getRGB()) & 0x00000000FFFFFFFFL, 16);		while (nameHex.length() < 8) {			nameHex = "0" + nameHex;		}		Panel		p		= new Panel();		p.setLayout(new BorderLayout());		p.add("North", new Label(nameHex, Label.CENTER));		p.add("South", new Label(name, Label.CENTER));		p.add("Center", new ColorTestSwatch(color));		this.add("Center", new SimpleBorder(p));	}}