/** Default human-presentable name of the service type. * In the default implementation, taken from the bean descriptor. * @return initial value of the human-presentable name * @see java.beans.FeatureDescriptor#getDisplayName */ protected String displayName() { try { return Introspector.getBeanInfo(getClass()).getBeanDescriptor().getDisplayName(); } catch (Exception e) { // Catching IntrospectionException, but also maybe NullPointerException...? Logger.getLogger(ServiceType.class.getName()).log(Level.WARNING, null, e); return getClass().getName(); } }
/** Default human-presentable name of the service type. * In the default implementation, taken from the bean descriptor. * @return initial value of the human-presentable name * @see java.beans.FeatureDescriptor#getDisplayName */ protected String displayName() { try { return Introspector.getBeanInfo(getClass()).getBeanDescriptor().getDisplayName(); } catch (Exception e) { // Catching IntrospectionException, but also maybe NullPointerException...? Logger.getLogger(ServiceType.class.getName()).log(Level.WARNING, null, e); return getClass().getName(); } }
/** * Returns name of the bean. */ private String getNameForBean() { if (nameGetter != null) { try { String name = (String) nameGetter.invoke(bean); return (name != null) ? name : ""; // NOI18N } catch (Exception ex) { NodeOp.warning(ex); } } BeanDescriptor descriptor = beanInfo.getBeanDescriptor(); return descriptor.getDisplayName(); }
String sd = descriptor.getShortDescription(); if (!Utilities.compareObjects(sd, descriptor.getDisplayName())) { setShortDescription(sd);
/** * {@inheritDoc} */ @Override public String getStaticLabel() { if (beanInfo == null){ return "null";// $NON-NLS-1$ } return beanInfo.getBeanDescriptor().getDisplayName(); }
public String getDisplayName() { String displayName = (String)getValue("displayName." + Locale.getDefault().getLanguage()); // NOI18N if (displayName != null) { return (displayName); } else { return super.getDisplayName(); } }
/** Default human-presentable name of the service type. * In the default implementation, taken from the bean descriptor. * @return initial value of the human-presentable name * @see java.beans.FeatureDescriptor#getDisplayName */ protected String displayName() { try { return Introspector.getBeanInfo(getClass()).getBeanDescriptor().getDisplayName(); } catch (Exception e) { // Catching IntrospectionException, but also maybe NullPointerException...? Logger.getLogger(ServiceType.class.getName()).log(Level.WARNING, null, e); return getClass().getName(); } }
/** Default human-presentable name of the service type. * In the default implementation, taken from the bean descriptor. * @return initial value of the human-presentable name * @see java.beans.FeatureDescriptor#getDisplayName */ protected String displayName() { try { return Introspector.getBeanInfo(getClass()).getBeanDescriptor().getDisplayName(); } catch (Exception e) { // Catching IntrospectionException, but also maybe NullPointerException...? Logger.getLogger(ServiceType.class.getName()).log(Level.WARNING, null, e); return getClass().getName(); } }
/** Default human-presentable name of the service type. * In the default implementation, taken from the bean descriptor. * @return initial value of the human-presentable name * @see FeatureDescriptor#getDisplayName */ protected String displayName () { try { return Introspector.getBeanInfo (getClass ()).getBeanDescriptor ().getDisplayName (); } catch (Exception e) { // Catching IntrospectionException, but also maybe NullPointerException...? ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, e); return getClass ().getName (); } }
/** Default human-presentable name of the service type. * In the default implementation, taken from the bean descriptor. * @return initial value of the human-presentable name * @see FeatureDescriptor#getDisplayName */ protected String displayName () { try { return Introspector.getBeanInfo (getClass ()).getBeanDescriptor ().getDisplayName (); } catch (Exception e) { // Catching IntrospectionException, but also maybe NullPointerException...? ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, e); return getClass ().getName (); } }
/** * Returns name of the bean. */ private String getNameForBean () { if (nameGetter != null) { try { String name = (String) nameGetter.invoke (bean, null); return name != null ? name : ""; // NOI18N } catch (Exception ex) { NodeOp.warning (ex); } } BeanDescriptor descriptor = beanInfo.getBeanDescriptor (); return descriptor.getDisplayName (); }
/** * @param <code>DesignBean</code> for the newly created instance */ public Result beanCreatedSetup(DesignBean bean) { DesignProperty textProperty = bean.getProperty("text"); //NOI18N textProperty.setValue(bean.getBeanInfo().getBeanDescriptor().getDisplayName()); return Result.SUCCESS; }
@Override public String getDisplayName() { BeanDescriptor bd = _beanInfo.get().getBeanDescriptor(); return bd != null ? bd.getDisplayName() : getJavaType().getRelativeName(); }
public Result beanCreatedSetup(DesignBean bean) { DesignProperty label = bean.getProperty("label"); //NOI18N DesignProperty name = bean.getProperty("name"); //NOI18N label.setValue( bean.getBeanInfo().getBeanDescriptor().getDisplayName()); return Result.SUCCESS; }
public Result beanCreatedSetup(DesignBean bean) { super.beanCreatedSetup(bean); DesignProperty textProperty = bean.getProperty("text"); //NOI18N textProperty.setValue( bean.getBeanInfo().getBeanDescriptor().getDisplayName()); return Result.SUCCESS; }
public Result beanCreatedSetup(DesignBean bean) { super.beanCreatedSetup(bean); DesignProperty textProperty = bean.getProperty("text"); //NOI18N textProperty.setValue(bean.getBeanInfo().getBeanDescriptor().getDisplayName()); return Result.SUCCESS; }
public Result beanCreatedSetup(DesignBean bean) { super.beanCreatedSetup(bean); DesignProperty textProperty = bean.getProperty("text"); //NOI18N textProperty.setValue(bean.getBeanInfo().getBeanDescriptor().getDisplayName()); return Result.SUCCESS; }
public Result beanCreatedSetup(DesignBean bean) { DesignProperty prop; DesignProperty textProperty = bean.getProperty("text"); //NOI18N textProperty.setValue(bean.getBeanInfo().getBeanDescriptor().getDisplayName()); DesignContext context = bean.getDesignContext(); if (context.canCreateBean(TreeNode.class.getName(), bean, null)) { DesignBean treeNodeBean = context.createBean(TreeNode.class.getName(), bean, null); // Use same DT property state as if user added TreeNode treeNodeBean.getDesignInfo().beanCreatedSetup(treeNodeBean); } return Result.SUCCESS; }
public Result beanCreatedSetup(DesignBean bean) { super.beanCreatedSetup(bean); DesignContext context = bean.getDesignContext(); DesignProperty textProperty = bean.getProperty("label"); //NOI18N String suffix = DesignUtil.getNumericalSuffix(bean.getInstanceName()); textProperty.setValue( bean.getBeanInfo().getBeanDescriptor().getDisplayName() + " " + suffix); DesignBean propertyBean = context.createBean(Property.class.getName(), bean, null); suffix = DesignUtil.getNumericalSuffix(propertyBean.getInstanceName()); propertyBean.getProperty("label").setValue( propertyBean.getBeanInfo().getBeanDescriptor().getDisplayName() + " " + suffix); return Result.SUCCESS; }
public Result beanCreatedSetup(DesignBean bean) { super.beanCreatedSetup(bean); DesignProperty textProperty = bean.getProperty("label"); //NOI18N String suffix = DesignUtil.getNumericalSuffix(bean.getInstanceName()); textProperty.setValue( bean.getBeanInfo().getBeanDescriptor().getDisplayName() + " " + suffix); return Result.SUCCESS; }