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.group;
|
12
|
|
13
|
import eu.etaxonomy.cdm.model.common.Group;
|
14
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
15
|
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
|
16
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
|
17
|
import eu.etaxonomy.taxeditor.ui.section.campanula.compatibility.ICdmFormElement;
|
18
|
|
19
|
/**
|
20
|
* @author n.hoffmann
|
21
|
* @created Mar 9, 2011
|
22
|
* @version 1.0
|
23
|
*/
|
24
|
public class GroupDetailElement extends AbstractCdmDetailElement<Group> {
|
25
|
|
26
|
private TextWithLabelElement text_name;
|
27
|
|
28
|
/**
|
29
|
* @param formFactory
|
30
|
* @param formElement
|
31
|
*/
|
32
|
public GroupDetailElement(CdmFormFactory formFactory,
|
33
|
ICdmFormElement formElement) {
|
34
|
super(formFactory, formElement);
|
35
|
}
|
36
|
|
37
|
/* (non-Javadoc)
|
38
|
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#createControls(eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement, java.lang.Object, int)
|
39
|
*/
|
40
|
@Override
|
41
|
protected void createControls(ICdmFormElement formElement, Group entity,
|
42
|
int style) {
|
43
|
text_name = formFactory.createTextWithLabelElement(formElement, "Name", entity.getName(), style);
|
44
|
}
|
45
|
|
46
|
/* (non-Javadoc)
|
47
|
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)
|
48
|
*/
|
49
|
@Override
|
50
|
public void handleEvent(Object eventSource) {
|
51
|
if(eventSource == text_name){
|
52
|
getEntity().setName(text_name.getText());
|
53
|
}
|
54
|
}
|
55
|
|
56
|
}
|