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


Java BooleanFieldEditor.setPropertyChangeListener方法代码示例

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


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

示例1: createFieldEditors

import org.eclipse.jface.preference.BooleanFieldEditor; //导入方法依赖的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: createUI_30_ApplyOption

import org.eclipse.jface.preference.BooleanFieldEditor; //导入方法依赖的package包/类
private void createUI_30_ApplyOption(final Composite parent) {

		/*
		 * checkbox: pace min/max value
		 */
		_booleanEditorApplyOption = new BooleanFieldEditor(
				IPreferences.SRTM_APPLY_WHEN_PROFILE_IS_SELECTED,
				Messages.prefPage_srtm_profile_option_apply_when_selected,
				parent);
		_booleanEditorApplyOption.setPreferenceStore(_prefStore);
		_booleanEditorApplyOption.setPage(this);
		_booleanEditorApplyOption.setPropertyChangeListener(new IPropertyChangeListener() {
			@Override
			public void propertyChange(final PropertyChangeEvent event) {
				if (((Boolean) event.getNewValue())) {
					// apply profile
					final Object firstElement = ((StructuredSelection) _profileViewer.getSelection()).getFirstElement();
					if (firstElement instanceof SRTMProfile) {
						onSelectProfile((SRTMProfile) firstElement, true);
					}
				}
			}
		});
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:25,代码来源:PrefPageSRTMColors.java

示例3: createUI

import org.eclipse.jface.preference.BooleanFieldEditor; //导入方法依赖的package包/类
private void createUI(final Composite parent) {

		final IPreferenceStore prefStore = getPreferenceStore();

		fPrefContainer = new Composite(parent, SWT.NONE);
		GridDataFactory.swtDefaults().grab(true, false).applyTo(fPrefContainer);
		GridLayoutFactory.fillDefaults().applyTo(fPrefContainer);
//		fPrefContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));

		// checkbox: is offline enabled
		fUseOffLineCache = new BooleanFieldEditor(IMappingPreferences.OFFLINE_CACHE_USE_OFFLINE,
				Messages.pref_cache_use_offline,
				fPrefContainer);
		fUseOffLineCache.setPreferenceStore(prefStore);
		fUseOffLineCache.setPage(this);
		fUseOffLineCache.load();
		fUseOffLineCache.setPropertyChangeListener(new IPropertyChangeListener() {
			public void propertyChange(final PropertyChangeEvent event) {
				enableControls();
			}
		});

		/*
		 * offline cache settings
		 */
		final Composite offlineContainer = new Composite(fPrefContainer, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, false).indent(15, 5).applyTo(offlineContainer);
		GridLayoutFactory.fillDefaults().applyTo(offlineContainer);

		createUICacheSettings(offlineContainer);
		createUICacheInfo(offlineContainer);

		/*
		 * hide error messages, this happend when the cache path is invalid but the offline cache is
		 * disabled
		 */
		if (fUseOffLineCache.getBooleanValue() == false) {
			setErrorMessage(null);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:41,代码来源:PrefPageCache.java

示例4: createUI

import org.eclipse.jface.preference.BooleanFieldEditor; //导入方法依赖的package包/类
private Control createUI(final Composite parent) {

		final IPreferenceStore prefStore = getPreferenceStore();

		final Composite uiContainer = new Composite(parent, SWT.NONE);
		GridDataFactory.swtDefaults().grab(true, false).applyTo(uiContainer);
		GridLayoutFactory.fillDefaults().applyTo(uiContainer);
//		fPrefContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));
		{
			// checkbox: is offline enabled
			_boolEditorUseOffLineCache = new BooleanFieldEditor(
					IMappingPreferences.OFFLINE_CACHE_USE_OFFLINE,
					Messages.pref_cache_use_offline,
					uiContainer);
			_boolEditorUseOffLineCache.setPreferenceStore(prefStore);
			_boolEditorUseOffLineCache.setPage(this);
			_boolEditorUseOffLineCache.load();
			_boolEditorUseOffLineCache.setPropertyChangeListener(new IPropertyChangeListener() {
				public void propertyChange(final PropertyChangeEvent event) {
					enableControls();
				}
			});

			/*
			 * offline cache settings
			 */
			final Composite offlineContainer = new Composite(uiContainer, SWT.NONE);
			GridDataFactory.fillDefaults().grab(true, false).indent(15, 5).applyTo(offlineContainer);
			GridLayoutFactory.fillDefaults().applyTo(offlineContainer);

			createUI_10_CacheSettings(offlineContainer);
			createUI_20_CacheInfo(offlineContainer);
		}

		/*
		 * hide error messages, this happend when the cache path is invalid but the offline cache is
		 * disabled
		 */
		if (_boolEditorUseOffLineCache.getBooleanValue() == false) {
			setErrorMessage(null);
		}

		return uiContainer;
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:45,代码来源:PrefPageCache.java


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