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