3 * Copyright (C) 2009 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.
10 package eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
;
12 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
13 import org
.eclipse
.ui
.forms
.widgets
.TableWrapLayout
;
15 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
16 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
.DetailType
;
19 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
20 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
27 public class DefinedTermDetailSection
<T
extends DefinedTermBase
> extends AbstractCdmDetailSection
<T
> {
31 * @param definedTermClass
33 * @param parentElement
34 * @param selectionProvider
37 public DefinedTermDetailSection(CdmFormFactory formFactory
,
38 Class
<T
> definedTermClass
, ConversationHolder conversation
, ICdmFormElement parentElement
,
39 ISelectionProvider selectionProvider
, int style
) {
40 super(formFactory
, definedTermClass
, conversation
, parentElement
, selectionProvider
, style
);
44 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()
47 protected DetailType
getDetailType() {
52 protected void createControlsByType(AbstractCdmDetailSection
<T
> abstractCdmDetailSection
, Class
<T
> clazz
, int style
) {
53 TableWrapLayout layout
= (TableWrapLayout
) getLayoutComposite().getLayout();
54 layout
.topMargin
= 10;
55 layout
.numColumns
= 2;
57 getLayoutComposite().setLayout(layout
);
58 detailElement
= formFactory
.createDefinedTermDetailElement(clazz
, abstractCdmDetailSection
, style
);
62 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()
65 public String
getHeading() {
66 return "Defined Term: "+ (getEntity() != null ?
getEntity().getLabel() : "");