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


Java ConfProp.getByName方法代码示例

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


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

示例1: createConfNameEditor

import org.apache.hadoop.eclipse.server.ConfProp; //导入方法依赖的package包/类
/**
 * Create an editor entry for the given configuration name
 * 
 * @param listener the listener to trigger on property change
 * @param parent the SWT parent container
 * @param propName the name of the property to create an editor for
 * @param labelText a label (null will defaults to the property name)
 * 
 * @return a SWT Text field
 */
private Text createConfNameEditor(ModifyListener listener,
    Composite parent, String propName, String labelText) {

  {
    ConfProp prop = ConfProp.getByName(propName);
    if (prop != null)
      return createConfLabelText(listener, parent, prop, labelText);
  }

  Label label = new Label(parent, SWT.NONE);
  if (labelText == null)
    labelText = propName;
  label.setText(labelText);

  Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
  GridData data = new GridData(GridData.FILL_HORIZONTAL);
  text.setLayoutData(data);
  text.setData("hPropName", propName);
  text.setText(location.getConfProp(propName));
  text.addModifyListener(listener);

  return text;
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:34,代码来源:HadoopLocationWizard.java

示例2: notifyChange

import org.apache.hadoop.eclipse.server.ConfProp; //导入方法依赖的package包/类
/**
 * Change notifications on properties (by name). A property might not be
 * reflected as a ConfProp enum. If it is, the notification is forwarded
 * to the ConfProp notifyChange method. If not, it is processed here.
 * 
 * @param source
 * @param propName
 * @param propValue
 */
void notifyChange(TabListener source, String propName, String propValue) {

  ConfProp prop = ConfProp.getByName(propName);
  if (prop != null)
    notifyChange(source, prop, propValue);

  location.setConfProp(propName, propValue);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:18,代码来源:HadoopLocationWizard.java


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