/** * See {@link java.beans.FeatureDescriptor}. */ public static void copyNonMethodProperties(PropertyDescriptor source, PropertyDescriptor target) { target.setExpert(source.isExpert()); target.setHidden(source.isHidden()); target.setPreferred(source.isPreferred()); target.setName(source.getName()); target.setShortDescription(source.getShortDescription()); target.setDisplayName(source.getDisplayName()); // Copy all attributes (emulating behavior of private FeatureDescriptor#addTable) Enumeration<String> keys = source.attributeNames(); while (keys.hasMoreElements()) { String key = keys.nextElement(); target.setValue(key, source.getValue(key)); } // See java.beans.PropertyDescriptor#PropertyDescriptor(PropertyDescriptor) target.setPropertyEditorClass(source.getPropertyEditorClass()); target.setBound(source.isBound()); target.setConstrained(source.isConstrained()); }
/** * See {@link java.beans.FeatureDescriptor}. */ public static void copyNonMethodProperties(PropertyDescriptor source, PropertyDescriptor target) { target.setExpert(source.isExpert()); target.setHidden(source.isHidden()); target.setPreferred(source.isPreferred()); target.setName(source.getName()); target.setShortDescription(source.getShortDescription()); target.setDisplayName(source.getDisplayName()); // Copy all attributes (emulating behavior of private FeatureDescriptor#addTable) Enumeration<String> keys = source.attributeNames(); while (keys.hasMoreElements()) { String key = keys.nextElement(); target.setValue(key, source.getValue(key)); } // See java.beans.PropertyDescriptor#PropertyDescriptor(PropertyDescriptor) target.setPropertyEditorClass(source.getPropertyEditorClass()); target.setBound(source.isBound()); target.setConstrained(source.isConstrained()); }
protected PropertyDescriptor createPropertyDescriptor( String name, Class cls, ResourceBundle resourceBundle) throws IntrospectionException { PropertyDescriptor pd = new PropertyDescriptor(name, cls); String s = resourceBundle.getString(pd.getName() + ".DisplayName"); if ((s == null) || (s == "")) { s = pd.getDisplayName(); } pd.setDisplayName(s); s = resourceBundle.getString(pd.getName() + ".Description"); if ((s == null) || (s == "")) { s = pd.getShortDescription(); } pd.setShortDescription(s); return pd; }
public FeatureDescriptor next() { PropertyDescriptor property = properties[next++]; FeatureDescriptor feature = new FeatureDescriptor(); feature.setDisplayName(property.getDisplayName()); feature.setName(property.getName()); feature.setShortDescription(property.getShortDescription()); feature.setExpert(property.isExpert()); feature.setHidden(property.isHidden()); feature.setPreferred(property.isPreferred()); feature.setValue(TYPE, property.getPropertyType()); feature.setValue(RESOLVABLE_AT_DESIGN_TIME, true); return feature; }
public FeatureDescriptor next() { PropertyDescriptor property = properties[next++]; FeatureDescriptor feature = new FeatureDescriptor(); feature.setDisplayName(property.getDisplayName()); feature.setName(property.getName()); feature.setShortDescription(property.getShortDescription()); feature.setExpert(property.isExpert()); feature.setHidden(property.isHidden()); feature.setPreferred(property.isPreferred()); feature.setValue(TYPE, property.getPropertyType()); feature.setValue(RESOLVABLE_AT_DESIGN_TIME, true); return feature; }
support.setName(p.getName()); support.setDisplayName(p.getDisplayName()); support.setShortDescription(p.getShortDescription()); support.setPropertyEditorClass(p.getPropertyEditorClass());
/** {@inheritDoc} */ @Override public String getDescription() { return this.beanPropertyDescriptor.getShortDescription(); }
public String getShortDescription() { return descriptor.getShortDescription(); }
/** * Gets the short description for the property. */ public String getShortDescription() { return m_delegate.getShortDescription(); }
public String getShortDescription() { return descriptor.getShortDescription(); }
@Override public String getShortDescription() { return _pd.getShortDescription(); } }
public PropertyDTO(PropertyDescriptor propertyDescriptor) { name = propertyDescriptor.getName(); displayName = propertyDescriptor.getDisplayName(); typeClass = propertyDescriptor.getPropertyType(); typeName = typeClass.getName(); description = propertyDescriptor.getShortDescription(); readable = propertyDescriptor.getReadMethod() != null; writeable = propertyDescriptor.getWriteMethod() != null; }
public String getShortDescription() { String shortDescription = (String)getValue("description." + Locale.getDefault().getLanguage()); // NOI18N if (shortDescription != null) { return (shortDescription); } else { return super.getShortDescription(); } }
public String getShortDescription() { String shortDescription = (String)getValue("description." + Locale.getDefault().getLanguage()); // NOI18N if (shortDescription != null) { return (shortDescription); } else { return super.getShortDescription(); } }
public PropertyDTO(PropertyDescriptor propertyDescriptor) { name = propertyDescriptor.getName(); displayName = propertyDescriptor.getDisplayName(); typeClass = propertyDescriptor.getPropertyType(); typeName = typeClass.getName(); description = propertyDescriptor.getShortDescription(); readable = propertyDescriptor.getReadMethod() != null; writeable = propertyDescriptor.getWriteMethod() != null; }
private JLabel createLabel(PropertyDescriptor desc) { String text = desc.getDisplayName(); if (!"".equals(text)) { text = propertyFieldLabelMessage.format(new Object[] { desc.getDisplayName() }); } // if the displayName is the empty string, leave it like that. JLabel label = new JLabel(text); label.setHorizontalAlignment(SwingConstants.TRAILING); label.setToolTipText(propertyToolTipMessage.format(new Object[] { desc.getShortDescription() })); return label; }
protected void fillAttributes ( final PropertyDescriptor pd, final Map<String, Variant> attributes ) { attributes.put ( "property.writeable", Variant.valueOf ( pd.getWriteMethod () != null ) ); attributes.put ( "property.readable", Variant.valueOf ( pd.getReadMethod () != null ) ); attributes.put ( "property.bound", Variant.valueOf ( pd.isBound () ) ); attributes.put ( "property.expert", Variant.valueOf ( pd.isExpert () ) ); attributes.put ( "property.constrained", Variant.valueOf ( pd.isConstrained () ) ); attributes.put ( "property.label", Variant.valueOf ( pd.getDisplayName () ) ); attributes.put ( "property.type", Variant.valueOf ( pd.getPropertyType ().getName () ) ); attributes.put ( "property.name", Variant.valueOf ( pd.getName () ) ); attributes.put ( "description", Variant.valueOf ( pd.getShortDescription () ) ); }
public FeatureDescriptor next() { PropertyDescriptor property = properties[next++]; FeatureDescriptor feature = new FeatureDescriptor(); feature.setDisplayName(property.getDisplayName()); feature.setName(property.getName()); feature.setShortDescription(property.getShortDescription()); feature.setExpert(property.isExpert()); feature.setHidden(property.isHidden()); feature.setPreferred(property.isPreferred()); feature.setValue(TYPE, property.getPropertyType()); feature.setValue(RESOLVABLE_AT_DESIGN_TIME, true); return feature; }
public FeatureDescriptor next() { PropertyDescriptor property = properties[next++]; FeatureDescriptor feature = new FeatureDescriptor(); feature.setDisplayName(property.getDisplayName()); feature.setName(property.getName()); feature.setShortDescription(property.getShortDescription()); feature.setExpert(property.isExpert()); feature.setHidden(property.isHidden()); feature.setPreferred(property.isPreferred()); feature.setValue(TYPE, property.getPropertyType()); feature.setValue(RESOLVABLE_AT_DESIGN_TIME, true); return feature; }
public FeatureDescriptor next() { PropertyDescriptor property = properties[next++]; FeatureDescriptor feature = new FeatureDescriptor(); feature.setDisplayName(property.getDisplayName()); feature.setName(property.getName()); feature.setShortDescription(property.getShortDescription()); feature.setExpert(property.isExpert()); feature.setHidden(property.isHidden()); feature.setPreferred(property.isPreferred()); feature.setValue(TYPE, property.getPropertyType()); feature.setValue(RESOLVABLE_AT_DESIGN_TIME, true); return feature; }