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.cdm.model.common.TermType;
|
17
|
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
|
18
|
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
|
19
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
20
|
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
|
21
|
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
|
22
|
|
23
|
/**
|
24
|
* <p>ModifierElement class.</p>
|
25
|
*
|
26
|
* @author n.hoffmann
|
27
|
* @created Sep 15, 2010
|
28
|
* @version 1.0
|
29
|
*/
|
30
|
public class ModifierElement extends AbstractEntityCollectionElement<DefinedTerm> {
|
31
|
|
32
|
private TermComboElement<DefinedTerm> combo_modifier;
|
33
|
|
34
|
/**
|
35
|
* <p>Constructor for ModifierElement.</p>
|
36
|
*
|
37
|
* @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
|
38
|
* @param section a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} object.
|
39
|
* @param entity a {@link eu.etaxonomy.cdm.model.description.Modifier} object.
|
40
|
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
|
41
|
* @param style a int.
|
42
|
*/
|
43
|
public ModifierElement(CdmFormFactory formFactory,
|
44
|
AbstractFormSection section, DefinedTerm entity,
|
45
|
SelectionListener removeListener, int style) {
|
46
|
super(formFactory, section, entity, removeListener, null, style);
|
47
|
}
|
48
|
|
49
|
/** {@inheritDoc} */
|
50
|
@Override
|
51
|
public void setEntity(DefinedTerm entity) {
|
52
|
this.entity = entity;
|
53
|
combo_modifier.setSelection(entity);
|
54
|
}
|
55
|
|
56
|
/** {@inheritDoc} */
|
57
|
@Override
|
58
|
public void createControls(ICdmFormElement element, int style) {
|
59
|
combo_modifier = formFactory.createDefinedTermComboElement(TermType.Modifier, element, "Modifier", getEntity(), style);
|
60
|
}
|
61
|
|
62
|
/** {@inheritDoc} */
|
63
|
@Override
|
64
|
public void handleEvent(Object eventSource) {
|
65
|
|
66
|
}
|
67
|
}
|