2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.editor
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.eclipse
.swt
.SWT
;
14 import org
.eclipse
.swt
.widgets
.Composite
;
15 import org
.eclipse
.swt
.widgets
.Label
;
16 import org
.eclipse
.ui
.forms
.widgets
.TableWrapData
;
17 import org
.eclipse
.ui
.forms
.widgets
.TableWrapLayout
;
24 public class GroupCompositeLabel
extends Composite
{
25 private static final Logger logger
= Logger
26 .getLogger(GroupCompositeLabel
.class);
28 public GroupCompositeLabel(Composite parent
, String labelText
) {
29 super(parent
, SWT
.NONE
);
31 // TODO move to group composite?
33 TableWrapLayout tableWrapLayout
= new TableWrapLayout();
34 tableWrapLayout
.horizontalSpacing
= 1;
35 tableWrapLayout
.rightMargin
= 10;
36 tableWrapLayout
.leftMargin
= 10;
37 tableWrapLayout
.bottomMargin
= 1;
38 tableWrapLayout
.topMargin
= 1;
39 tableWrapLayout
.verticalSpacing
= 1;
40 setLayout(tableWrapLayout
);
41 setLayoutData(new TableWrapData(TableWrapData
.FILL_GRAB
, TableWrapData
.MIDDLE
));
44 final Label label
= new Label(this, SWT
.NONE
);
45 label
.setText(labelText
.toUpperCase());
47 logger
.trace(this.getClass().getSimpleName() + " created");