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

项目:pgcodekeeper    文件:GeneralPrefPage.java   
@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()));

}
项目:Hydrograph    文件:ServicesPreference.java   
/**
 * Check if all fields are valid
 * 
 */
private void checkState() {
    if(editorList != null){
        int size = editorList.size();
        for(int i=0; i<size; i++){
            FieldEditor fieldEditor = editorList.get(i);
            if(StringUtils.isNotBlank(((StringFieldEditor)fieldEditor).getErrorMessage())){
                setErrorMessage(((StringFieldEditor)fieldEditor).getErrorMessage());
                setValid(false);
                break;
            }else{
                setValid(true);
            }
        }
    }
}
项目:hybris-commerce-eclipse-plugin    文件:HACPreferencePage.java   
/**
 * {@inheritDoc}
 */
@Override
protected void createFieldEditors() {
    hostname = new StringFieldEditor(HACPreferenceConstants.P_HOSTNAME_URL, PreferencePage.Label.HOSTNAME_URL_INPUT_TEXT,
            getFieldEditorParent());
    username = new StringFieldEditor(HACPreferenceConstants.P_USERNAME, PreferencePage.Label.USERNAME_INPUT_TEXT,
            getFieldEditorParent());
    password = new StringFieldEditor(HACPreferenceConstants.P_PASSWORD, PreferencePage.Label.PASSWORD_INPUT_TEXT,
            getFieldEditorParent()) {
        @Override
        protected void doFillIntoGrid(final Composite parent, final int numColumns) {
            super.doFillIntoGrid(parent, numColumns);
            getTextControl().setEchoChar('*');
        }
    };
    timeout = new IntegerFieldEditor(HACPreferenceConstants.P_TIMEOUT, PreferencePage.Label.TIMEOUT_INPUT_TEXT,
            getFieldEditorParent());

    addField(hostname);
    addField(username);
    addField(password);
    addField(timeout);
}
项目:hybris-commerce-eclipse-plugin    文件:CopyrightPreferencePage.java   
/**
 * {@inheritDoc}
 */
@Override
protected void createFieldEditors() {
    copyrightContent = new MultiLineStringFieldEditor(CopyrightPreferenceConstants.COPYRIGHT_CONTENT,
            LABELS.COPYRIGHT_CONTENTS, getFieldEditorParent());
    firstLine = new StringFieldEditor(CopyrightPreferenceConstants.COPYRIGHT_FIRST_LINE,
            LABELS.COPYRIGHT_FIRST_LINE, FIELD_WIDTH, getFieldEditorParent());
    linePrefix = new StringFieldEditor(CopyrightPreferenceConstants.COPYRIGHT_LINE_PREFIX,
            LABELS.COPYRIGHT_LINE_PREFIX, FIELD_WIDTH, getFieldEditorParent());
    lastLine = new StringFieldEditor(CopyrightPreferenceConstants.COPYRIGHT_LAST_LINE, LABELS.COPYRIGHT_LAST_LINE,
            FIELD_WIDTH, getFieldEditorParent());
    addField(copyrightContent);
    addField(firstLine);
    addField(linePrefix);
    addField(lastLine);
}
项目:xstreamer    文件:TimerPreferencePage.java   
@Override
protected void createFieldEditors() {
    addField(new DirectoryFieldEditor(PreferenceConstants.TIMER_FILE_PATH, 
            "Timer output directory:", getFieldEditorParent()));

    addField(new StringFieldEditor(PreferenceConstants.TIMER_FILE, "Filename:", getFieldEditorParent()));

    addField(new SpacerFieldEditor(getFieldEditorParent()));

    addField(new LabelFieldEditor("Default Timer Settings", getFieldEditorParent()));

    StringFieldEditor hoursField = new StringFieldEditor(PreferenceConstants.TIMER_HOUR_DEFAULT, "Hour(s):", getFieldEditorParent());
    hoursField.setTextLimit(2);
    addField(hoursField);

    StringFieldEditor minsField = new StringFieldEditor(PreferenceConstants.TIMER_MINUTES_DEFAULT, "Minutes:", getFieldEditorParent());
    minsField.setTextLimit(2);
    addField(minsField);

    StringFieldEditor secField = new StringFieldEditor(PreferenceConstants.TIMER_SECONDS_DEFAULT, "Seconds:", getFieldEditorParent());
    secField.setTextLimit(2);
    addField(secField);
}
项目:mesfavoris    文件:GDriveBookmarksStorePreferencePage.java   
private void createPollChangesIntervalGroup(Composite composite) {
    Composite groupComposite = new Composite(composite, SWT.LEFT);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    groupComposite.setLayout(layout);
    GridData gd = new GridData();
    gd.horizontalAlignment = GridData.FILL;
    gd.grabExcessHorizontalSpace = true;
    groupComposite.setLayoutData(gd);

    pollChangesInterval = new IntegerFieldEditor(POLL_CHANGES_INTERVAL_PREF, "Poll changes interval (seconds)",
            groupComposite);

    pollChangesInterval.setTextLimit(Integer.toString(MAX_POLL_CHANGES_INTERVAL).length());
    pollChangesInterval.setErrorMessage("The workspace save interval should be between 30 and 9999.");
    pollChangesInterval.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);
    pollChangesInterval.setValidRange(MIN_POLL_CHANGES_INTERVAL, MAX_POLL_CHANGES_INTERVAL);
    pollChangesInterval.setPropertyChangeListener(event -> {
        if (event.getProperty().equals(FieldEditor.IS_VALID)) {
            setValid(pollChangesInterval.isValid());
        }
    });
    addField(pollChangesInterval);
}
项目:tlaplus    文件:SpecPropertyPage.java   
public void createFieldEditors(Composite composite) {
    // TODO change root file
    rootFileEditor = new StringFieldEditor(
            IPreferenceConstants.P_PROJECT_ROOT_FILE,
            "Specification root module", composite);
    addEditor(rootFileEditor);
    rootFileEditor.getTextControl(composite).setEditable(false);

    StringFieldEditor pcalParamEditor = new StringFieldEditor(
            IPreferenceConstants.PCAL_CAL_PARAMS, "PlusCal call arguments",
            composite);
    addEditor(pcalParamEditor);

    directorySizeEditor = new StringFieldEditor(
            "DoesNotExistIsIrrelevant",
            "Size of .toolbox directory in kbytes", composite);
    addEditor(directorySizeEditor);
    directorySizeEditor.getTextControl(composite).setEditable(false);

    libraryPathComposite = new LibraryPathComposite(this);

}
项目:jsweet-eclipse-plugin    文件:JSweetPreferencePage.java   
@Override
protected void updateFieldEditors() {
    super.updateFieldEditors();
    // update editor states if needed
    if (this.isPageEnabled()) {
        Composite parent = this.getFieldEditorParent();
        BooleanFieldEditor bundle = this.getField(Preferences.BUNDLE(DEFAULT_PROFILE_NAME));
        StringFieldEditor bundlesDirectory = this.getField(Preferences.BUNDLES_DIRECTORY(DEFAULT_PROFILE_NAME));
        ComboFieldEditor module = this.getField(Preferences.MODULE_KIND(DEFAULT_PROFILE_NAME));
        if (bundle.getBooleanValue()) {
            getPreferenceStore().setValue(Preferences.MODULE_KIND(currentProfile), "none");
            module.load();
        }
        module.setEnabled(!bundle.getBooleanValue(), parent);
        bundlesDirectory.setEnabled(bundle.getBooleanValue(), parent);

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

    }

}
项目:Permo    文件:StringFieldEditorBuilder.java   
private StringFieldEditor createWithValidation() {
  final Validation validation = this.optionalValidation.get();
  final StringFieldEditor stringFieldEditor = new StringFieldEditor(name, labelText, parent) {

    @Override
    protected boolean checkState() {
      if (!validation.getCondition().test(getStringValue())) {
        setErrorMessage(validation.getMessage());
        showErrorMessage();
        return false;
      }
      return super.checkState();
    }
  };
  return stringFieldEditor;
}
项目:raptor-chess-interface    文件:SpeechPage.java   
@Override
protected void createFieldEditors() {
    LabelFieldEditor userHomeDir = new LabelFieldEditor(
            "NONE",
            WordUtils
                    .wrap(local.getString("speechAns"), 70), 
                    getFieldEditorParent());
    addField(userHomeDir);

    final StringFieldEditor speechProcessName = new StringFieldEditor(
            PreferenceKeys.SPEECH_PROCESS_NAME, local.getString("speechPrcN"),
            getFieldEditorParent());
    addField(speechProcessName);

    labelButtonFieldEditor = new LabelButtonFieldEditor(
            "NONE",
            local.getString("testSet"),
            getFieldEditorParent(), local.getString("test"), new SelectionAdapter() {
                @Override
                public void widgetSelected(SelectionEvent e) {
                    SoundService.getInstance().textToSpeech(
                            local.getString("speechStpCrct"));
                }
            });
    addField(labelButtonFieldEditor);
}
项目:raptor-chess-interface    文件:SoundPage.java   
@Override
protected void createFieldEditors() {
    LabelFieldEditor userHomeDir = new LabelFieldEditor(
            "NONE",
            WordUtils
                    .wrap(local.getString("soundP1"),
                            70), getFieldEditorParent());
    addField(userHomeDir);

    final StringFieldEditor soundProcessName = new StringFieldEditor(
            PreferenceKeys.SOUND_PROCESS_NAME, local.getString("soundP2"),
            getFieldEditorParent());
    addField(soundProcessName);

    labelButtonFieldEditor = new LabelButtonFieldEditor(
            "NONE",
            local.getString("soundP3"),
            getFieldEditorParent(), local.getString("test"), new SelectionAdapter() {
                @Override
                public void widgetSelected(SelectionEvent e) {
                    SoundService.getInstance().initSoundPlayer();
                    SoundService.getInstance().playSound("win");
                }
            });
    addField(labelButtonFieldEditor);
}
项目:PDFReporter-Studio    文件:PDFExporterPreferencePage.java   
private void createTabMetadata(CTabFolder tabFolder) {
    CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
    ptab.setText(Messages.PDFExporterPreferencePage_38);

    Composite sc = new Composite(tabFolder, SWT.NONE);
    ptab.setControl(sc);

    addField(new StringFieldEditor(PdfExporterConfiguration.PROPERTY_METADATA_TITLE,
            Messages.PDFExporterPreferencePage_39, sc));
    addField(new StringFieldEditor(PdfExporterConfiguration.PROPERTY_METADATA_AUTHOR,
            Messages.PDFExporterPreferencePage_40, sc));
    addField(new StringFieldEditor(PdfExporterConfiguration.PROPERTY_METADATA_SUBJECT,
            Messages.PDFExporterPreferencePage_41, sc));
    addField(new StringFieldEditor(PdfExporterConfiguration.PROPERTY_METADATA_KEYWORDS,
            Messages.PDFExporterPreferencePage_42, sc));
    addField(new StringFieldEditor(PdfExporterConfiguration.PROPERTY_METADATA_CREATOR,
            Messages.PDFExporterPreferencePage_43, sc));

    sc.setLayout(new GridLayout(3, false));
}
项目: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));

}
项目:mytourbook    文件:PrefPagePeople.java   
/**
 * field: path to save raw tour data
 */
private void createUI_94_Field_RawDataPath(final Composite parent) {

    /*
     * editor: raw data path
     */
    _rawDataPathEditor = new DirectoryFieldEditor(
            ITourbookPreferences.DUMMY_FIELD,
            Messages.Pref_People_Label_DefaultDataTransferFilePath,
            parent);
    _rawDataPathEditor.setEmptyStringAllowed(true);
    _rawDataPathEditor.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);

    final Label lblPath = _rawDataPathEditor.getLabelControl(parent);
    lblPath.setToolTipText(Messages.Pref_People_Label_DefaultDataTransferFilePath_Tooltip);

    _txtRawDataPath = _rawDataPathEditor.getTextControl(parent);
    _txtRawDataPath.addModifyListener(_defaultModifyListener);
}
项目:OpenSPIFe    文件:PlanEditorPreferencePage.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();
    String valueString = EnsembleProperties.getProperty(P_TEMPLATE_PLAN_URI_EDITABLE);
    if (valueString == null || Boolean.FALSE != Boolean.parseBoolean(valueString)) {
        addField(new StringFieldEditor(P_TEMPLATE_PLAN_URI, "Template plan URI", parent));
    }
    addField(new BooleanFieldEditor(P_CHECK_CUSTODIAN, "Check custodian when saving", parent));
    addField(new BooleanFieldEditor(P_CROSS_EDITOR_SELECTIONS, "Share selections across editors", parent));
    Label reorderByTimeLabel=new Label(parent, SWT.None);
    reorderByTimeLabel.setText("Reorder by time usually uses the start time of an activity \nor activity group unless the duration in hours is longer than large plan item duration.");
    GridData reorderByTimeLayout = new GridData();
    reorderByTimeLayout.horizontalSpan=2;
    reorderByTimeLabel.setLayoutData(reorderByTimeLayout);
    IntegerFieldEditor reorderByTimeField=new IntegerFieldEditor(P_WATERFALL_LARGE_ELEMENT_DURATION_IN_HOURS, "", parent);
    reorderByTimeField.setLabelText("Large Plan Item Duration");
    reorderByTimeField.setEmptyStringAllowed(false);
    reorderByTimeField.setValidRange(0, 10000);
    addField(reorderByTimeField);

}
项目:dazzl    文件:BluetoothPreferencePage.java   
protected void createFieldEditors()
{
    enabled = new BooleanFieldEditor(
            Bluetooth.ENABLED_PREFERENCE,
            Messages.getString("BluetoothPreferencePage.enabled"), getFieldEditorParent()); //$NON-NLS-1$
    addField(enabled);

    deviceAddress = new StringFieldEditor(
            Bluetooth.DEVICE_ADDRESS_PREFERENCE,
            Messages.getString("BluetoothPreferencePage.deviceAddress"), getFieldEditorParent()); //$NON-NLS-1$
    addField(deviceAddress);

    redirectExtension = new StringFieldEditor(
            Bluetooth.REDIRECT_EXTENSION_PREFERENCE,
            Messages.getString("BluetoothPreferencePage.redirectExtension"), getFieldEditorParent()); //$NON-NLS-1$
    addField(redirectExtension);

    //TODO ADD REDIRECT PREFIX
}
项目: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();
}
项目:eclipse-asveditor    文件:CommonPreferences.java   
@Override
    protected void createFieldEditors() {

        addField(new DirectoryFieldEditor("MAIN_PATH", "&Directory preference:",
                getFieldEditorParent()));
        addField(new BooleanFieldEditor("BOOLEAN_CREATE_BACKUP",
                "&Create backup file", 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("BACKUP_SUFF", "A &backup suffix:",
                getFieldEditorParent()));
        addField(new StringFieldEditor("DEFAULT_LOCALE", "A &default resource locale:",
                getFieldEditorParent()));

    }
项目:massif    文件:ImportSettingsDialog.java   
@Override
protected List<FieldEditor> additionalFields(Composite fieldEditorParent) {
    Label filters = new Label(fieldEditorParent, SWT.NONE);
    filters.setText("Import filters to use:");

    List<FieldEditor> fes = new LinkedList<FieldEditor>();

    Map<String, ISimulinkImportFilter> filtersById = ImportFilterRegistry.INSTANCE.getFiltersById();
    for (String filterId : filtersById.keySet()) {
        ISimulinkImportFilter filter = filtersById.get(filterId);
        BooleanFieldEditor filterCheckbox = new BooleanFieldEditor(filterId, filter.getName(), fieldEditorParent);
        filterCheckbox.setPreferenceStore(store);
        filterCheckbox.setPreferenceName(filterId);
        filterCheckbox.load();
        filterCheckbox.getDescriptionControl(fieldEditorParent).setToolTipText(filter.getDescription());
        fes.add(filterCheckbox);
        filterSelectors.put(filterId, filterCheckbox);
    }

    importedModelNameEditor = new StringFieldEditor("", "Result Model Name:", fieldEditorParent);
    importedModelNameEditor.setEmptyStringAllowed(false);
    importedModelNameEditor.setStringValue(importedModelName);
    fes.add(importedModelNameEditor);

    return fes;
}
项目:angularjs-eclipse    文件:ExpressionPropertyPage.java   
@Override
protected void createFieldEditors() {
    Composite parent = super.getFieldEditorParent();

    // start symbol
    StringFieldEditor startSymbolField = new StringFieldEditor(
            AngularCoreConstants.EXPRESSION_START_SYMBOL,
            AngularUIMessages.ExpressionPropertyPage_startSybol_label,
            parent);
    addField(startSymbolField);

    // end symbol
    StringFieldEditor endSymbolField = new StringFieldEditor(
            AngularCoreConstants.EXPRESSION_END_SYMBOL,
            AngularUIMessages.ExpressionPropertyPage_endSybol_label, parent);
    addField(endSymbolField);
}
项目: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);

}
项目:elexis-3-core    文件:TextTemplatePreferences.java   
@Override
protected void createFieldEditors(){
    Label expl = new Label(getFieldEditorParent(), SWT.WRAP);
    expl.setText(Messages.TextTemplatePreferences_ExplanationLine1
        + Messages.TextTemplatePreferences_ExplanationLine2
        + Messages.TextTemplatePreferences_ExplanationLine3);
    expl.setLayoutData(SWTHelper.getFillGridData(2, true, 1, false));
    addField(new StringFieldEditor(SUFFIX_STATION, SUFFIX_FOR_THIS_STATION,
        getFieldEditorParent()));
    /*
     * IExtensionRegistry exr = Platform.getExtensionRegistry(); IExtensionPoint exp =
     * exr.getExtensionPoint("ch.elexis.documentTemplates"); if (exp != null) { IExtension[]
     * extensions = exp.getExtensions(); for (IExtension ex : extensions) {
     * IConfigurationElement[] elems = ex.getConfigurationElements(); for (IConfigurationElement
     * el : elems) { String n=el.getAttribute("name"); addField(new StringFieldEditor(BRANCH+n,
     * n, getFieldEditorParent())); } }
     * 
     * }
     */
}
项目:olca-app    文件:IoPreferencePage.java   
private void createIlcdNetworkContents(Composite parent) {
    Group section = new Group(parent, SWT.SHADOW_OUT);
    section.setText(M.ILCDNetworkSettings);
    StringFieldEditor urlEditor = new StringFieldEditor(
            IoPreference.ILCD_URL, M.URL, section);
    addField(urlEditor);
    StringFieldEditor userEditor = new StringFieldEditor(
            IoPreference.ILCD_USER, M.User, section);
    addField(userEditor);
    StringFieldEditor passwordEditor = new StringFieldEditor(
            IoPreference.ILCD_PASSWORD, M.Password, section);
    passwordEditor.getTextControl(section).setEchoChar('*');
    addField(passwordEditor);
    UI.gridLayout(section, 2);
    UI.gridData(section, true, false);
}
项目:elexis-3-base    文件:MedicsPreferencePage.java   
@Override
protected void createFieldEditors(){
    addField(new DirectoryFieldEditor(DOWNLOAD_DIR,
        Messages.MedicsPreferencePage_labelDownloadDir, getFieldEditorParent()));
    addField(new DirectoryFieldEditor(UPLOAD_DIR, Messages.MedicsPreferencePage_labelUploadDir,
        getFieldEditorParent()));
    addField(new DirectoryFieldEditor(IMED_DIR,
        Messages.MedicsPreferencePage_labelUploadDirimed, getFieldEditorParent()));
    addField(new DirectoryFieldEditor(ARCHIV_DIR, Messages.MedicsPreferencePage_labelArchivDir,
        getFieldEditorParent()));
    addField(new DirectoryFieldEditor(ERROR_DIR, Messages.MedicsPreferencePage_labelErrorDir,
        getFieldEditorParent()));
    addField(new StringFieldEditor(DOKUMENT_CATEGORY,
        Messages.MedicsPreferencePage_labelDocumentCategory, getFieldEditorParent()));
    addField(new StringFieldEditor(DELETE_ARCHIV_DAYS, "Archiv bereinigen (Tage)",
        getFieldEditorParent()));
}
项目: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$
}
项目:MongoWorkBench    文件:MPrefPage.java   
public void createFieldEditors() {
    // addField( new StringFieldEditor( BATCH_SIZE, "Default 'limit' size:", getFieldEditorParent() ) );
    addField(new StringFieldEditor(PREF_MAX_FIND_RESULTS, "Maximum number of items shown in the Document List View:", getFieldEditorParent()));
    // addField( new BooleanFieldEditor( PREF_REMEMBER_LAST_LOCATION, "Remember last location", getFieldEditorParent() ) );
    /*
     * addField( new StringFieldEditor( PORT, "Port:", getFieldEditorParent() ) );
     * 
     * addField( new BooleanFieldEditor( RUN_ON_STARTUP, RUN_ON_STARTUP, getFieldEditorParent() ) );
     */
    /*
     * addField( new BooleanFieldEditor( PreferenceConstants.P_BOOLEAN, "&An example of a boolean preference", getFieldEditorParent()));
     */

    /*
     * addField( new DirectoryFieldEditor(PreferenceConstants.P_PATH, "&Directory 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()));
     */
}
项目: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()));
}
项目:neoscada    文件:ImportPreferencePage.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 ()
{
    final IntegerFieldEditor fieldEditor = new IntegerFieldEditor ( PreferenceConstants.P_DEFAULT_CHUNK_SIZE, "&Default chunk size:", getFieldEditorParent () );
    fieldEditor.setEmptyStringAllowed ( false );
    fieldEditor.setValidRange ( 1, Integer.MAX_VALUE );
    fieldEditor.setValidateStrategy ( StringFieldEditor.VALIDATE_ON_KEY_STROKE );

    addField ( fieldEditor );
}
项目:scanning    文件:ActiveMQPage.java   
@Override
protected void createFieldEditors() {

    final StringFieldEditor uri = new StringFieldEditor(CommandConstants.JMS_URI, "Comamnd Server", getFieldEditorParent());
    addField(uri);

    final StringFieldEditor checking = new StringFieldEditor(CommandConstants.DIR_CHECKING_URI, "Directory Permisssion Checker", getFieldEditorParent());
    addField(checking);
}
项目: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()));
}
项目:Hydrograph    文件:ViewDataPreference.java   
private void checkState() {
    if(editorList != null){
        int size = editorList.size();
        for(int i=0; i<size; i++){
            FieldEditor fieldEditor = editorList.get(i);
            if(StringUtils.isNotBlank(((StringFieldEditor)fieldEditor).getErrorMessage())){
                setErrorMessage(((StringFieldEditor)fieldEditor).getErrorMessage());
                setValid(false);
                break;
            }else{
                setValid(true);
            }
        }
    }
}
项目:solidity-ide    文件:SolidityCompilerPreferencePage.java   
protected void createCompilerSettings(Composite parent) {
    Composite composite = createGroupComposite(parent, "Solc compiler");
    compilerPathFieldEditor = new FileFieldEditor(SolidityPreferences.COMPILER_PATH, "Path to solc", composite);
    addField(compilerPathFieldEditor);
    addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_ENABLED, "Enable solidity compiler", composite));
    addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_BIN, "Enable solidity bin output",
            composite));
    addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_AST, "Enable solidity ast output",
            composite));
    addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_ASM, "Enable solidity asm output",
            composite));
    addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_ABI, "Enable solidity abi output",
            composite));
    addField(new StringFieldEditor(SolidityPreferences.COMPILER_OUTPUT_PATH, "Compiler output path", composite));
}
项目:eclipse-weblogic-plugin    文件:WeblogicPreferencePage.java   
/**
 * Creates the Weblogic Preferece page 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.
 * 
 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
 */
@Override
public void createFieldEditors() {
    this.addField(new DirectoryFieldEditor(PREF_ORACLEHOME, WEBLOGIC_ORACLEHOME_LABEL, this.getFieldEditorParent()));
    this.addField(new DirectoryFieldEditor(PREF_WLHOME, WEBLOGIC_WLHOME_LABEL, this.getFieldEditorParent()));
    this.addField(new StringFieldEditor(PREF_DOMAINNAME, WEBLOGIC_DOMAINNAME_LABEL, 20, this.getFieldEditorParent()));
    this.addField(new DirectoryFieldEditor(PREF_DOMAINDIR, WEBLOGIC_DOMAINDIR_LABEL, this.getFieldEditorParent()));
    this.addField(new StringFieldEditor(PREF_SERVERNAME, WEBLOGIC_SERVERNAME_LABEL, 20, this.getFieldEditorParent()));
    this.addField(new StringFieldEditor(PREF_USERNAME, WEBLOGIC_USER_LABEL, 20, this.getFieldEditorParent()));
    this.addField(new StringFieldEditor(PREF_PASSWORD, WEBLOGIC_PASSWORD_LABEL, 20, this.getFieldEditorParent()));
    this.addField(new StringFieldEditor(PREF_HOSTNAME, WEBLOGIC_HOSTNAME_LABEL, 20, this.getFieldEditorParent()));
    this.addField(new StringFieldEditor(PREF_PORT, WEBLOGIC_PORT_LABEL, 10, this.getFieldEditorParent()));
}
项目:hybris-commerce-eclipse-plugin    文件:HACPreferencePage.java   
/**
 * {@inheritDoc}
 */
@Override
public void propertyChange(final PropertyChangeEvent event) {
    // not allowing blank fields on Preference page
    if (PreferencePage.Validation.EVENT_FIELD_EDITOR_VALUE.equals(event.getProperty())) {
        if (event.getSource() instanceof StringFieldEditor) {
            if (checkIfEmpty() && validateTimeout() && validateUrl()) {
                super.performApply();
                super.propertyChange(event);
                setValid(true);
            }
        }
    }
}
项目:xstreamer    文件:SecondPlayerTemplatePreference.java   
@Override
protected void createFieldEditors() {
    addField(new StringFieldEditor(PreferenceConstants.SECOND_PLAYER_SQUAD_FILENAME, "Squad Filename:",
            getFieldEditorParent()));
    createFileEditorForPlayerTemplate(PreferenceConstants.TEMPLATE_SECOND_PLAYER_FILE, "Template Filename:");

}
项目:tlaplus    文件:TLA2TeXPreferencePage.java   
protected void createFieldEditors() {
    if (!Platform.getOS().equals(Platform.OS_MACOSX)) {
        addField(new BooleanFieldEditor(
                ITLA2TeXPreferenceConstants.EMBEDDED_VIEWER,
                "&Use built-in PDF viewer", getFieldEditorParent()));
    }
    // Preference to regenerate PDF upon spec save?
    addField(new BooleanFieldEditor(
            ITLA2TeXPreferenceConstants.AUTO_REGENERATE, "&Regenerate pretty-printed PDF on spec save (takes effect once spec re-opened).",
            getFieldEditorParent()));

    addField(new BooleanFieldEditor(
            ITLA2TeXPreferenceConstants.SHADE_COMMENTS, "&Shade comments",
            getFieldEditorParent()));
       addField(new BooleanFieldEditor(
               ITLA2TeXPreferenceConstants.NO_PCAL_SHADE, "&Do not shade PlusCal code",
               getFieldEditorParent()));
    addField(new BooleanFieldEditor(
            ITLA2TeXPreferenceConstants.NUMBER_LINES, "&Number lines",
            getFieldEditorParent()));
    addField(new StringFieldEditor(
            ITLA2TeXPreferenceConstants.DOT_COMMAND,
            "&Specify dot command", getFieldEditorParent()));
    addField(new StringFieldEditor(
            ITLA2TeXPreferenceConstants.LATEX_COMMAND,
            "&Specify pdflatex command", getFieldEditorParent()));
    addField(new DoubleFieldEditor(ITLA2TeXPreferenceConstants.GRAY_LEVEL,
            "&Specify gray level (between 0.0 and 1.0)",
            getFieldEditorParent(), 0, 1));
}
项目:fluentmark    文件:PrefPageEditor.java   
/** Create fields controlling editing assist behavior */
@Override
public void createFieldEditors() {

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

    // Lines
    addField(new BooleanFieldEditor(EDITOR_SMART_BACKSPACE, "Smart backspace", baseComp));
    addField(new BooleanFieldEditor(EDITOR_WORD_WRAP, "Soft word wrapping", baseComp));
    addField(new BooleanFieldEditor(EDITOR_HTML_OPEN, "Open HTML file after creation", baseComp));
    addField(new BooleanFieldEditor(EDITOR_PDF_OPEN, "Open PDF file after creation", baseComp));
    addField(new IntegerFieldEditor(EDITOR_TAB_WIDTH, "Tab size: ", baseComp, 6));

    addField(new BooleanFieldEditor(EDITOR_FORMATTING_ENABLED, "Formatting enabled", baseComp));
    addField(new IntegerFieldEditor(EDITOR_FORMATTING_COLUMN, "Formatted line width: ", baseComp, 6));

    // ------

    taskComp = SwtUtil.makeGroupComposite(getFieldEditorParent(), 1, 1, "Tasks");

    // Tasks
    addField(new BooleanFieldEditor(EDITOR_TASK_TAGS, "Use task tags ", taskComp));
    addField(new StringFieldEditor(EDITOR_TASK_TAGS_DEFINED, "Task tags defined:", taskComp));
    viewComp = SwtUtil.makeGroupComposite(getFieldEditorParent(), 1, 1, "Preview");

    addField(new IntegerFieldEditor(VIEW_UPDATE_DELAY, "Update rate limiter period (ms): ", viewComp, 6));
    ((GridData) viewComp.getLayoutData()).grabExcessHorizontalSpace = false;
}
项目:yamcs-studio    文件:ConnectionPreferencePage.java   
@Override
protected void createFieldEditors() {

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

    singleConnectionMode = new BooleanFieldEditor("singleConnectionMode", "Single Connection Mode", getFieldEditorParent());
    addField(singleConnectionMode);

    connectionString = new StringFieldEditor("connectionString", "Connection String (for single connection mode)", getFieldEditorParent());
    addField(connectionString);
}
项目:statecharts    文件:ExamplesPreferencePage.java   
protected void addFields(Composite main) {
    addField(new StorageLocationFieldEditor(ExamplesPreferenceConstants.STORAGE_LOCATION, "Storage Location:",
            main));
    separator();
    StringFieldEditor remoteLocationEditor = new StringFieldEditor(ExamplesPreferenceConstants.REMOTE_LOCATION,
            "Remote Location", main);
    remoteLocationEditor.getTextControl(main).setEditable(false);
    addField(remoteLocationEditor);
    separator();
    StringFieldEditor remoteBranchEditor = new StringFieldEditor(ExamplesPreferenceConstants.REMOTE_BRANCH,
            "Remote Branch:", main);
    addField(remoteBranchEditor);
}