Customization: Providing Custom PropertyEditors and GUI Interfaces

So far, you have seen how to create a Bean; how to expose its properties, methods, and events; and how to tweak the introspection process. You might have noticed from the figures that the properties of a Bean have a PropertyEditor. For example, look back at Figure 29.3. In the PropertySheet window, next to the "Text String" label, there's a TextField component already filled with the value of the OutputText property. You didn't supply any code for this component, so how did Sun's BeanBox know to provide it? The answer is that the BeanBox application asked the java.beans.PropertyEditorManager what the default PropertyEditor was for an object of type java.lang.String and displayed ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.