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.term;
|
12
|
|
13
|
import java.util.ArrayList;
|
14
|
import java.util.List;
|
15
|
|
16
|
import eu.etaxonomy.cdm.model.description.Sex;
|
17
|
import eu.etaxonomy.taxeditor.singlesource.ui.forms.CdmFormFactoryFacade;
|
18
|
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
|
19
|
|
20
|
/**
|
21
|
* <p>SexComboElement class.</p>
|
22
|
*
|
23
|
* @author n.hoffmann
|
24
|
* @created Jun 24, 2010
|
25
|
* @version 1.0
|
26
|
*/
|
27
|
public class SexComboElement extends AbstractTermComboElement<Sex> {
|
28
|
|
29
|
private static final int VISIBLE_ITEMS = 2;
|
30
|
|
31
|
/**
|
32
|
* <p>Constructor for SexComboElement.</p>
|
33
|
*
|
34
|
* @param formFactory a {@link eu.etaxonomy.taxeditor.singlesource.ui.forms.CdmFormFactoryFacade} object.
|
35
|
* @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
|
36
|
* @param labelString a {@link java.lang.String} object.
|
37
|
* @param selection a {@link eu.etaxonomy.cdm.model.description.Sex} object.
|
38
|
* @param style a int.
|
39
|
*/
|
40
|
public SexComboElement(CdmFormFactoryFacade formFactory,
|
41
|
ICdmFormElement parentElement, String labelString, Sex selection, int style) {
|
42
|
super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
|
43
|
}
|
44
|
|
45
|
/* (non-Javadoc)
|
46
|
* @see eu.etaxonomy.taxeditor.forms.term.AbstractTermComboElement#preferredTerms()
|
47
|
*/
|
48
|
/** {@inheritDoc} */
|
49
|
@Override
|
50
|
protected List<Sex> preferredTerms() {
|
51
|
List<Sex> list = new ArrayList<Sex>();
|
52
|
list.add(Sex.FEMALE());
|
53
|
list.add(Sex.MALE());
|
54
|
return list;
|
55
|
}
|
56
|
}
|