当前位置: 首页>>代码示例>>Java>>正文


Java FieldEditor.setPreferenceStore方法代码示例

本文整理汇总了Java中org.eclipse.jface.preference.FieldEditor.setPreferenceStore方法的典型用法代码示例。如果您正苦于以下问题:Java FieldEditor.setPreferenceStore方法的具体用法?Java FieldEditor.setPreferenceStore怎么用?Java FieldEditor.setPreferenceStore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.preference.FieldEditor的用法示例。


在下文中一共展示了FieldEditor.setPreferenceStore方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addField

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
protected void addField(final FieldEditor editor, Composite parent, IPreferenceStore preferenceStore) {
    fields.add(editor);

    editor.setPreferenceStore(preferenceStore);
    editor.load();
    editor.setPropertyChangeListener(new IPropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent event) {
            // Apply on any change!
            editor.store();
        }
    });
    if (editor instanceof BooleanFieldEditorCustom) {
        editor.fillIntoGrid(parent, 2);
    } else {
        editor.fillIntoGrid(parent, 1);
    }
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:20,代码来源:ProfileView.java

示例2: createContents

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
@Override
protected Control createContents(Composite parent) {
	Composite composite = new Composite(parent, SWT.FILL);

	fieldEditors.add(new BooleanFieldEditor(ENABLE_HAETAE, "Enable Epsilon Haetae (experimental)", composite));

	for (FieldEditor fieldEditor : fieldEditors) {
		fieldEditor.setPreferenceStore(Activator.getDefault().getPreferenceStore());
		fieldEditor.load();
	}

	return composite;
}
 
开发者ID:epsilonlabs,项目名称:haetae,代码行数:14,代码来源:EpsilonHaetaePreferencePage.java

示例3: initialize

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
protected void initialize()
{
    if (fields != null)
    {
        Iterator e = fields.iterator();
        while (e.hasNext())
        {
            FieldEditor fieldEditor = (FieldEditor) e.next();
            fieldEditor.setPage(this);
            fieldEditor.setPreferenceStore(getPreferenceStore());
            fieldEditor.load();
        }
    }
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:15,代码来源:GenericFieldEditorPropertyPage.java

示例4: dispose

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
public void dispose() {
	for (FieldEditor ed : actives) {
		ed.setPage(null);
		ed.setPropertyChangeListener(null);
		ed.setPreferenceStore(null);
	}

	actives.clear();
	comp.getParent().dispose();
	comp = null;
	page = null;
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:13,代码来源:AbstractOptionsBlock.java

示例5: initEditor

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
/**
 * Initializes and sets up the given editor
 * 
 * @param editor
 * @param store
 */
void initEditor(FieldEditor editor, IPreferenceStore store) {
	addField(editor);
	editor.setPage(this);
	editor.setPropertyChangeListener(this);
	editor.setPreferenceStore(store);
	editor.load();
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:14,代码来源:TypeScriptMainPreferencePage.java

示例6: propertyChange

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
@Override
public final void propertyChange(PropertyChangeEvent event) {
	if (event.getSource() instanceof FieldEditor) {
		FieldEditor fe = (FieldEditor) event.getSource();
		internalStore.setValue(fe.getPreferenceName(), fe.getPreferenceStore().getDefaultString(fe.getPreferenceName()));
		fe.setPreferenceStore(internalStore);
		fe.store();
	}
	super.propertyChange(event);
}
 
开发者ID:cplutte,项目名称:bts,代码行数:11,代码来源:AbstractDetailsPart.java

示例7: addFieldEditor

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
/**
 * Hooks up a field editor to performOk and performDefaults.
 * 
 * @param fieldEditor
 *        The field editor
 */
protected void addFieldEditor( FieldEditor fieldEditor )
{
	fieldEditors.add( fieldEditor );
	fieldEditor.setPage( this );
	fieldEditor.setPreferenceStore( getPreferenceStore() );
	fieldEditor.load();
}
 
开发者ID:tliron,项目名称:creel,代码行数:14,代码来源:PreferencePageWithFields.java

示例8: dispose

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
/**
 * The field editor preference page implementation of an <code>IDialogPage</code> method disposes of this page's
 * controls and images. Subclasses may override to release their own allocated SWT resources, but must call
 * <code>super.dispose</code>.
 */
@Override
public void dispose() {
    super.dispose();
    if (m_fields != null) {
        Iterator<FieldEditor> I = m_fields.iterator();
        while (I.hasNext()) {
            FieldEditor editor = I.next();
            editor.setPage(null);
            editor.setPropertyChangeListener(null);
            editor.setPreferenceStore(null);
        }
    }
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:19,代码来源:FieldLayoutPreferencePage.java

示例9: initialize

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
/**
 * Initializes all field editors.
 */
protected void initialize() {
    if (m_fields != null) {
        Iterator<FieldEditor> I = m_fields.iterator();
        while (I.hasNext()) {
            FieldEditor editor = I.next();
            editor.setPage(null);
            editor.setPropertyChangeListener(this);
            editor.setPreferenceStore(getPreferenceStore());
            editor.load();
        }
    }
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:16,代码来源:FieldLayoutPreferencePage.java

示例10: createContents

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
@Override
   protected Control createContents(Composite parent) {
setTitle("Iso options");
Composite top = new Composite(parent, SWT.NONE);
fieldEditors = new ArrayList<FieldEditor>();
FieldEditor editor = new FileFieldEditor("mkisofs.path", "MKISOFS Path", true,
	StringButtonFieldEditor.VALIDATE_ON_FOCUS_LOST, top);
fieldEditors.add(editor);

Group optionsGroup = new Group(top, SWT.NONE);
optionsGroup.setText("Iso creations options");

editor = new BooleanFieldEditor("mkisofs.rockridge.use", "Use RockRidge Extension", optionsGroup);
fieldEditors.add(editor);

editor = new BooleanFieldEditor("mkisofs.joliet.use", "Use Joliet Extension", optionsGroup);
fieldEditors.add(editor);

editor = new BooleanFieldEditor("mkisofs.symlinks.follow", "Follow symbolic links", optionsGroup);
fieldEditors.add(editor);

for (FieldEditor fieldEditor : fieldEditors) {
    fieldEditor.setPage(this);
    fieldEditor.setPreferenceStore(getPreferenceStore());
    fieldEditor.load();
}

GridDataFactory.defaultsFor(optionsGroup).grab(true, false).span(3, 1).applyTo(optionsGroup);
GridLayoutFactory.swtDefaults().generateLayout(optionsGroup);
GridLayoutFactory.fillDefaults().numColumns(3).generateLayout(top);
return top;
   }
 
开发者ID:Cavallinux,项目名称:jisocreator,代码行数:33,代码来源:MKISOFSPreferencePage.java

示例11: setupEditor

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
/**
 * Adds the editor to the current preference page. Links it with the 
 * page IPreferenceStore and then load stored value.
 * 
 * @param editor the field editor to setup 
 */
public void setupEditor(FieldEditor editor)
{
    editor.setPage(this);
    editor.setPreferenceStore(getPreferenceStore());
    editor.load();
}
 
开发者ID:edeoliveira,项目名称:Mailster,代码行数:13,代码来源:DefaultConfigurationPage.java

示例12: addTimezonePrefsEditors

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
/**
     * Configuration of timezone.
     */
    private void addTimezonePrefsEditors() {
        timezonePrefsGroup = new Group(getFieldEditorParent(), SWT.NONE);
        timezonePrefsGroup.setLayout(new GridLayout(1, false));
        timezonePrefsGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        timezonePrefsGroup.setText("Timezone settings");

        timezoneFromCountryEditor = new BooleanFieldEditor(WaqtSalatPreferenceConstants.P_GET_TIMEZONE_FROM_COUNTRY,
                "Try to get timezone from country/city", timezonePrefsGroup);
// FIXME: fix tooltip display issues in windows XP        
//        timezoneFromCountryEditor
//                .getLabelControl(timezonePrefsGroup)
//                .setToolTipText(
//                        "Be aware that there may exist several timezones for the same country. In that case, it is highly recommended to set explicitely the timezone or even use system default timezone.");

        useSystemTimezoneEditor = new BooleanFieldEditor(WaqtSalatPreferenceConstants.P_USE_SYSTEM_TIMEZONE,
                "Use system timezone", timezonePrefsGroup);

        timezonesEditor = new ComboFieldEditor(WaqtSalatPreferenceConstants.P_TIMEZONE, "Timezone",
                getAvailableTimezones(), timezonePrefsGroup);

        BooleanFieldEditor daylightSavingsEditor = new BooleanFieldEditor(
                WaqtSalatPreferenceConstants.P_DAYLIGHT_SAVINGS, "Daylight savings", timezonePrefsGroup);

        for (FieldEditor editor : new FieldEditor[] { timezoneFromCountryEditor, useSystemTimezoneEditor,
                timezonesEditor, daylightSavingsEditor }) {
            editor.setPreferenceStore(getPreferenceStore());
            editor.load();
            addField(editor);
        }
    }
 
开发者ID:paissad,项目名称:waqtsalat-eclipse-plugin,代码行数:34,代码来源:MainPrefsPage.java

示例13: initPreferenceStore

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
private static void initPreferenceStore(FieldEditor field) {
    field.setPreferenceStore(PreferenceActivator.getDefault().getPreferenceStore());
    field.load();
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:5,代码来源:CDOServerConnectionPreference.java

示例14: initField

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
private void initField(FieldEditor field) {
	field.setPreferenceStore(getPreferenceStore());
	field.setPreferencePage(this);
	field.load();
}
 
开发者ID:dcendents,项目名称:sysdeotomcat,代码行数:6,代码来源:TomcatJVMPreferencePage.java

示例15: initField

import org.eclipse.jface.preference.FieldEditor; //导入方法依赖的package包/类
private void initField(FieldEditor field) {
	field.setPreferenceStore(getPreferenceStore());
	field.setPreferencePage(this);
	field.load();		
}
 
开发者ID:dcendents,项目名称:sysdeotomcat,代码行数:6,代码来源:AdvancedPreferencePage.java


注:本文中的org.eclipse.jface.preference.FieldEditor.setPreferenceStore方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。