3 * Copyright (C) 2007 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.
11 package eu
.etaxonomy
.taxeditor
.ui
.section
.group
;
13 import org
.eclipse
.swt
.events
.SelectionListener
;
15 import eu
.etaxonomy
.cdm
.model
.common
.User
;
16 import eu
.etaxonomy
.taxeditor
.ui
.forms
.AbstractFormSection
;
17 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
;
18 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
.SelectionType
;
19 import eu
.etaxonomy
.taxeditor
.ui
.forms
.ICdmFormElement
;
20 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
21 import eu
.etaxonomy
.taxeditor
.ui
.selection
.UserSelectionElement
;
25 * @created Mar 9, 2011
28 public class MemberDetailElement
extends AbstractEntityCollectionElement
<User
> {
30 private UserSelectionElement selection_user
;
36 * @param removeListener
37 * @param backgroundColor
40 public MemberDetailElement(CdmFormFactory formFactory
,
41 AbstractFormSection section
, User entity
,
42 SelectionListener removeListener
, int style
) {
43 super(formFactory
, section
, entity
, removeListener
, null, style
);
47 * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement#setEntity(java.lang.Object)
50 public void setEntity(User entity
) {
51 selection_user
.setEntity(entity
);
55 * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement#createControls(eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement, int)
58 public void createControls(ICdmFormElement element
, int style
) {
59 selection_user
= (UserSelectionElement
) formFactory
.createSelectionElement(SelectionType
.USER
, getConversationHolder(), element
, "Member", entity
, style
);
63 * @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement#handleEvent(java.lang.Object)
66 public void handleEvent(Object eventSource
) {
67 if(eventSource
== selection_user
){
68 setEntity(selection_user
.getEntity());