Merged refactoring from development branch.
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / ui / 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.ui.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.ui.forms.AbstractCdmEntityWizardPage;
18 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
19 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
20 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
21 import eu.etaxonomy.taxeditor.ui.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 @Deprecated // use the specific pages instead (e.g. GeneralWizardPage, GatheringEventPage, s.o.)
31 public class DerivedUnitFacadeWizardPage extends AbstractCdmEntityWizardPage<DerivedUnitBase> {
32
33 /**
34 * <p>Constructor for DerivedUnitFacadeWizardPage.</p>
35 *
36 * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
37 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
38 * @param entity a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase} object.
39 */
40 public DerivedUnitFacadeWizardPage(CdmFormFactory formFactory, ConversationHolder conversation, DerivedUnitBase entity) {
41 super(formFactory, conversation, entity);
42 setTitle("Derived Unit");
43 }
44
45 /* (non-Javadoc)
46 * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
47 */
48 /** {@inheritDoc} */
49 @Override
50 public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
51 DerivedUnitFacadeDetailElement derivedUnitFacadeDetailElement = (DerivedUnitFacadeDetailElement) formFactory.createCdmDetailElement(DetailType.DERIVED_UNIT_FACADE, rootElement, SWT.NULL);
52 derivedUnitFacadeDetailElement.setEntity(entity);
53 return derivedUnitFacadeDetailElement;
54 }
55 }