1 /**********************************************************************
2 * Copyright (c) 2005, 2012 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
.linuxtools
.tmf
.ui
.views
.uml2sd
.drawings
.impl
;
15 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.uml2sd
.drawings
.IFont
;
16 import org
.eclipse
.swt
.graphics
.Font
;
17 import org
.eclipse
.swt
.graphics
.FontData
;
18 import org
.eclipse
.swt
.widgets
.Display
;
21 * Default implementation of the IFont interface.
27 public class FontImpl
implements IFont
{
29 // ------------------------------------------------------------------------
31 // ------------------------------------------------------------------------
36 protected Font fFont
= null;
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 // ------------------------------------------------------------------------
69 * Returns a font implementation based system font.
71 * @return a font implementation based system font.
73 public static FontImpl
getSystemFont() {
74 return new FontImpl(Display
.getDefault().getSystemFont());
79 * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IFont#getFont()
82 public Object
getFont() {
88 * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IFont#dispose()
91 public void dispose() {
This page took 0.049954 seconds and 5 git commands to generate.