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
.agent
;
13 import java
.util
.Collection
;
15 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
16 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
17 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
18 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.compatibility
.ICdmFormElement
;
19 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
20 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionSection
;
23 * <p>TeamMemberSection class.</p>
26 * @created Apr 30, 2010
29 public class TeamMemberSection
extends AbstractEntityCollectionSection
<Team
, Person
> {
32 * <p>Constructor for TeamMemberSection.</p>
34 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
35 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
36 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
39 public TeamMemberSection(CdmFormFactory cdmFormFactory
, ConversationHolder conversation
, ICdmFormElement parentElement
, int style
) {
40 super(cdmFormFactory
, conversation
, parentElement
, null, style
);
45 public String
getTitleString() {
46 return "Team Members";
51 public void addElement(Person element
) {
52 getEntity().addTeamMember(element
);
57 public Person
createNewElement() {
58 return Person
.NewTitledInstance("");
63 public Collection
<Person
> getCollection(Team entity
) {
64 return getEntity().getTeamMembers();
69 public String
getEmptyString() {
70 return "No persons yet.";
75 protected String
getTooltipString() {
76 return "Add a membmer to this team";
81 public void removeElement(Person element
) {
82 getEntity().removeTeamMember(element
);