KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > beans > Customizer


1 /*
2  * @(#)Customizer.java 1.19 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.beans;
9
10 /**
11  * A customizer class provides a complete custom GUI for customizing
12  * a target Java Bean.
13  * <P>
14  * Each customizer should inherit from the java.awt.Component class so
15  * it can be instantiated inside an AWT dialog or panel.
16  * <P>
17  * Each customizer should have a null constructor.
18  */

19
20 public interface Customizer {
21
22     /**
23      * Set the object to be customized. This method should be called only
24      * once, before the Customizer has been added to any parent AWT container.
25      * @param bean The object to be customized.
26      */

27     void setObject(Object JavaDoc bean);
28
29     /**
30      * Register a listener for the PropertyChange event. The customizer
31      * should fire a PropertyChange event whenever it changes the target
32      * bean in a way that might require the displayed properties to be
33      * refreshed.
34      *
35      * @param listener An object to be invoked when a PropertyChange
36      * event is fired.
37      */

38      void addPropertyChangeListener(PropertyChangeListener JavaDoc listener);
39
40     /**
41      * Remove a listener for the PropertyChange event.
42      *
43      * @param listener The PropertyChange listener to be removed.
44      */

45     void removePropertyChangeListener(PropertyChangeListener JavaDoc listener);
46
47 }
48
49
Popular Tags