3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.ui
.element
;
13 import org
.eclipse
.swt
.SWT
;
14 import org
.eclipse
.swt
.widgets
.Label
;
16 import eu
.etaxonomy
.cdm
.common
.CdmUtils
;
19 * <p>LabelElement class.</p>
22 * @created Jun 1, 2010
25 public class LabelElement
extends AbstractCdmFormElement
{
30 * <p>Constructor for LabelElement.</p>
32 * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
33 * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
34 * @param text a {@link java.lang.String} object.
36 public LabelElement(CdmFormFactory formFactory
, ICdmFormElement formElement
, String text
) {
37 super(formFactory
, formElement
);
39 label
= formFactory
.createLabel(getLayoutComposite(), text
, SWT
.WRAP
);
40 label
.setLayoutData(CdmFormFactory
.FILL_HORIZONTALLY(2, 1));
47 * @param text a {@link java.lang.String} object.
49 public void setText(String text
) {
50 label
.setText(CdmUtils
.Nz(text
));