p2izing the editor
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor / src / eu / etaxonomy / taxeditor / editor / GroupCompositeLabel.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
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.
8 */
9
10 package eu.etaxonomy.taxeditor.editor;
11
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;
18
19 /**
20 * @author p.ciardelli
21 * @created 10.09.2008
22 * @version 1.0
23 */
24 public class GroupCompositeLabel extends Composite {
25 private static final Logger logger = Logger
26 .getLogger(GroupCompositeLabel.class);
27
28 public GroupCompositeLabel(Composite parent, String labelText) {
29 super(parent, SWT.NONE);
30
31 // TODO move to group composite?
32
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));
42
43 // Add the label
44 final Label label = new Label(this, SWT.NONE);
45 label.setText(labelText.toUpperCase());
46 }
47 }