Revision 83cb55ca
Added by Katja Luther almost 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/LabelElement.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.ui.element; |
11 | 11 |
|
12 |
import org.eclipse.jface.resource.FontDescriptor; |
|
12 | 13 |
import org.eclipse.swt.SWT; |
13 | 14 |
import org.eclipse.swt.graphics.Color; |
15 |
import org.eclipse.swt.graphics.Font; |
|
14 | 16 |
import org.eclipse.swt.widgets.Label; |
15 | 17 |
import org.eclipse.ui.forms.widgets.TableWrapData; |
16 | 18 |
|
... | ... | |
59 | 61 |
label.setLayoutData(layoutConstants); |
60 | 62 |
} |
61 | 63 |
|
64 |
|
|
65 |
|
|
62 | 66 |
public void setForeground(Color color){ |
63 | 67 |
label.setForeground(color); |
64 | 68 |
} |
... | ... | |
70 | 74 |
public boolean isDisposed(){ |
71 | 75 |
return label.isDisposed(); |
72 | 76 |
} |
77 |
|
|
78 |
public void setBold(){ |
|
79 |
FontDescriptor boldDescriptor = FontDescriptor.createFrom(label.getFont()).setStyle(SWT.BOLD); |
|
80 |
Font boldFont = boldDescriptor.createFont(label.getDisplay()); |
|
81 |
label.setFont( boldFont ); |
|
82 |
} |
|
73 | 83 |
} |
Also available in: Unified diff
ref #9032: label can set to bold