當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。