Java Bean - 创建检查器窗口 [英] Java Beans - creating an inspector window
问题描述
我想知道是否存在一个现有的Java类,在给定Java bean的情况下,使用内省来查找所有可公开修改的字段,并使用默认的PropertyEditors显示它们。我看到了一堆关于BeanInfo,PropertyEditor,Bean Customizers的信息,但是我找不到实际的例子。
I'm wondering whether there is an existing Java class that, given a Java bean, uses introspection to find all the publicly modifiable fields, and displays them using default PropertyEditors. I see a bunch of information about BeanInfo, PropertyEditor, Bean Customizers, but nowhere can I find actual examples.
基本上我想要XCode的Inspector窗口的功能或者Netbeans中的属性面板。
Basically I want the functionality of the Inspector window from XCode or the Properties panel in Netbeans.
Netbeans属性面板http ://i45.tinypic.com/4jnsyu.png
推荐答案
看起来像L2FProd公共图书馆有一些东西了我的小巷:
Looks like L2FProd commons library has something just up my alley:
http://www.l2fprod .com / common /
在StackOverflow上搜索更多内容这个答案,其中
Yan Cheng Check 注意到他将课程扩展到了正确我需要的是:
ObjectInspectorJPanel
EnumComboBoxPropertyEditor
Searching some more on StackOverflow turned up this answer, in which Yan Cheng Check noted that he extended the classes to be exactly what I need: ObjectInspectorJPanel EnumComboBoxPropertyEditor
这篇关于Java Bean - 创建检查器窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!