1 /*******************************************************************************
2 * Copyright (c) 2010 SAP AG.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Mathias Kinzler (SAP AG) - initial implementation
10 *******************************************************************************/
11 package org
.eclipse
.egit
.ui
;
13 import org
.eclipse
.jface
.resource
.FontRegistry
;
14 import org
.eclipse
.swt
.graphics
.Font
;
15 import org
.eclipse
.ui
.PlatformUI
;
18 * Some utilities for UI code
20 public class UIUtils
{
23 * @param id see {@link FontRegistry#get(String)}
26 public static Font
getFont(final String id
) {
27 return PlatformUI
.getWorkbench().getThemeManager().getCurrentTheme()
28 .getFontRegistry().get(id
);
32 * @param id see {@link FontRegistry#getBold(String)}
35 public static Font
getBoldFont(final String id
) {
36 return PlatformUI
.getWorkbench().getThemeManager().getCurrentTheme()
37 .getFontRegistry().getBold(id
);