|
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.tasklist.usertasks; import java.awt.Image; import java.beans.BeanDescriptor; import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; import java.beans.SimpleBeanInfo; import org.openide.util.NbBundle; import org.openide.util.Utilities; /** * Bean info for Settings */ public class SettingsBeanInfo extends SimpleBeanInfo { public BeanDescriptor getBeanDescriptor() { BeanDescriptor bdesc = new BeanDescriptor(Settings.class); bdesc.setDisplayName(NbBundle.getMessage(SettingsBeanInfo.class, "OPTION_TASK_SETTINGS_NAME")); //NOI18N bdesc.setShortDescription(NbBundle.getMessage(SettingsBeanInfo.class, "HINT_TASK_SETTINGS_NAME")); //NOI18N return bdesc; } /** * Descriptor of valid properties. * * @return array of properties */ public PropertyDescriptor[] getPropertyDescriptors() { int i = 0; PropertyDescriptor[] desc = null; try { desc = new PropertyDescriptor[] { new PropertyDescriptor(Settings.PROP_APPEND, Settings.class), new PropertyDescriptor(Settings.PROP_FILENAME, Settings.class), new PropertyDescriptor(Settings.PROP_MAKE_BACKUPS, Settings.class), new PropertyDescriptor(Settings.PROP_HOURS_PER_DAY, Settings.class) }; desc[i].setDisplayName(NbBundle.getMessage(SettingsBeanInfo.class, "PROP_APPEND")); //NOI18N desc[i++].setShortDescription(NbBundle.getMessage(SettingsBeanInfo.class, "HINT_APPEND")); //NOI18N desc[i].setDisplayName(NbBundle.getMessage( SettingsBeanInfo.class, "PROP_FILENAME")); //NOI18N desc[i++].setShortDescription(NbBundle.getMessage( SettingsBeanInfo.class, "HINT_FILENAME")); //NOI18N desc[i].setDisplayName(NbBundle.getMessage( SettingsBeanInfo.class, "PROP_MAKE_BACKUPS")); //NOI18N desc[i++].setShortDescription(NbBundle.getMessage( SettingsBeanInfo.class, "HINT_MAKE_BACKUPS")); //NOI18N desc[i].setDisplayName(NbBundle.getMessage( SettingsBeanInfo.class, "PROP_HOURS_PER_DAY")); //NOI18N desc[i++].setShortDescription(NbBundle.getMessage( SettingsBeanInfo.class, "HINT_HOURS_PER_DAY")); //NOI18N } catch (IntrospectionException ex) { ex.printStackTrace(); throw new InternalError(); } return desc; } /** (Placeholder) icon in options window */ public Image getIcon(int type) { return Utilities.loadImage("org/netbeans/modules/tasklist/core/task.gif"); //NOI18N } } |
... 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.