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


Java PreferenceConverter.setValue方法代碼示例

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


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

示例1: setColor

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
@Override
public void setColor(String preferenceName, RGB color)
{
	PreferenceConverter.setValue(m_preferences, preferenceName, color);
	// Override color if already buffered
	if (m_colors.containsKey(preferenceName))
	{
		m_colors.get(preferenceName).dispose();
		boolean dark = preferenceName.endsWith("-DARK");
		String prefCode = preferenceName.replace("-DARK","");
		RGB rgb = PreferenceConverter.getColor(m_preferences, prefCode);
		if (dark)
		{
			rgb.red -= 25; 
			rgb.blue -= 25; 
			rgb.green -= 25; 
		}
		m_colors.put(preferenceName, new Color(Display.getDefault(), rgb));
	}
}
 
開發者ID:Spacecraft-Code,項目名稱:SPELL,代碼行數:21,代碼來源:ConfigurationManager.java

示例2: updateActiveEditor

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
/**
 * Sets the chosen options to the preference store and refreshes it in the editor.
 */
private void updateActiveEditor() {
	// set the values after ok or apply
	IPreferenceStore preferenceStore = getPreferenceStore();
	PreferenceConverter.setValue(preferenceStore, BRACKETS_COLOR, matchingBracketsColorEditor.getColorValue());
	preferenceStore.setValue(de.darwinspl.preferences.resource.dwprofile.ui.DwprofilePreferenceConstants.EDITOR_MATCHING_BRACKETS_CHECKBOX, enableCheckbox.getSelection());
	preferenceStore.setValue(language + de.darwinspl.preferences.resource.dwprofile.ui.DwprofilePreferenceConstants.EDITOR_BRACKETS_SUFFIX, bracketSetTemp.get(language));
	IWorkbench workbench = org.eclipse.ui.PlatformUI.getWorkbench();
	IEditorPart editor = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
	if (editor != null && editor instanceof de.darwinspl.preferences.resource.dwprofile.ui.DwprofileEditor) {
		((de.darwinspl.preferences.resource.dwprofile.ui.DwprofileEditor) editor).invalidateTextRepresentation();
	}
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:DwprofileBracketPreferencePage.java

示例3: updateActiveEditor

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
/**
 * Sets the chosen options to the preference store and refreshes it in the editor.
 */
private void updateActiveEditor() {
	// set the values after ok or apply
	IPreferenceStore preferenceStore = getPreferenceStore();
	PreferenceConverter.setValue(preferenceStore, BRACKETS_COLOR, matchingBracketsColorEditor.getColorValue());
	preferenceStore.setValue(eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionPreferenceConstants.EDITOR_MATCHING_BRACKETS_CHECKBOX, enableCheckbox.getSelection());
	preferenceStore.setValue(language + eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionPreferenceConstants.EDITOR_BRACKETS_SUFFIX, bracketSetTemp.get(language));
	IWorkbench workbench = org.eclipse.ui.PlatformUI.getWorkbench();
	IEditorPart editor = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
	if (editor != null && editor instanceof eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionEditor) {
		((eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionEditor) editor).invalidateTextRepresentation();
	}
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HyexpressionBracketPreferencePage.java

示例4: updateActiveEditor

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
/**
 * Sets the chosen options to the preference store and refreshes it in the editor.
 */
private void updateActiveEditor() {
	// set the values after ok or apply
	IPreferenceStore preferenceStore = getPreferenceStore();
	PreferenceConverter.setValue(preferenceStore, BRACKETS_COLOR, matchingBracketsColorEditor.getColorValue());
	preferenceStore.setValue(eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaPreferenceConstants.EDITOR_MATCHING_BRACKETS_CHECKBOX, enableCheckbox.getSelection());
	preferenceStore.setValue(language + eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaPreferenceConstants.EDITOR_BRACKETS_SUFFIX, bracketSetTemp.get(language));
	IWorkbench workbench = org.eclipse.ui.PlatformUI.getWorkbench();
	IEditorPart editor = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
	if (editor != null && editor instanceof eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaEditor) {
		((eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaEditor) editor).invalidateTextRepresentation();
	}
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HyvalidityformulaBracketPreferencePage.java

示例5: updateActiveEditor

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
/**
 * Sets the chosen options to the preference store and refreshes it in the editor.
 */
private void updateActiveEditor() {
	// set the values after ok or apply
	IPreferenceStore preferenceStore = getPreferenceStore();
	PreferenceConverter.setValue(preferenceStore, BRACKETS_COLOR, matchingBracketsColorEditor.getColorValue());
	preferenceStore.setValue(eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavaluePreferenceConstants.EDITOR_MATCHING_BRACKETS_CHECKBOX, enableCheckbox.getSelection());
	preferenceStore.setValue(language + eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavaluePreferenceConstants.EDITOR_BRACKETS_SUFFIX, bracketSetTemp.get(language));
	IWorkbench workbench = org.eclipse.ui.PlatformUI.getWorkbench();
	IEditorPart editor = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
	if (editor != null && editor instanceof eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueEditor) {
		((eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueEditor) editor).invalidateTextRepresentation();
	}
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HydatavalueBracketPreferencePage.java

示例6: updateActiveEditor

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
/**
 * Sets the chosen options to the preference store and refreshes it in the editor.
 */
private void updateActiveEditor() {
	// set the values after ok or apply
	IPreferenceStore preferenceStore = getPreferenceStore();
	PreferenceConverter.setValue(preferenceStore, BRACKETS_COLOR, matchingBracketsColorEditor.getColorValue());
	preferenceStore.setValue(eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingPreferenceConstants.EDITOR_MATCHING_BRACKETS_CHECKBOX, enableCheckbox.getSelection());
	preferenceStore.setValue(language + eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingPreferenceConstants.EDITOR_BRACKETS_SUFFIX, bracketSetTemp.get(language));
	IWorkbench workbench = org.eclipse.ui.PlatformUI.getWorkbench();
	IEditorPart editor = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
	if (editor != null && editor instanceof eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingEditor) {
		((eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingEditor) editor).invalidateTextRepresentation();
	}
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HymappingBracketPreferencePage.java

示例7: updateActiveEditor

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
/**
 * Sets the chosen options to the preference store and refreshes it in the editor.
 */
private void updateActiveEditor() {
	// set the values after ok or apply
	IPreferenceStore preferenceStore = getPreferenceStore();
	PreferenceConverter.setValue(preferenceStore, BRACKETS_COLOR, matchingBracketsColorEditor.getColorValue());
	preferenceStore.setValue(eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsPreferenceConstants.EDITOR_MATCHING_BRACKETS_CHECKBOX, enableCheckbox.getSelection());
	preferenceStore.setValue(language + eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsPreferenceConstants.EDITOR_BRACKETS_SUFFIX, bracketSetTemp.get(language));
	IWorkbench workbench = org.eclipse.ui.PlatformUI.getWorkbench();
	IEditorPart editor = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
	if (editor != null && editor instanceof eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsEditor) {
		((eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsEditor) editor).invalidateTextRepresentation();
	}
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HyconstraintsBracketPreferencePage.java

示例8: updateActiveEditor

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
/**
 * Sets the chosen options to the preference store and refreshes it in the editor.
 */
private void updateActiveEditor() {
	// set the values after ok or apply
	IPreferenceStore preferenceStore = getPreferenceStore();
	PreferenceConverter.setValue(preferenceStore, BRACKETS_COLOR, matchingBracketsColorEditor.getColorValue());
	preferenceStore.setValue(eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestPreferenceConstants.EDITOR_MATCHING_BRACKETS_CHECKBOX, enableCheckbox.getSelection());
	preferenceStore.setValue(language + eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestPreferenceConstants.EDITOR_BRACKETS_SUFFIX, bracketSetTemp.get(language));
	IWorkbench workbench = org.eclipse.ui.PlatformUI.getWorkbench();
	IEditorPart editor = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
	if (editor != null && editor instanceof eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestEditor) {
		((eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestEditor) editor).invalidateTextRepresentation();
	}
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:16,代碼來源:HymanifestBracketPreferencePage.java

示例9: saveLocation

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
/**
 * Saves the location of a Shell
 */
private static void saveLocation(final Shell shell, final String id) {
	log.debug("saving window location, id=" + id);
	final Point location = shell.getLocation();
	final Point size = shell.getSize();
	final Rectangle rectangle = new Rectangle(location.x, location.y, size.x, size.y);
	PreferenceConverter.setValue(ps, id, rectangle);
}
 
開發者ID:nresare,項目名稱:javapasswordsafe,代碼行數:11,代碼來源:WidgetPreferences.java

示例10: doStore

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
@Override
protected void doStore() {

	if (chosenFont != null) {
		PreferenceConverter.setValue(getPreferenceStore(), getPreferenceName(), chosenFont);
	}
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:8,代碼來源:FontFieldEditorExtended.java

示例11: setToDefault

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
/**
 * Store the default preference for the field being edited
 */
protected void setToDefault() {

	final FontData[] defaultFontData = PreferenceConverter.getDefaultFontDataArray(
			getPreferenceStore(),
			getPreferenceName());

	PreferenceConverter.setValue(getPreferenceStore(), getPreferenceName(), defaultFontData);
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:12,代碼來源:FontFieldEditorExtended.java

示例12: saveColors_GraphColors_InPrefStore

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
private static void saveColors_GraphColors_InPrefStore() {

		final IPreferenceStore commonPrefStore = CommonActivator.getPrefStore();

		for (final ColorDefinition graphDefinition : getInstance().getGraphColorDefinitions()) {

			PreferenceConverter.setValue(
					commonPrefStore,
					graphDefinition.getGraphPrefName(PREF_COLOR_BRIGHT),
					graphDefinition.getGradientBright_New());

			PreferenceConverter.setValue(
					commonPrefStore,
					graphDefinition.getGraphPrefName(PREF_COLOR_DARK),
					graphDefinition.getGradientDark_New());

			PreferenceConverter.setValue(
					commonPrefStore,
					graphDefinition.getGraphPrefName(PREF_COLOR_LINE),
					graphDefinition.getLineColor_New());

			PreferenceConverter.setValue(
					commonPrefStore,
					graphDefinition.getGraphPrefName(PREF_COLOR_TEXT),
					graphDefinition.getTextColor_New());
		}
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:28,代碼來源:GraphColorManager.java

示例13: saveState

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
private void saveState() {

		_prefStore.setValue(ITourbookPreferences.MAP_LAYOUT_PLOT_TYPE, getPlotType());

		/*
		 * Line
		 */
		_prefStore.setValue(ITourbookPreferences.MAP_LAYOUT_SYMBOL_WIDTH, _spinnerLineWidth.getSelection());

		/*
		 * Border
		 */
		_prefStore.setValue(ITourbookPreferences.MAP_LAYOUT_PAINT_WITH_BORDER, _chkPaintWithBorder.getSelection());
		_prefStore.setValue(ITourbookPreferences.MAP_LAYOUT_BORDER_WIDTH, _spinnerBorderWidth.getSelection());

		_prefStore.setValue(ITourbookPreferences.MAP_LAYOUT_BORDER_TYPE, getBorderType());
		_prefStore.setValue(ITourbookPreferences.MAP_LAYOUT_BORDER_DIMM_VALUE,//
				_spinnerBorderColorDarker.getSelection());
		PreferenceConverter.setValue(_prefStore, ITourbookPreferences.MAP_LAYOUT_BORDER_COLOR,//
				_colorBorderColor.getColorValue());

		/*
		 * Map dimming
		 */
		PreferenceConverter.setValue(_prefStore, ITourbookPreferences.MAP_LAYOUT_MAP_DIMM_COLOR,//
				_colorMapDimmColor.getColorValue());

		_prefStore.setValue(ITourbookPreferences.MAP_LAYOUT_LIVE_UPDATE, _chkLiveUpdate.getSelection());
	}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:30,代碼來源:PrefPageMap2Appearance.java

示例14: afterValueChange

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
@Override
public void afterValueChange(final GamaFont font) {
	try {
		final FontData newValue = new FontData(font.getName(), font.getSize(), font.getStyle());
		PreferenceConverter.setValue(EditorsPlugin.getDefault().getPreferenceStore(),
				JFaceResources.TEXT_FONT, newValue);
	} catch (final Exception e) {}
}
 
開發者ID:gama-platform,項目名稱:gama,代碼行數:9,代碼來源:AutoStartup.java

示例15: apply

import org.eclipse.jface.preference.PreferenceConverter; //導入方法依賴的package包/類
public void apply(IPreferenceStore store) {
	PreferenceConverter.setValue(store, getKey(), newValue);
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:4,代碼來源:DwprofileSyntaxColoringPreferencePage.java


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