Project

General

Profile

Download (2.23 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.apache.log4j.Logger;
14
import org.eclipse.swt.events.SelectionListener;
15

    
16
import eu.etaxonomy.cdm.model.common.OriginalSourceBase;
17
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
18
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
19
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
20
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
21

    
22
/**
23
 * <p>Abstract AbstractOriginalSourceElement class.</p>
24
 *
25
 * @author n.hoffmann
26
 * @created Mar 16, 2010
27
 * @version 1.0
28
 */
29
public abstract class AbstractOriginalSourceElement<T extends OriginalSourceBase> extends AbstractReferencedEntityElement<T> {
30
	private static final Logger logger = Logger
31
			.getLogger(AbstractOriginalSourceElement.class);
32
	protected TextWithLabelElement text_idInSource;
33
	protected TextWithLabelElement text_idNamespace;
34

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