1 /**********************************************************************
2 * Copyright (c) 2005, 2014 IBM Corporation, Ericsson
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 * IBM - Initial API and implementation
10 * Bernd Hufmann - Updated for TMF
11 **********************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.ui
.views
.uml2sd
.drawings
.impl
;
15 import org
.eclipse
.swt
.graphics
.Font
;
16 import org
.eclipse
.swt
.graphics
.FontData
;
17 import org
.eclipse
.swt
.widgets
.Display
;
18 import org
.eclipse
.tracecompass
.tmf
.ui
.views
.uml2sd
.drawings
.IFont
;
21 * Default implementation of the IFont interface.
27 public class FontImpl
implements IFont
{
29 // ------------------------------------------------------------------------
31 // ------------------------------------------------------------------------
36 private final Font fFont
;
38 * Flag to indicate that this object is managing the resource.
40 protected boolean fManageFont
= true;
42 // ------------------------------------------------------------------------
44 // ------------------------------------------------------------------------
46 * Default constructor.
48 * @param display The display to use
49 * @param data A font data
51 public FontImpl(Display display
, FontData data
) {
52 fFont
= new Font(display
, data
);
58 * @param value A font to copy.
60 protected FontImpl(Font value
) {
65 // ------------------------------------------------------------------------
67 // ------------------------------------------------------------------------
70 * Returns a font implementation based system font.
72 * @return a font implementation based system font.
74 public static FontImpl
getSystemFont() {
75 return new FontImpl(Display
.getDefault().getSystemFont());
79 public Object
getFont() {
84 public void dispose() {
This page took 0.034154 seconds and 6 git commands to generate.