|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.httpserver; import java.awt.Image; import java.beans.*; import java.util.ResourceBundle; import org.openide.TopManager; import org.openide.util.NbBundle; import org.openide.util.Utilities; /** BeanInfo for http - custom editor for hosts property * * @author Ales Novak, Petr Jiricka */ public class HttpServerSettingsBeanInfo extends SimpleBeanInfo { /** @return the ExternalCompilerSettings' icon */ public Image getIcon(int type) { if ((type == java.beans.BeanInfo.ICON_COLOR_16x16) || (type == java.beans.BeanInfo.ICON_MONO_16x16)) { return Utilities.loadImage("org/netbeans/modules/httpserver/httpServerSettings.gif"); // NOI18N } else { return Utilities.loadImage ("org/netbeans/modules/httpserver/httpServerSettings32.gif"); // NOI18N } } /** Descriptor of valid properties * @return array of properties */ public PropertyDescriptor[] getPropertyDescriptors () { try { PropertyDescriptor[] desc = new PropertyDescriptor[] { new PropertyDescriptor("host", HttpServerSettings.class, null, "setHost"), // 0 // NOI18N new PropertyDescriptor("grantedAddresses", HttpServerSettings.class, null, "setGrantedAddresses"), // 1 // NOI18N new PropertyDescriptor("port", HttpServerSettings.class), // 2 // NOI18N new PropertyDescriptor("repositoryBaseURL", HttpServerSettings.class), // 3 // NOI18N new PropertyDescriptor("classpathBaseURL", HttpServerSettings.class), // 4 // NOI18N new PropertyDescriptor("javadocBaseURL", HttpServerSettings.class), // 5 // NOI18N new PropertyDescriptor("running", HttpServerSettings.class), // 6 // NOI18N new PropertyDescriptor("hostProperty", HttpServerSettings.class) // 7 // NOI18N }; ResourceBundle bundle = NbBundle.getBundle(HttpServerSettingsBeanInfo.class); // host and grantedAddresses are write-olny props for deserialization of old settings (release32) desc[0].setHidden (true); desc[1].setHidden (true); desc[2].setDisplayName(bundle.getString("PROP_Port")); desc[2].setShortDescription(bundle.getString("HINT_Port")); desc[3].setDisplayName(bundle.getString("PROP_RepositoryBase")); desc[3].setShortDescription(bundle.getString("HINT_RepositoryBase")); desc[3].setExpert(true); desc[4].setDisplayName(bundle.getString("PROP_ClasspathBase")); desc[4].setShortDescription(bundle.getString("HINT_ClasspathBase")); desc[4].setExpert(true); desc[5].setDisplayName(bundle.getString("PROP_JavadocBase")); desc[5].setShortDescription(bundle.getString("HINT_JavadocBase")); desc[5].setExpert(true); desc[6].setDisplayName(bundle.getString("PROP_Running")); desc[6].setShortDescription(bundle.getString("HINT_Running")); desc[7].setDisplayName(bundle.getString("PROP_HostProperty")); desc[7].setShortDescription(bundle.getString("HINT_HostProperty")); desc[7].setPropertyEditorClass (HostPropertyEditor.class); return desc; } catch (IntrospectionException ex) { TopManager.getDefault().getErrorManager().notify(ex); return null; } } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.