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