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 eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
13 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
14 import eu
.etaxonomy
.cdm
.model
.common
.Representation
;
15 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
24 public class DefinedTermDetailElement
<T
extends DefinedTermBase
> extends AbstractTermBaseDetailElement
<T
> {
30 public DefinedTermDetailElement(CdmFormFactory formFactory
,
31 ICdmFormElement formElement
) {
32 super(formFactory
, formElement
);
36 * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)
39 public void handleEvent(Object eventSource
) {
40 if (eventSource
== text_label
){
41 getEntity().setLabel(text_label
.getText());
42 }else if (eventSource
== text_description
){
43 Representation representation
= getEntity().getRepresentation(Language
.DEFAULT());
44 representation
.setText(text_description
.getText());
49 * @see eu.etaxonomy.taxeditor.ui.section.vocabulary.AbstractTermBaseDetailElement#getVocabularyMarkers()
52 public TermVocabulary
getVocabulary() {
53 return getEntity() != null ?
getEntity().getVocabulary() : null;