Search in sources :

Example 6 with ColorFieldEditor

use of org.eclipse.jface.preference.ColorFieldEditor in project tdi-studio-se by Talend.

the class DesignerColorsPreferencePage method createMRGroupFieldEditors.

private void createMRGroupFieldEditors(Composite parent) {
    Group mrGroup = new Group(parent, SWT.NULL);
    //$NON-NLS-1$
    mrGroup.setText(Messages.getString("DesignerPreferencePage.MRColorGroup"));
    mrGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    addField(new ColorFieldEditor(DesignerColorUtils.MRGROUP_COLOR_NAME, Messages.getString("DesignerPreferencePage.MRGroupColorLabel"), //$NON-NLS-1$
    mrGroup));
    GridLayout layout = new GridLayout(2, false);
    layout.marginLeft = 10;
    mrGroup.setLayout(layout);
}
Also used : Group(org.eclipse.swt.widgets.Group) GridLayout(org.eclipse.swt.layout.GridLayout) ColorFieldEditor(org.eclipse.jface.preference.ColorFieldEditor) GridData(org.eclipse.swt.layout.GridData)

Example 7 with ColorFieldEditor

use of org.eclipse.jface.preference.ColorFieldEditor in project tdi-studio-se by Talend.

the class DesignerColorsPreferencePage method createSubjobFieldEditors.

private void createSubjobFieldEditors(Composite parent) {
    Group subjobGroup = new Group(parent, SWT.NULL);
    //$NON-NLS-1$
    subjobGroup.setText(Messages.getString("DesignerPreferencePage.SubjobColorGroup"));
    subjobGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    addField(new ColorFieldEditor(DesignerColorUtils.SUBJOB_TITLE_COLOR_NAME, Messages.getString("DesignerPreferencePage.SubjobTitleColorLabel"), //$NON-NLS-1$
    subjobGroup));
    addField(new ColorFieldEditor(DesignerColorUtils.SUBJOB_COLOR_NAME, Messages.getString("DesignerPreferencePage.SubjobColorLabel"), //$NON-NLS-1$
    subjobGroup));
    GridLayout layout = new GridLayout(2, false);
    layout.marginLeft = 10;
    subjobGroup.setLayout(layout);
}
Also used : Group(org.eclipse.swt.widgets.Group) GridLayout(org.eclipse.swt.layout.GridLayout) ColorFieldEditor(org.eclipse.jface.preference.ColorFieldEditor) GridData(org.eclipse.swt.layout.GridData)

Example 8 with ColorFieldEditor

use of org.eclipse.jface.preference.ColorFieldEditor in project eclipse.platform.text by eclipse.

the class SearchPreferencePage method createFieldEditors.

@Override
protected void createFieldEditors() {
    addField(new BooleanFieldEditor(REUSE_EDITOR, SearchMessages.SearchPreferencePage_reuseEditor, getFieldEditorParent()));
    addField(new BooleanFieldEditor(BRING_VIEW_TO_FRONT, SearchMessages.SearchPreferencePage_bringToFront, getFieldEditorParent()));
    fIgnorePotentialMatchesCheckbox = new BooleanFieldEditor(IGNORE_POTENTIAL_MATCHES, SearchMessages.SearchPreferencePage_ignorePotentialMatches, getFieldEditorParent());
    addField(fIgnorePotentialMatchesCheckbox);
    fEmphasizedCheckbox = new BooleanFieldEditor(EMPHASIZE_POTENTIAL_MATCHES, SearchMessages.SearchPreferencePage_emphasizePotentialMatches, getFieldEditorParent());
    addField(fEmphasizedCheckbox);
    fColorEditor = new ColorFieldEditor(POTENTIAL_MATCH_FG_COLOR, SearchMessages.SearchPreferencePage_potentialMatchFgColor, getFieldEditorParent());
    addField(fColorEditor);
    fEmphasizedCheckbox.setEnabled(!arePotentialMatchesIgnored(), getFieldEditorParent());
    fColorEditor.setEnabled(!arePotentialMatchesIgnored() && arePotentialMatchesEmphasized(), getFieldEditorParent());
    handleDeletedPerspectives();
    String[][] perspectiveNamesAndIds = getPerspectiveNamesAndIds();
    ComboFieldEditor comboEditor = new ComboFieldEditor(DEFAULT_PERSPECTIVE, SearchMessages.SearchPreferencePage_defaultPerspective, perspectiveNamesAndIds, getFieldEditorParent());
    addField(comboEditor);
    // in case we have a contributed engine, let the user choose.
    TextSearchEngineRegistry reg = SearchPlugin.getDefault().getTextSearchEngineRegistry();
    String[][] engineNamesAndIds = reg.getAvailableEngines();
    if (engineNamesAndIds.length > 1) {
        comboEditor = new ComboFieldEditor(TEXT_SEARCH_ENGINE, SearchMessages.SearchPreferencePage_textSearchEngine, engineNamesAndIds, getFieldEditorParent());
        addField(comboEditor);
    }
}
Also used : ColorFieldEditor(org.eclipse.jface.preference.ColorFieldEditor) BooleanFieldEditor(org.eclipse.jface.preference.BooleanFieldEditor) ComboFieldEditor(org.eclipse.jface.preference.ComboFieldEditor) TextSearchEngineRegistry(org.eclipse.search.internal.core.text.TextSearchEngineRegistry)

Aggregations

ColorFieldEditor (org.eclipse.jface.preference.ColorFieldEditor)8 GridData (org.eclipse.swt.layout.GridData)6 GridLayout (org.eclipse.swt.layout.GridLayout)6 Group (org.eclipse.swt.widgets.Group)5 BooleanFieldEditor (org.eclipse.jface.preference.BooleanFieldEditor)2 Composite (org.eclipse.swt.widgets.Composite)2 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 ComboFieldEditor (org.eclipse.jface.preference.ComboFieldEditor)1 IPropertyChangeListener (org.eclipse.jface.util.IPropertyChangeListener)1 PropertyChangeEvent (org.eclipse.jface.util.PropertyChangeEvent)1 TextSearchEngineRegistry (org.eclipse.search.internal.core.text.TextSearchEngineRegistry)1 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 RGB (org.eclipse.swt.graphics.RGB)1 Button (org.eclipse.swt.widgets.Button)1 Combo (org.eclipse.swt.widgets.Combo)1 Label (org.eclipse.swt.widgets.Label)1 ChartComposite (org.jfree.experimental.chart.swt.ChartComposite)1 EConnectionType (org.talend.core.model.process.EConnectionType)1