3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.taxeditor
.propertysheet
.name
;
13 import org
.eclipse
.jface
.viewers
.CellEditor
;
14 import org
.eclipse
.jface
.viewers
.ComboBoxCellEditor
;
15 import org
.eclipse
.swt
.SWT
;
16 import org
.eclipse
.swt
.custom
.CCombo
;
17 import org
.eclipse
.swt
.widgets
.Composite
;
18 import org
.eclipse
.ui
.views
.properties
.ComboBoxPropertyDescriptor
;
25 public class EditorComboBoxPropertyDescriptor
extends
26 ComboBoxPropertyDescriptor
{
27 private String
[] labels
;
34 public EditorComboBoxPropertyDescriptor(Object id
, String displayName
,
35 String
[] labelsArray
) {
36 super(id
, displayName
, labelsArray
);
37 this.labels
= labelsArray
;
40 public CellEditor
createPropertyEditor(Composite parent
) {
41 CellEditor editor
= new ComboBoxCellEditor(parent
, labels
,
43 if (getValidator() != null) {
44 editor
.setValidator(getValidator());
46 ((CCombo
) editor
.getControl()).setVisibleItemCount(20);