Apache NetBeans Wiki Index

Note: These pages are being reviewed.

How do I add a readonly property?

You can customize your properties by using the setValue method.


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

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

javaVersionProperty.setValue("suppressCustomEditor", true);

Taken from mailing list, contributed by Jean-Marc Borer

Apache Migration Information

The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.

This page was exported from http://wiki.netbeans.org/DevFaqPropertySheetReadonlyProperty , that was last modified by NetBeans user Markiewb on 2016-04-10T10:30:21Z.

NOTE: This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed.