当前位置: 首页>>代码示例>>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;未经允许,请勿转载。