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


Java BooleanFieldEditor.load方法代码示例

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


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

示例1: createDialogArea

import org.eclipse.jface.preference.BooleanFieldEditor; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
	Composite top = (Composite) super.createDialogArea(parent);

	Composite editArea = new Composite(top, SWT.NONE);
	editArea.setLayout(new GridLayout());
	editArea.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));

	runInBackground = new BooleanFieldEditor(IProgressConstants.RUN_IN_BACKGROUND, ProgressMessages.JobsViewPreferenceDialog_RunInBackground, editArea);
	runInBackground.setPreferenceName(IProgressConstants.RUN_IN_BACKGROUND);
	runInBackground.setPreferenceStore(preferenceStore);
	runInBackground.load();

	showSystemJob = new BooleanFieldEditor(IProgressConstants.SHOW_SYSTEM_JOBS, ProgressMessages.JobsViewPreferenceDialog_ShowSystemJobs, editArea);
	showSystemJob.setPreferenceName(IProgressConstants.SHOW_SYSTEM_JOBS);
	showSystemJob.setPreferenceStore(preferenceStore);
	showSystemJob.load();

	Dialog.applyDialogFont(top);

	return top;
}
 
开发者ID:termsuite,项目名称:termsuite-ui,代码行数:23,代码来源:JobsViewPreferenceDialog.java

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

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

示例4: createUI

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

		final IPreferenceStore prefStore = getPreferenceStore();

		final Composite container = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
		GridLayoutFactory.fillDefaults().applyTo(container);
		{
			final Composite infoContainer = new Composite(container, SWT.NONE);
			GridDataFactory.fillDefaults().grab(true, false).applyTo(infoContainer);
			GridLayoutFactory.fillDefaults().applyTo(infoContainer);
			{

				// checkbox: show tile info
				_chkShowTileInfo = new BooleanFieldEditor(
						IMappingPreferences.SHOW_MAP_TILE_INFO,
						Messages.pref_map_show_tile_info,
						infoContainer);
				_chkShowTileInfo.setPreferenceStore(prefStore);
				_chkShowTileInfo.setPage(this);
				_chkShowTileInfo.load();
			}

 			final Composite fontContainer = new Composite(container, SWT.NONE);
			GridDataFactory.fillDefaults().indent(0, 20).grab(true, false).applyTo(fontContainer);
			GridLayoutFactory.fillDefaults().applyTo(fontContainer);
			{
				// font: mono space
				_monoFontEditor = new FontFieldEditor(
						IMappingPreferences.THEME_FONT_LOGGING,
						Messages.Theme_Font_Logging,
						Messages.Theme_Font_Logging_PREVIEW_TEXT,
						fontContainer);
				_monoFontEditor.setPreferenceStore(prefStore);
				_monoFontEditor.setPage(this);
				_monoFontEditor.load();
			}
			// force 2 columns
			final GridLayout gl = (GridLayout) fontContainer.getLayout();
			gl.numColumns = 2;
			gl.makeColumnsEqualWidth = true;
		}

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

示例5: createUI_10_Notes

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

		_groupNotesImport = new Group(parent, SWT.NONE);
		_groupNotesImport.setText(Messages.prefPage_tcx_group_importNotes);
		GridDataFactory.fillDefaults().grab(true, false).applyTo(_groupNotesImport);
		{
			// label: description
			final Label label = new Label(_groupNotesImport, SWT.NONE);
			GridDataFactory.fillDefaults().span(2, 1).applyTo(label);
			label.setText(Messages.prefPage_tcx_label_importNotes);

			// check: import into title field
			_editBool_ImportIntoTitle = new BooleanFieldEditor2(
					IPreferences.IS_IMPORT_INTO_TITLE_FIELD,
					Messages.prefPage_tcx_check_importIntoTitleField,
					_groupNotesImport);
			_editBool_ImportIntoTitle.fillIntoGrid(_groupNotesImport, 2);
			_editBool_ImportIntoTitle.setPreferenceStore(_prefStore);
			_editBool_ImportIntoTitle.load();
			addField(_editBool_ImportIntoTitle);

			/*
			 * setPropertyChangeListener() is occupied by the pref page when the field is added to
			 * the page with addField
			 */
			final Button chkImportIntoTitle = _editBool_ImportIntoTitle.getChangeControl(_groupNotesImport);
			chkImportIntoTitle.addSelectionListener(_defaultSelectionListener);

			// container: title
			final Composite containerTitle = new Composite(_groupNotesImport, SWT.NONE);
			GridDataFactory.fillDefaults().span(2, 1).grab(true, false).indent(15, 0).applyTo(containerTitle);
			GridLayoutFactory.fillDefaults().numColumns(2).applyTo(containerTitle);
			{
				// radio: import all
				_rdoImportAll = new Button(containerTitle, SWT.RADIO);
				GridDataFactory.fillDefaults().span(2, 1).applyTo(_rdoImportAll);
				_rdoImportAll.setText(Messages.prefPage_tcx_radio_importIntoTitleAll);
				_rdoImportAll.addSelectionListener(_defaultSelectionListener);

				// radio: import truncated
				_rdoImportTruncated = new Button(containerTitle, SWT.RADIO);
				_rdoImportTruncated.setText(Messages.prefPage_tcx_radio_importIntoTitleTruncated);
				_rdoImportTruncated.addSelectionListener(_defaultSelectionListener);

				// editor: number of characters
				_containerCharacter = new Composite(containerTitle, SWT.NONE);
				{
					_editInt_TruncatedNotes = new IntegerFieldEditor(
							IPreferences.NUMBER_OF_TITLE_CHARACTERS,
							UI.EMPTY_STRING,
							_containerCharacter);
					_editInt_TruncatedNotes.setValidRange(10, 1000);
					_editInt_TruncatedNotes.fillIntoGrid(_containerCharacter, 2);
					_editInt_TruncatedNotes.setPreferenceStore(_prefStore);
					_editInt_TruncatedNotes.load();
					UI.setFieldWidth(_containerCharacter, _editInt_TruncatedNotes, UI.DEFAULT_FIELD_WIDTH);
					addField(_editInt_TruncatedNotes);
				}
			}

			// check: import into description field
			_editBool_ImportIntoDescription = new BooleanFieldEditor(
					IPreferences.IS_IMPORT_INTO_DESCRIPTION_FIELD,
					Messages.prefPage_tcx_check_importIntoDescriptionField,
					_groupNotesImport);
			_editBool_ImportIntoDescription.fillIntoGrid(_groupNotesImport, 2);
			_editBool_ImportIntoDescription.setPreferenceStore(_prefStore);
			_editBool_ImportIntoDescription.load();
			addField(_editBool_ImportIntoDescription);
		}

		// add layout to the group
		final GridLayout regionalLayout = (GridLayout) _groupNotesImport.getLayout();
		regionalLayout.marginWidth = 5;
		regionalLayout.marginHeight = 5;
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:77,代码来源:PrefPageTCX.java


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