Search in sources :

Example 21 with RadioGroupFieldEditor

use of org.eclipse.jface.preference.RadioGroupFieldEditor in project janrufmonitor by tbrandt77.

the class Client method createFieldEditors.

protected void createFieldEditors() {
    super.createFieldEditors();
    StringFieldEditor sfe = new StringFieldEditor(this.CONFIG_NAMESPACE_2 + SEPARATOR + "server", this.m_i18n.getString(this.getNamespace(), "server", "label", this.m_language), 20, this.getFieldEditorParent());
    sfe.setEmptyStringAllowed(false);
    addField(sfe);
    sfe = new StringFieldEditor(this.CONFIG_NAMESPACE_2 + SEPARATOR + "port", this.m_i18n.getString(this.getNamespace(), "port", "label", this.m_language), 5, this.getFieldEditorParent());
    sfe.setEmptyStringAllowed(false);
    addField(sfe);
    if (isExpertMode()) {
        BooleanFieldEditor bfe = new BooleanFieldEditor(this.getConfigNamespace() + SEPARATOR + "autoconnect", this.m_i18n.getString(this.getNamespace(), "autoconnect", "label", this.m_language), this.getFieldEditorParent());
        addField(bfe);
        bfe = new BooleanFieldEditor(this.getConfigNamespace() + SEPARATOR + "autoreconnect", this.m_i18n.getString(this.getNamespace(), "autoreconnect", "label", this.m_language), this.getFieldEditorParent());
        addField(bfe);
        sfe = new StringFieldEditor(this.CONFIG_NAMESPACE_1 + SEPARATOR + "port", this.m_i18n.getString(this.getNamespace(), "cport", "label", this.m_language), 5, this.getFieldEditorParent());
        sfe.setEmptyStringAllowed(false);
        addField(sfe);
        RadioGroupFieldEditor rgfe = new RadioGroupFieldEditor(this.CONFIG_NAMESPACE_1 + SEPARATOR + "events", this.m_i18n.getString(this.getNamespace(), "events", "label", this.m_language), 1, new String[][] { { this.m_i18n.getString(this.getNamespace(), "thin", "label", this.m_language), thinClientEvents }, { this.m_i18n.getString(this.getNamespace(), "fat", "label", this.m_language), fatClientEvents } }, this.getFieldEditorParent(), true);
        addField(rgfe);
        ComboFieldEditor cfe = new ComboFieldEditor("repository.HttpCallerManager" + SEPARATOR + "remote_repository", this.m_i18n.getString(this.getNamespace(), "remote_ab", "label", this.m_language), new String[][] { { this.m_i18n.getString(this.getNamespace(), "callerdirectory", "label", this.m_language), "CallerDirectory" }, { this.m_i18n.getString(this.getNamespace(), "mysqladdressbook", "label", this.m_language), "MySqlAddressbook" }, { this.m_i18n.getString(this.getNamespace(), "outlook", "label", this.m_language), "OutlookCallerManager" }, { this.m_i18n.getString(this.getNamespace(), "macab", "label", this.m_language), "MacAddressBookManager" } }, this.getFieldEditorParent());
        addField(cfe);
        cfe = new ComboFieldEditor("repository.HttpCallManager" + SEPARATOR + "remote_repository", this.m_i18n.getString(this.getNamespace(), "remote_j", "label", this.m_language), new String[][] { { this.m_i18n.getString(this.getNamespace(), "defaultjournal", "label", this.m_language), "DefaultJournal" }, { this.m_i18n.getString(this.getNamespace(), "mysqljournal", "label", this.m_language), "MySqlJournal" } }, this.getFieldEditorParent());
        addField(cfe);
    }
}
Also used : StringFieldEditor(org.eclipse.jface.preference.StringFieldEditor) RadioGroupFieldEditor(org.eclipse.jface.preference.RadioGroupFieldEditor) BooleanFieldEditor(org.eclipse.jface.preference.BooleanFieldEditor) ComboFieldEditor(org.eclipse.jface.preference.ComboFieldEditor)

Example 22 with RadioGroupFieldEditor

use of org.eclipse.jface.preference.RadioGroupFieldEditor in project titan.EclipsePlug-ins by eclipse.

the class TITANCommonPreferencePage method createFieldEditors.

@Override
protected void createFieldEditors() {
    final Composite parent = getFieldEditorParent();
    mergeGroup = new Group(parent, SWT.SHADOW_ETCHED_OUT);
    mergeGroup.setText("Log file merge");
    mergeGroup.setLayout(new GridLayout(1, false));
    mergeGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    final String[][] labelAndValues = { { "Overwrite file", org.eclipse.titan.common.preferences.PreferenceConstants.LOG_MERGE_OPTIONS_OVERWRITE }, { "Create a new file", org.eclipse.titan.common.preferences.PreferenceConstants.LOG_MERGE_OPTIONS_CREATE }, { "Ask", org.eclipse.titan.common.preferences.PreferenceConstants.LOG_MERGE_OPTIONS_ASK } };
    mergeOptions = new RadioGroupFieldEditor(org.eclipse.titan.common.preferences.PreferenceConstants.LOG_MERGE_OPTIONS, "If the merged file already exists:", 1, labelAndValues, mergeGroup, true);
    addField(mergeOptions);
}
Also used : Group(org.eclipse.swt.widgets.Group) GridLayout(org.eclipse.swt.layout.GridLayout) RadioGroupFieldEditor(org.eclipse.jface.preference.RadioGroupFieldEditor) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData)

Example 23 with RadioGroupFieldEditor

use of org.eclipse.jface.preference.RadioGroupFieldEditor in project jbosstools-hibernate by jbosstools.

the class HibernateConsolePreferencePage method createFieldEditors.

/**
 * Creates the field editors. Field editors are abstractions of
 * the common GUI blocks needed to manipulate various types
 * of preferences. Each field editor knows how to save and
 * restore itself.
 */
public void createFieldEditors() {
    addField(new DirectoryFieldEditor(P_PATH, HibernateConsoleMessages.HibernateConsolePreferencePage_dir_preference, getFieldEditorParent()));
    addField(new BooleanFieldEditor(P_BOOLEAN, HibernateConsoleMessages.HibernateConsolePreferencePage_example_of_bool_pref, getFieldEditorParent()));
    addField(new RadioGroupFieldEditor(P_CHOICE, HibernateConsoleMessages.HibernateConsolePreferencePage_example_of_multichoise_pref, 1, new String[][] { { HibernateConsoleMessages.HibernateConsolePreferencePage_choice_1, HibernateConsoleMessages.HibernateConsolePreferencePage_choice1 }, { HibernateConsoleMessages.HibernateConsolePreferencePage_choice_2, HibernateConsoleMessages.HibernateConsolePreferencePage_choice2 } }, getFieldEditorParent()));
    addField(new StringFieldEditor(P_STRING, HibernateConsoleMessages.HibernateConsolePreferencePage_text_pref, getFieldEditorParent()));
}
Also used : StringFieldEditor(org.eclipse.jface.preference.StringFieldEditor) RadioGroupFieldEditor(org.eclipse.jface.preference.RadioGroupFieldEditor) DirectoryFieldEditor(org.eclipse.jface.preference.DirectoryFieldEditor) BooleanFieldEditor(org.eclipse.jface.preference.BooleanFieldEditor)

Aggregations

RadioGroupFieldEditor (org.eclipse.jface.preference.RadioGroupFieldEditor)23 BooleanFieldEditor (org.eclipse.jface.preference.BooleanFieldEditor)12 Composite (org.eclipse.swt.widgets.Composite)12 IntegerFieldEditor (org.eclipse.jface.preference.IntegerFieldEditor)5 StringFieldEditor (org.eclipse.jface.preference.StringFieldEditor)5 GridLayout (org.eclipse.swt.layout.GridLayout)5 Label (org.eclipse.swt.widgets.Label)4 ComboFieldEditor (org.eclipse.jface.preference.ComboFieldEditor)3 DirectoryFieldEditor (org.eclipse.jface.preference.DirectoryFieldEditor)3 GridData (org.eclipse.swt.layout.GridData)3 Group (org.eclipse.swt.widgets.Group)3 IPropertyChangeListener (org.eclipse.jface.util.IPropertyChangeListener)2 PropertyChangeEvent (org.eclipse.jface.util.PropertyChangeEvent)2 Control (org.eclipse.swt.widgets.Control)2 File (java.io.File)1 ArrayList (java.util.ArrayList)1 TraceType (org.csstudio.javafx.rtplot.TraceType)1 ArchiveRescale (org.csstudio.trends.databrowser3.model.ArchiveRescale)1 DefaultScope (org.eclipse.core.runtime.preferences.DefaultScope)1 IPreferenceChangeListener (org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener)1