Java 类org.eclipse.jface.preference.RadioGroupFieldEditor 实例源码

项目:solidity-ide    文件:FoldingPreferences.java   
@Override
protected void createFieldEditors() {
    Composite parent = getFieldEditorParent();

    RadioGroupFieldEditor autoFoldCommentChoice = new RadioGroupFieldEditor(
            SolidityPreferences.FOLDING_COMMENT_AUTOFOLD
            , "Auto-fold comments"
            , 1
            , new String[][] {
                 {"None", SolidityPreferences.FOLDING_COMMENT_AUTOFOLD_NONE}
                ,{"Only header comment", SolidityPreferences.FOLDING_COMMENT_AUTOFOLD_HEADER}
                ,{"All", SolidityPreferences.FOLDING_COMMENT_AUTOFOLD_ALL}
            }
            , parent);
    addField(autoFoldCommentChoice);

    IntegerFieldEditor longCommentLineCount = new IntegerFieldEditor(
            SolidityPreferences.FOLDING_COMMENT_LINECOUNT
            , "Enable folding for comments exceeding line count"
            , parent);
    addField(longCommentLineCount);
}
项目:texlipse    文件:ColoringPreferencePage.java   
/**
 * Creates the property editing UI components of this page.
 */
protected void createFieldEditors() {
    adjustGridLayout();
    addField(new ColorFieldEditor(ColorManager.DEFAULT, TexlipsePlugin.getResourceString("preferenceColorTextLabel"), getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(ColorManager.DEFAULT_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent()));
    addField(new ColorFieldEditor(ColorManager.COMMAND, TexlipsePlugin.getResourceString("preferenceColorCommandLabel"), getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(ColorManager.COMMAND_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent()));
    addField(new ColorFieldEditor(ColorManager.CURLY_BRACKETS, TexlipsePlugin.getResourceString("preferenceColorArgumentLabel"), getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(ColorManager.CURLY_BRACKETS_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent()));
    addField(new ColorFieldEditor(ColorManager.SQUARE_BRACKETS, TexlipsePlugin.getResourceString("preferenceColorOptionalLabel"), getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(ColorManager.SQUARE_BRACKETS_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent()));
    addField(new ColorFieldEditor(ColorManager.EQUATION, TexlipsePlugin.getResourceString("preferenceColorMathLabel"), getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(ColorManager.EQUATION_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent()));
    addField(new ColorFieldEditor(ColorManager.COMMENT, TexlipsePlugin.getResourceString("preferenceColorCommentLabel"), getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(ColorManager.COMMENT_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent()));
    addField(new ColorFieldEditor(ColorManager.TEX_NUMBER, TexlipsePlugin.getResourceString("preferenceColorNumberLabel"), getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(ColorManager.TEX_NUMBER_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent()));
    addField(new ColorFieldEditor(ColorManager.TEX_SPECIAL, TexlipsePlugin.getResourceString("preferenceColorSpeLabel"), getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(ColorManager.TEX_SPECIAL_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent()));
    addField(new ColorFieldEditor(ColorManager.VERBATIM, TexlipsePlugin.getResourceString("preferenceColorVerbatimLabel"), getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(ColorManager.VERBATIM_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent()));
}
项目:depan    文件:NodePreferencesPage.java   
@Override
protected void createFieldEditors() {
  Composite parent = getFieldEditorParent();

  // color: mode
  RadioGroupFieldEditor colorSelect = new RadioGroupFieldEditor(
      NodePreferencesIds.NODE_COLOR, "...shows...", 3,
      buildNodeColorModeOptions(), parent, true);

  // shape: mode
  RadioGroupFieldEditor shapeSelect = new RadioGroupFieldEditor(
      NodePreferencesIds.NODE_SHAPE, "...shows...", 2, 
      buildNodeShapeModeOptions(), parent, true);

  // size: mode
  RadioGroupFieldEditor sizeSelect = new RadioGroupFieldEditor(
      NodePreferencesIds.NODE_SIZE, "...shows...", 2,
      buildNodeSizeModeOptions(), parent, true);

  // add fields to the page
  addField(colorSelect);
  addField(shapeSelect);
  addField(sizeSelect);
}
项目:ecle    文件:PrefPageGeneral.java   
/**
 * 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() {
    Composite parent = getFieldEditorParent();

    Group grpPath = createGroup(getFieldEditorParent(), "General path definition");
    addField(new DirectoryFieldEditor(PrefKeys.Path.SDK, "&SDK path:", grpPath));
    addField(new DirectoryFieldEditor(PrefKeys.Path.COMPILER, "&Compiler path:", grpPath));
    addField(new DirectoryFieldEditor(PrefKeys.Path.TOOLS, "&Tools path:", grpPath));

    Group grpSerial = createGroup(parent, "General serial port settings");
    addField(new StringFieldEditor(PrefKeys.Serial.PORT, "Default port:", grpSerial));

    RadioGroupFieldEditor rg1 = new RadioGroupFieldEditor(PrefKeys.Serial.PARITY, "Parity", 6,
            PrefKeys.Serial.VPARITY, grpSerial);
    addField(rg1);
    addField(new RadioGroupFieldEditor(PrefKeys.Serial.DATABITS, "Data bits", 6, PrefKeys.Serial.VDATABITS,
            grpSerial));
    addField(new RadioGroupFieldEditor(PrefKeys.Serial.STOPBITS, "Stop bits", 2, PrefKeys.Serial.VSTOPBITS,
            grpSerial));

}
项目:sadlos2    文件:SadlRootPreferencePage.java   
@Override
protected void createFieldEditors() {
    addField(new LabelFieldEditor("General SADL Settings", getFieldEditorParent()));
    addField(new StringFieldEditor("baseUri", "Base URI", getFieldEditorParent()));
    addField(new RadioGroupFieldEditor("OWL_Format", "Saved OWL model format :", 5, 
            new String[][] {
            {ConfigurationManager.RDF_XML_ABBREV_FORMAT, ConfigurationManager.RDF_XML_ABBREV_FORMAT}, 
            {ConfigurationManager.RDF_XML_FORMAT, ConfigurationManager.RDF_XML_FORMAT}, 
            {ConfigurationManager.N3_FORMAT, ConfigurationManager.N3_FORMAT}, 
            {ConfigurationManager.N_TRIPLE_FORMAT, ConfigurationManager.N_TRIPLE_FORMAT}, 
            {ConfigurationManager.JENA_TDB, ConfigurationManager.JENA_TDB},
            }, 
            getFieldEditorParent()));
    addField(new RadioGroupFieldEditor("importBy", "Show import model list as:", 2, 
            new String[][] {{"Model Namespaces", "ns"}, {"SADL File Names", "fn"}}, getFieldEditorParent()));
    addField(new BooleanFieldEditor("prefixesOnlyAsNeeded", "Show prefixes for imported concepts only when needed for disambiguation", getFieldEditorParent()));
    addField(new BooleanFieldEditor("validateBeforeTest", "Validate before Testing", getFieldEditorParent()));
    addField(new BooleanFieldEditor("namespacesInQueryResults", "Show Namespaces in Query Results", getFieldEditorParent()));
    addField(new BooleanFieldEditor("showTimingInformation", "Show Timing Informaton (Build, Reasoning)", getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(IConfigurationManager.dmyOrder, "Interpret Date 10/11/2012 as:", 2, 
            new String[][] {{"MM/DD/YYYY", IConfigurationManager.dmyOrderMDY}, 
                            {"DD/MM/YYYY", IConfigurationManager.dmyOrderDMY}}, getFieldEditorParent()));
    addField(new BooleanFieldEditor("deepValidationOff", "Disable Deep Validation of Model", getFieldEditorParent()));
    addField(new StringFieldEditor("graphvizpath", "GraphViz bin folder", getFieldEditorParent()));
}
项目:eclipse-timekeeper    文件:DatabasePreferences.java   
@Override
protected void createFieldEditors() {

    addField(new RadioGroupFieldEditor(TimekeeperPlugin.DATABASE_LOCATION, "Database location", 1,
            new String[][] {
        { "Shared (in ~/.timekeeper/)", TimekeeperPlugin.DATABASE_LOCATION_SHARED },
        { "Relative to workspace (in .timekeeper/)", TimekeeperPlugin.DATABASE_LOCATION_WORKSPACE },
        { "Specified by JDBC URL", TimekeeperPlugin.DATABASE_LOCATION_URL },
            }, getFieldEditorParent(), true));

    addField(new StringFieldEditor(TimekeeperPlugin.DATABASE_URL, Messages.DatabasePreferences_URL,
            getFieldEditorParent()));

    Group g2 = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);
    g2.setText(Messages.DatabasePreferences_ExportImportTitle);
    g2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
    g2.setLayout(new GridLayout(2, true));
    addExportButton(g2);
    addImportButton(g2);
    adjustGridLayout();
}
项目:massif    文件:ExportSettingsDialog.java   
@Override
protected List<? extends FieldEditor> additionalFields(Composite fieldEditorParent) {
    modelExtensionSelector = new RadioGroupFieldEditor(
            PreferenceConstants.EXPORT_RESULT_MODEL_EXTENSION, 
            "Simulink model file extension: ", 
            1,
            new String[][] {
                {"MDL", "mdl"},
                {"SLX", "slx"}
            },
            fieldEditorParent);  
    //@formatter:on
    modelExtensionSelector.setPreferenceStore(store);
    modelExtensionSelector.load();

    return Lists.newArrayList(modelExtensionSelector);
}
项目:Pydev    文件:PyCodeStylePreferencesPage.java   
/**
 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
 */
@Override
public void createFieldEditors() {
    Composite p = getFieldEditorParent();

    useLocalsAndAttrsCamelCase = new RadioGroupFieldEditor(USE_LOCALS_AND_ATTRS_CAMELCASE,
            "Locals and attributes format (used for assign quick-assist)?", 1, LOCALS_LABEL_AND_VALUE, p, true);
    addField(useLocalsAndAttrsCamelCase);

    useMethodsFormat = new RadioGroupFieldEditor(USE_METHODS_FORMAT,
            "Methods format (used for generate properties refactoring)", 1, LABEL_AND_VALUE, p, true);
    addField(useMethodsFormat);

    labelLocalsFormat = new Label(p, SWT.NONE);

    labelMethodsFormat = new Label(p, SWT.NONE);
    updateLabelLocalsAndAttrs(useLocalsAndAttrsCamelCase());
    updateLabelMethods(useMethodsCamelCase());

}
项目:eclipse-utility    文件:OpenExternalPreferencePage.java   
@Override
protected void createFieldEditors() {
    if (Platform.getOS().equals(Platform.OS_WIN32)) {
        addField(new RadioGroupFieldEditor(
                PreferenceIds.WINDOWS_EXPLORER_POLICY,
                "Windows Explorer Policy:", 1, new String[][] {
                        { "Open with folders", PreferenceIds.WINDOWS_EXPLORER_FOLDERS },
                        { "Open without folders", PreferenceIds.WINDOWS_EXPLORER_NO_FOLDERS }},
                        getFieldEditorParent(), true));
    }

    if (Platform.getOS().equals(Platform.OS_MACOSX)) {
        addField(new RadioGroupFieldEditor(
                PreferenceIds.MAC_TERMINAL_POLICY,
                "Mac OS X Shell Policy:", 1, new String[][] {
                        { "Open in a new shell", PreferenceIds.MAC_TERMINAL_NEW_SHELL },
                        { "Open in a new tab", PreferenceIds.MAC_TERMINAL_NEW_TAB }},
                        getFieldEditorParent(), true));
    }
}
项目:seg.jUCMNav    文件:AutoLayoutPreferencePage.java   
protected void createFieldEditors() {
    // Initialize all field editors.
    FileFieldEditor dotPath = new FileFieldEditor(AutoLayoutPreferences.PREF_DOTPATH, Messages.getString("AutoLayoutDotSettingsWizardPage.dotPath"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(dotPath);

    StringFieldEditor width = new StringFieldEditor(AutoLayoutPreferences.PREF_WIDTH, Messages.getString("AutoLayoutDotSettingsWizardPage.width"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(width);

    StringFieldEditor height = new StringFieldEditor(AutoLayoutPreferences.PREF_HEIGHT, Messages.getString("AutoLayoutDotSettingsWizardPage.height"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(height);

    String[][] values = { { Messages.getString("AutoLayoutDotSettingsWizardPage.topdown"), "TB" }, //$NON-NLS-1$ //$NON-NLS-2$
            { Messages.getString("AutoLayoutDotSettingsWizardPage.leftright"), "LR" } }; //$NON-NLS-1$ //$NON-NLS-2$

    RadioGroupFieldEditor orientation = new RadioGroupFieldEditor(AutoLayoutPreferences.PREF_ORIENTATION, Messages
            .getString("AutoLayoutDotSettingsWizardPage.orientation"), 1, values, getFieldEditorParent()); //$NON-NLS-1$
    addField(orientation);

    BooleanFieldEditor empty = new BooleanFieldEditor(AutoLayoutPreferences.PREF_EMPTYPOINTS, Messages
            .getString("AutoLayoutDotSettingsWizardPage.manipulateEmptyPoints"), getFieldEditorParent()); //$NON-NLS-1$
    addField(empty);

}
项目:seg.jUCMNav    文件:ScenarioExportPreferencePage.java   
protected void createFieldEditors() {
    // Initialize all field editors.

    String[][] values = { { Messages.getString("ScenarioExportPreferencePage.ExportJucmScenarios"), "0" }, //$NON-NLS-1$ //$NON-NLS-2$
            { Messages.getString("ScenarioExportPreferencePage.ExportLinearizedJucm"), "1" }, //$NON-NLS-1$ //$NON-NLS-2$
            { Messages.getString("ScenarioExportPreferencePage.ExportWellFormedJucm"), "2" } //$NON-NLS-1$ //$NON-NLS-2$
    };

    RadioGroupFieldEditor type = new RadioGroupFieldEditor(ScenarioExportPreferences.PREF_EXPORTTYPE, Messages
            .getString("ScenarioExportPreferencePage.ExportType"), 1, values, getFieldEditorParent()); //$NON-NLS-1$
    addField(type);

    String[][] values2 = { { Messages.getString("ScenarioExportPreferencePage.AllScenarios"), "all" }, //$NON-NLS-1$ //$NON-NLS-2$
            { Messages.getString("ScenarioExportPreferencePage.LastRunScenario"), "last" } }; //$NON-NLS-1$ //$NON-NLS-2$

    RadioGroupFieldEditor what = new RadioGroupFieldEditor(ScenarioExportPreferences.PREF_EXPORTALL, Messages
            .getString("ScenarioExportPreferencePage.ExportWhat"), 1, values2, getFieldEditorParent()); //$NON-NLS-1$
    addField(what);

    BooleanFieldEditor openAfterExport = new BooleanFieldEditor(ScenarioExportPreferences.PREF_OPENAFTEREXPORT, Messages
            .getString("ScenarioExportPreferencePage.AutoOpenAfterExport"), getFieldEditorParent()); //$NON-NLS-1$
    addField(openAfterExport);

}
项目:elexis-3-core    文件:Ablauf.java   
@Override
protected void createFieldEditors(){
    addField(new RadioGroupFieldEditor(Preferences.ABL_LANGUAGE, Messages.Ablauf_preferredLang,
        1, new String[][] {
            {
                Messages.Ablauf_german, "d" //$NON-NLS-1$
            }, {
                Messages.Ablauf_french, "f" //$NON-NLS-1$
            }, {
                Messages.Ablauf_italian, Messages.Ablauf_24
            }
        }, getFieldEditorParent()));

    addField(new IntegerFieldEditor(Preferences.ABL_CACHELIFETIME,
        Messages.Ablauf_cachelifetime, getFieldEditorParent()));

    addField(new IntegerFieldEditor(Preferences.ABL_HEARTRATE, Messages.Ablauf_heartrate,
        getFieldEditorParent()));

}
项目:olca-app    文件:LoggerConfigPage.java   
@Override
protected void createFieldEditors() {
    Composite parent = getFieldEditorParent();
    BooleanFieldEditor logConsole = new BooleanFieldEditor(
            LoggerPreference.LOG_CONSOLE, "Show log console",
            getFieldEditorParent());
    addField(logConsole);
    String[][] logLevel = new String[][] {
            { "All", LoggerPreference.LEVEL_ALL },
            { "Information", LoggerPreference.LEVEL_INFO },
            { "Warnings", LoggerPreference.LEVEL_WARN },
            { "Errors", LoggerPreference.LEVEL_ERROR } };
    RadioGroupFieldEditor logRadios = new RadioGroupFieldEditor(
            LoggerPreference.LOG_LEVEL, "Log-Level:", 1, logLevel, parent,
            true);
    addField(logRadios);
}
项目:elexis-3-base    文件:PreferencePage.java   
@Override
protected void createFieldEditors(){
    final Composite parentComp = getFieldEditorParent();
    final RadioGroupFieldEditor groupFieldEditor =
        new RadioGroupFieldEditor(
            BATCH_OR_FTP,
            Messages.getString("PreferencePage.direktimport.label"), 2, new String[][] { //$NON-NLS-1$
                {
                    Messages.getString("PreferencePage.batchscript.label"), BATCH}, { Messages.getString("PreferencePage.ftpserver.label"), FTP}}, //$NON-NLS-1$ //$NON-NLS-2$
            parentComp, true);
    final FileFieldEditor batchFileEditor =
        new FileFieldEditor(BATCH_DATEI, Messages.getString("PreferencePage.batchdatei.label"), //$NON-NLS-1$
            parentComp);

    addField(groupFieldEditor);
    addField(batchFileEditor);

    addField(new StringFieldEditor(FTP_HOST,
        Messages.getString("PreferencePage.label.host"), getFieldEditorParent())); //$NON-NLS-1$
    addField(new StringFieldEditor(FTP_USER,
        Messages.getString("PreferencePage.label.user"), getFieldEditorParent())); //$NON-NLS-1$
    addField(new StringFieldEditor(FTP_PWD,
        Messages.getString("PreferencePage.label.password"), getFieldEditorParent())); //$NON-NLS-1$
    addField(new InexistingDirectoryOKDirectoryFieldEditor(DL_DIR,
        Messages.getString("PreferencePage.label.download"), getFieldEditorParent())); //$NON-NLS-1$
}
项目:AgentWorkbench    文件:DummyPage.java   
@Override
protected void createFieldEditors() {
    addField(new DirectoryFieldEditor("PATH", "&Directory preference:", getFieldEditorParent()));
    addField(new BooleanFieldEditor("BOOLEAN_VALUE", "&An example of a boolean preference", getFieldEditorParent()));
    addField(new RadioGroupFieldEditor("CHOICE", "An example of a multiple-choice preference", 1, new String[][] { { "&Choice 1", "choice1" },
           { "C&hoice 2", "choice2" } }, getFieldEditorParent()));

    addField(new StringFieldEditor("MySTRING1", "A &text preference:",
               getFieldEditorParent()));
       addField(new StringFieldEditor("MySTRING2", "A &text preference:",
               getFieldEditorParent()));
}
项目:eclipse-uroborosql-formatter    文件:UroborosqlFormatterPreferencePage.java   
@Override
public void createFieldEditors() {
    addField(new RadioGroupFieldEditor(UroborosqlFormatterPreferenceInitializer.CASE,
            "Specify case", 1,
            new String[][] {
                    new String[] { "UPPER", CaseType.UPPER.name() },
                    new String[] { "lower", CaseType.LOWER.name() },
                    new String[] { "Capitalize", CaseType.CAPITALIZE.name() },
                    new String[] { "nochange", CaseType.NOCHANGE.name() }
            }, getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(UroborosqlFormatterPreferenceInitializer.RESERVED_CASE,
            "Specify reserved words case", 1,
            new String[][] {
                    new String[] { "UPPER", CaseType.UPPER.name() },
                    new String[] { "lower", CaseType.LOWER.name() },
                    new String[] { "Capitalize", CaseType.CAPITALIZE.name() },
                    new String[] { "nochange", CaseType.NOCHANGE.name() }
            }, getFieldEditorParent()));

    reservedWordsEditor = new StringFieldEditor(UroborosqlFormatterPreferenceInitializer.RESERVED_WORDS,
            "Input reserved words list(comma separated)", getFieldEditorParent());
    addField(reservedWordsEditor);
    addField(new BooleanFieldEditor(UroborosqlFormatterPreferenceInitializer.USE_BACKSLASH,
            "&Using backslash escape sequences", getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(UroborosqlFormatterPreferenceInitializer.COMMENT_SYNTAX_TYPE,
            "Comment syntax type", 1,
            new String[][] {
                    new String[] { CommentSyntaxType.Uroborosql.name(), CommentSyntaxType.Uroborosql.name() },
                    new String[] { CommentSyntaxType.Doma2.name(), CommentSyntaxType.Doma2.name() } },
            getFieldEditorParent()));
}
项目:eclipse-uroborosql-formatter    文件:UroborosqlFormatterPreferencePage.java   
/**
 * Enable or disable the reserved word section deprnds on the user input.
 * if the user input is "NOCHANGE" in the reserved case section, the reserved word section is disabled,
 * otherwise the option is enabled.
 *
 * @param PropertyChangeEvent event
 */
@Override
public void propertyChange(PropertyChangeEvent event) {
    if(event.getSource() instanceof RadioGroupFieldEditor){
        RadioGroupFieldEditor editor = (RadioGroupFieldEditor) event.getSource();
        if(editor.getPreferenceName().equals(UroborosqlFormatterPreferenceInitializer.RESERVED_CASE)) {
            if (CaseType.NOCHANGE.name().equals(event.getNewValue().toString())) {
                this.reservedWordsEditor.setEnabled(false, getFieldEditorParent());
            }else {
                this.reservedWordsEditor.setEnabled(true, getFieldEditorParent());
            }
        }
    }
}
项目:ClassCleaner    文件:PreferencePage.java   
@Override
protected void createFieldEditors() {
    addField(new BooleanFieldEditor(ClassCleanerPlugin.ANALYZER_METHOD_CLUSTER,
            "Analyze method clusters that do not refer to each other", getFieldEditorParent()));
    addField(new BooleanFieldEditor(ClassCleanerPlugin.ANALYZER_UNUSED_METHOD,
            "Detect public methods that are not used", getFieldEditorParent()));
    addField(new BooleanFieldEditor(ClassCleanerPlugin.ANALYZER_FOREIGN_METHOD,
            "Detect method that should be moved to a differen class", getFieldEditorParent()));

    String[][] strings = { { "Class", ReferenceScope.Class.toString() },
            { "Project", ReferenceScope.Project.toString() } };
    addField(new RadioGroupFieldEditor(ClassCleanerPlugin.DEFAULT_REFERENCE_SCOPE,
            "Default scope to analyze during compilation", 1, strings, getFieldEditorParent()));
}
项目:tlaplus    文件:EditorPreferencePage.java   
protected void createFieldEditors()
{   IntegerFieldEditor rightMarginEditor = 
        new IntegerFieldEditor(EDITOR_RIGHT_MARGIN, "&Module editor right margin", 
               getFieldEditorParent());
    addField(rightMarginEditor);
    rightMarginEditor.setValidRange(20, 200);

    addField(new BooleanFieldEditor(CLEAR_DECLARATION_USE_MARKERS_ON_PARSE,
            "&Clear declaration use markers when parsing", getFieldEditorParent()));

    // Preferences for renumbering.  Added 25 July 2013 by LL
    Label lbl = new Label(getFieldEditorParent(), SWT.NONE);
    GridData gd = new GridData();
    gd.horizontalSpan = 2;
    lbl.setLayoutData(gd);

    lbl = new Label(getFieldEditorParent(), SWT.NONE);
    lbl.setText("Renumber Proof Command preferences") ;
    lbl.setLayoutData(gd);

    addField(new RadioGroupFieldEditor(EditorPreferencePage.RENUMBER_KEY, 
            "Which step names to renumber", 1,
            new String[][] 
              { {"All step names", ALL_NAMES},
              {"Names containing  a digit", SOME_DIGIT},
              {"Names beginning with a digit", FIRST_DIGIT},
              {"Names that are all digits", ALL_DIGITS} },
            getFieldEditorParent())) ;
    addField(new BooleanFieldEditor(SAVE_MODULE, "&Save module", 
               getFieldEditorParent())) ;
}
项目:ncl30-eclipse    文件:Language.java   
public void createFieldEditors() {
    addField(new RadioGroupFieldEditor(PreferenceConstants.P_LANGUAGE,
            "Error Language", 1, new String[][] {
                    { "Portuguese", "messagesPt" },
                    { "English", "messagesEn" },
                    { "Spanish", "messagesEs" } }, getFieldEditorParent(),
            true));

}
项目:ForgedUI-Eclipse    文件:DialogTypeWizardPage.java   
@Override
public void createControl(Composite parent) {
    initializeDialogUnits(parent);
    Composite topLevel = new Composite(parent, SWT.NONE);
    topLevel.setLayout(new GridLayout());
    topLevel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL
            | GridData.HORIZONTAL_ALIGN_FILL));
    Font font = parent.getFont();
    topLevel.setFont(font);

    RadioGroupFieldEditor rgfe = new RadioGroupFieldEditor("DialogTypeWizardPage",
            "Select dialog", 1,
            new String[][] {
                {"Option Dialog", "option"},
                {"Alert Dialog", "alert"},
                {"Email dialog", "email"}
            },
            topLevel);

    rgfe.setPropertyChangeListener(new IPropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent event) {
            dialogType = (String) event.getNewValue();
            DialogTypeWizardPage.this.setPageComplete(true);
        }
    });

    Composite radioBoxControl = rgfe.getRadioBoxControl(topLevel);
    ((Button)radioBoxControl.getChildren()[0]).setSelection(true);
    dialogType = "option";

    setControl(topLevel);
}
项目:depan    文件:LabelPreferencesPage.java   
@Override
protected void createFieldEditors() {
  Composite parent = getFieldEditorParent();

  // label positions.
  RadioGroupFieldEditor position = new RadioGroupFieldEditor(
      LabelPreferencesIds.LABEL_POSITION,
      "Label position", 3, new String[][] {
          // first line of 3 elements
          {"North-west", LabelPosition.NW.toString()},
          {"North", LabelPosition.N.toString()},
          {"North-east", LabelPosition.NE.toString()},
          // second line
          {"West", LabelPosition.W.toString()},
          {"Center", LabelPosition.CENTER.toString()},
          {"East", LabelPosition.E.toString()},
          // third line
          {"South-west", LabelPosition.SW.toString()},
          {"South", LabelPosition.S.toString()},
          {"South-east", LabelPosition.SE.toString()},
          // last line
          {"Inside, as node shape", LabelPosition.INSIDE.toString()},
          {"No labels", LabelPosition.NOLABEL.toString()},
          {"Only if selected", LabelPosition.IFSELECTED.toString()}
      },
      parent, true);

  addField(position);
}
项目:GLSL-Eclipse    文件:GlslEditorPreferencesPage.java   
/**
 * 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.
 */
@Override
public void createFieldEditors() {
    themeGroup = new RadioGroupFieldEditor(PreferenceConstants.P_THEME,
            "Pick the color theme you prefer.", 1, new String[][] {
                    { "&Light", "0" }, { "&Dark", "1" } },
            getFieldEditorParent());
    addField(themeGroup);
}
项目:eclipseforces    文件:PreferencesPage.java   
@Override
protected void createFieldEditors() {
  List<String> languages = LanguageSupportFactory.supportedLanguages();
  String[][] labelAndValues = new String[languages.size()][2];
  for (int i = 0; i < labelAndValues.length; i++) {
    labelAndValues[i][0] = labelAndValues[i][1] = languages.get(i);
  }
  addField(new RadioGroupFieldEditor(EclipseForcesPlugin.PREFERENCE_LANGUAGE, "Preferred programming language", 1,
      labelAndValues, getFieldEditorParent(), true));
}
项目:JFaceUtils    文件:FieldEditorFactory.java   
protected RadioGroupFieldEditor createRadioGroupFieldEditor(final String name, final String label, final Composite parent, final FieldEditorDetails details) {
    if (details.getRadioUseGroup() != null) {
        return new RadioGroupFieldEditor(name, label, details.getRadioNumColumns(), details.getLabelsAndValues().toArray(), parent, details.getRadioUseGroup());
    }
    else {
        return new RadioGroupFieldEditor(name, label, details.getRadioNumColumns(), details.getLabelsAndValues().toArray(), parent);
    }
}
项目:sadlos2    文件:SadlRootPreferencePage.java   
private void doStoreFieldEditorValue(RadioGroupFieldEditor editor) {
    try {
        Field field = RadioGroupFieldEditor.class.getDeclaredField("value");
        field.setAccessible(true);
        Object value = field.get(editor);
        if (value instanceof String) {
            editor.getPreferenceStore().putValue(editor.getPreferenceName(), (String) value);
        } else {
            editor.getPreferenceStore().setToDefault(editor.getPreferenceName());
        }
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
项目:developer-studio    文件:AppearancePreperance.java   
@Override
protected void createFieldEditors() {
    Composite fieldEditorParent = getFieldEditorParent();
    //Composite enableDisableSet = new Composite(fieldEditorParent, SWT.LEFT);
    RadioGroupFieldEditor updateInstallationRadioBttn = new RadioGroupFieldEditor(DASHBOARD_PREFERNCES,
            "Specify Dashboard view Preference", 1,
            new String[][] { {ANIMATED, JS_VIEW },
                    {CLASSIC, SWT_VIEW} },
            fieldEditorParent);
    addField(updateInstallationRadioBttn);
    boolean isUpdatesEnabled=true;
    updateInstallationRadioBttn.setEnabled(isUpdatesEnabled, fieldEditorParent);
    setSeparator(fieldEditorParent);
    addBlankSeparator(fieldEditorParent);
}
项目:AutoDeriv    文件:MainPreferencePage.java   
/**
 * 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.
 */
@Override
public void createFieldEditors() {
    Composite parent = getFieldEditorParent();

    addField(new LabelFieldEditor  ("General", parent, true));
    addField(new BooleanFieldEditor(PrefCst.P_STARTUP_CHECK,        "Check resources derived state at startup", parent));
    addField(new BooleanFieldEditor(PrefCst.P_ENABLE_MARKER,        "Add markers in .derived file (per-rule info or warn)", parent));

    addField(new LabelFieldEditor  ("Trace", parent, true));
    addField(new BooleanFieldEditor(PrefCst.P_OUTPUT_LOG,           "Output in the .log file (in workspace/.metadata/)", parent));
    addField(new BooleanFieldEditor(PrefCst.P_OUTPUT_STD,           "Output in the standard output streams (console)", parent));
    addField(new BooleanFieldEditor(PrefCst.P_TRACE_WARN,           "Trace warnings (recommended)", parent));
    addField(new BooleanFieldEditor(PrefCst.P_TRACE_INFO,           "Trace info", parent));
    addField(new BooleanFieldEditor(PrefCst.P_TRACE_DEBUG,          "Trace debug", parent));

    addField(new LabelFieldEditor  ("Decoration - Label", parent, true));
    addField(new LabelFieldEditor  ("NOTE: decorations may be disabled at workspace level,", parent));
    addField(new LabelFieldEditor  ("See General > Appearance > Label Decorations", parent));
    addField(new BooleanFieldEditor(PrefCst.P_DECO_LABEL_TEXT,      "Affect the label of derived resources", parent));
    addField(new StringFieldEditor (PrefCst.P_DECO_PREFIX,          "Label prefix", parent));
    addField(new StringFieldEditor (PrefCst.P_DECO_SUFFIX,          "Label suffix", parent));
    addField(new BooleanFieldEditor(PrefCst.P_DECO_LABEL_FCOLOR,    "Override foreground color", parent));
    addField(new ColorFieldEditor  (PrefCst.P_DECO_FOREGROUND,      "Label foreground", parent));
    addField(new BooleanFieldEditor(PrefCst.P_DECO_LABEL_BCOLOR,    "Override background color", parent));
    addField(new ColorFieldEditor  (PrefCst.P_DECO_BACKGROUND,      "Label background", parent));
    addField(new BooleanFieldEditor(PrefCst.P_ENABLE_DECO_FONT,     "Override font", parent));
    addField(new FontFieldEditor   (PrefCst.P_DECO_LABEL_FONT,      "Derived resources font", parent));

    addField(new LabelFieldEditor("Decoration - Icon", parent, true));
    addField(new ColorFieldEditor  (PrefCst.P_ICON_COLOR,           "Icon color (hue only)", parent));
    addField(new BooleanFieldEditor(PrefCst.P_ENABLE_CONF_ICON,     "Replace icon of .derived conf file", parent));
    addField(new BooleanFieldEditor(PrefCst.P_ENABLE_DECO_ICON,     "Show an icon on derived resources", parent));
    String[][] comboLocation = {
        {"top left",    "TOP_LEFT"},    {"top right",   "TOP_RIGHT"},
        {"bottom left", "BOTTOM_LEFT"}, {"bottom right","BOTTOM_RIGHT"},
    };
    addField(new RadioGroupFieldEditor( PrefCst.P_DECO_ICON_LOC, "Decoration icon location", 2,comboLocation, parent, true));
}
项目:maru    文件:MainPage.java   
/**
 * 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.
 */
@Override
public void createFieldEditors()
{
    addField(new FileFieldEditor(PreferenceConstants.P_FILE, "&File preference:", false, StringButtonFieldEditor.VALIDATE_ON_FOCUS_LOST, getFieldEditorParent()));
    addField(new PathEditor(PreferenceConstants.P_PATH2, "&Path preference:", "Chooser Label", getFieldEditorParent()));
    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()));
}
项目:Pydev    文件:DocstringsPrefPage.java   
/**
 * 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.
 */
@Override
public void createFieldEditors() {
    Composite p = getFieldEditorParent();

    Composite p2 = new Composite(p, 0);
    p2.setLayout(new RowLayout());

    RadioGroupFieldEditor docstringCharEditor = new RadioGroupFieldEditor(P_DOCSTRINGCHARACTER,
            "Docstring character", 1,
            new String[][] { { "Quotation mark (\")", "\"" }, { "Apostrophe (')", "'" } }, p2, true);
    addField(docstringCharEditor);

    RadioGroupFieldEditor docstringStyleEditor = new RadioGroupFieldEditor(P_DOCSTRINGSTYLE, "Docstring style", 1,
            new String[][] { { "Sphinx (:tag name:)", DOCSTRINGSTYLE_SPHINX },
                    { "EpyDoc (@tag name:)", DOCSTRINGSTYLE_EPYDOC } },
            p2, true);
    addField(docstringStyleEditor);

    Group typeDoctagGroup = new Group(p2, 0);
    typeDoctagGroup.setText("Type doctag generation (@type x:...)");
    typeDoctagEditor = new RadioGroupFieldEditor(P_TYPETAGGENERATION, "", 1, new String[][] {
            { "&Always", TYPETAG_GENERATION_ALWAYS }, { "&Never", TYPETAG_GENERATION_NEVER },
            { "&Custom", TYPETAG_GENERATION_CUSTOM } }, typeDoctagGroup);

    addField(typeDoctagEditor);
    addField(new ParameterNamePrefixListEditor(P_DONT_GENERATE_TYPETAGS, "Don't create for parameters with prefix",
            typeDoctagGroup));
}
项目:logan    文件:LoganalyserPreferencePage.java   
@Override
public void createFieldEditors() {
  String[][] labelAndValues = new String[][] {
      { Messages.searchResultCreationModeOnce, SearchResultsCreation.ONCE.name() },
      { Messages.searchResultCreationModeEditor, SearchResultsCreation.EDITOR.name() },
      { Messages.searchResultCreationModeSearch, SearchResultsCreation.SEARCH.name() } };
  addField(new RadioGroupFieldEditor(PreferenceConstants.SEARCH_RESULT_CREATION, Messages.searchResultCreationMode,
      1, labelAndValues, getFieldEditorParent()));
}
项目:clickwatch    文件:ClickWatchPreferences.java   
/**
 * 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 BooleanFieldEditor(
            PreferenceConstants.BIND_TO_PLAYER,
            "&Connect to recorded simulation of ClickNodes instead of using real to connections to real click instances.",
            getFieldEditorParent()));

    addField(new RadioGroupFieldEditor(
            PreferenceConstants.HANDLER_BEHAVIOUR,
            "Handler Behaviour",
            4,
            new String[][] {
                    { "DEFAULT", HandlerBehaviour.DEFAULT.toString() },
                    { "COMPOUND", HandlerBehaviour.COMPOUND.toString() },
                    { "COMPOUND_RECORDING",
                            HandlerBehaviour.COMPOUND_RECORDING.toString() },
                    {
                            "COMPOUND_RECORDING_DIFFERENCES",
                            HandlerBehaviour.COMPOUND_RECORDING_DIFFERENCES
                                    .toString() } },
            getFieldEditorParent(), true));

    addField(new RadioGroupFieldEditor(PreferenceConstants.VALUE_TYPE,
            "&Debug level", 4, new String[][] {
                    { "Specific", ValueType.SPECIFIC.toString() },
                    { "String", ValueType.STRING.toString() },
                    { "XML", ValueType.XML.toString() } },
            getFieldEditorParent(), true));

    addField(new RadioGroupFieldEditor(PreferenceConstants.DEBUG_LEVEL,
            "&Debug level", 4,
            new String[][] { { "Error", "1" }, { "Warning", "2" },
                    { "Info", "3" }, { "Debug", "4" } },
            getFieldEditorParent(), true));

}
项目:seg.jUCMNav    文件:DisplayPreferencesPage.java   
/**
 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
 */
protected void createFieldEditors() {
    StringFieldEditor author = new StringFieldEditor(DisplayPreferences.PREF_OUTLINE_FILTER, Messages.getString("DisplayPreferencesPage_ContainingText"), getFieldEditorParent()); //$NON-NLS-1$
    addField(author);

    BooleanFieldEditor bef = null;

    bef = new BooleanFieldEditor(DisplayPreferences.PREF_OUTLINE_SHOWNODENUMBER, Messages.getString("DisplayPreferencesPage_ShowNodeID"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(bef);

    bef = new BooleanFieldEditor(DisplayPreferences.PREF_OUTLINE_SHOWGRLS, Messages.getString("DisplayPreferencesPage_ShowGRL"), getFieldEditorParent()); //$NON-NLS-1$
    addField(bef);

    bef = new BooleanFieldEditor(DisplayPreferences.PREF_OUTLINE_SHOWUCMS, Messages.getString("DisplayPreferencesPage_ShowUCM"), getFieldEditorParent()); //$NON-NLS-1$
    addField(bef);
    bef = new BooleanFieldEditor(DisplayPreferences.PREF_OUTLINE_SHOWEMPTY, Messages.getString("DisplayPreferencesPage_ShowEmptyPoint"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(bef);
    bef = new BooleanFieldEditor(DisplayPreferences.PREF_OUTLINE_SHOWFORKJOIN, Messages.getString("DisplayPreferencesPage_ShowForkJoin"), getFieldEditorParent()); //$NON-NLS-1$
    addField(bef);
    bef = new BooleanFieldEditor(DisplayPreferences.PREF_OUTLINE_SHOWSTARTEND, Messages.getString("DisplayPreferencesPage_ShowStartEnd"), getFieldEditorParent()); //$NON-NLS-1$
    addField(bef);

    bef = new BooleanFieldEditor(DisplayPreferences.PREF_OUTLINE_SHOWCONCERNS, Messages.getString("DisplayPreferencesPage_ShowConcern"), getFieldEditorParent()); //$NON-NLS-1$
    addField(bef);

    String[][] values = { { Messages.getString("DisplayPreferencesPage_Default"), DisplayPreferences.SORT_DEFAULT }, { Messages.getString("DisplayPreferencesPage_Identifier"), DisplayPreferences.SORT_ID }, //$NON-NLS-1$ //$NON-NLS-2$
            { Messages.getString("DisplayPreferencesPage_Name"), DisplayPreferences.SORT_NAME }, }; //$NON-NLS-1$

    RadioGroupFieldEditor orientation = new RadioGroupFieldEditor(DisplayPreferences.PREF_OUTLINE_SORT, Messages.getString("DisplayPreferencesPage_SortOrder"), 1, values, //$NON-NLS-1$
            getFieldEditorParent());
    addField(orientation);
}
项目:seg.jUCMNav    文件:DefinitionReferencePreferencePage.java   
protected void createFieldEditors() {
    // Initialize all field editors.

    String[][] values = { { DeletePreferences.PREF_ALWAYS, DeletePreferences.PREF_ALWAYS }, { DeletePreferences.PREF_NEVER, DeletePreferences.PREF_NEVER },
            { DeletePreferences.PREF_PROMPT, DeletePreferences.PREF_PROMPT } };
    RadioGroupFieldEditor deleteDefinition = new RadioGroupFieldEditor(DeletePreferences.PREF_DELDEFINITION,
            Messages.getString("DefinitionReferencePreferencePage_DeleteDefinitionWhenDeletingLast"), 3, values, getFieldEditorParent()); //$NON-NLS-1$
    addField(deleteDefinition);

    RadioGroupFieldEditor deleteReference = new RadioGroupFieldEditor(DeletePreferences.PREF_DELREFERENCE, Messages.getString("DefinitionReferencePreferencePage_AllowDeleteReferencedDefinition"), 3, //$NON-NLS-1$
            values, getFieldEditorParent());
    addField(deleteReference);

}
项目:elexis-3-core    文件:UserSettings2.java   
@Override
protected void createFieldEditors(){
    addField(new RadioGroupFieldEditor(USERSETTINGS2_EXPANDABLE_COMPOSITES,
        Messages.UserSettings2_ExtendableFields, 1, new String[][] {
            {
                ALWAYS_OPEN, USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_OPEN
            }, {
                ALWAYS_CLOSED, USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_CLOSED
            }, {
                REMEMBER_LAST_STATE, USERSETTINGS2_EXPANDABLECOMPOSITE_STATE_REMEMBER_STATE
            }

        }, getFieldEditorParent()));
    new Label(getFieldEditorParent(), SWT.SEPARATOR | SWT.HORIZONTAL).setLayoutData(SWTHelper
        .getFillGridData(2, true, 1, false));
    new Label(getFieldEditorParent(), SWT.NONE).setText(Messages.UserSettings2_FieldsInList);
    addField(new BooleanFieldEditor(Preferences.USR_PATLIST_SHOWPATNR,
        Messages.UserSettings2_PatientNr, getFieldEditorParent()));
    addField(new BooleanFieldEditor(Preferences.USR_PATLIST_SHOWNAME,
        Messages.UserSettings2_PatientName, getFieldEditorParent()));
    addField(new BooleanFieldEditor(Preferences.USR_PATLIST_SHOWFIRSTNAME,
        Messages.UserSettings2_PatientFirstname, getFieldEditorParent()));
    addField(new BooleanFieldEditor(Preferences.USR_PATLIST_SHOWDOB,
        Messages.UserSettings2_Birthdate, getFieldEditorParent()));
    addField(new ComboFieldEditor(Preferences.USR_PATLIST_FOCUSFIELD, "Fokusfeld",
        patlistFocusFields, getFieldEditorParent()));
    new Label(getFieldEditorParent(), SWT.SEPARATOR | SWT.HORIZONTAL).setLayoutData(SWTHelper
        .getFillGridData(2, true, 1, false));
    new Label(getFieldEditorParent(), SWT.NONE)
        .setText(Messages.UserSettings2_AddidtionalFields);
    addField(new MultilineFieldEditor(Patientenblatt2.CFG_EXTRAFIELDS, StringTool.leer, 5,
        SWT.NONE, true, getFieldEditorParent()));

}
项目:waqtsalat-eclipse-plugin    文件:MainPrefsPage.java   
/**
 * Configuration of Juristic Method.
 */
private void addJuristicMethodsPrefsEditor() {
    RadioGroupFieldEditor editor = new RadioGroupFieldEditor(WaqtSalatPreferenceConstants.P_JURISTIC_METHOD,
            "Madhab", 1, getJuristicMethods(), getFieldEditorParent(), true);
    editor.getRadioBoxControl(getFieldEditorParent()).setToolTipText("Set the juristic method to use.");
    addField(editor);
}
项目:team-explorer-everywhere    文件:WITPreferencePage.java   
@Override
protected void createFieldEditors() {
    openFileAttachmentPrefsEditor = new RadioGroupFieldEditor(
        UIPreferenceConstants.WIT_DOUBLE_CLICK_FILE_ATTACHMENT,
        Messages.getString("WITPreferencePage.SummaryLabelText"), //$NON-NLS-1$
        1,
        new String[][] {
            {
                Messages.getString("WITPreferencePage.LaunchBrowserWithAttachment"), //$NON-NLS-1$
                UIPreferenceConstants.WIT_DOUBLE_CLICK_FILE_ATTACHMENT_LAUNCH_BROWSER
            }, {
                Messages.getString("WITPreferencePage.DownloadAttachmentToTemp"), //$NON-NLS-1$
                UIPreferenceConstants.WIT_DOUBLE_CLICK_FILE_ATTACHMENT_LAUNCH_LOCAL
            }
        },
        getFieldEditorParent(),
        true);

    addField(openFileAttachmentPrefsEditor);

    /*@formatter:off
     * 
     * We decided to always use the External Web Browser Editor for work items. 
     * S123 09/05/2017
     * 
     * workItemEditorPrefsEditor = new RadioGroupFieldEditor(
     *    UIPreferenceConstants.WORK_ITEM_EDITOR_ID,
     *      Messages.getString("WITPreferencePage.WorkItemEditorGroupLabel"), //$NON-NLS-1$
     *      1,
     *      getWorkItemEditors(),
     *      getFieldEditorParent(),
     *      true);
     * addField(workItemEditorPrefsEditor);
     * 
     * @formatter:on
     */

    /*
     * Get the controls back out of the field editor to set automation IDs.
     * There may be a better way to do this.
     */
    final Control[] radioButtons =
        openFileAttachmentPrefsEditor.getRadioBoxControl(getFieldEditorParent()).getChildren();
    AutomationIDHelper.setWidgetID(radioButtons[0], LAUNCH_BROWSER_FOR_ATTACHMENT_RADIO_ID);
    AutomationIDHelper.setWidgetID(radioButtons[1], DOWNLOAD_ATTACHMENT_RADIO_ID);
}
项目:eclox    文件:PreferencePage.java   
/**
 * Creates the preference page fields.
 */
protected void createFieldEditors() {
    Composite rootControl = getFieldEditorParent();

    // Create the controls.

    BooleanFieldEditor escapeValueStrings = new BooleanFieldEditor(IPreferences.HANDLE_ESCAPED_VALUES,
            "Handle escapes for \" and \\ in value strings", rootControl);
    escapeValueStrings.setPreferenceStore(getPreferenceStore());
    addField(escapeValueStrings);

    IntegerFieldEditor historySize = new IntegerFieldEditor(IPreferences.BUILD_HISTORY_SIZE, "Build history size:",
            rootControl);
    historySize.setPreferenceStore(getPreferenceStore());
    historySize.setValidRange(1, 100);
    addField(historySize);

    RadioGroupFieldEditor autoSaveField = new RadioGroupFieldEditor(IPreferences.AUTO_SAVE,
            "Save all modified files before building", 1,
            new String[][] { { IPreferences.AUTO_SAVE_NEVER, IPreferences.AUTO_SAVE_NEVER },
                    { IPreferences.AUTO_SAVE_ALWAYS, IPreferences.AUTO_SAVE_ALWAYS },
                    { IPreferences.AUTO_SAVE_ASK, IPreferences.AUTO_SAVE_ASK }, },
            rootControl, true);
    autoSaveField.setPreferenceStore(getPreferenceStore());
    addField(autoSaveField);

    int lineSepLength = LineSeparator.values().length;
    String[][] lineSepNames = new String[lineSepLength][2];
    for(int i=0;i<lineSepLength;i++) {
        lineSepNames[i][0] = LineSeparator.values()[i].getName();
        lineSepNames[i][1] = LineSeparator.values()[i].name();
    }
    RadioGroupFieldEditor lineSeparatorField = new RadioGroupFieldEditor(IPreferences.LINE_SEPARATOR,
            "Line separator", 1, lineSepNames, rootControl, true);
    lineSeparatorField.setPreferenceStore(getPreferenceStore());
    addField(lineSeparatorField);

    int listSepModeLength = ListSeparateMode.values().length;
    String[][] listSepModeNames = new String[listSepModeLength][2];
    for(int i=0;i<listSepModeLength;i++) {
        listSepModeNames[i][0] = ListSeparateMode.values()[i].getName();
        listSepModeNames[i][1] = ListSeparateMode.values()[i].name();
    }
    RadioGroupFieldEditor listSepModeField = new RadioGroupFieldEditor(IPreferences.LIST_SEPARATE_MODE,
            "List separate mode", 1, listSepModeNames, rootControl, true);
    listSepModeField.setPreferenceStore(getPreferenceStore());
    addField(listSepModeField);

    int tagFormatLength = TagFormat.values().length;
    String[][] tagFormatNames = new String[tagFormatLength][2];
    for(int i=0;i<tagFormatLength;i++) {
        tagFormatNames[i][0] = TagFormat.values()[i].getName();
        tagFormatNames[i][1] = TagFormat.values()[i].name();
    }
    RadioGroupFieldEditor tagFormatField = new RadioGroupFieldEditor(IPreferences.TAG_FORMAT,
            "TAG format", 1, tagFormatNames, rootControl, true);
    tagFormatField.setPreferenceStore(getPreferenceStore());
    addField(tagFormatField);

}
项目:mytourbook    文件:PrefPageMap2Appearance.java   
private void createUI_60_PaintingMethod(final Composite parent) {

        final Display display = parent.getDisplay();

        /*
         * checkbox: paint tour method
         */

        final Group groupMethod = new Group(parent, SWT.NONE);
        GridDataFactory.fillDefaults().applyTo(groupMethod);
        groupMethod.setText(Messages.Pref_MapLayout_Label_TourPaintMethod);
//      groupMethod.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
        {
            _editorTourPaintMethod = new RadioGroupFieldEditor(
                    ITourbookPreferences.MAP_LAYOUT_TOUR_PAINT_METHOD,
                    UI.EMPTY_STRING,
                    2,
                    new String[][] {
                            { Messages.Pref_MapLayout_Label_TourPaintMethod_Simple, TOUR_PAINT_METHOD_SIMPLE },
                            { Messages.Pref_MapLayout_Label_TourPaintMethod_Complex, TOUR_PAINT_METHOD_COMPLEX } },
                    groupMethod);

            addField(_editorTourPaintMethod);

            _pageBookPaintMethod = new PageBook(groupMethod, SWT.NONE);
            GridDataFactory.fillDefaults()//
                    .grab(true, false)
                    .span(2, 1)
                    .hint(350, SWT.DEFAULT)
                    .indent(16, 0)
                    .applyTo(_pageBookPaintMethod);

            // use a bulleted list to display this info
            final StyleRange style = new StyleRange();
            style.metrics = new GlyphMetrics(0, 0, 10);
            final Bullet bullet = new Bullet(style);

            /*
             * simple painting method
             */
            String infoText = Messages.Pref_MapLayout_Label_TourPaintMethod_Simple_Tooltip;
            int lineCount = Util.countCharacter(infoText, '\n');

            _pageSimple = new StyledText(_pageBookPaintMethod, SWT.READ_ONLY | SWT.WRAP | SWT.MULTI);
            GridDataFactory.fillDefaults().grab(true, false).applyTo(_pageSimple);
            _pageSimple.setText(infoText);
            _pageSimple.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
            _pageSimple.setLineBullet(0, lineCount + 1, bullet);
            _pageSimple.setLineWrapIndent(0, lineCount + 1, 10);

            /*
             * complex painting method
             */
            infoText = Messages.Pref_MapLayout_Label_TourPaintMethod_Complex_Tooltip;
            lineCount = Util.countCharacter(infoText, '\n');

            _pageComplex = new StyledText(_pageBookPaintMethod, SWT.READ_ONLY | SWT.WRAP | SWT.MULTI);
            GridDataFactory.fillDefaults().grab(true, false).applyTo(_pageComplex);
            _pageComplex.setText(infoText);
            _pageComplex.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
            _pageComplex.setLineBullet(0, lineCount + 1, bullet);
            _pageComplex.setLineWrapIndent(0, lineCount + 1, 10);
        }

        // set group margin after the fields are created
        GridLayoutFactory.swtDefaults().margins(0, 5).numColumns(2).applyTo(groupMethod);
    }
项目:massif    文件:ImporterPreferencePage.java   
/**
   * Creates the field editors.
   */
  public void createFieldEditors() {

      Label traverseModeInformation = new Label(getFieldEditorParent(), SWT.NONE);
      traverseModeInformation.setBounds(new Rectangle(0, 0, 300, 30));
      traverseModeInformation.setText("Set the traversal strategy of the importer."
              + "\nCases differ in handling model references.");

      // Traverse mode
      RadioGroupFieldEditor importModePickerEditor = new RadioGroupFieldEditor(
              PreferenceConstants.IMPORT_TRAVERSE_MODE, "Traverse mode:", 1, new String[][] {
                      { "&Shallow (only the model reference block is imported)", ImportMode.SHALLOW.toString() },
                      { "&Deep (the models referred by the imported model are also imported as an individual model)", ImportMode.DEEP.toString() },
                      { "&Flattening (the model references are resolved and are imported as though they were part of the same model)", ImportMode.FLATTENING.toString() }, 
                      { "&Referencing (all linked subsystem blocks' library is imported as an individual model)", ImportMode.REFERENCING.toString() } 
              },
              getFieldEditorParent());
      addField(importModePickerEditor);

      Label modelPathInformationPlaceholder = new Label(getFieldEditorParent(), SWT.NONE);
      modelPathInformationPlaceholder.setBounds(new Rectangle(0, 0, 300, 15));
      modelPathInformationPlaceholder.setText("");
      Label modelPathInformation = new Label(getFieldEditorParent(), SWT.NONE);
      modelPathInformation.setBounds(new Rectangle(0, 0, 400, 30));
      modelPathInformation.setText("You can provide a default path for the imported models."
              + "\nIf empty, you will be prompted for the required information at import time.");

      // Result model path
      ContainerFieldEditor resultModelPathEditor = new ContainerFieldEditor(
              PreferenceConstants.IMPORT_RESULT_MODEL_PATH, "Default result model location:", getFieldEditorParent());

      // A horizontal separator on the page
      SeparatorFieldEditor separator = new SeparatorFieldEditor(getFieldEditorParent());
      addField(separator);

      // Import filter
      // TODO magic string elimination
      Label filterInformation = new Label(getFieldEditorParent(), SWT.NONE);
      filterInformation.setBounds(new Rectangle(0, 0, 300, 15));
      filterInformation.setText("Import filters to use by default:");


      Map<String, ISimulinkImportFilter> filtersById = ImportFilterRegistry.INSTANCE.getFiltersById();
      for (String filterId : filtersById.keySet()) {
        ISimulinkImportFilter filter = filtersById.get(filterId);
        Composite filterCheckboxParent = getFieldEditorParent();
        BooleanFieldEditor filterCheckbox = new BooleanFieldEditor(filterId,filter.getName(), filterCheckboxParent);
        filterCheckbox.getDescriptionControl(filterCheckboxParent).setToolTipText(filter.getDescription());
        addField(filterCheckbox);           
}


// TODO set this, makes the setting more user friendly
// resultModelPathEditor.setFilterPath(path);

      addField(resultModelPathEditor);

      Label additionalMatlabPathInformation = new Label(getFieldEditorParent(), SWT.NONE);
      additionalMatlabPathInformation.setBounds(new Rectangle(0, 0, 400, 30));
      additionalMatlabPathInformation
              .setText("You can provide additional path that are to be added to the Matlab Path."
                      + "\nIf you provide multiple paths, separate them with '|'.");

      // Additional MATLAB path
      addField(new StringFieldEditor(PreferenceConstants.IMPORT_ADDITIONAL_MATLAB_PATH, "Additional Matlab path:",
              getFieldEditorParent()));

      Label startupScriptInformation = new Label(getFieldEditorParent(), SWT.NONE);
      startupScriptInformation.setBounds(new Rectangle(0, 0, 400, 30));
      startupScriptInformation
              .setText("You can provide additional startup scripts that are to be executed in Matlab."
                      + "\nIf you provide multiple script names, separate them with '|'.");

      // Additional MATLAB script names
      addField(new StringFieldEditor(PreferenceConstants.IMPORT_STARTUP_SCRIPTS, "Startup script names:",
              getFieldEditorParent()));

  }