Revision 46260bb5
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
48 | 48 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
49 | 49 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
50 | 50 |
import org.eclipse.jface.action.IStatusLineManager; |
51 |
import org.eclipse.jface.resource.FontRegistry; |
|
52 | 51 |
import org.eclipse.jface.viewers.IStructuredSelection; |
53 | 52 |
import org.eclipse.jface.viewers.SelectionChangedEvent; |
54 | 53 |
import org.eclipse.swt.graphics.Color; |
... | ... | |
128 | 127 |
return themeManager.getCurrentTheme(); |
129 | 128 |
} |
130 | 129 |
|
131 |
/** |
|
132 |
* Fonts registered to the plugin may be obtained with the Eclipse themeing |
|
133 |
* functionality. Thus fonts are chooseable by the user via |
|
134 |
* Preferences->General->Appearance->Colors and Fonts |
|
135 |
* |
|
136 |
* @return the FontRegistry for the current theme |
|
137 |
*/ |
|
138 |
public static FontRegistry getFontRegistry() { |
|
139 |
return getCurrentTheme().getFontRegistry(); |
|
140 |
} |
|
141 |
|
|
142 | 130 |
public static Font getFont(String symbolicName) { |
143 |
return getFontRegistry().get(symbolicName);
|
|
131 |
return FontResources.getFont(symbolicName);
|
|
144 | 132 |
} |
145 | 133 |
|
146 | 134 |
public static Color getColor(String symbolicName) { |
Also available in: Unified diff
ref #7044 Migrate font theme