Project

General

Profile

Download (2.02 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.description;
12

    
13
import org.eclipse.swt.events.SelectionListener;
14

    
15
import eu.etaxonomy.cdm.model.common.DefinedTerm;
16
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
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.section.AbstractEntityCollectionElement;
21

    
22
/**
23
 * <p>ScopeElement class.</p>
24
 *
25
 * @author n.hoffmann
26
 * @created Mar 18, 2010
27
 * @version 1.0
28
 */
29
public class ScopeElement extends AbstractEntityCollectionElement<DefinedTerm> {
30
	
31
	private TermComboElement<DefinedTerm> combo_scope;
32

    
33
	/**
34
	 * <p>Constructor for ScopeElement.</p>
35
	 *
36
	 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
37
	 * @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
38
	 * @param element a {@link eu.etaxonomy.cdm.model.description.Scope} object.
39
	 * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
40
	 * @param style a int.
41
	 */
42
	public ScopeElement(CdmFormFactory cdmFormFactory,
43
			AbstractFormSection section, DefinedTerm element,
44
			SelectionListener removeListener, int style) {
45
		super(cdmFormFactory, section, element, removeListener, null, style);
46
	}
47

    
48
	/** {@inheritDoc} */
49
	@Override
50
	public void setEntity(DefinedTerm entity) {
51
		this.entity = entity;
52
		combo_scope.setSelection(entity);
53
	}
54

    
55
	/** {@inheritDoc} */
56
	@Override
57
	public void createControls(ICdmFormElement element, int style) {
58
		combo_scope = formFactory.createTermComboElement(DefinedTerm.class, element, "Scope", null, style);
59
	}
60

    
61
	/** {@inheritDoc} */
62
	@Override
63
	public void handleEvent(Object eventSource) {
64
		
65
	}
66

    
67

    
68
}
(19-19/24)