7e529b16729d6d89c43ad32907279c8469c4ea1e
[taxeditor.git] / taxeditor-editor / src / main / java / eu / etaxonomy / taxeditor / section / occurrence / DerivedUnitFacadeWizardPage.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.section.occurrence;
12
13 import org.eclipse.swt.SWT;
14
15 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
16 import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
17 import eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage;
18 import eu.etaxonomy.taxeditor.forms.CdmFormFactory;
19 import eu.etaxonomy.taxeditor.forms.CdmFormFactory.DetailType;
20 import eu.etaxonomy.taxeditor.forms.ICdmFormElement;
21 import eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement;
22
23 /**
24 * <p>DerivedUnitFacadeWizardPage class.</p>
25 *
26 * @author n.hoffmann
27 * @created Jun 16, 2010
28 * @version 1.0
29 */
30 public class DerivedUnitFacadeWizardPage extends AbstractCdmEntityWizardPage<DerivedUnitBase> {
31
32 /**
33 * <p>Constructor for DerivedUnitFacadeWizardPage.</p>
34 *
35 * @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
36 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
37 * @param entity a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase} object.
38 */
39 public DerivedUnitFacadeWizardPage(CdmFormFactory formFactory, ConversationHolder conversation, DerivedUnitBase entity) {
40 super(formFactory, conversation, entity);
41 setTitle("Derived Unit");
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 AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
50 DerivedUnitFacadeDetailElement derivedUnitFacadeDetailElement = (DerivedUnitFacadeDetailElement) formFactory.createCdmDetailElement(DetailType.DERIVED_UNIT_FACADE, rootElement, SWT.NULL);
51 derivedUnitFacadeDetailElement.setEntity(entity);
52 return derivedUnitFacadeDetailElement;
53 }
54 }