[platform-dev] Re: EnumerationValues in propertySheet

  • From: Frédéric Deniger < >
  • To:
  • Subject: [platform-dev] Re: EnumerationValues in propertySheet
  • Date: Thu, 27 Sep 2012 23:08:48 +0200

Hello,

Have you tried the customization explained in :
http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/doc-files/propertyViewCustomization.html

This line can be useful:
java.lang.Integer and primitive integer stringKeys String[] Should contain internationalized strings that should be used as tags in a combo box. Number of elements must be >= 1. If this hint is supplied, the hint intKeyValues must also be supplied
intValues int[] The values the string keys correspond to. Must have the same number of elements as the string array
codeValues String[] Values to use in getJavaInitializationString() in place of hardcoding numbers (useful for constants)



Le 27/09/2012 11:30, Ben35 a écrit :
" type="cite">
Hi!

 I have Javabean with an int property. In the BeanInfo class I have this
 property descriptor:

 PropertyDescriptor layout = new PropertyDescriptor("layout", beanClass);
 layout.setValue("enumerationValues", new Object[] {
 "Body", new Integer(LayoutProperties.BODY), "LayoutProperties.BODY",
 "Header", new Integer(LayoutProperties.HEADER), "LayoutProperties.HEADER",
 "Sidebar", new
 Integer(LayoutProperties.SIDEBAR),"LayoutProperties.SIDEBAR",
 "Footer", new Integer(LayoutProperties.FOOTER),
 "LayoutProperties.FOOTER" } );

       

 I would like the PropertySheet in Netbeans Platform to give me a drop
 down where I can select one of the values.
 Netbeans picks up other things I define in PropertyDescriptors, but not
 enumerationValues.







[platform-dev] EnumerationValues in propertySheet

Ben35 09/27/2012

[platform-dev] Re: EnumerationValues in propertySheet

Frédéric Deniger 09/27/2012

Project Features

Project Links

About this Project

Platform was started in November 2009, is owned by Antonin Nebuzelsky, and has 138 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close