Project

General

Profile

Download (2.13 KB) Statistics
| Branch: | Tag: | Revision:
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.taxeditor.ui.element.AbstractFormSection;
17
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
18
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
19
import eu.etaxonomy.taxeditor.ui.section.campanula.compatibility.ICdmFormElement;
20

    
21
/**
22
 * <p>Abstract AbstractOriginalSourceElement class.</p>
23
 *
24
 * @author n.hoffmann
25
 * @created Mar 16, 2010
26
 * @version 1.0
27
 */
28
public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase> extends AbstractReferencedEntityElement<T> {
29
	protected TextWithLabelElement text_idInSource;
30
	protected TextWithLabelElement text_idNamespace;
31

    
32
	/**
33
	 * <p>Constructor for AbstractOriginalSourceElement.</p>
34
	 *
35
	 * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
36
	 * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
37
	 * @param element a T object.
38
	 * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
39
	 * @param style a int.
40
	 * @param <T> a T object.
41
	 */
42
	public AbstractOriginalSourceElement(CdmFormFactory formFactory,
43
			AbstractFormSection section,
44
			T element, SelectionListener removeListener,
45
			int style) {
46
		super(formFactory, section, element, removeListener, style);
47
	}
48
	
49
	/** {@inheritDoc} */
50
	@Override
51
	public void init() {
52
		super.init();
53
		setHasOriginalNameString(true);
54
	}
55
	
56
	/** {@inheritDoc} */
57
	@Override
58
	public void createControls(ICdmFormElement formElement, int style) {
59
		text_idInSource = formFactory.createTextWithLabelElement(formElement, "Id In Source", null, style);
60
		text_idNamespace = formFactory.createTextWithLabelElement(formElement, "ID Namespace", null, style);
61
		super.createControls(formElement, style);
62
	}
63
}
(1-1/19)