當前位置: 首頁>>代碼示例>>Java>>正文


Java FieldEditor.setEnabled方法代碼示例

本文整理匯總了Java中org.eclipse.jface.preference.FieldEditor.setEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java FieldEditor.setEnabled方法的具體用法?Java FieldEditor.setEnabled怎麽用?Java FieldEditor.setEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.preference.FieldEditor的用法示例。


在下文中一共展示了FieldEditor.setEnabled方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createFieldEditors

import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
/**
   * Creates the field editors. Field editors are abstractions of the common GUI
   * blocks needed to manipulate various types of preferences. Each field editor
   * knows how to save and restore itself.
   */
  public void createFieldEditors()
  {
    this.createBeyondCompareFieldEditors();
    this.addField(new EmptyFieldEitor(this.getFieldEditorParent()));
    this.createTortoiseFieldEditors("SVN", "TortoiseProc.exe", "TortoiseMerge.exe", PreferenceConstants.TORTOISE_SVN);
    this.addField(new EmptyFieldEitor(this.getFieldEditorParent()));
    this.createTortoiseFieldEditors("Git", "TortoiseGitProc.exe", "TortoiseGitMerge.exe", PreferenceConstants.TORTOISE_GIT);
    
    /*final String tortoiseHgExecutable = "thg.exe";
    this.addField(new EmptyFieldEitor(this.getFieldEditorParent()));
    this.createTortoiseFieldEditors("Hg", tortoiseHgExecutable, tortoiseHgExecutable, PreferenceConstants.TORTOISE_HG);
*/
    for (BooleanFieldEditor featureEnabledEditor : this.controlMapping.keySet())
    {
      featureEnabledEditor.setPropertyChangeListener(this);
      final boolean featureEnabled = this.getPreferenceStore().getBoolean(featureEnabledEditor.getPreferenceName());
      for (FieldEditor fieldEditor : this.controlMapping.get(featureEnabledEditor))
      {
        fieldEditor.setPropertyChangeListener(this);
        fieldEditor.setEnabled(featureEnabled, getFieldEditorParent());
      }
    }
  }
 
開發者ID:ContextQuickie,項目名稱:ContextQuickie,代碼行數:29,代碼來源:ContextQuickie.java

示例2: propertyChange

import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
@Override
public final void propertyChange(final PropertyChangeEvent event)
{
  final Object eventSource = event.getSource();
  if (eventSource instanceof BooleanFieldEditor)
  {
    final BooleanFieldEditor featureEnabledEditor = (BooleanFieldEditor) eventSource;
    if (this.controlMapping.keySet().contains(featureEnabledEditor))
    {
      final boolean featureEnabled = featureEnabledEditor.getBooleanValue();
      for (FieldEditor fieldEditor : this.controlMapping.get(featureEnabledEditor))
      {
        fieldEditor.setEnabled(featureEnabled, getFieldEditorParent());
      }
    }
  }

  // Updated the apply button in every case because the property change
  // can be caused by a changed string or path value
  this.updateApplyButton();
}
 
開發者ID:ContextQuickie,項目名稱:ContextQuickie,代碼行數:22,代碼來源:ContextQuickie.java

示例3: updateFieldEditors

import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateFieldEditors(boolean enabled) {
	Composite parent = getFieldEditorParent();
	for (FieldEditor editor : editors) {
		editor.load();
		editor.setEnabled(enabled, parent);
	}
	getDefaultsButton().setEnabled(enabled);
}
 
開發者ID:UrsZeidler,項目名稱:uml2solidity,代碼行數:9,代碼來源:AbstractProjectPreferencesPage.java

示例4: updateFieldEditors

import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateFieldEditors(boolean enabled) {
	// TODO handle do not use project settings sets project settings to
	// default
	Composite parent = getFieldEditorParent();
	Iterator<FieldEditor> it = editors.iterator();
	while (it.hasNext()) {
		FieldEditor editor = it.next();
		if (enabled)
			editor.load();
		else
			editor.loadDefault();
		editor.setEnabled(enabled, parent);
	}
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:15,代碼來源:AbstractPreferencePage.java

示例5: updateFieldEditors

import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateFieldEditors() {
	boolean pageEnabled = this.isPageEnabled();
	Composite parent = this.getFieldEditorParent();
	for (FieldEditor field : this.fields) {
		field.setEnabled(pageEnabled, parent);
	}
}
 
開發者ID:cincheo,項目名稱:jsweet-eclipse-plugin,代碼行數:8,代碼來源:FieldEditorProjectPreferencePage.java

示例6: updateFieldEditors

import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
/**
 * Enables or disables the field editors and buttons of this page
 * Subclasses may override.
 * @param enabled - true if enabled
 */
protected void updateFieldEditors(boolean enabled) {
	Composite parent = getFieldEditorParent();
	Iterator<FieldEditor> it = editors.iterator();
	while (it.hasNext()) {
		FieldEditor editor = (FieldEditor) it.next();
		editor.setEnabled(enabled, parent);
	}
}
 
開發者ID:camac,項目名稱:Swiper,代碼行數:14,代碼來源:FieldEditorOverlayPage.java

示例7: 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

示例8: createCheckboxEnabledTextFieldEditor

import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
private void createCheckboxEnabledTextFieldEditor(
	CheckBoxFieldEditor toggleEditor,
	FieldEditor valueEditor) {
	addField(toggleEditor);
	addField(valueEditor);
	Button checkbox = toggleEditor.getCheckbox();
	boolean selected = getPreferenceStore().getBoolean(toggleEditor.getPreferenceName());
	valueEditor.setEnabled(selected, checkbox.getParent());
	checkbox.addSelectionListener(new TextEnablementListener(valueEditor));
}
 
開發者ID:nasa,項目名稱:OpenSPIFe,代碼行數:11,代碼來源:MissionTimePreferencePage.java

示例9: updateFieldEditors

import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateFieldEditors(boolean enabled) {
	Composite parent = getFieldEditorParent();
	Iterator<FieldEditor> it = editors.iterator();
	while (it.hasNext()) {
		FieldEditor editor = (FieldEditor) it.next();
		editor.setEnabled(enabled, parent);
	}
}
 
開發者ID:eposse,項目名稱:osate2-agcl,代碼行數:9,代碼來源:FieldEditorOverlayPage.java

示例10: updateFieldEditors

import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateFieldEditors(boolean enabled)
{
	Composite parent = getFieldEditorParent();
	for (FieldEditor editor : editors)
	{
		editor.setEnabled(enabled, parent);
	}
}
 
開發者ID:mybatis,項目名稱:mybatipse,代碼行數:9,代碼來源:ScopedFieldEditorPreferencePage.java

示例11: refresh

import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
private void refresh() {
	for (FieldEditor restrictedSymbolEditor : restrictedSymbolEditors) {
		restrictedSymbolEditor.setEnabled(restrictConfigurations.getBooleanValue(),
			group);
	}
}
 
開發者ID:kwin,項目名稱:cppcheclipse,代碼行數:7,代碼來源:SymbolsPropertyPage.java


注:本文中的org.eclipse.jface.preference.FieldEditor.setEnabled方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。