DevFaqPropertySheetReadonlyProperty

How do I add a readonly property?

You can customize your properties by using the setValue method.

http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/doc-files/propertyViewCustomization.html

Example:

PropertySupport.ReadOnly<String> javaVersionProperty = new PropertySupport.ReadOnly<String>(RuntimeProxyBean.PROP_VMVERSION, String.class, "JVM version", "Java VM version") {

            @Override
            public String getValue() throws IllegalAccessException, InvocationTargetException {
                return runtimeProxyBean.getVmVersion();
            }
        };

javaVersionProperty.setValue("suppressCustomEditor", true);

Taken from mailing list, contributed by Jean-Marc Borer

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo