org.eclipse.jface.preference.ColorFieldEditor Java Examples
The following examples show how to use
org.eclipse.jface.preference.ColorFieldEditor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ColoringPreferencePage.java From texlipse with Eclipse Public License 1.0 | 6 votes |
/** * Creates the property editing UI components of this page. */ protected void createFieldEditors() { adjustGridLayout(); addField(new ColorFieldEditor(ColorManager.DEFAULT, TexlipsePlugin.getResourceString("preferenceColorTextLabel"), getFieldEditorParent())); addField(new RadioGroupFieldEditor(ColorManager.DEFAULT_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent())); addField(new ColorFieldEditor(ColorManager.COMMAND, TexlipsePlugin.getResourceString("preferenceColorCommandLabel"), getFieldEditorParent())); addField(new RadioGroupFieldEditor(ColorManager.COMMAND_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent())); addField(new ColorFieldEditor(ColorManager.CURLY_BRACKETS, TexlipsePlugin.getResourceString("preferenceColorArgumentLabel"), getFieldEditorParent())); addField(new RadioGroupFieldEditor(ColorManager.CURLY_BRACKETS_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent())); addField(new ColorFieldEditor(ColorManager.SQUARE_BRACKETS, TexlipsePlugin.getResourceString("preferenceColorOptionalLabel"), getFieldEditorParent())); addField(new RadioGroupFieldEditor(ColorManager.SQUARE_BRACKETS_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent())); addField(new ColorFieldEditor(ColorManager.EQUATION, TexlipsePlugin.getResourceString("preferenceColorMathLabel"), getFieldEditorParent())); addField(new RadioGroupFieldEditor(ColorManager.EQUATION_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent())); addField(new ColorFieldEditor(ColorManager.COMMENT, TexlipsePlugin.getResourceString("preferenceColorCommentLabel"), getFieldEditorParent())); addField(new RadioGroupFieldEditor(ColorManager.COMMENT_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent())); addField(new ColorFieldEditor(ColorManager.TEX_NUMBER, TexlipsePlugin.getResourceString("preferenceColorNumberLabel"), getFieldEditorParent())); addField(new RadioGroupFieldEditor(ColorManager.TEX_NUMBER_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent())); addField(new ColorFieldEditor(ColorManager.TEX_SPECIAL, TexlipsePlugin.getResourceString("preferenceColorSpeLabel"), getFieldEditorParent())); addField(new RadioGroupFieldEditor(ColorManager.TEX_SPECIAL_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent())); addField(new ColorFieldEditor(ColorManager.VERBATIM, TexlipsePlugin.getResourceString("preferenceColorVerbatimLabel"), getFieldEditorParent())); addField(new RadioGroupFieldEditor(ColorManager.VERBATIM_STYLE, "", 3, RADIO_STYLE_STRING, getFieldEditorParent())); }
Example #2
Source File: AbstractToolsConsolePrefPage.java From goclipse with Eclipse Public License 1.0 | 6 votes |
@Override protected void createFieldEditors() { Composite parent = getFieldEditorParent(); create_ActivateOnErrorMessagesField(parent); SWTFactoryUtil.createLabel(parent, SWT.LEFT, "Console color settings:", GridDataFactory.fillDefaults().span(2, 1).create()); addField(new ColorFieldEditor(INFO_COLOR.getActiveKey(), "Information text color:", parent)); addField(new ColorFieldEditor(STDOUT_COLOR.getActiveKey(), "Program standard output text color:", parent)); addField(new ColorFieldEditor(STDERR_COLOR.getActiveKey(), "Program error output text color:", parent)); addField(new ColorFieldEditor(BACKGROUND_COLOR.getActiveKey(), "Console background color:", parent)); }
Example #3
Source File: PydevVerticalIndentGuidePreferencesPage.java From Pydev with Eclipse Public License 1.0 | 6 votes |
@Override protected void createFieldEditors() { Composite p = getFieldEditorParent(); showVerticalindentGuideFieldEditor = new BooleanFieldEditor(PyDevEditorPreferences.USE_VERTICAL_INDENT_GUIDE, "Show vertical indent guide?", p); addField(showVerticalindentGuideFieldEditor); useEditorForegroundAsColorFieldEditor = new BooleanFieldEditor( PyDevEditorPreferences.USE_VERTICAL_INDENT_COLOR_EDITOR_FOREGROUND, "Use the editor foreground as the color?", p); addField(useEditorForegroundAsColorFieldEditor); selectionColorFieldEditor = new ColorFieldEditor(PyDevEditorPreferences.VERTICAL_INDENT_COLOR, "Vertical indent guide color.", p); addField(selectionColorFieldEditor); transparencyFieldEditor = new IntegerFieldEditor(PyDevEditorPreferences.VERTICAL_INDENT_TRANSPARENCY, "Vertical indent guide transparency\n(0 = transparent, 255 = opaque).", p); transparencyFieldEditor.setValidRange(0, 255); addField(transparencyFieldEditor); updateInitialState(); }
Example #4
Source File: ColorPreferencesPage.java From depan with Apache License 2.0 | 6 votes |
@Override protected void createFieldEditors() { Composite parent = getFieldEditorParent(); ColorFieldEditor builtin = new ColorFieldEditor( ColorPreferencesIds.COLOR_BUILTIN, "Built-ins", parent); ColorFieldEditor jsclass = new ColorFieldEditor( ColorPreferencesIds.COLOR_CLASS, "Classes", parent); ColorFieldEditor jsenum = new ColorFieldEditor( ColorPreferencesIds.COLOR_ENUM, "Enums", parent); ColorFieldEditor field= new ColorFieldEditor( ColorPreferencesIds.COLOR_FIELD, "Fields", parent); ColorFieldEditor function = new ColorFieldEditor( ColorPreferencesIds.COLOR_FUNCTION, "Functions", parent); ColorFieldEditor variable = new ColorFieldEditor( ColorPreferencesIds.COLOR_VARIABLE, "Variables", parent); addField(builtin); addField(jsclass); addField(jsenum); addField(field); addField(function); addField(variable); }
Example #5
Source File: ColorPreferencesPage.java From depan with Apache License 2.0 | 6 votes |
@Override protected void createFieldEditors() { Composite parent = getFieldEditorParent(); ColorFieldEditor type = new ColorFieldEditor( ColorPreferencesIds.COLOR_CLASS, "Class", parent); ColorFieldEditor classMethod = new ColorFieldEditor( ColorPreferencesIds.COLOR_CLASS_METHOD, "Class Methods", parent); ColorFieldEditor instanceMethod = new ColorFieldEditor( ColorPreferencesIds.COLOR_CLASS_METHOD, "Instance Methods", parent); ColorFieldEditor singletonMethod = new ColorFieldEditor( ColorPreferencesIds.COLOR_CLASS_METHOD, "Singleton Methods", parent); addField(type); addField(classMethod); addField(instanceMethod); addField(singletonMethod); }
Example #6
Source File: SimulationPreferencePage.java From statecharts with Eclipse Public License 1.0 | 6 votes |
public void createFieldEditors() { addField(new ColorFieldEditor( SimulationPreferenceConstants.STATE_FOREGROUND_HIGHLIGHTING_COLOR, "&State highlighting foreground color:", getFieldEditorParent())); addField(new ColorFieldEditor( SimulationPreferenceConstants.STATE_BACKGROUND_HIGHLIGHTING_COLOR, "&State highlighting background color:", getFieldEditorParent())); addField(new ColorFieldEditor( SimulationPreferenceConstants.VERTEX_FOREGROUND_TRANSIENT_COLOR, "&Vertex transient foreground color:", getFieldEditorParent())); addField(new ColorFieldEditor( SimulationPreferenceConstants.VERTEX_BACKGROUND_TRANSIENT_COLOR, "&Vertex transient background color:", getFieldEditorParent())); addField(new ColorFieldEditor( SimulationPreferenceConstants.TRANSITION_HIGHLIGHTING_COLOR, "&Transition highlighting color", getFieldEditorParent())); }
Example #7
Source File: StatechartAppearancePreferencePage.java From statecharts with Eclipse Public License 1.0 | 6 votes |
protected void createColorsLineStyleFontEditors(Composite main) { Composite composite = createGroupComposite(main, "Colors, line style, and font"); // Colors: addField(new ColorFieldEditor(StatechartPreferenceConstants.PREF_REGION_BACKGROUND, "Region background color:", composite)); addField(new ColorFieldEditor(StatechartPreferenceConstants.PREF_REGION_LINE, "Region line color:", composite)); addField(new ColorFieldEditor(StatechartPreferenceConstants.PREF_STATE_BACKGROUND, "State background color:", composite)); addField(new ColorFieldEditor(StatechartPreferenceConstants.PREF_STATE_LINE, "State line color:", composite)); // Line style: ComboFieldEditor lineStyleFieldEditor = new ComboFieldEditor(IPreferenceConstants.PREF_LINE_STYLE, "Routing style:", composite, ComboFieldEditor.INT_TYPE, false, 0, 0, true); Combo lineStyleCombo = lineStyleFieldEditor.getComboControl(); GridData gridData = new GridData(); gridData.horizontalSpan = 2; lineStyleCombo.setLayoutData(gridData); addField(lineStyleFieldEditor); lineStyleCombo.add(DiagramUIMessages.ConnectionsPreferencePage_ConnectionView_Manual_text); lineStyleCombo.add(DiagramUIMessages.ConnectionsPreferencePage_ConnectionView_Rectilinear_text); // Font: FontFieldEditor editor = new FontFieldEditor(IPreferenceConstants.PREF_DEFAULT_FONT, "Font: ", composite); addField(editor); }
Example #8
Source File: ColorPreferencesPage.java From depan with Apache License 2.0 | 5 votes |
@Override protected void createFieldEditors() { Composite parent = getFieldEditorParent(); ColorFieldEditor artifact = new ColorFieldEditor( ColorPreferencesIds.COLOR_ARTIFACT, "Artifacts", parent); ColorFieldEditor property = new ColorFieldEditor( ColorPreferencesIds.COLOR_PROPERTY, "Properties", parent); addField(artifact); addField(property); }
Example #9
Source File: ColorPreferencesPage.java From depan with Apache License 2.0 | 5 votes |
@Override protected void createFieldEditors() { Composite parent = getFieldEditorParent(); ColorFieldEditor background = new ColorFieldEditor( ColorPreferencesIds.COLOR_BACKGROUND, "Background", parent); ColorFieldEditor foreground = new ColorFieldEditor( ColorPreferencesIds.COLOR_FOREGROUND, "Text color", parent); addField(background); addField(foreground); }
Example #10
Source File: ColorPreferencesPage.java From depan with Apache License 2.0 | 5 votes |
@Override protected void createFieldEditors() { Composite parent = getFieldEditorParent(); ColorFieldEditor artifact = new ColorFieldEditor( ColorPreferencesIds.COLOR_DIRECTORY, "Directories", parent); ColorFieldEditor property = new ColorFieldEditor( ColorPreferencesIds.COLOR_FILE, "Files", parent); addField(artifact); addField(property); }
Example #11
Source File: ColorPreferencesPage.java From depan with Apache License 2.0 | 5 votes |
@Override protected void createFieldEditors() { Composite parent = getFieldEditorParent(); ColorFieldEditor type = new ColorFieldEditor( ColorPreferencesIds.COLOR_TYPE, "Types", parent); ColorFieldEditor method = new ColorFieldEditor( ColorPreferencesIds.COLOR_METHOD, "Methods", parent); ColorFieldEditor field = new ColorFieldEditor( ColorPreferencesIds.COLOR_FIELD, "Fields", parent); ColorFieldEditor interfac = new ColorFieldEditor( ColorPreferencesIds.COLOR_INTERFACE, "Interfaces", parent); ColorFieldEditor pkge = new ColorFieldEditor( ColorPreferencesIds.COLOR_PACKAGE, "Packages", parent); ColorFieldEditor source = new ColorFieldEditor( ColorPreferencesIds.COLOR_SOURCE, "Source files", parent); ColorFieldEditor directory = new ColorFieldEditor( ColorPreferencesIds.COLOR_DIRECTORY, "Directories", parent); addField(type); addField(method); addField(field); addField(interfac); addField(pkge); addField(source); addField(directory); }
Example #12
Source File: ColorPredicatePreferencePage.java From tlaplus with MIT License | 5 votes |
/** * 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. */ protected void createFieldEditors() { for (int i = 1; i <= NUM_STATUS_COLORS; i++) { addField(new ColorFieldEditor(getMainColorPrefName(i), "Color " + i, getFieldEditorParent())); addField(new ComboFieldEditor(getColorPredPrefName(i), "Predicate", ColorPredicate.PREDEFINED_MACROS, getFieldEditorParent())); addField(new BooleanFieldEditor(getLeafSideBarPrefName(i), "Show Leaf Steps in Side Bar", getFieldEditorParent())); addField(new BooleanFieldEditor(getAppliesToLeafPrefName(i), "Applies to Leaf Steps Only", getFieldEditorParent())); } }
Example #13
Source File: ConsolePreferencesPage.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
/** * Creates a new color field editor. */ private ColorFieldEditor createColorFieldEditor(String preferenceName, String label, Composite parent) { ColorFieldEditor editor = new ColorFieldEditor(preferenceName, label, parent); editor.setPage(this); editor.setPreferenceStore(getPreferenceStore()); return editor; }
Example #14
Source File: SamplePage.java From e4Preferences with Eclipse Public License 1.0 | 5 votes |
@Override protected void createFieldEditors() { addField(new ComboFieldEditor("prefCombo", "A combo field", new String[][]{{"display1", "value1"},{"display2", "value2"}}, getFieldEditorParent())); addField(new ColorFieldEditor("prefColor", "Color for table items : ", getFieldEditorParent())); addField(new BooleanFieldEditor("prefBoolean", "A boolean : ", getFieldEditorParent())); addField(new StringFieldEditor("prefString", "A string : ", getFieldEditorParent())); }
Example #15
Source File: SamplePageWithProvider.java From e4Preferences with Eclipse Public License 1.0 | 5 votes |
@Override protected void createFieldEditors() { addField(new ComboFieldEditor("prefCombo", "A combo field", new String[][]{{"display1", "value1"},{"display2", "value2"}}, getFieldEditorParent())); addField(new ColorFieldEditor("prefColor", "Color for table items : ", getFieldEditorParent())); addField(new BooleanFieldEditor("prefBoolean", "A boolean : ", getFieldEditorParent())); addField(new StringFieldEditor("prefString", "A string : ", getFieldEditorParent())); }
Example #16
Source File: MinimapOverviewRulerPreferencesPage.java From Pydev with Eclipse Public License 1.0 | 5 votes |
@Override protected void createFieldEditors() { Composite p = getFieldEditorParent(); BooleanFieldEditor useMinimap = new BooleanFieldEditor(USE_MINIMAP, "Show minimap? (applied on editor restart)", p); addField(useMinimap); BooleanFieldEditor showScrollbar = new BooleanFieldEditor(SHOW_VERTICAL_SCROLLBAR, "Show vertical scrollbar? (applied on editor restart)", p); addField(showScrollbar); BooleanFieldEditor showHorizontalScrollbar = new BooleanFieldEditor(SHOW_HORIZONTAL_SCROLLBAR, "Show horizontal scrollbar? (applied on editor restart)", p); addField(showHorizontalScrollbar); BooleanFieldEditor showContents = new BooleanFieldEditor(SHOW_MINIMAP_CONTENTS, "Show overview items in overview ruler? (applied on text change)", p); addField(showContents); IntegerFieldEditor minimapWidth = new IntegerFieldEditor(MINIMAP_WIDTH, "Minimap Width: (applied on editor resize)", p); addField(minimapWidth); ColorFieldEditor selectionColor = new ColorFieldEditor(MINIMAP_SELECTION_COLOR, "Selection color", p); addField(selectionColor); }
Example #17
Source File: BibColoringPreferencePage.java From texlipse with Eclipse Public License 1.0 | 5 votes |
/** * Creates the property editing UI components of this page. */ protected void createFieldEditors() { addField(new ColorFieldEditor(BibColorProvider.DEFAULT, TexlipsePlugin.getResourceString("preferenceBibColorTextLabel"), getFieldEditorParent())); addField(new ColorFieldEditor(BibColorProvider.TYPE, TexlipsePlugin.getResourceString("preferenceBibColorTypeLabel"), getFieldEditorParent())); addField(new ColorFieldEditor(BibColorProvider.KEYWORD, TexlipsePlugin.getResourceString("preferenceBibColorKeywordLabel"), getFieldEditorParent())); addField(new ColorFieldEditor(BibColorProvider.STRING, TexlipsePlugin.getResourceString("preferenceBibColorStringLabel"), getFieldEditorParent())); // addField(new ColorFieldEditor(BibColorProvider.MULTI_LINE_COMMENT, TexlipsePlugin.getResourceString("preferenceBibColorMLCommentLabel"), getFieldEditorParent())); addField(new ColorFieldEditor(BibColorProvider.SINGLE_LINE_COMMENT, TexlipsePlugin.getResourceString("preferenceBibColorCommentLabel"), getFieldEditorParent())); }
Example #18
Source File: LogViewerPreferences.java From LogViewer with Eclipse Public License 2.0 | 4 votes |
private void createColorChooser(Composite composite) { colorFieldEditor = new ColorFieldEditor(ILogViewerConstants.PREF_CURSORLINE_COLOR,LogViewerPlugin.getResourceString("preferences.contenteditor.cursorline.color.chooser.text"),composite); //$NON-NLS-1$ colorFieldEditor.setPreferenceStore(doGetPreferenceStore()); colorFieldEditor.setPage(this); colorFieldEditor.load(); }
Example #19
Source File: SDViewerPage.java From tracecompass with Eclipse Public License 2.0 | 4 votes |
@Override protected Control createContents(Composite parent) { GridLayout gl = new GridLayout(); gl.marginHeight = 0; gl.marginWidth = 0; parent.setLayout(gl); Composite page = new Composite(parent, SWT.NONE); GridLayout pageLayout = new GridLayout(); pageLayout.numColumns = 2; GridData pageLayoutdata = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_FILL); page.setLayoutData(pageLayoutdata); page.setLayout(pageLayout); fTooltip = new BooleanFieldEditor(ISDPreferences.PREF_TOOLTIP, Messages.SequenceDiagram_ShowTooltips, page); fTooltip.setPreferenceStore(fPreferences.getPreferenceStore()); fTooltip.load(); // link font with zoom pref fLink = new BooleanFieldEditor(ISDPreferences.PREF_LINK_FONT, Messages.SequenceDiagram_IncreaseFontSizeWhenZooming, page); fLink.setPreferenceStore(fPreferences.getPreferenceStore()); fLink.load(); fNoExternalTime = new BooleanFieldEditor(ISDPreferences.PREF_EXCLUDE_EXTERNAL_TIME, Messages.SequenceDiagram_ExcludeExternalTime, page); fNoExternalTime.setPreferenceStore(fPreferences.getPreferenceStore()); fNoExternalTime.load(); // use gradient color pref fUseGrad = new BooleanFieldEditor(ISDPreferences.PREF_USE_GRADIENT, Messages.SequenceDiagram_UseGradientColor, page); fUseGrad.setPreferenceStore(fPreferences.getPreferenceStore()); fUseGrad.load(); Label separator = new Label(page, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_NONE); GridData sepData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL); separator.setLayoutData(sepData); Composite prefPage = new Composite(page, SWT.NONE); GridLayout prefPageLayout = new GridLayout(); prefPage.setLayoutData(pageLayoutdata); prefPageLayout.numColumns = 1; prefPage.setLayout(prefPageLayout); // swimLane width pref fLifelineWidth = new IntegerFieldEditor(ISDPreferences.PREF_LIFELINE_WIDTH, Messages.SequenceDiagram_LifelineWidth, prefPage); fLifelineWidth.setPreferenceStore(fPreferences.getPreferenceStore()); fLifelineWidth.setValidRange(119, 500); fLifelineWidth.load(); // not very nice new Label(prefPage, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_NONE); new Label(prefPage, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_NONE); // Font list pref fClassItemList = new List(prefPage, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); GridData tabItemLayoutdata = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_FILL); fClassItemList.setLayoutData(tabItemLayoutdata); String[] fontList2 = SDViewPref.getFontList2(); for (int i = 0; i < fontList2.length; i++) { fClassItemList.add(fontList2[i]); } fClassItemList.setSelection(0); fClassItemList.addSelectionListener(this); fButtonArea = new Composite(prefPage, SWT.NONE); GridData tabItemLayoutdata2 = new GridData(GridData.HORIZONTAL_ALIGN_FILL/* |GridData.GRAB_HORIZONTAL */| GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_FILL); fButtonArea.setLayoutData(tabItemLayoutdata2); GridLayout buttonAreaLayout = new GridLayout(); buttonAreaLayout.numColumns = 1; fButtonArea.setLayout(buttonAreaLayout); // font selector initialise for the lifeline font pref String[] fontList = SDViewPref.getFontList(); fFont = new FontFieldEditor(fontList[0], "",//$NON-NLS-1$ Messages.SequenceDiagram_AaBbYyZz, fButtonArea); fFont.getPreviewControl().setSize(500, 500); fFont.setPreferenceStore(fPreferences.getPreferenceStore()); fFont.load(); fBackGroundColor = new ColorFieldEditor(fontList[0] + SDViewPref.BACK_COLOR_POSTFIX, Messages.SequenceDiagram_Background, fButtonArea); fBackGroundColor.setPreferenceStore(fPreferences.getPreferenceStore()); fBackGroundColor.load(); fLineColor = new ColorFieldEditor(fontList[0] + SDViewPref.FORE_COLOR_POSTFIX, Messages.SequenceDiagram_Lines, fButtonArea); fLineColor.setPreferenceStore(fPreferences.getPreferenceStore()); fLineColor.load(); fTextColor = new ColorFieldEditor(fontList[0] + SDViewPref.TEXT_COLOR_POSTFIX, Messages.SequenceDiagram_Text, fButtonArea); fTextColor.setPreferenceStore(fPreferences.getPreferenceStore()); fTextColor.load(); swapPref(true); Dialog.applyDialogFont(page); return page; }
Example #20
Source File: IndentGuidePreferencePage.java From xds-ide with Eclipse Public License 1.0 | 4 votes |
@Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout(1, true)); enabled = new Button(composite, SWT.CHECK); enabled.setText(Messages.IndentGuidePreferencePage_EnableIndentGuide); enabled.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); enableControls(enabled.getSelection()); } }); Group group = new Group(composite, SWT.NONE); group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false)); group.setLayout(new GridLayout(1, true)); group.setText(Messages.IndentGuidePreferencePage_LineAttributes); attributes = new Composite(group, SWT.NONE); GridData gridData = new GridData(SWT.FILL, SWT.BEGINNING, true, false); gridData.horizontalIndent = 5; attributes.setLayoutData(gridData); attributes.setLayout(new GridLayout(2, false)); new Label(attributes, SWT.NONE) .setText(Messages.IndentGuidePreferencePage_Alpha_0_255 + ':'); lineAlpha = new Spinner(attributes, SWT.BORDER); lineAlpha.setMinimum(0); lineAlpha.setMaximum(255); new Label(attributes, SWT.NONE) .setText(Messages.IndentGuidePreferencePage_Style + ':'); lineStyle = new Combo(attributes, SWT.READ_ONLY); lineStyle.setItems(styles); new Label(attributes, SWT.NONE) .setText(Messages.IndentGuidePreferencePage_Width_1_8 + ':'); lineWidth = new Spinner(attributes, SWT.BORDER); lineWidth.setMinimum(1); lineWidth.setMaximum(8); new Label(attributes, SWT.NONE) .setText(Messages.IndentGuidePreferencePage_Shift_1_8 + ':'); lineShift = new Spinner(attributes, SWT.BORDER); lineShift.setMinimum(0); lineShift.setMaximum(8); colorFieldEditor = new ColorFieldEditor(PreferenceConstants.LINE_COLOR, Messages.IndentGuidePreferencePage_Color + ':', attributes); colorFieldEditor.setPreferenceStore(getPreferenceStore()); loadPreferences(); return composite; }
Example #21
Source File: InteractiveConsolePrefs.java From Pydev with Eclipse Public License 1.0 | 4 votes |
@Override protected void createFieldEditors() { Composite p = getFieldEditorParent(); addField(new ColorFieldEditor(PydevConsoleConstants.CONSOLE_OUTPUT_COLOR, "Stdout color", p)); addField(new ColorFieldEditor(PydevConsoleConstants.CONSOLE_ERROR_COLOR, "Stderr color", p)); addField(new ColorFieldEditor(PydevConsoleConstants.CONSOLE_INPUT_COLOR, "Stdin color", p)); addField(new ColorFieldEditor(PydevConsoleConstants.CONSOLE_PROMPT_COLOR, "Prompt color", p)); addField(new ColorFieldEditor(PydevConsoleConstants.CONSOLE_BACKGROUND_COLOR, "Background color", p)); addField(new ColorFieldEditor(PydevConsoleConstants.DEBUG_CONSOLE_BACKGROUND_COLOR, "Debug console background color", p)); addField(new StringFieldEditor(PydevConsoleConstants.INTERACTIVE_CONSOLE_VM_ARGS, "Vm Args for jython\n(used only on external\nprocess option):", p)); addField(new StringFieldEditor(PydevConsoleConstants.INTERACTIVE_CONSOLE_ENCODING, "Encoding for interactive console:", p)); addField(new IntegerFieldEditor(PydevConsoleConstants.INTERACTIVE_CONSOLE_MAXIMUM_CONNECTION_ATTEMPTS, "Maximum connection attempts\nfor initial communication:", p)); addField(new BooleanFieldEditor(PydevConsoleConstants.INTERACTIVE_CONSOLE_FOCUS_ON_CONSOLE_START, "Focus console when it's started?", BooleanFieldEditor.SEPARATE_LABEL, p)); addField(new BooleanFieldEditor(PydevConsoleConstants.INTERACTIVE_CONSOLE_TAB_COMPLETION, "Enable tab completion in interactive console?", BooleanFieldEditor.SEPARATE_LABEL, p)); addField(new IntegerFieldEditor( ScriptConsoleUIConstants.INTERACTIVE_CONSOLE_PERSISTENT_HISTORY_MAXIMUM_ENTRIES, "Maximum number of lines to\nstore in global history\n(0 for unlimited):", p) { // We are trying to set a preference that is in a different store, but logically lives within this UI @Override public IPreferenceStore getPreferenceStore() { return InteractiveConsolePlugin.getDefault().getPreferenceStore(); } }); addField(new BooleanFieldEditor( PydevConsoleConstants.INTERACTIVE_CONSOLE_SEND_INITIAL_COMMAND_WHEN_CREATED_FROM_EDITOR, "When creating console send\ncurrent selection/editor\ncontents for execution?", BooleanFieldEditor.SEPARATE_LABEL, p)); addField(new BooleanFieldEditor(PydevConsoleConstants.INTERACTIVE_CONSOLE_FOCUS_ON_SEND_COMMAND, "Focus console when an evaluate\ncommand is sent from the editor?", BooleanFieldEditor.SEPARATE_LABEL, p)); addField(new BooleanFieldEditor(PydevConsoleConstants.INTERACTIVE_CONSOLE_CONNECT_DEBUG_SESSION, "Connect console to a Debug Session?", BooleanFieldEditor.SEPARATE_LABEL, p)); addField(new ComboFieldEditor(PydevConsoleConstants.INTERACTIVE_CONSOLE_ENABLE_GUI_ON_STARTUP, "Enable GUI event loop integration?", PydevConsoleConstants.ENTRIES_VALUES_INTERACTIVE_CONSOLE_ENABLE_GUI_ON_STARTUP, p)); }