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


Java ConfProp类代码示例

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


ConfProp类属于org.apache.hadoop.eclipse.server包,在下文中一共展示了ConfProp类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: modifyText

import org.apache.hadoop.eclipse.server.ConfProp; //导入依赖的package包/类
public void modifyText(ModifyEvent e) {
  final Text text = (Text) e.widget;
  Object hProp = text.getData("hProp");
  final ConfProp prop = (hProp != null) ? (ConfProp) hProp : null;
  Object hPropName = text.getData("hPropName");
  final String propName =
      (hPropName != null) ? (String) hPropName : null;

  Display.getDefault().syncExec(new Runnable() {
    public void run() {
      if (prop != null)
        mediator.notifyChange(TabAdvanced.this, prop, text.getText());
      else
        mediator
            .notifyChange(TabAdvanced.this, propName, text.getText());
    }
  });
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:19,代码来源:HadoopLocationWizard.java

示例3: toString

import org.apache.hadoop.eclipse.server.ConfProp; //导入依赖的package包/类
@Override
public String toString() {
  if (path.equals("/")) {
    return location.getConfProp(ConfProp.FS_DEFAULT_URI);

  } else {
    return this.path.getName();
  }
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:10,代码来源:DFSPath.java

示例4: createConfText

import org.apache.hadoop.eclipse.server.ConfProp; //导入依赖的package包/类
/**
 * Create a SWT Text component for the given {@link ConfProp} text
 * configuration property.
 * 
 * @param listener
 * @param parent
 * @param prop
 * @return
 */
private Text createConfText(ModifyListener listener, Composite parent,
    ConfProp prop) {

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

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

示例5: createConfCheckButton

import org.apache.hadoop.eclipse.server.ConfProp; //导入依赖的package包/类
/**
 * Create a SWT Checked Button component for the given {@link ConfProp}
 * boolean configuration property.
 * 
 * @param listener
 * @param parent
 * @param prop
 * @return
 */
private Button createConfCheckButton(SelectionListener listener,
    Composite parent, ConfProp prop, String text) {

  Button button = new Button(parent, SWT.CHECK);
  button.setText(text);
  button.setData("hProp", prop);
  button.setSelection(location.getConfProp(prop).equalsIgnoreCase("yes"));
  button.addSelectionListener(listener);

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

示例6: widgetSelected

import org.apache.hadoop.eclipse.server.ConfProp; //导入依赖的package包/类
public void widgetSelected(SelectionEvent e) {
  final Button button = (Button) e.widget;
  final ConfProp prop = (ConfProp) button.getData("hProp");

  Display.getDefault().syncExec(new Runnable() {
    public void run() {
      // We want to receive the update also!
      mediator.notifyChange(null, prop, button.getSelection() ? "yes"
          : "no");
    }
  });
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:13,代码来源:HadoopLocationWizard.java


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