Project

General

Profile

Download (1.49 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.ui.section.vocabulary;
10

    
11
import eu.etaxonomy.cdm.model.term.TermVocabulary;
12
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
13
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
14
import eu.etaxonomy.taxeditor.ui.element.UriWithLabelElement;
15

    
16
/**
17
 * @author l.morris
18
 * @date 20 Dec 2011
19
 *
20
 */
21
public class TermVocabularyDetailElement extends AbstractTermBaseDetailElement<TermVocabulary> {
22

    
23
	private UriWithLabelElement uri_uriTermSource;
24
	public TermVocabularyDetailElement(CdmFormFactory formFactory,
25
			ICdmFormElement formElement) {
26
		super(formFactory, formElement);
27
	}
28

    
29
	@Override
30
	protected void createControls(ICdmFormElement formElement,
31
			TermVocabulary entity, int style) {
32

    
33
		super.createControls(formElement, entity, style);
34
		uri_uriTermSource = formFactory.createUriWithLabelElement(formElement, "Term Source URI", getEntity().getTermSourceUri(), style);
35
	}
36

    
37
	@Override
38
	public void handleEvent(Object eventSource) {
39
	    super.handleEvent(eventSource);
40

    
41
		if (eventSource == uri_uriTermSource) {
42
			getEntity().setTermSourceUri(uri_uriTermSource.parseText());
43
		}
44
	}
45

    
46
	@Override
47
	public TermVocabulary getVocabulary() {
48
		return getEntity();
49
	}
50

    
51
}
(18-18/19)