本文整理汇总了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;
}
示例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);
}