/** * PropertyPanel is the parent of panels that throw PropertyEvents.<p> * * Copyright &copy; 1998-89 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> * * Based on DateGUI.java in Mastering JavaBeans. * @see <a href="http://www.sybase.com">Sybase</a>, click on *  "Catalog>Updates>Mastering JavaBeans". * @author <a href="mailto:minow@pobox.com">Martin Minow</a> * @version 1.0a0 * Set tabs every 8 characters. */package org.minow.applets.sunsphere;import java.beans.*;import java.util.*;import java.awt.*;import java.awt.event.*;import java.text.*;public abstract class PropertyPanel extends Panel{    /**     * PropertyPanel is the parent of Component classes that     * distribute user interaction by sending a PropertyChangeEvent.     * Instead of sub-classing Panel, just subclass PropertyPanel.     * When you need to distribute an event, call the (parent)     * firePropertyChange method. PropertyPanel implements several     * methods from java.beans.PropertyChangeSupport:     *	addPropertyChangeListener     *	removePropertyChangeListener,     *	firePropertyChange     */     /*     * PropertyChange message distributor.     */    protected PropertyChangeSupport	butler = new PropertyChangeSupport(this);        /**     * Subclasses call firePropertyChange to send a PropertyChange event     * to their listeners.     */    protected void firePropertyChange(    	    String		propertyName,    	    Object		oldValue,    	    Object		newValue    	)    {	butler.firePropertyChange(propertyName, oldValue, newValue);    }    /**     * PropertyPanel subclass users call addPropertyChange to add     * (usually) themselves to the notification list.     */    public void addPropertyChangeListener(	    PropertyChangeListener  listener	)    {	butler.addPropertyChangeListener(listener);    }    /**     * PropertyPanel subclass users call removePropertyChange to     * remove (usually) themselves to the notification list.     */    public void removePropertyChangeListener(	    PropertyChangeListener  listener	)    {	butler.removePropertyChangeListener(listener);    }}