In addition, if you want to do more complex design time customization of the bean, possibly involving many properties, you can implement java.beans.Customizer. You may present a panel for the user to change many properties or run other methods of the bean class.
|
In the custom property editor, you must implement methods isPaintable, paintValue, supportsCustomEditor, getCustomEditor, and getJavaInitializationString.
|
The first methods allow you to present a GUI interface for changing the properties. The last method returns Java code that can be used to initialize the property value.
-
For example, a GUI color property editor would return something of the form "new Color(127, 0, 255)".
|