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
.views
.properties
.IPropertySource
;
17 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
18 import eu
.etaxonomy
.cdm
.model
.description
.PresenceAbsenceTermBase
;
19 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
20 import eu
.etaxonomy
.taxeditor
.propertysheet
.description
.DistributionPropertySource
;
27 public class DistributionComposite
extends DescriptionElementComposite
{
28 private static final Logger logger
= Logger
29 .getLogger(DistributionComposite
.class);
32 * @param groupComposite
33 * @param groupComposite
36 public DistributionComposite(TaxonDescriptionEditor editor
, Composite groupComposite
,
37 Distribution element
) {
38 super(editor
, groupComposite
, element
);
43 public IPropertySource
getPropertySource() {
44 return new DistributionPropertySource((Distribution
) getElement());
50 * @see eu.etaxonomy.taxeditor.editor.description.DescriptionElementComposite#initTextViewer()
53 protected void initTextViewer() {
55 Distribution distribution
= (Distribution
) getElement();
57 NamedArea area
= distribution
.getArea();
58 PresenceAbsenceTermBase
<?
> status
= distribution
.getStatus();
61 String text
= area
.getLabel() + ", " + status
.getLabel();
62 textViewer
.getTextWidget().setText(text
);
66 textViewer
.getTextWidget().setEditable(false);