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

项目:texlipse    文件:BibDirectoriesPreferencePage.java   
/**
 * Creates the property editing UI components of this page.
 */
protected void createFieldEditors() {
    Composite parent = getFieldEditorParent();
    PathEditor dir = new PathEditor(TexlipseProperties.BIB_DIR, TexlipsePlugin.getResourceString("preferenceBibDirLabel"), "", parent);
    addField(dir);
    dir.getButtonBoxControl(parent).setToolTipText(TexlipsePlugin.getResourceString("preferenceBibDirTooltip"));
    dir.getLabelControl(parent).setToolTipText(TexlipsePlugin.getResourceString("preferenceBibDirTooltip"));
    dir.getListControl(parent).setToolTipText(TexlipsePlugin.getResourceString("preferenceBibDirTooltip"));
}
项目:PDFReporter-Studio    文件:PDFExporterPreferencePage.java   
private void createTabFonts(CTabFolder tabFolder) {
    CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
    ptab.setText(Messages.PDFExporterPreferencePage_50);

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

    BooleanFieldEditor bf = new BooleanFieldEditor(NSF_EXPORT_PDF_EMBEDDED, Messages.PDFExporterPreferencePage_52, sc);
    addField(bf);
    HelpSystem.setHelp(bf.getDescriptionControl(sc), StudioPreferencePage.REFERENCE_PREFIX + bf.getPreferenceName());

    JSSComboFieldEditor cfe = new JSSComboFieldEditor(NSF_EXPORT_PDF_ENCODING, Messages.PDFExporterPreferencePage_51,
            ModelUtils.getPdfEncodings2(), sc);
    addField(cfe);
    HelpSystem.setHelp(cfe.getComboBoxControl(sc), StudioPreferencePage.REFERENCE_PREFIX + cfe.getPreferenceName());

    cfe = new JSSComboFieldEditor(NSF_EXPORT_PDF_FONT_NAME, Messages.PDFExporterPreferencePage_53,
            ModelUtils.getPDFFontNames2(), sc);
    addField(cfe);
    HelpSystem.setHelp(cfe.getComboBoxControl(sc), StudioPreferencePage.REFERENCE_PREFIX + cfe.getPreferenceName());

    Composite fdircompo = new Composite(sc, SWT.NONE);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 5;
    fdircompo.setLayoutData(gd);
    PathEditor pe = new PathEditor(NSF_EXPORT_PDF_FONTDIR, Messages.PDFExporterPreferencePage_54,
            Messages.PDFExporterPreferencePage_55, fdircompo);
    addField(pe);
    HelpSystem.setHelp(pe.getListControl(fdircompo), StudioPreferencePage.REFERENCE_PREFIX + pe.getPreferenceName());

    fdircompo.setLayout(new GridLayout(4, false));
}
项目:PDFReporter-Studio    文件:TemplateLocationsPreferencePage.java   
@Override
protected void createFieldEditors() {
    addField(
            new PathEditor(TPP_TEMPLATES_LOCATIONS_LIST,
                    Messages.TemplateLocationsPreferencePage_Locations, 
                    Messages.TemplateLocationsPreferencePage_Message,getFieldEditorParent()));
}
项目: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()));
}