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
.editor
.description
;
13 import org
.apache
.log4j
.Logger
;
14 import org
.eclipse
.swt
.widgets
.Composite
;
15 import org
.eclipse
.ui
.forms
.IManagedForm
;
16 import org
.eclipse
.ui
.views
.properties
.IPropertySource
;
18 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
19 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
20 import eu
.etaxonomy
.taxeditor
.propertysheet
.description
.CommonNamePropertySource
;
21 import eu
.etaxonomy
.taxeditor
.store
.model
.LanguageUtil
;
28 public class CommonNameComposite
extends DescriptionElementComposite
{
29 private static final Logger logger
= Logger
30 .getLogger(CommonNameComposite
.class);
33 * @param groupComposite
34 * @param groupComposite
37 public CommonNameComposite(TaxonDescriptionEditor editor
, Composite groupComposite
,
38 CommonTaxonName element
) {
39 super(editor
, groupComposite
, element
);
47 private void setLanguageInfo() {
49 Language language
= ((CommonTaxonName
) element
).getLanguage();
50 if (language
!= null) {
51 setNonEditableInfo(LanguageUtil
.getDescription(language
));
53 setNonEditableInfo("No language");
57 public IPropertySource
getPropertySource() {
58 return new CommonNamePropertySource((CommonTaxonName
) getElement());