0c2dac1326650f5d07b53cb9a830103203965fc0
1 /**********************************************************************
2 * Copyright (c) 2005, 2008 IBM Corporation and others.
3 * Copyright (c) 2011, 2012 Ericsson.
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * which accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
11 * IBM - Initial API and implementation
12 * Bernd Hufmann - Updated for TMF
13 **********************************************************************/
14 package org
.eclipse
.linuxtools
.tmf
.ui
.views
.uml2sd
.drawings
.impl
;
16 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.uml2sd
.drawings
.IFont
;
17 import org
.eclipse
.swt
.graphics
.Font
;
18 import org
.eclipse
.swt
.graphics
.FontData
;
19 import org
.eclipse
.swt
.widgets
.Display
;
22 * Default implementation of the IFont interface.
28 public class FontImpl
implements IFont
{
30 // ------------------------------------------------------------------------
32 // ------------------------------------------------------------------------
37 protected Font font
= null;
39 * Flag to indicate that this object is managing the resource.
41 protected boolean manageFont
= true;
43 // ------------------------------------------------------------------------
45 // ------------------------------------------------------------------------
47 * Default constructor.
49 * @param display The display to use
50 * @param data A font data
52 public FontImpl(Display display
, FontData data
) {
53 font
= new Font(display
, data
);
59 * @param value A font to copy.
61 protected FontImpl(Font value
) {
66 // ------------------------------------------------------------------------
68 // ------------------------------------------------------------------------
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());
80 * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IFont#getFont()
83 public Object
getFont() {
89 * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IFont#dispose()
92 public void dispose() {
This page took 0.031627 seconds and 5 git commands to generate.