2 * Copyright (C) 2016 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.
9 package eu
.etaxonomy
.taxeditor
.ui
.dialog
;
11 import eu
.etaxonomy
.cdm
.model
.term
.TermType
;
12 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
13 import eu
.etaxonomy
.cdm
.model
.taxon
.Classification
;
14 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationshipType
;
15 import eu
.etaxonomy
.taxeditor
.ui
.combo
.term
.TermComboElement
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.TextWithLabelElement
;
19 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
20 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
27 public class CloneClassificationDetailElement
extends
28 AbstractCdmDetailElement
<Classification
>{
30 private TextWithLabelElement txtClassificationName
;
31 private TermComboElement
<TaxonRelationshipType
> comboRelationType
;
32 private EntitySelectionElement
<Reference
> selectReference
;
34 public CloneClassificationDetailElement(CdmFormFactory formFactory
, ICdmFormElement formElement
) {
35 super(formFactory
, formElement
);
39 protected void createControls(ICdmFormElement formElement
, Classification entity
, int style
) {
40 txtClassificationName
= formFactory
.createTextWithLabelElement(formElement
, "Classification name", null, style
);
41 comboRelationType
= formFactory
.createDefinedTermComboElement(TermType
.TaxonRelationshipType
, formElement
, "Taxon relation", null, style
);
42 selectReference
= formFactory
.createSelectionElement(Reference
.class,
43 formElement
, "Reference", null, EntitySelectionElement
.SELECTABLE
, style
);
47 public void handleEvent(Object eventSource
) {
50 public String
getClassificationName(){
51 return txtClassificationName
.getText();
54 public TaxonRelationshipType
getRelationType(){
55 return comboRelationType
.getSelection();
58 public Reference
getReference(){
59 return selectReference
.getSelection();
63 public void fillFields() {
64 // TODO Auto-generated method stub