Search in sources :

Example 1 with CheckBoxFieldEditor

use of org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor in project tdi-studio-se by Talend.

the class ComponentsPreferencePage method addFontAndColorFieldsForJoblet.

protected void addFontAndColorFieldsForJoblet(Composite composite) {
    doNotShowJobletAfterDoubleClickCheckBoxField = new CheckBoxFieldEditor(IComponentPreferenceConstant.IS_AVOID_JOBLET, Messages.getString("ComponentJobletPreferencePage.label"), //$NON-NLS-1$
    composite);
    addField(doNotShowJobletAfterDoubleClickCheckBoxField);
}
Also used : CheckBoxFieldEditor(org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor)

Example 2 with CheckBoxFieldEditor

use of org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor in project tdi-studio-se by Talend.

the class ComponentsPreferencePage method addFontAndColorFieldsFortRunJob.

protected void addFontAndColorFieldsFortRunJob(Composite composite) {
    doNotShowJobAfterDoubleClickCheckBoxField = new CheckBoxFieldEditor(IComponentPreferenceConstant.IS_AVOID, Messages.getString("ComponenttRunJobPreferencePage.label"), //$NON-NLS-1$
    composite);
    addField(doNotShowJobAfterDoubleClickCheckBoxField);
}
Also used : CheckBoxFieldEditor(org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor)

Example 3 with CheckBoxFieldEditor

use of org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor in project tdi-studio-se by Talend.

the class ImportExportPreferencePage method createFieldEditors.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
     */
@Override
protected void createFieldEditors() {
    CheckBoxFieldEditor isUsedCheckButton = new CheckBoxFieldEditor(IRepositoryPrefConstants.USE_EXPORT_SAVE, Messages.getString("ImportExportPreferencePage.exportJobScript"), //$NON-NLS-1$
    getFieldEditorParent());
    addField(isUsedCheckButton);
    CheckBoxFieldEditor addClasspathJarButton = new CheckBoxFieldEditor(IRepositoryPrefConstants.ADD_CLASSPATH_JAR, Messages.getString("ImportExportPreferencePage.addClasspathJar"), //$NON-NLS-1$
    getFieldEditorParent());
    addField(addClasspathJarButton);
    CheckBoxFieldEditor needRebuild = new CheckBoxFieldEditor(IRepositoryPrefConstants.REBUILD_RELATIONSHIPS, Messages.getString("ImportExportPreferencePage.rebuildRelationships"), //$NON-NLS-1$
    getFieldEditorParent());
    addField(needRebuild);
}
Also used : CheckBoxFieldEditor(org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor)

Example 4 with CheckBoxFieldEditor

use of org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor in project tdi-studio-se by Talend.

the class PerformancePreferencePage method addSVNInforAutoCheckFiled.

private void addSVNInforAutoCheckFiled() {
    if (PluginChecker.isSVNProviderPluginLoaded()) {
        final CheckBoxFieldEditor autoCheckField = new CheckBoxFieldEditor(ITalendCorePrefConstants.SVN_UPDATE_INFO_AUTO_CHECK, Messages.getString("PerformancePreferencePage.autoCheckField"), //$NON-NLS-1$
        getFieldEditorParent());
        addField(autoCheckField);
        final IntegerFieldEditor autoCheckTime = new IntegerFieldEditor(ITalendCorePrefConstants.SVN_UPDATE_INFO_AUTO_CHECK_TIME_INTERVAL, //$NON-NLS-1$
        Messages.getString("PerformancePreferencePage.autoCheckTime"), getFieldEditorParent());
        autoCheckTime.setValidRange(1, 30);
        autoCheckTime.setEnabled(getPreferenceStore().getBoolean(ITalendCorePrefConstants.SVN_UPDATE_INFO_AUTO_CHECK), getFieldEditorParent());
        addField(autoCheckTime);
        autoCheckField.getButton().addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                if (autoCheckField.getButton().getSelection()) {
                    autoCheckTime.setEnabled(true, getFieldEditorParent());
                } else {
                    autoCheckTime.setEnabled(false, getFieldEditorParent());
                }
            }
        });
        final CheckBoxFieldEditor autoRefreshLocksField = new CheckBoxFieldEditor(ITalendCorePrefConstants.AUTO_REFRESH_LOCKS, Messages.getString("PerformancePreferencePage.autoRefreshLocksField"), //$NON-NLS-1$
        getFieldEditorParent());
        addField(autoRefreshLocksField);
        final IntegerFieldEditor tacConnectionTimeout = new IntegerFieldEditor(ITalendCorePrefConstants.PERFORMANCE_TAC_CONNECTION_TIMEOUT, //$NON-NLS-1$
        Messages.getString("PerformancePreferencePage.tacTimeout"), getFieldEditorParent());
        autoCheckTime.setValidRange(0, 3600);
        addField(tacConnectionTimeout);
    }
}
Also used : SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) SelectionEvent(org.eclipse.swt.events.SelectionEvent) IntegerFieldEditor(org.eclipse.jface.preference.IntegerFieldEditor) CheckBoxFieldEditor(org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor)

Example 5 with CheckBoxFieldEditor

use of org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor in project tdi-studio-se by Talend.

the class SpagicPreferencePage method createFieldEditors.

/*
     * @Override protected IPreferenceStore doGetPreferenceStore() { // SpagoPreferenceStore preferenceStore = new
     * SpagoPreferenceStore(ProxyRepositoryFactory.getInstance()); // try { // preferenceStore.load(); // } catch
     * (PersistenceException e) { // String detailError = e.getMessage(); // new ErrorDialogWidthDetailArea(new Shell(),
     * RepositoryPlugin.PLUGIN_ID, Messages // .getString("CommonWizard.persistenceException"), detailError);
     * //$NON-NLS-1$ // log.error(Messages.getString("CommonWizard.persistenceException") + "\n" + detailError);
     * //$NON-NLS-1$ // //$NON-NLS-2$ // } // return preferenceStore; return
     * Activator.getDefault().getPreferenceStore(); }
     */
@Override
protected void createFieldEditors() {
    parent = getFieldEditorParent();
    spagicCheckButton = new CheckBoxFieldEditor(SpagicPreferenceInitializer.SPAGIC_STATUS, "Enable/Disable Deploy on Spagic", //$NON-NLS-1$
    parent);
    //$NON-NLS-1$
    editor = new SpagicServerEditor(SpagoBiServer.SPAGOBI_SERVER, "Spagic server", parent);
    addField(editor);
    updateEnableStateFromPreferences();
    SelectionListener listener = new SelectionListener() {

        public void widgetDefaultSelected(SelectionEvent e) {
        }

        public void widgetSelected(SelectionEvent e) {
            IPreferenceStore preferenceStore = getPreferenceStore();
            preferenceStore.setValue(SpagicPreferenceInitializer.SPAGIC_STATUS, ((Button) e.getSource()).getSelection());
            updateEnableStateFromDisplay();
        }
    };
    spagicCheckButton.getButton().addSelectionListener(listener);
// disable the spagic feature
// spagicCheckButton.setEnabled(false, parent);
}
Also used : SelectionEvent(org.eclipse.swt.events.SelectionEvent) CheckBoxFieldEditor(org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) SelectionListener(org.eclipse.swt.events.SelectionListener)

Aggregations

CheckBoxFieldEditor (org.talend.commons.ui.swt.preferences.CheckBoxFieldEditor)11 SelectionEvent (org.eclipse.swt.events.SelectionEvent)4 IntegerFieldEditor (org.eclipse.jface.preference.IntegerFieldEditor)3 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)2 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2 SelectionListener (org.eclipse.swt.events.SelectionListener)2 BooleanFieldEditor (org.eclipse.jface.preference.BooleanFieldEditor)1 GridData (org.eclipse.swt.layout.GridData)1 Composite (org.eclipse.swt.widgets.Composite)1 Label (org.eclipse.swt.widgets.Label)1 Text (org.eclipse.swt.widgets.Text)1 LabelFieldEditor (org.talend.commons.ui.swt.advanced.dataeditor.LabelFieldEditor)1 IBrandingService (org.talend.core.ui.branding.IBrandingService)1