merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / name / AbstractTypeDesignationElement.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.name;
12
13 import org.eclipse.swt.events.SelectionListener;
14
15 import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
16 import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
17 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
18 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
19 import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
20 import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractReferencedEntityElement;
21
22 /**
23 * <p>Abstract AbstractTypeDesignationElement class.</p>
24 *
25 * @author n.hoffmann
26 * @created May 17, 2010
27 * @version 1.0
28 */
29 public abstract class AbstractTypeDesignationElement<T extends TypeDesignationBase> extends AbstractReferencedEntityElement<T> {
30
31 protected CheckboxElement checkbox_notDesignated;
32
33
34 /**
35 * <p>Constructor for AbstractTypeDesignationElement.</p>
36 *
37 * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
38 * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
39 * @param entity a T object.
40 * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
41 * @param style a int.
42 * @param <T> a T object.
43 */
44 public AbstractTypeDesignationElement(CdmFormFactory formFactory,
45 AbstractFormSection section, T entity,
46 SelectionListener removeListener, int style) {
47 super(formFactory, section, entity, removeListener, style);
48 }
49
50 /** {@inheritDoc} */
51 @Override
52 public void createControls(ICdmFormElement formElement, int style) {
53 checkbox_notDesignated = formFactory.createCheckbox(formElement, "Not Designated", false, style);
54 super.createControls(formElement, style);
55 }
56
57 }