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


Java FieldEditor.isValid方法代码示例

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


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

示例1: checkState

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
/**
 * Recomputes the page's error state by calling <code>isValid</code> for
 * every field editor.
 */
protected void checkState()
{
    boolean valid = true;
    setInvalidFieldEditor(null);
    // The state can only be set to true if all
    // field editors contain a valid value. So we must check them all
    if (fields != null)
    {
        int size = fields.size();
        for (int i = 0; i < size; i++)
        {
            FieldEditor editor = (FieldEditor) fields.get(i);
            valid = valid && editor.isValid();
            if (!valid)
            {
                setInvalidFieldEditor(editor);
                break;
            }
        }
    }
    setValid(valid);
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:27,代码来源:GenericFieldEditorPropertyPage.java

示例2: isValid

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
@Override
public final boolean isValid()
{
  // Search for enabled features wit invalid configuration options
  for (BooleanFieldEditor featureEnabledEditor : this.controlMapping.keySet())
  {
    if (featureEnabledEditor.getBooleanValue() == true)
    {
      for (FieldEditor fieldEditor : this.controlMapping.get(featureEnabledEditor))
      {
        if (fieldEditor.isValid() == false)
        {
          return false;
        }
      }
    }
  }

  return true;
}
 
开发者ID:ContextQuickie,项目名称:ContextQuickie,代码行数:21,代码来源:ContextQuickie.java

示例3: checkState

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
/**
 * Recomputes the page's error state by calling <code>isValid</code> for every field editor.
 */
protected void checkState() {
    boolean valid = true;
    m_invalidFieldEditor = null;
    // The state can only be set to true if all
    // field editors contain a valid value. So we must check them all
    if (m_fields != null) {
        int size = m_fields.size();
        for (int i = 0; i < size; i++) {
            FieldEditor editor = m_fields.get(i);
            valid = valid && editor.isValid();
            if (!valid) {
                m_invalidFieldEditor = editor;
                break;
            }
        }
    }
    setValid(true);
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:22,代码来源:FieldLayoutPreferencePage.java

示例4: storeEditor

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
private static void storeEditor(FieldEditor editor, String errorValue) {
  if (editor.isValid()) {
    editor.store();
  } else {
    editor.getPreferenceStore().setValue(editor.getPreferenceName(), errorValue);
  }
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:8,代码来源:TabBase.java

示例5: performOk

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
@Override
public boolean performOk() {
    for (FieldEditor field : fields) {
        if (field.isValid()) {
            field.store();
            setErrorMessage(null);
        } else {
            setErrorMessage("Some fields do not have valid values!");
        }
    }
    return super.performOk();
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:13,代码来源:CDOServerConnectionPreference.java

示例6: updateChildStatus

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
protected void updateChildStatus(final FieldEditorWrapper childFieldEditor, final boolean parentEnabled) {
	if (childFieldEditor != null) { // null if on another page!
		final FieldEditor fieldEditor = childFieldEditor.getFieldEditor();
		fieldEditor.setEnabled(parentEnabled, childFieldEditor.getParent());
		if (!parentEnabled && !fieldEditor.isValid()) {
			fieldEditor.loadDefault(); // Fix invalid value
			checkState(); // Enable OK & Apply buttons
		}
	}
}
 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:11,代码来源:BasePreferencePage.java

示例7: getErrorMessages

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
private String getErrorMessages() {
	String messages = new String();
	for (FieldEditor editor : editors) {
		if (!editor.isValid()) {
			String message = ((StringFieldEditor) editor).getErrorMessage();
			if (messages.length() > 0) {
				messages += "; ";
			}
			messages += message;
		}
	}
	return messages;
}
 
开发者ID:crapo,项目名称:sadlos2,代码行数:14,代码来源:TranslatorConfigurationDialog.java


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