当前位置: 首页>>代码示例>>Java>>正文


Java BeanDescriptor.getShortDescription方法代码示例

本文整理汇总了Java中java.beans.BeanDescriptor.getShortDescription方法的典型用法代码示例。如果您正苦于以下问题:Java BeanDescriptor.getShortDescription方法的具体用法?Java BeanDescriptor.getShortDescription怎么用?Java BeanDescriptor.getShortDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.beans.BeanDescriptor的用法示例。


在下文中一共展示了BeanDescriptor.getShortDescription方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getShortDescription

import java.beans.BeanDescriptor; //导入方法依赖的package包/类
/** 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();
        BeanDescriptor bd = Utilities.getBeanInfo(clazz).getBeanDescriptor();
        String desc = bd.getShortDescription();
        return (desc.equals(bd.getDisplayName()))? getDisplayName(): desc;
    } catch (Exception ex) {
        return super.getShortDescription();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:SerialDataNode.java

示例2: getHtmlDescription

import java.beans.BeanDescriptor; //导入方法依赖的package包/类
public String getHtmlDescription() {
	if (htmlDescription == null) {
		BeanDescriptor beanDescriptor = beanInfo.getBeanDescriptor();
		String beanDescription = beanDescriptor.getShortDescription();

		String[] beanDescriptions = beanDescription.split("\\|");

		String beanShortDescription = beanDescriptions.length >= 1 ? beanDescriptions[0] : "n/a";
		String beanLongDescription = beanDescriptions.length >= 2 ? beanDescriptions[1] : "n/a";
		beanShortDescription = BeansUtils.cleanDescription(beanShortDescription, true);
		beanLongDescription = BeansUtils.cleanDescription(beanLongDescription, true);

		htmlDescription = "<p>" +
				"<font size=\"4.5\"><u><b>" + getDisplayName() + "</b></u></font>" + "<br><br>"	+
				"<i>" + beanShortDescription + "</i>" + "<br><br>" + beanLongDescription +
		   "</p>";
	}

	return htmlDescription;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:21,代码来源:DboBeanData.java

示例3: updateHelpText

import java.beans.BeanDescriptor; //导入方法依赖的package包/类
private void updateHelpText(BeanInfo bi) {
	BeanDescriptor beanDescriptor = bi.getBeanDescriptor();
	boolean isDocumented = documentedDboList.contains(beanDescriptor.getBeanClass().getName());
	String beanDescription = isDocumented ? beanDescriptor.getShortDescription():"Not yet documented. |";
	String[] beanDescriptions = beanDescription.split("\\|");
	String beanDisplayName = beanDescriptor.getDisplayName();
	String beanShortDescription = beanDescriptions.length >= 1 ? beanDescriptions[0] : "n/a";
	String beanLongDescription = beanDescriptions.length >= 2 ? beanDescriptions[1] : "n/a";

	beanShortDescription = BeansUtils.cleanDescription(beanShortDescription, true);
	beanLongDescription = BeansUtils.cleanDescription(beanLongDescription, true);

	helpBrowser.setText("<html>" +
							"<head>" +
							"<script type=\"text/javascript\">"+
						        "document.oncontextmenu = new Function(\"return false\");"+
						    "</script>"+
									"<style type=\"text/css\">"+
										  "body {"+
										    "font-family: Courrier new, sans-serif;"+
										    "font-size: 14px;"+
										    "padding-left: 0.3em;"+
										    "background-color: #ECEBEB }"+
									"</style>"+
							"</head><p>" 
						+ "<font size=\"4.5\"><u><b>"+beanDisplayName+"</b></u></font>" + "<br><br>" 
						+ "<i>"+beanShortDescription+"</i>" + "<br><br>" 
						+ beanLongDescription + "</p></html>");
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:30,代码来源:ObjectsExplorerComposite.java


注:本文中的java.beans.BeanDescriptor.getShortDescription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。