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
.supplemental
;
12 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
13 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.compatibility
.ICdmFormElement
;
14 import eu
.etaxonomy
.taxeditor
.ui
.element
.AbstractCdmFormElement
;
15 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.IEntityElement
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.TextWithLabelElement
;
24 public class CdmBaseElement
extends AbstractCdmFormElement
implements IEntityElement
<CdmBase
>{
26 private TextWithLabelElement text_uuid
;
27 private TextWithLabelElement text_objectId
;
28 private CdmBase entity
;
33 public CdmBaseElement(CdmFormFactory formFactory
,
34 ICdmFormElement formElement
, CdmBase entity
, int style
) {
36 super(formFactory
, formElement
);
37 text_uuid
= formFactory
.createTextWithLabelElement(formElement
, "UUID", null, style
);
38 text_objectId
= formFactory
.createTextWithLabelElement(formElement
, "Object ID", null, style
);
43 * @see eu.etaxonomy.taxeditor.ui.element.ISelectable#setSelected(boolean)
46 public void setSelected(boolean selected
) {
47 // this entity element is not likely to get selected
51 * @see eu.etaxonomy.taxeditor.ui.element.IEntityElement#getEntity()
54 public CdmBase
getEntity() {
59 public void setEntity(CdmBase entity
) {
63 text_uuid
.setText(entity
!= null ? entity
.getUuid().toString() : "");
64 text_objectId
.setText(entity
!= null ? entity
.getId()+"" : "");