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 org
.eclipse
.jface
.viewers
.ISelectionProvider
;
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
.cdm
.model
.agent
.TeamOrPersonBase
;
19 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
20 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
.DetailType
;
21 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
22 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
25 * <p>TeamOrPersonBaseDetailSection class.</p>
28 * @created Apr 26, 2010
31 public class TeamOrPersonBaseDetailSection
extends AbstractCdmDetailSection
<TeamOrPersonBase
> {
34 * <p>Constructor for TeamOrPersonBaseDetailSection.</p>
36 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
37 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
38 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
39 * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
42 public TeamOrPersonBaseDetailSection(CdmFormFactory cdmFormFactory
, ConversationHolder conversation
,
43 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
44 super(cdmFormFactory
, conversation
, parentElement
, selectionProvider
, style
);
49 protected DetailType
getDetailType() {
50 return DetailType
.TEAMORPERSONBASE
;
55 public String
getHeading() {
56 if (getEntity() != null){
57 if(getEntity() instanceof Team
){
59 }else if (getEntity().getClass().isAssignableFrom(Person
.class)){
63 return "Team or Person";