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.forms.term;
|
12
|
|
13
|
import java.util.List;
|
14
|
|
15
|
import org.apache.log4j.Logger;
|
16
|
|
17
|
import eu.etaxonomy.cdm.model.location.NamedAreaType;
|
18
|
import eu.etaxonomy.taxeditor.forms.CdmFormFactory;
|
19
|
import eu.etaxonomy.taxeditor.forms.ICdmFormElement;
|
20
|
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
|
21
|
|
22
|
/**
|
23
|
* <p>NamedAreaTypeComboElement class.</p>
|
24
|
*
|
25
|
* @author n.hoffmann
|
26
|
* @created May 11, 2010
|
27
|
* @version 1.0
|
28
|
*/
|
29
|
public class NamedAreaTypeComboElement extends AbstractTermComboElement<NamedAreaType> {
|
30
|
|
31
|
private static final Logger logger = Logger
|
32
|
.getLogger(NamedAreaTypeComboElement.class);
|
33
|
|
34
|
private static final int VISIBLE_ITEMS = 10;
|
35
|
|
36
|
/**
|
37
|
* <p>Constructor for NamedAreaTypeComboElement.</p>
|
38
|
*
|
39
|
* @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
|
40
|
* @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
|
41
|
* @param labelString a {@link java.lang.String} object.
|
42
|
* @param selection a {@link eu.etaxonomy.cdm.model.location.NamedAreaType} object.
|
43
|
* @param style a int.
|
44
|
*/
|
45
|
public NamedAreaTypeComboElement(CdmFormFactory formFactory,
|
46
|
ICdmFormElement parentElement, String labelString,
|
47
|
NamedAreaType selection, int style) {
|
48
|
super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
|
49
|
}
|
50
|
|
51
|
/** {@inheritDoc} */
|
52
|
@Override
|
53
|
protected List<NamedAreaType> preferredTerms() {
|
54
|
return PreferencesUtil.getPreferredNamedAreaTypes();
|
55
|
}
|
56
|
}
|