本文整理匯總了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());
}
}
}
示例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);
}
}
}
});
}
示例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);
}
}
示例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;
}