Project

General

Profile

Download (1.62 KB) Statistics
| Branch: | Tag: | Revision:
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.description.State;
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>StateComboElement class.</p>
24
 *
25
 * @author n.hoffmann
26
 * @created Sep 15, 2010
27
 * @version 1.0
28
 */
29
public class StateComboElement extends AbstractTermComboElement<State> {
30

    
31

    
32
	private static final Logger logger = Logger
33
			.getLogger(StateComboElement.class);
34

    
35
	private static final int VISIBLE_ITEMS = 10;
36
	
37
	/**
38
	 * <p>Constructor for StateComboElement.</p>
39
	 *
40
	 * @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
41
	 * @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
42
	 * @param labelString a {@link java.lang.String} object.
43
	 * @param selection a {@link eu.etaxonomy.cdm.model.description.State} object.
44
	 * @param style a int.
45
	 */
46
	public StateComboElement(CdmFormFactory formFactory,
47
			ICdmFormElement parentElement, String labelString, State selection,
48
			int style) {
49
		super(formFactory, parentElement, labelString, selection, VISIBLE_ITEMS, style);
50
	}
51
	
52
	/** {@inheritDoc} */
53
	@Override
54
	protected List<State> preferredTerms() {
55
		return PreferencesUtil.getPreferredStates();
56
	}
57
}
(26-26/27)