String sd = descriptor.getShortDescription();
public String getShortDescription() { String shortDescription = (String)getValue("description." + Locale.getDefault().getLanguage()); // NOI18N if (shortDescription != null) { return (shortDescription); } else { return super.getShortDescription(); } }
private String getDescription (Lookup.Item item) { String id = item.getId (); String result = null; try { result = Introspector.getBeanInfo(item.getInstance().getClass()).getBeanDescriptor().getShortDescription(); } catch (IntrospectionException ie) { //do nothing } String toCheck = item.getInstance().getClass().getName(); toCheck = toCheck.lastIndexOf('.')!=-1 ? toCheck.substring(toCheck.lastIndexOf('.')+1) : toCheck; //NOI18N if (toCheck.equals(result)) { result = null; } return result; }
out.writeObject(_descriptor.getName()); out.writeBoolean(_descriptor.isPreferred()); out.writeObject(_descriptor.getShortDescription());
public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(_descriptor.getBeanClass()); out.writeObject(_descriptor.getCustomizerClass()); out.writeObject(_descriptor.getDisplayName()); out.writeBoolean(_descriptor.isExpert()); out.writeObject(_descriptor.getName()); out.writeBoolean(_descriptor.isPreferred()); out.writeObject(_descriptor.getShortDescription()); Map<String,Object> map = new HashMap<String, Object>(4,1); for (Enumeration<String> e = _descriptor.attributeNames(); e.hasMoreElements();) { String name = e.nextElement(); // It is not necessary to serialize AttachedObjectTarget list because // we only use it when VDL.retargetAttachedObjects() is called and this only // happen when the view is built. Also, try to serialize this instances could // cause unwanted exceptions. if (!AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY.equals(name)) { map.put(name, _descriptor.getValue(name)); } } out.writeObject(map); out.writeObject(_propertyDescriptors); } }
public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(_descriptor.getBeanClass()); out.writeObject(_descriptor.getCustomizerClass()); out.writeObject(_descriptor.getDisplayName()); out.writeBoolean(_descriptor.isExpert()); out.writeObject(_descriptor.getName()); out.writeBoolean(_descriptor.isPreferred()); out.writeObject(_descriptor.getShortDescription()); Map<String,Object> map = new HashMap<String, Object>(4,1); for (Enumeration<String> e = _descriptor.attributeNames(); e.hasMoreElements();) { String name = e.nextElement(); // It is not necessary to serialize AttachedObjectTarget list because // we only use it when VDL.retargetAttachedObjects() is called and this only // happen when the view is built. Also, try to serialize this instances could // cause unwanted exceptions. if (!AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY.equals(name)) { map.put(name, _descriptor.getValue(name)); } } out.writeObject(map); out.writeObject(_propertyDescriptors); } }
else jf.setTitle("script avec '"+s1+"'"); s2 = bd.getShortDescription(); if (s2 != null) System.out.println(s2);
else jf2.setTitle("script avec '"+s1+"'"); s2 = bd.getShortDescription(); if (s2 != null) tw.out.write(s2+"\n");
cd.setDescription(beanInfo.getBeanDescriptor().getShortDescription());
setNameSilently (getNameForBean ()); BeanDescriptor descriptor = beanInfo.getBeanDescriptor (); String sd = descriptor.getShortDescription (); if (! Utilities.compareObjects (sd, descriptor.getDisplayName ())) setShortDescription (sd);
setNameSilently (getNameForBean ()); BeanDescriptor descriptor = beanInfo.getBeanDescriptor (); String sd = descriptor.getShortDescription (); if (! Utilities.compareObjects (sd, descriptor.getDisplayName ())) setShortDescription (sd);
/** Gets the short description of this feature. */ public String getShortDescription() { if (noBeanInfo) return super.getShortDescription(); try { InstanceCookie ic = ic(); if (ic == null) { // it must be unrecognized instance return getDataObject().getPrimaryFile().toString(); } Class clazz = ic.instanceClass(); java.beans.BeanDescriptor bd = Utilities.getBeanInfo(clazz).getBeanDescriptor(); String desc = bd.getShortDescription(); return (desc.equals(bd.getName()))? getDisplayName(): desc; } catch (Exception ex) { return super.getShortDescription(); } catch (LinkageError ex) { // #30650 - catch also LinkageError. return super.getShortDescription(); } }