~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to results/plugins/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/LabelFont.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*******************************************************************************
2
 
 * Copyright (c) 2007 Wind River Systems and others.
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
7
 
 * 
8
 
 * Contributors:
9
 
 *     Wind River Systems - initial API and implementation
10
 
 *******************************************************************************/
11
 
package org.eclipse.cdt.dsf.ui.viewmodel.properties;
12
 
 
13
 
import java.util.Map;
14
 
 
15
 
import org.eclipse.core.runtime.IStatus;
16
 
import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
17
 
import org.eclipse.jface.resource.JFaceResources;
18
 
import org.eclipse.swt.graphics.FontData;
19
 
 
20
 
/**
21
 
 * The font attribute of a label.
22
 
 * 
23
 
 * @see LabelAttribute
24
 
 * @see LabelColumnInfo
25
 
 * @see PropertiesBasedLabelProvider
26
 
 * 
27
 
 * @since 1.0
28
 
 */
29
 
public class LabelFont extends LabelAttribute {
30
 
    private static final FontData DEFAULT_FONT = JFaceResources.getDefaultFontDescriptor().getFontData()[0];
31
 
    
32
 
    /** 
33
 
     * The font data of this attribute.
34
 
     */
35
 
    private FontData fFontData;
36
 
 
37
 
    public LabelFont() {
38
 
        this(DEFAULT_FONT);
39
 
    }
40
 
 
41
 
    public LabelFont(FontData fontData) {
42
 
        fFontData = fontData;
43
 
    }
44
 
 
45
 
    public FontData getFontData() {
46
 
        return fFontData;
47
 
    }
48
 
 
49
 
    public void setFontData(FontData fontData) {
50
 
        fFontData = fontData;
51
 
    }
52
 
 
53
 
    @Override
54
 
    public void updateAttribute(ILabelUpdate update, int columnIndex, IStatus status, Map<String, Object> properties) {
55
 
        update.setFontData(getFontData(), columnIndex);
56
 
    }
57
 
 
58
 
}
 
 
b'\\ No newline at end of file'