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


Java ComboFieldEditor類代碼示例

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


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

示例1: createFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
@Override
protected void createFieldEditors ()
{
    final List<String> tzs = Arrays.asList ( TimeZone.getAvailableIDs () );
    Collections.sort ( tzs );
    final String[][] entries = new String[tzs.size ()][2];
    int i = 0;
    for ( final String id : tzs )
    {
        entries[i][0] = id;
        entries[i][1] = id;
        i += 1;
    }
    final FieldEditor field = new ComboFieldEditor ( "timeZone", Messages.TimeZonePreferencePage_TimeZone_Label, entries, getFieldEditorParent () ); //$NON-NLS-1$
    addField ( field );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:17,代碼來源:TimeZonePreferencePage.java

示例2: createComboBox

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
private void createComboBox(BashEditorValidationPreferenceConstants constant, Composite parent) {
	String name = constant.getId();
	String labelText = constant.getLabelText();

	/* @formatter:off */
	String[][] entryNamesAndValues = 
			new String[][] { 
				getLabelAndValue(BashEditorValidationErrorLevel.ERROR),
				getLabelAndValue(BashEditorValidationErrorLevel.WARNING),
				getLabelAndValue(BashEditorValidationErrorLevel.INFO)
	};
	/* @formatter:on */
	
	Composite composite = new Composite(parent, SWT.NONE);
	
	ComboFieldEditor comboFieldEditor = new ComboFieldEditor(name, labelText, entryNamesAndValues, composite);
	addField(comboFieldEditor);
}
 
開發者ID:de-jcup,項目名稱:eclipse-bash-editor,代碼行數:19,代碼來源:BashEditorValidationPreferencePage.java

示例3: createFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
@Override
protected void createFieldEditors() {

    addField( new ComboFieldEditor(PG_EDIT_PREF.PERSPECTIVE_CHANGING_STATUS,
            Messages.generalPrefPage_perspective_changing_status, new String[][] {
        {Messages.prespective_change_status_always, MessageDialogWithToggle.ALWAYS},
        {Messages.prespective_change_status_never, MessageDialogWithToggle.NEVER},
        {Messages.prespective_change_status_ask, MessageDialogWithToggle.PROMPT}},
            getFieldEditorParent()));

    addField( new ComboFieldEditor(PG_EDIT_PREF.EDITOR_UPDATE_ACTION,
            Messages.ProjectEditorPrefPage_action_type, new String[][] {
        {Messages.ProjectEditorPrefPage_action_update, PG_EDIT_PREF.UPDATE},
        {Messages.ProjectEditorPrefPage_action_reset, PG_EDIT_PREF.RESET},
        {Messages.ProjectEditorPrefPage_action_no_action, PG_EDIT_PREF.NO_ACTION}},
            getFieldEditorParent()));
}
 
開發者ID:pgcodekeeper,項目名稱:pgcodekeeper,代碼行數:18,代碼來源:ProjectEditorPrefPage.java

示例4: createFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
/** Creates the field editors. */
@Override
public void createFieldEditors() {
	Composite parent = getFieldEditorParent();

	Group frame = new Group(parent, SWT.NONE);
	frame.setText("Stylesheets");
	GridDataFactory.fillDefaults().indent(0, 6).grab(true, false).span(2, 1).applyTo(frame);
	GridLayoutFactory.fillDefaults().numColumns(3).margins(6, 6).applyTo(frame);

	Composite internal = new Composite(frame, SWT.NONE);
	GridDataFactory.fillDefaults().indent(0, 4).grab(true, false).applyTo(internal);
	GridLayoutFactory.fillDefaults().numColumns(3).applyTo(internal);

	// Github Syntax support
	addField(new BooleanFieldEditor(EDITOR_GITHUB_SYNTAX, "Support Github Syntax", internal));

	// Multi-Markdown support
	addField(new BooleanFieldEditor(EDITOR_MULTIMARKDOWN_METADATA, "Support Multi-Markdown Metadata", internal));

	// Browser CSS
	addField(new ComboFieldEditor(EDITOR_CSS_DEFAULT, "Default Stylesheet", builtins(), internal));
	addField(new FileFieldEditor(EDITOR_CSS_CUSTOM, "Custom Stylesheet", internal));
}
 
開發者ID:grosenberg,項目名稱:fluentmark,代碼行數:25,代碼來源:PrefPageStyles.java

示例5: createFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
@Override
protected void createFieldEditors() {

    // separator
    Label label = new Label(getFieldEditorParent(), SWT.NONE);
    label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 3, 1));

    // beep fields
    String[][] typeOfBeepTriggers = { { "Do Not Beep", "NONE" },
            { "Parameter First Out-of-Limit Value", "FIRST" },
            { "Parameter Each Out-of-Limit Value", "EACH" } };
    triggerBeep = new ComboFieldEditor("trigerBeep", "Beep on event:",
            typeOfBeepTriggers, getFieldEditorParent());
    addField(triggerBeep);

    beepWarning = new BooleanFieldEditor("beepWarning", "Beep on Warning",
            getFieldEditorParent());
    addField(beepWarning);

    beepCritical = new BooleanFieldEditor("beepCritical",
            "Beep on Critical", getFieldEditorParent());
    addField(beepCritical);
}
 
開發者ID:yamcs,項目名稱:yamcs-studio,代碼行數:24,代碼來源:SoundPreferencePage.java

示例6: updateFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
@Override
protected void updateFieldEditors() {
	super.updateFieldEditors();
	// update editor states if needed
	if (this.isPageEnabled()) {
		Composite parent = this.getFieldEditorParent();
		BooleanFieldEditor bundle = this.getField(Preferences.BUNDLE(DEFAULT_PROFILE_NAME));
		StringFieldEditor bundlesDirectory = this.getField(Preferences.BUNDLES_DIRECTORY(DEFAULT_PROFILE_NAME));
		ComboFieldEditor module = this.getField(Preferences.MODULE_KIND(DEFAULT_PROFILE_NAME));
		if (bundle.getBooleanValue()) {
			getPreferenceStore().setValue(Preferences.MODULE_KIND(currentProfile), "none");
			module.load();
		}
		module.setEnabled(!bundle.getBooleanValue(), parent);
		bundlesDirectory.setEnabled(bundle.getBooleanValue(), parent);

		BooleanFieldEditor declaration = this.getField(Preferences.DECLARATION(DEFAULT_PROFILE_NAME));
		StringFieldEditor declarationDirectory = this
				.getField(Preferences.DECLARATION_DIRECTORY(DEFAULT_PROFILE_NAME));
		declarationDirectory.setEnabled(declaration.getBooleanValue(), parent);

	}

}
 
開發者ID:cincheo,項目名稱:jsweet-eclipse-plugin,代碼行數:25,代碼來源:JSweetPreferencePage.java

示例7: createFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
@Override
protected void createFieldEditors() {
	addField(new ComboFieldEditor(PreferenceKeys.SEEK_OUTPUT_TYPE, local.getString("seekOutType"),
			SEEK_OUTPUT_TYPES, getFieldEditorParent()));

	addField(new ColorFieldEditor(PreferenceKeys.SEEK_GRAPH_COMPUTER_COLOR,
			local.getString("seekGraphCompCol"), getFieldEditorParent()));

	addField(new ColorFieldEditor(PreferenceKeys.SEEK_GRAPH_MANY_COLOR,
			local.getString("seekGraphManyCol"), getFieldEditorParent()));

	addField(new ColorFieldEditor(PreferenceKeys.SEEK_GRAPH_RATED_COLOR,
			local.getString("seekGraphRatCol"), getFieldEditorParent()));

	addField(new ColorFieldEditor(PreferenceKeys.SEEK_GRAPH_UNRATED_COLOR,
			local.getString("seekGraphUnratCol"), getFieldEditorParent()));
}
 
開發者ID:evilwan,項目名稱:raptor-chess-interface,代碼行數:18,代碼來源:SeekPage.java

示例8: createFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
@Override
protected void createFieldEditors() {
	addField(new BooleanFieldEditor(PreferenceKeys.RESULTS_FADE_AWAY_MODE,
			local.getString("resFedAw"), getFieldEditorParent()));

	addField(new ComboFieldEditor(PreferenceKeys.RESULTS_ANIMATION_DELAY,
			local.getString("resAnDel"), RESULTS_ANIMATION_DELAY_OPTIONS,
			getFieldEditorParent()));

	addField(new ComboFieldEditor(PreferenceKeys.RESULTS_WIDTH_PERCENTAGE,
			local.getString("resPreSz"), RESULTS_PERCENTAGE,
			getFieldEditorParent()));

	addField(new ColorFieldEditor(PreferenceKeys.RESULTS_COLOR,
			local.getString("resCol"), getFieldEditorParent()));
	addField(new FontFieldEditor(PreferenceKeys.RESULTS_FONT,
			local.getString("resFnt"), getFieldEditorParent()));
}
 
開發者ID:evilwan,項目名稱:raptor-chess-interface,代碼行數:19,代碼來源:ChessBoardResultsPage.java

示例9: createFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的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() {

	addField(new ComboFieldEditor(JSS_COMPATIBILITY_VERSION, Messages.StudioPreferencePage_versionLabel, JRXmlWriterHelper.getVersions(),
			getFieldEditorParent()));

	addField(new BooleanFieldEditor(JSS_COMPATIBILITY_SHOW_DIALOG, Messages.StudioPreferencePage_showCompDialog,
			getFieldEditorParent()));

	Label label = new Label(getFieldEditorParent(), SWT.WRAP);
	label.setText(Messages.StudioPreferencePage_message1);
	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 2;
	label.setLayoutData(gd);

	label = new Label(getFieldEditorParent(), SWT.WRAP);
	label.setText(Messages.StudioPreferencePage_message2);
	gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 2;
	label.setLayoutData(gd);
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:25,代碼來源:StudioPreferencePage.java

示例10: createFilterSelector

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
/**
 * createFilterSelector
 * 
 * @param parent
 */
protected void createFilterSelector(Composite parent)
{
	// @formatter:off
	ComboFieldEditor fieldEditor = new ComboFieldEditor(
		com.aptana.editor.common.contentassist.IPreferenceConstants.CONTENT_ASSIST_USER_AGENT_FILTER_TYPE,
		Messages.ContentAssistPreferencePage_ProposalFilterTypeLabel,
		new String[][]
		{
			{ Messages.ContentAssistPreferencePage_NoFilterLabel, UserAgentFilterType.NO_FILTER.getText() },
			{ Messages.ContentAssistPreferencePage_OneOrMoreFilterLabel, UserAgentFilterType.ONE_OR_MORE.getText() },
			{ Messages.ContentAssistPreferencePage_AllFilterLabel, UserAgentFilterType.ALL.getText() }
		},
		parent
	);
	addField(fieldEditor);
	// @formatter:on
	// We only want to enable this field editor for workspace-specific settings.
	// Since the UI will not draw anything unless we have at least one field-editor in this page, we have to add it
	// and disable it for project-specific.
	fieldEditor.setEnabled(!isProjectPreferencePage(), parent);
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:27,代碼來源:ContentAssistPreferencePage.java

示例11: addDefaultSortColumnEditor

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
protected void addDefaultSortColumnEditor(List<String> ids) {
	
	String entryNamesAndValues[][] = new String[ids.size()+1][2];
	entryNamesAndValues[0][0] = "";
	entryNamesAndValues[0][1] = P_MERGE_EDITOR_SORT_COLUMN_NONE;
	for(int i=0; i<ids.size(); i++) {
		String id = ids.get(i);
		entryNamesAndValues[i+1][0] = id; // should be a pretty name
		entryNamesAndValues[i+1][1] = id; // should be the internal id
	}
	
	addField(new ComboFieldEditor(
			P_MERGE_EDITOR_SORT_COLUMN,
			"Default sort column",
			entryNamesAndValues,
			getFieldEditorParent()));
}
 
開發者ID:nasa,項目名稱:OpenSPIFe,代碼行數:18,代碼來源:MergeEditorPreferencePage.java

示例12: createFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
@Override
public void createFieldEditors() {
	final Level[] logLevels = new Level[] { Level.OFF, Level.ERROR, 
			Level.WARN, Level.INFO, Level.DEBUG, Level.TRACE };
	final String[][] values = new String[logLevels.length][2];
	for (int i = 0; i < logLevels.length; i++) {
		// constructor of ComboFieldEditor expects a two-dimensional
		// array with label-value pairs.
		values[i][0] = logLevels[i].toString();
		values[i][1] = logLevels[i].toString();
	}
	final ComboFieldEditor editor = new ComboFieldEditor(
			ConsoleImpl.KEY, "Log level:", values, 
			this.getFieldEditorParent());
	this.addField(editor);
}
 
開發者ID:antlr4ide,項目名稱:antlr4ide,代碼行數:17,代碼來源:GeneralPreferencePage.java

示例13: createFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
@Override
protected void createFieldEditors() {
	
	String[][] entryNamesAndValues = new String[][] {
			new String[] { "clean all", EGradleJUnitTestTasksType.CLEAN_ALL.getId() },
			new String[] { "clean tests only", EGradleJUnitTestTasksType.CLEAN_ONLY_TESTS.getId() },
			new String[] { "do nothing", EGradleJUnitTestTasksType.CLEAN_NOTHING.getId() } };
	/* @formatter:on */
	gradleCallTypeRadioButton = new ComboFieldEditor(P_TEST_TASKS.getId(), "Before test execution", entryNamesAndValues,
			getFieldEditorParent());

	addField(gradleCallTypeRadioButton);
	SWTFactory.createLabel(getFieldEditorParent(), "(This will be used by all test launch configurations)", 2);
}
 
開發者ID:de-jcup,項目名稱:egradle,代碼行數:15,代碼來源:EGradleJUnitPreferencePage.java

示例14: createFieldEditors

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
/**
 * Creates the JVM Options Preferece page field editors.
 * 
 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
 */
@Override
public void createFieldEditors() {
    this.setAllVMs();
    this.addField(new ComboFieldEditor(PREF_JRE, JVM_JAVAVM_LABEL, this.jvmNamesAndValues, this.getFieldEditorParent()));
    this.addField(new JVMOptionEditor(PREF_JVM_OPTIONS, JVM_OPTIONS_LABEL, this.getFieldEditorParent()));
    this.addField(new PathFieldEditor(PREF_LIBPATH, JVM_LIBRARYPATH_LABEL, this.getFieldEditorParent()));
}
 
開發者ID:rajendarreddyj,項目名稱:eclipse-weblogic-plugin,代碼行數:13,代碼來源:JVMOptionsPreferencePage.java

示例15: createFieldEditor

import org.eclipse.jface.preference.ComboFieldEditor; //導入依賴的package包/類
@Override
public FieldEditor createFieldEditor(Composite parent) {
    String[][] entryNamesAndValues = new String[values.size()][2];
    for (int i = 0; i < values.size(); ++i) {
        entryNamesAndValues[i][0] = values.get(i).getDisplayName();
        entryNamesAndValues[i][1] = values.get(i).getId();
    }
    return new ComboFieldEditor(this.getKey(), this.getDescription(), entryNamesAndValues, parent);
}
 
開發者ID:helospark,項目名稱:SparkBuilderGenerator,代碼行數:10,代碼來源:NamedElementListPluginPreference.java


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