Revision 224b66a3
Added by Patrick Plitzner about 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/TermComboElement.java | ||
---|---|---|
10 | 10 |
import java.util.List; |
11 | 11 |
|
12 | 12 |
import org.eclipse.jface.util.PropertyChangeEvent; |
13 |
import org.eclipse.jface.viewers.ComboViewer; |
|
13 | 14 |
import org.eclipse.swt.SWT; |
14 | 15 |
import org.eclipse.swt.events.DisposeEvent; |
15 | 16 |
import org.eclipse.swt.events.DisposeListener; |
... | ... | |
19 | 20 |
import org.eclipse.swt.widgets.Combo; |
20 | 21 |
import org.eclipse.swt.widgets.Label; |
21 | 22 |
import org.eclipse.swt.widgets.Listener; |
23 |
import org.eclipse.ui.forms.widgets.TableWrapData; |
|
22 | 24 |
|
23 | 25 |
import eu.etaxonomy.cdm.model.common.DefinedTermBase; |
24 | 26 |
import eu.etaxonomy.cdm.model.common.TermType; |
... | ... | |
108 | 110 |
} |
109 | 111 |
|
110 | 112 |
// create combo |
111 |
combo = new Combo(getLayoutComposite(), SWT.BORDER | SWT.READ_ONLY );//FIXME: removed this parameter seems break windows version: | style |
|
113 |
ComboViewer viewer = new ComboViewer(getLayoutComposite(), SWT.BORDER | SWT.READ_ONLY ); |
|
114 |
combo = viewer.getCombo(); |
|
112 | 115 |
addControl(combo); |
113 |
combo.setLayoutData(LayoutConstants.FILL_HORIZONTALLY()); |
|
116 |
TableWrapData fill_HORIZONTALLY = LayoutConstants.FILL_HORIZONTALLY(); |
|
117 |
combo.setLayoutData(fill_HORIZONTALLY); |
|
118 |
fill_HORIZONTALLY.maxWidth = 50; |
|
114 | 119 |
combo.setVisibleItemCount(DEFAULT_VISIBLE_ITEMS); |
115 | 120 |
|
121 |
|
|
116 | 122 |
if(termType!=null){ |
117 | 123 |
//TODO try to remove generic T and avoid classes to be used |
118 | 124 |
populateTerms((List<T>) getTermManager().getPreferredTerms(termType)); |
Also available in: Unified diff
fix #5305 Set max width of combo elements to 50px