當前位置: 首頁>>代碼示例>>Java>>正文


Java FeatureDescriptor.setDisplayName方法代碼示例

本文整理匯總了Java中java.beans.FeatureDescriptor.setDisplayName方法的典型用法代碼示例。如果您正苦於以下問題:Java FeatureDescriptor.setDisplayName方法的具體用法?Java FeatureDescriptor.setDisplayName怎麽用?Java FeatureDescriptor.setDisplayName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.beans.FeatureDescriptor的用法示例。


在下文中一共展示了FeatureDescriptor.setDisplayName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: _copyFeatureDescriptor

import java.beans.FeatureDescriptor; //導入方法依賴的package包/類
private static void _copyFeatureDescriptor(
  FeatureDescriptor oldDescriptor,
  FeatureDescriptor newDescriptor
  )
{
  newDescriptor.setName(oldDescriptor.getName());
  newDescriptor.setDisplayName(oldDescriptor.getDisplayName());
  newDescriptor.setExpert(oldDescriptor.isExpert());
  newDescriptor.setHidden(oldDescriptor.isHidden());
  newDescriptor.setShortDescription(oldDescriptor.getShortDescription());

  JavaIntrospector.__addFeatureValues(oldDescriptor, newDescriptor);
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:14,代碼來源:JavaIntrospector.java

示例2: _mergeFeatureDescriptors

import java.beans.FeatureDescriptor; //導入方法依賴的package包/類
/**
 * Merge information from two FeatureDescriptors into a third
 * FeatureDescriptor.
 * The merged hidden and expert flags are formed by or-ing the values.
 * In the event of other conflicts, the second argument
 * <code>primaryDescriptor</code> is given priority over the first argument
 * <code>secondaryDescriptor</code>.
 * <p>
 * @param secondaryDescriptor  The lower priority FeatureDescriptor
 * @param primaryDescriptor  The higher priority FeatureDescriptor
 * @param mergedDescriptor The FeatureDescriptor to merge the information
 *                         into.
 */
private static void _mergeFeatureDescriptors(
  FeatureDescriptor secondaryDescriptor,
  FeatureDescriptor primaryDescriptor,
  FeatureDescriptor mergedDescriptor
  )
{
  // merge the expert property
  mergedDescriptor.setExpert(secondaryDescriptor.isExpert() |
                             primaryDescriptor.isExpert());

  // merge the hidden property
  mergedDescriptor.setHidden(secondaryDescriptor.isHidden() |
                             primaryDescriptor.isHidden());

  // the primary's name is the merged name
  mergedDescriptor.setName(primaryDescriptor.getName());


  //
  // Merge the short description
  //
  String shortDescription = primaryDescriptor.getShortDescription();

  if (shortDescription == null)
  {
    shortDescription = primaryDescriptor.getShortDescription();
  }

  mergedDescriptor.setShortDescription(shortDescription);


  //
  // Merge the display name
  //
  String displayName = primaryDescriptor.getDisplayName();

  if (displayName == null)
  {
    displayName = primaryDescriptor.getDisplayName();
  }

  mergedDescriptor.setDisplayName(displayName);

  //
  // merge in the Feature values, merging in the secondary descriptor's
  // attributes first, so that any of the primary descriptor's attributes
  // that conflict can override them.
  //
  __addFeatureValues(secondaryDescriptor, mergedDescriptor);
  __addFeatureValues(primaryDescriptor, mergedDescriptor);
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:65,代碼來源:JavaIntrospector.java


注:本文中的java.beans.FeatureDescriptor.setDisplayName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。