java.beans.BeanDescriptor#setShortDescription ( )源码实例Demo

下面列出了java.beans.BeanDescriptor#setShortDescription ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: jivejdon   文件: FilterBeanInfo.java
public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor descriptor = new BeanDescriptor(getBeanClass());
    try {
        // Attempt to load the displayName and shortDescription explicitly.
        String displayName = bundle.getString("displayName");
        if (displayName != null) {
            descriptor.setDisplayName(displayName);
        }
        String shortDescription = bundle.getString("shortDescription");
        if (shortDescription != null) {
            descriptor.setShortDescription(shortDescription);
        }
        // Add any other properties that are specified.
        Enumeration em = bundle.getKeys();
        while (em.hasMoreElements()) {
            String key = (String)em.nextElement();
            String value = bundle.getString(key);
            if (value != null) {
                descriptor.setValue(key, value);
            }
        }
    }
    catch (Exception e) {
        // Ignore any exceptions. We may get some if we try to load a
        // a property that doesn't appear in the resource bundle.
    }
    return descriptor;
}
 
源代码2 项目: netbeans   文件: MicrosoftEdgeBrowserBeanInfo.java
@Override
   public BeanDescriptor getBeanDescriptor() {
       BeanDescriptor descr = new BeanDescriptor(MicrosoftEdgeBrowser.class);
       descr.setDisplayName(NbBundle.getMessage(MicrosoftEdgeBrowserBeanInfo.class, "CTL_MicrosoftEdgeBrowserName")); // NOI18N
       descr.setShortDescription(NbBundle.getMessage(MicrosoftEdgeBrowserBeanInfo.class, "HINT_MicrosoftEdgeBrowserName")); // NOI18N
       descr.setValue ("helpID", "org.netbeans.modules.extbrowser.ExtWebBrowser");  // NOI18N
return descr;
   }
 
源代码3 项目: openjdk-jdk9   文件: TestBeanInfoPriority.java
@Override
public BeanDescriptor getBeanDescriptor() {

    BeanDescriptor bd = new BeanDescriptor(TestClass.class, null);
    bd.setShortDescription("user-defined-description");
    bd.setValue("isContainer", true);
    bd.setValue("containerDelegate", "user-defined-delegate");

    return bd;
}
 
源代码4 项目: Openfire   文件: JiveBeanInfo.java
@Override
public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor descriptor = new BeanDescriptor(getBeanClass());
    try {
        // Attempt to load the displayName and shortDescription explicitly.
        String displayName = bundle.getString("displayName");
        if (displayName != null) {
            descriptor.setDisplayName(displayName);
        }
        String shortDescription = bundle.getString("shortDescription");
        if (shortDescription != null) {
            descriptor.setShortDescription(shortDescription);
        }
        // Add any other properties that are specified.
        Enumeration enumeration = bundle.getKeys();
        while (enumeration.hasMoreElements()) {
            String key = (String)enumeration.nextElement();
            String value = bundle.getString(key);
            if (value != null) {
                descriptor.setValue(key, value);
            }
        }
    }
    catch (Exception e) {
        // Ignore any exceptions. We may get some if we try to load a
        // a property that doesn't appear in the resource bundle.
    }
    return descriptor;
}
 
@Override
public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor d = new BeanDescriptor(Base.class, null);
    d.setShortDescription("BASE");
    return d;
}