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
;
17 import eu
.etaxonomy
.taxeditor
.ui
.section
.campanula
.compatibility
.ICdmFormElement
;
20 * <p>LabelElement class.</p>
23 * @created Jun 1, 2010
26 public class LabelElement
extends AbstractCdmFormElement
{
31 * <p>Constructor for LabelElement.</p>
33 * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
34 * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
35 * @param text a {@link java.lang.String} object.
37 public LabelElement(CdmFormFactory formFactory
, ICdmFormElement formElement
, String text
) {
38 super(formFactory
, formElement
);
40 label
= formFactory
.createLabel(getLayoutComposite(), text
, SWT
.WRAP
);
41 label
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY(2, 1));
48 * @param text a {@link java.lang.String} object.
50 public void setText(String text
) {
51 label
.setText(CdmUtils
.Nz(text
));