2 * Copyright (C) 2009 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
.section
.supplemental
;
11 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
12 import eu
.etaxonomy
.taxeditor
.ui
.element
.AbstractCdmFormElement
;
13 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
14 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
15 import eu
.etaxonomy
.taxeditor
.ui
.element
.IEntityElement
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.TextWithLabelElement
;
23 public class CdmBaseElement
extends AbstractCdmFormElement
implements IEntityElement
<CdmBase
>{
25 private TextWithLabelElement text_uuid
;
26 private TextWithLabelElement text_objectId
;
27 private CdmBase entity
;
32 public CdmBaseElement(CdmFormFactory formFactory
,
33 ICdmFormElement formElement
, CdmBase entity
, int style
) {
35 super(formFactory
, formElement
);
36 text_uuid
= formFactory
.createTextWithLabelElement(formElement
, "UUID", null, style
);
37 text_objectId
= formFactory
.createTextWithLabelElement(formElement
, "Object ID", null, style
);
42 * @see eu.etaxonomy.taxeditor.ui.element.ISelectable#setSelected(boolean)
45 public void setSelected(boolean selected
) {
46 // this entity element is not likely to get selected
50 * @see eu.etaxonomy.taxeditor.ui.element.IEntityElement#getEntity()
53 public CdmBase
getEntity() {
58 public void setEntity(CdmBase entity
) {
62 text_uuid
.setText(entity
!= null ? entity
.getUuid().toString() : "");
63 text_objectId
.setText(entity
!= null ? entity
.getId()+"" : "");