1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.taxeditor.ui.section.agent;
|
11
|
|
12
|
import org.eclipse.swt.SWT;
|
13
|
|
14
|
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
|
15
|
import eu.etaxonomy.cdm.model.agent.Team;
|
16
|
import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
|
17
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
18
|
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
|
19
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
|
20
|
|
21
|
/**
|
22
|
* <p>
|
23
|
* TeamWizardPage class.
|
24
|
* </p>
|
25
|
*
|
26
|
* @author n.hoffmann
|
27
|
* @created Jun 1, 2010
|
28
|
* @version 1.0
|
29
|
*/
|
30
|
public class TeamWizardPage extends AbstractCdmEntityWizardPage<Team> {
|
31
|
|
32
|
private boolean isNomenclaturalTeam = false;
|
33
|
|
34
|
/**
|
35
|
* <p>
|
36
|
* Constructor for TeamWizardPage.
|
37
|
* </p>
|
38
|
*
|
39
|
* @param formFactory
|
40
|
* a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
|
41
|
* object.
|
42
|
* @param conversation
|
43
|
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
|
44
|
* object.
|
45
|
* @param entity
|
46
|
* a {@link eu.etaxonomy.cdm.model.agent.Team} object.
|
47
|
*/
|
48
|
public TeamWizardPage(CdmFormFactory formFactory,
|
49
|
ConversationHolder conversation, Team entity, boolean isNomenclaturalTeam) {
|
50
|
super(formFactory, conversation, entity);
|
51
|
setTitle("Team");
|
52
|
setIsNomenclaturalTeam(isNomenclaturalTeam);
|
53
|
}
|
54
|
|
55
|
/** {@inheritDoc} */
|
56
|
@Override
|
57
|
public AbstractCdmDetailElement<Team> createElement(
|
58
|
ICdmFormElement rootElement) {
|
59
|
TeamDetailElement teamElement = formFactory.createTeamDetailElement(rootElement, SWT.NULL, isNomenclaturalTeam);
|
60
|
teamElement.setEntity(entity);
|
61
|
return teamElement;
|
62
|
}
|
63
|
|
64
|
/**
|
65
|
* @return the isNomenclaturalTeam
|
66
|
*/
|
67
|
public boolean isNomenclaturalTeam() {
|
68
|
return isNomenclaturalTeam;
|
69
|
}
|
70
|
|
71
|
public void setIsNomenclaturalTeam(boolean isNomenclaturalTeam){
|
72
|
this.isNomenclaturalTeam = isNomenclaturalTeam;
|
73
|
}
|
74
|
}
|