Merged refactoring from development branch.
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / ui / section / classification / ClassificationWizardPage.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.classification;
12
13
14 import org.eclipse.swt.SWT;
15
16 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
17 import eu.etaxonomy.cdm.model.taxon.Classification;
18 import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage;
19 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
20 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
21 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
22
23 /**
24 * <p>ClassificationWizardPage class.</p>
25 *
26 * @author n.hoffmann
27 * @created 23.06.2009
28 * @version 1.0
29 */
30 public class ClassificationWizardPage extends AbstractCdmEntityWizardPage<Classification>{
31
32 /**
33 * <p>Constructor for ClassificationWizardPage.</p>
34 *
35 * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
36 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
37 * @param entity a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
38 */
39 public ClassificationWizardPage(CdmFormFactory formFactory, ConversationHolder conversation, Classification entity){
40 super(formFactory, conversation, entity);
41 setTitle("Classification");
42 }
43
44 /* (non-Javadoc)
45 * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
46 */
47 /** {@inheritDoc} */
48 @Override
49 public ClassificationDetailElement createElement(ICdmFormElement rootElement) {
50 ClassificationDetailElement detailElement = (ClassificationDetailElement) formFactory.createCdmDetailElement(DetailType.CLASSIFICATION, rootElement, SWT.NULL);
51 detailElement.setEntity(getEntity());
52
53 return detailElement;
54 }
55 }