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


Java BooleanFieldEditor類代碼示例

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


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

示例1: createFieldEditors

import org.eclipse.jface.preference.BooleanFieldEditor; //導入依賴的package包/類
@Override
protected void createFieldEditors() {
    addField(new BooleanFieldEditor(PREF.PGDUMP_SWITCH,
            Messages.generalPrefPage_pg_dump_switch, getFieldEditorParent()));

    addField(new FileFieldEditor(PREF.PGDUMP_EXE_PATH,
            Messages.generalPrefPage_pg_dump_executable, getFieldEditorParent()){

        @Override
        protected boolean checkState() {
            return true;
        }
    });

    addField(new StringFieldEditor(PREF.PGDUMP_CUSTOM_PARAMS,
            Messages.generalPrefPage_pg_dump_custom_parameters, getFieldEditorParent()));

    addField(new BooleanFieldEditor(PREF.FORCE_SHOW_CONSOLE,
            Messages.generalPrefPage_show_console_when_program_write_to_console, getFieldEditorParent()));

    addField(new BooleanFieldEditor(PREF.NO_PRIVILEGES,
            Messages.dbUpdatePrefPage_ignore_privileges,
            getFieldEditorParent()));

}
 
開發者ID:pgcodekeeper,項目名稱:pgcodekeeper,代碼行數:26,代碼來源:GeneralPrefPage.java

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

示例3: 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() {
	GridData groupLayoutData = new GridData();
	groupLayoutData.horizontalAlignment = GridData.FILL;
	groupLayoutData.verticalAlignment = GridData.BEGINNING;
	groupLayoutData.grabExcessHorizontalSpace = true;
	groupLayoutData.grabExcessVerticalSpace = false;
	groupLayoutData.verticalSpan = 2;
	groupLayoutData.horizontalSpan = 3;

	automaticalDeriveBuildFolders=		new BooleanFieldEditor(
				EGradleIdePreferenceConstants.P_FILEHANDLING_AUTOMATICALLY_DERIVE_BUILDFOLDERS.getId(),
				"Automatically derive build folders",
				getFieldEditorParent());
	String info = "(Importer and 'refresh eclipse' action will automatically derive build folders)";
	
	addField(automaticalDeriveBuildFolders);
	SWTFactory.createLabel(getFieldEditorParent(), info, 2);
}
 
開發者ID:de-jcup,項目名稱:egradle,代碼行數:24,代碼來源:EGradleFileHandlingPreferencePage.java

示例4: 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() {
	GridData groupLayoutData = new GridData();
	groupLayoutData.horizontalAlignment = GridData.FILL;
	groupLayoutData.verticalAlignment = GridData.BEGINNING;
	groupLayoutData.grabExcessHorizontalSpace = true;
	groupLayoutData.grabExcessVerticalSpace = false;
	groupLayoutData.verticalSpan = 2;
	groupLayoutData.horizontalSpan = 3;

	outputValidationEnabled=		new BooleanFieldEditor(
				EGradleIdePreferenceConstants.P_OUTPUT_VALIDATION_ENABLED.getId(),
				"Output validation enabled",
				getFieldEditorParent());
	addField(outputValidationEnabled);
	
	showConsoleViewOnBuildFailed=		new BooleanFieldEditor(
			EGradleIdePreferenceConstants.P_SHOW_CONSOLE_VIEW_ON_BUILD_FAILED_ENABLED.getId(),
			"Show console view on build failure",
			getFieldEditorParent());
	addField(showConsoleViewOnBuildFailed);
}
 
開發者ID:de-jcup,項目名稱:egradle,代碼行數:27,代碼來源:EGradleValidationPreferencePage.java

示例5: 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() {
	GridData groupLayoutData = new GridData();
	groupLayoutData.horizontalAlignment = GridData.FILL;
	groupLayoutData.verticalAlignment = GridData.BEGINNING;
	groupLayoutData.grabExcessHorizontalSpace = true;
	groupLayoutData.grabExcessVerticalSpace = false;
	groupLayoutData.verticalSpan = 2;
	groupLayoutData.horizontalSpan = 3;

	subProjectWithIconDecorationEnabled=		new BooleanFieldEditor(
				EGradleIdePreferenceConstants.P_DECORATION_SUBPROJECTS_WITH_ICON_ENABLED.getId(),
				"Subproject are decorated with gradle icon",
				getFieldEditorParent());
	addField(subProjectWithIconDecorationEnabled);
}
 
開發者ID:de-jcup,項目名稱:egradle,代碼行數:21,代碼來源:EGradleDecorationPreferencePage.java

示例6: 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() {
	GridData groupLayoutData = new GridData();
	groupLayoutData.horizontalAlignment = GridData.FILL;
	groupLayoutData.verticalAlignment = GridData.BEGINNING;
	groupLayoutData.grabExcessHorizontalSpace = true;
	groupLayoutData.grabExcessVerticalSpace = false;
	groupLayoutData.verticalSpan = 2;
	groupLayoutData.horizontalSpan = 3;

	executeAssembleTask = new BooleanFieldEditor(
			EGradleIdePreferenceConstants.P_IMPORT__EXECUTE_ASSEMBLE_TASK.getId(),
			"Execute assemble task", getFieldEditorParent());
	String executeAssembleTaskInfo = "(main build folders and generated resources will exist after import)";

	addField(executeAssembleTask);
	SWTFactory.createLabel(getFieldEditorParent(), executeAssembleTaskInfo, 2);

	/* clean eclipse projects */
	cleanEclipseProjects = new BooleanFieldEditor(EGradleIdePreferenceConstants.P_IMPORT__DO_CLEAN_PROJECTS.getId(),
			"Clean eclipse projects", getFieldEditorParent());
	String cleanEclipseProjectsInfo = "(after import 'clean all projects' is executed inside eclipse )";

	addField(cleanEclipseProjects);
	SWTFactory.createLabel(getFieldEditorParent(), cleanEclipseProjectsInfo, 2);
}
 
開發者ID:de-jcup,項目名稱:egradle,代碼行數:31,代碼來源:EGradleImporterPreferencePage.java

示例7: createFieldEditors

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

       colorComment = new ColorFieldEditor(GradleEditorConstants.KEY_COLOR_COMMENT, "Comment color:", parent);
       addField(colorComment);

       colorDoc = new ColorFieldEditor(GradleEditorConstants.KEY_COLOR_DOC, "Doc color:", parent);
       addField(colorDoc);

       colorKeyword = new ColorFieldEditor(GradleEditorConstants.KEY_COLOR_KEYWORD, "Keyword color:", parent);
       addField(colorKeyword);

       boldAttributeKeyword = new BooleanFieldEditor(GradleEditorConstants.KEY_BOLD_KEYWORD, "Bold keywords", parent);
       addField(boldAttributeKeyword);

       colorString = new ColorFieldEditor(GradleEditorConstants.KEY_COLOR_STRING, "String color:", parent);
       addField(colorString);

       colorNumber = new ColorFieldEditor(GradleEditorConstants.KEY_COLOR_NUMBER, "Number color:", parent);
       addField(colorNumber);

       colorNormal = new ColorFieldEditor(GradleEditorConstants.KEY_COLOR_NORMAL, "Normal text color:", parent);
       addField(colorNormal);
}
 
開發者ID:Nodeclipse,項目名稱:GradleEditor,代碼行數:27,代碼來源:GradleEditorPreferencePage.java

示例8: createFieldEditors

import org.eclipse.jface.preference.BooleanFieldEditor; //導入依賴的package包/類
/**
   * Add edit fields to the preference page.
   */
  @Override
  public void createFieldEditors() {
    addField(newMinimumRangeFieldEditor(
        IMechanicPreferences.SLEEPAGE_PREF,
        "Task scan frequency (seconds):",
        IMechanicPreferences.MINIMUM_SLEEP_SECONDS,
        "Task scan frequency",
        getFieldEditorParent()));

    addField(new DirectoryOrUrlEditor(IMechanicPreferences.DIRS_PREF,
        "Task sources:", getFieldEditorParent()));

    blockedEditor = new BlockedTaskEditor(IMechanicPreferences.BLOCKED_PREF,
        "Blocked tasks:", getFieldEditorParent());

    addField(blockedEditor);

    addField(new BooleanFieldEditor(IMechanicPreferences.SHOW_POPUP_PREF,
        "Show popup when tasks fail", getFieldEditorParent()));

//    addCacheFields(getFieldEditorParent());
  }
 
開發者ID:alfsch,項目名稱:workspacemechanic,代碼行數:26,代碼來源:MechanicPreferencePage.java

示例9: createFieldEditors

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

        // Smart backspace
        addField(new BooleanFieldEditor(TexlipseProperties.SMART_BACKSPACE,
                TexlipsePlugin.getResourceString("preferenceSmartBackspace"), getFieldEditorParent()));
        Label backspaceLabel = new Label(getFieldEditorParent(),SWT.LEFT | SWT.WRAP);
        backspaceLabel.setText(TexlipsePlugin.getResourceString("preferenceSmartBackspaceText"));
        
        // Smart quotes
        addField(new BooleanFieldEditor(TexlipseProperties.SMART_QUOTES,
                TexlipsePlugin.getResourceString("preferenceSmartReplaceQuotes"), getFieldEditorParent()));
        Label quotesLabel = new Label(getFieldEditorParent(),SWT.LEFT | SWT.WRAP);
        quotesLabel.setText(TexlipsePlugin.getResourceString("preferenceSmartReplaceQuotesText"));

        // Smart parens
        addField(new BooleanFieldEditor(TexlipseProperties.SMART_PARENS,
                TexlipsePlugin.getResourceString("preferenceSmartBracketCompletion"), getFieldEditorParent()));
        Label bracketLabel = new Label(getFieldEditorParent(),SWT.LEFT | SWT.WRAP);
        bracketLabel.setText(TexlipsePlugin.getResourceString("preferenceSmartBracketCompletionText"));

        // Smart \ldots
        addField(new BooleanFieldEditor(TexlipseProperties.SMART_LDOTS,
                TexlipsePlugin.getResourceString("preferenceSmartLdots"), getFieldEditorParent()));
    }
 
開發者ID:eclipse,項目名稱:texlipse,代碼行數:25,代碼來源:SmartKeyPreferencePage.java

示例10: createFieldEditors

import org.eclipse.jface.preference.BooleanFieldEditor; //導入依賴的package包/類
/**
    * Creates the page components.
 */
protected void createFieldEditors() {
       TexlipsePreferencePage.addSpacer(getFieldEditorParent());
       addField(new BooleanFieldEditor(TexlipseProperties.INDENTATION, TexlipsePlugin.getResourceString("preferenceIndentEnabledLabel"), getFieldEditorParent()));

       String message = TexlipsePlugin.getResourceString("preferenceIndentLevelLabel").replaceFirst("%1", "" + MIN_INDENTATION).replaceFirst("%2", "" + MAX_INDENTATION);
       final IntegerFieldEditor indentationWidth = new IntegerFieldEditor(TexlipseProperties.INDENTATION_LEVEL, message, getFieldEditorParent());
       indentationWidth.setValidateStrategy(IntegerFieldEditor.VALIDATE_ON_KEY_STROKE);
       indentationWidth.setValidRange(MIN_INDENTATION, MAX_INDENTATION);
       if (TexlipsePlugin.getDefault().getPreferenceStore().getBoolean(TexlipseProperties.INDENTATION_TABS)) {
           indentationWidth.setEnabled(false, getFieldEditorParent());
       }
       addField(indentationWidth);
	
       BooleanFieldEditor indentationTabs = new BooleanFieldEditor(TexlipseProperties.INDENTATION_TABS, TexlipsePlugin.getResourceString("preferenceIndentTabsLabel"), getFieldEditorParent()){
	  @Override
	    protected void valueChanged(boolean oldValue, boolean newValue) {
	        super.valueChanged(oldValue, newValue);
	        if (newValue == true) indentationWidth.setEnabled(false, getFieldEditorParent());
	        else indentationWidth.setEnabled(true, getFieldEditorParent());
	    }  
	};
       addField(indentationTabs);
       TexlipsePreferencePage.addSpacer(getFieldEditorParent());
       addField(new StringListFieldEditor(TexlipseProperties.INDENTATION_ENVS, TexlipsePlugin.getResourceString("preferenceIndentEnvsLabel"), getFieldEditorParent()));
}
 
開發者ID:eclipse,項目名稱:texlipse,代碼行數:29,代碼來源:IndentationPreferencePage.java

示例11: 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()
{
    /*
    addField(new DirectoryFieldEditor(PreferenceConstants.P_PATH, "&Directory preference:", getFieldEditorParent()));
    addField(new BooleanFieldEditor(PreferenceConstants.P_BOOLEAN, "&An example of a boolean preference",
            getFieldEditorParent()));

    addField(new RadioGroupFieldEditor(PreferenceConstants.P_CHOICE, "An example of a multiple-choice preference",
            1, new String[][] { { "&Choice 1", "choice1" }, { "C&hoice 2", "choice2" } }, getFieldEditorParent()));
    addField(new StringFieldEditor(PreferenceConstants.P_STRING, "A &text preference:", getFieldEditorParent()));
    */
    addField(new BooleanFieldEditor(IPreferenceConstants.I_RESTORE_LAST_SPEC,
            "&Continue Previous Session on Restart", getFieldEditorParent()));
    
    IntegerFieldEditor minStorageSizeEditor = 
         new IntegerFieldEditor(IPreferenceConstants.I_MIN_DISPLAYED_SIZE, 
            "&Minimum spec storage displayed (in kilobytes)", getFieldEditorParent());
    addField(minStorageSizeEditor);
    minStorageSizeEditor.setValidRange(0, 2000000);
}
 
開發者ID:tlaplus,項目名稱:tlaplus,代碼行數:27,代碼來源:GeneralPreferencePage.java

示例12: createFieldEditors

import org.eclipse.jface.preference.BooleanFieldEditor; //導入依賴的package包/類
/**
 * Create field editors
 */
protected void createFieldEditors()
{

    addField(new BooleanFieldEditor(IPreferenceConstants.I_PARSER_POPUP_ERRORS,
            "&Always pop up Parsing Errors view", getFieldEditorParent()));

    addField(new BooleanFieldEditor(IPreferenceConstants.I_PARSE_MODULE_ON_MODIFY, "&Re-parse module on save",
            getFieldEditorParent()));

    /*addField(new BooleanFieldEditor(IPreferenceConstants.I_PARSE_FILES_ON_MODIFY,
            "&Automatic re-parse all module dependent files (experimental)", getFieldEditorParent()));*/

    /* It is necessary to make this a field in order to enable and disable it when
     * parse module on modify is selected and de-selected
     */
    parseSpecField = new BooleanFieldEditor(IPreferenceConstants.I_PARSE_SPEC_ON_MODIFY,
            "&Re-parse specification on spec module save", getFieldEditorParent());
    if (!getPreferenceStore().getBoolean(IPreferenceConstants.I_PARSE_MODULE_ON_MODIFY))
    {
        parseSpecField.setEnabled(false, getFieldEditorParent());
    }
    addField(parseSpecField);

}
 
開發者ID:tlaplus,項目名稱:tlaplus,代碼行數:28,代碼來源:ParserPreferencePage.java

示例13: propertyChange

import org.eclipse.jface.preference.BooleanFieldEditor; //導入依賴的package包/類
/**
 * This overrides the method in {@link FieldEditorPreferencePage}.
 * It disables the parse spec on spec module modify if the parse
 * module on modify option is de-selected and enables it when parse
 * module on modify is selected.
 */
public void propertyChange(PropertyChangeEvent event)
{
    if (event.getSource() instanceof BooleanFieldEditor)
    {
        BooleanFieldEditor parseModuleOnModifyField = (BooleanFieldEditor) event.getSource();
        if (parseModuleOnModifyField.getPreferenceName().equals(IPreferenceConstants.I_PARSE_MODULE_ON_MODIFY))
        {
            boolean parseModuleOnModify = parseModuleOnModifyField.getBooleanValue();
            if (parseModuleOnModify)
            {
                parseSpecField.setEnabled(true, getFieldEditorParent());
            } else
            {
                parseSpecField.setEnabled(false, getFieldEditorParent());
            }
        }
    }
    super.propertyChange(event);
}
 
開發者ID:tlaplus,項目名稱:tlaplus,代碼行數:26,代碼來源:ParserPreferencePage.java

示例14: createFieldEditors

import org.eclipse.jface.preference.BooleanFieldEditor; //導入依賴的package包/類
/** Create fields controlling editing assist behavior */
@Override
public void createFieldEditors() {

	baseComp = SwtUtil.makeGroupComposite(getFieldEditorParent(), 1, 1, "");

	SwtUtil.addLabel(baseComp, "Enable folding of:", 2);
	addField(new BooleanFieldEditor(FOLDING_FRONTMATTER_ENABLED, "Front matter block", baseComp));
	addField(new BooleanFieldEditor(FOLDING_HIDDEN_COMMENTS_ENABLED, "Hidden comments", baseComp));
	addField(new BooleanFieldEditor(FOLDING_CODEBLOCKS_ENABLED, "Code blocks", baseComp));
	SwtUtil.addSpacer(baseComp, 2);

	SwtUtil.addLabel(baseComp, "Initially fold:", 2);
	addField(new BooleanFieldEditor(FOLDING_INITIAL_FRONT_MATTER, "Front matter block", baseComp));
	addField(new BooleanFieldEditor(FOLDING_INITIAL_HIDDEN_COMMENTS, "Hidden comments", baseComp));
	addField(new BooleanFieldEditor(FOLDING_INITIAL_CODEBLOCKS, "Code blocks", baseComp));
	SwtUtil.addSpacer(baseComp, 2);

	addField(new IntegerFieldEditor(FOLDING_LINES_LIMIT, "Minimum number of lines to fold: ", baseComp, 6));
}
 
開發者ID:grosenberg,項目名稱:fluentmark,代碼行數:21,代碼來源:PrefPageFolding.java

示例15: createFieldEditors

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


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