Example usage for org.eclipse.jface.preference DirectoryFieldEditor setFilterPath

List of usage examples for org.eclipse.jface.preference DirectoryFieldEditor setFilterPath

Introduction

In this page you can find the example usage for org.eclipse.jface.preference DirectoryFieldEditor setFilterPath.

Prototype

public void setFilterPath(File path) 

Source Link

Document

Sets the initial path for the Browse dialog.

Usage

From source file:cn.edu.xmu.tidems.control.ui.preferences.PreferencePageADCard.java

License:Open Source License

/**
 * 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.
 *//*  w  ww  . ja  va2  s  .  c  o m*/
@Override
public void createFieldEditors() {

    addField(new SpacerFieldEditor(getFieldEditorParent()));
    adCardFieldEditor = new ComboFieldEditor(PreferenceSupplier.P_SELECTED_ADCARD, "Selected ADCard:",
            getRegisteredADC9982Services(), getFieldEditorParent());
    addField(adCardFieldEditor);
    addField(new ComboFieldEditor(PreferenceSupplier.P_SELECTED_ADCARD_ADDRESS, "Selected Address:",
            getAvailableAddress(), getFieldEditorParent()));
    addField(new ComboFieldEditor(PreferenceSupplier.P_CLOCK, "Clock:", PreferenceSupplier.CLOCK_LIST,
            getFieldEditorParent()));
    addField(new ComboFieldEditor(PreferenceSupplier.P_CLOCK_DIVISION, "Clock Division:",
            PreferenceSupplier.CLOCK_DIVISION_LIST, getFieldEditorParent()));
    addField(new BooleanFieldEditor(PreferenceSupplier.P_ADCARD_2G_ACQUISTION, "Enable 2G Acquisiton",
            getFieldEditorParent()));
    addField(new ComboFieldEditor(PreferenceSupplier.P_TRIGGER_MODE, "Trigger Mode:",
            PreferenceSupplier.TRIGGER_MODE_LIST, getFieldEditorParent()));
    addField(new ComboFieldEditor(PreferenceSupplier.P_TRIGGER_SOURCE, "Trigger Source:",
            PreferenceSupplier.TRIGGER_SOURCE_LIST, getFieldEditorParent()));
    final DirectoryFieldEditor dirFieldEditor = new DirectoryFieldEditor(
            PreferenceSupplier.P_DEFAULT_DATA_FOLDER, "Data folder:", getFieldEditorParent());
    final String userHomeDir = System.getProperty("user.home");
    dirFieldEditor.getTextControl(getFieldEditorParent()).setText(userHomeDir);
    dirFieldEditor.setFilterPath(new File(userHomeDir));
    addField(dirFieldEditor);
}