1 /******************************************************************************* 2 * Copyright (c) 2000, 2015 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.jface.preference; 15 16 /** 17 * 18 * JFacePreferences is a class used to administer the preferences used by JFace 19 * objects. 20 */ 21 public final class JFacePreferences { 22 23 /** 24 * Identifier for the Error Color 25 */ 26 public static final String ERROR_COLOR = "ERROR_COLOR"; //$NON-NLS-1$ 27 28 /** 29 * Identifier for the Hyperlink Color 30 */ 31 public static final String HYPERLINK_COLOR = "HYPERLINK_COLOR"; //$NON-NLS-1$ 32 33 /** 34 * Identifier for the Active Hyperlink Colour 35 */ 36 public static final String ACTIVE_HYPERLINK_COLOR = "ACTIVE_HYPERLINK_COLOR"; //$NON-NLS-1$ 37 38 /** 39 * Identifier for the color used to show extra informations in labels, as a 40 * qualified name. For example in 'Foo.txt - myproject/bar', the qualifier 41 * is '- myproject/bar'. 42 * 43 * @since 3.4 44 */ 45 public static final String QUALIFIER_COLOR = "QUALIFIER_COLOR"; //$NON-NLS-1$ 46 47 /** 48 * Identifier for the color used to show label decorations For example in 49 * 'Foo.txt [1.16]', the decoration is '[1.16]'. 50 * 51 * @since 3.4 52 */ 53 public static final String DECORATIONS_COLOR = "DECORATIONS_COLOR"; //$NON-NLS-1$ 54 55 /** 56 * Identifier for the color used to counter informations For example in 57 * 'Foo.txt (2 matches)', the counter information is '(2 matches)'. 58 * 59 * @since 3.4 60 */ 61 public static final String COUNTER_COLOR = "COUNTER_COLOR"; //$NON-NLS-1$ 62 63 64 /** 65 * Identifier for the color used for the background of content assist 66 * popup dialogs. 67 * 68 * @since 3.4 69 */ 70 public static final String CONTENT_ASSIST_BACKGROUND_COLOR = "CONTENT_ASSIST_BACKGROUND_COLOR"; //$NON-NLS-1$ 71 72 /** 73 * Identifier for the color used for the foreground of content assist 74 * popup dialogs. 75 * 76 * @since 3.4 77 */ 78 public static final String CONTENT_ASSIST_FOREGROUND_COLOR = "CONTENT_ASSIST_FOREGROUND_COLOR"; //$NON-NLS-1$ 79 80 /** 81 * The color used for the background of controls that provide information 82 * for reading. E.g. Hover boxes with information like javadoc or view parts. 83 * 84 * @since 3.14 85 */ 86 public static final String INFORMATION_BACKGROUND_COLOR = "org.eclipse.ui.workbench.INFORMATION_BACKGROUND"; //$NON-NLS-1$ 87 88 /** 89 * The color used for text for controls that provide information for 90 * reading. E.g. Hover boxes with information like javadoc or view parts. 91 * 92 * @since 3.14 93 */ 94 public static final String INFORMATION_FOREGROUND_COLOR = "org.eclipse.ui.workbench.INFORMATION_FOREGROUND"; //$NON-NLS-1$ 95 96 /** 97 * The color used for the background of the newest revision when revisions are 98 * shown in a ruler. Together with {@link #REVISION_OLDEST_COLOR} a gradient is 99 * defined. 100 * 101 * @since 3.19 102 */ 103 public static final String REVISION_NEWEST_COLOR = "org.eclipse.jface.REVISION_NEWEST_COLOR"; //$NON-NLS-1$ 104 105 /** 106 * The color used for the background of the oldest revision when revisions are 107 * shown in a ruler. Together with {@link #REVISION_NEWEST_COLOR} a gradient is 108 * defined. 109 * 110 * @since 3.19 111 */ 112 public static final String REVISION_OLDEST_COLOR = "org.eclipse.jface.REVISION_OLDEST_COLOR"; //$NON-NLS-1$ 113 114 private static IPreferenceStore preferenceStore; 115 116 /** 117 * Prevent construction. 118 */ JFacePreferences()119 private JFacePreferences() { 120 } 121 122 /** 123 * Return the preference store for the receiver. 124 * 125 * @return IPreferenceStore or null 126 */ getPreferenceStore()127 public static IPreferenceStore getPreferenceStore() { 128 return preferenceStore; 129 } 130 131 /** 132 * Set the preference store for the receiver. 133 * 134 * @param store 135 * IPreferenceStore 136 */ setPreferenceStore(IPreferenceStore store)137 public static void setPreferenceStore(IPreferenceStore store) { 138 preferenceStore = store; 139 } 140 141 } 142