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.supplemental;
|
12
|
|
13
|
import org.eclipse.swt.events.SelectionListener;
|
14
|
|
15
|
import eu.etaxonomy.cdm.model.common.OriginalSourceBase;
|
16
|
import eu.etaxonomy.cdm.model.common.OriginalSourceType;
|
17
|
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
|
18
|
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
|
19
|
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
|
20
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
21
|
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
|
22
|
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
|
23
|
|
24
|
/**
|
25
|
* <p>Abstract AbstractOriginalSourceElement class.</p>
|
26
|
*
|
27
|
* @author n.hoffmann
|
28
|
* @created Mar 16, 2010
|
29
|
* @version 1.0
|
30
|
*/
|
31
|
public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase> extends AbstractReferencedEntityElement<T> {
|
32
|
protected EnumComboElement<OriginalSourceType> combo_origsourcetype;
|
33
|
protected TextWithLabelElement text_idInSource;
|
34
|
protected TextWithLabelElement text_idNamespace;
|
35
|
|
36
|
/**
|
37
|
* <p>Constructor for AbstractOriginalSourceElement.</p>
|
38
|
*
|
39
|
* @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
|
40
|
* @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
|
41
|
* @param element a T object.
|
42
|
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
|
43
|
* @param style a int.
|
44
|
* @param <T> a T object.
|
45
|
*/
|
46
|
public AbstractOriginalSourceElement(CdmFormFactory formFactory,
|
47
|
AbstractFormSection section,
|
48
|
T element, SelectionListener removeListener,
|
49
|
int style) {
|
50
|
super(formFactory, section, element, removeListener, style);
|
51
|
}
|
52
|
|
53
|
/** {@inheritDoc} */
|
54
|
@Override
|
55
|
public void init() {
|
56
|
super.init();
|
57
|
setHasOriginalNameString(true);
|
58
|
}
|
59
|
|
60
|
/** {@inheritDoc} */
|
61
|
@Override
|
62
|
public void createControls(ICdmFormElement formElement, int style) {
|
63
|
combo_origsourcetype = formFactory
|
64
|
.createEnumComboElement(OriginalSourceType.class,
|
65
|
formElement, style);
|
66
|
text_idInSource = formFactory.createTextWithLabelElement(formElement, "Id In Source", null, style);
|
67
|
text_idNamespace = formFactory.createTextWithLabelElement(formElement, "ID Namespace", null, style);
|
68
|
super.createControls(formElement, style);
|
69
|
}
|
70
|
}
|