Project

General

Profile

« Previous | Next » 

Revision 36fdf767

Added by Andreas Müller over 3 years ago

cleanup

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/VocabularyComboElement.java
1 1
/**
2
 *
3
 */
2
* Copyright (C) 2016 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
4 9
package eu.etaxonomy.taxeditor.ui.combo;
5 10

  
6 11
import java.util.ArrayList;
......
29 34
/**
30 35
 * @author n.hoffmann
31 36
 * @created Nov 5, 2009
32
 * @version 1.0
33
 * @param <VOC>
34 37
 */
35 38
public class VocabularyComboElement<TERM extends DefinedTermBase<TERM>, VOC extends TermVocabulary<TERM>>
36 39
		extends AbstractComboElement<VOC> {
......
45 48
    private final TermType termType;
46 49

  
47 50
    public VocabularyComboElement(CdmFormFactory formFactory,
48
	        ICdmFormElement parentElement, TermType termType, String labelString, VOC selection,
49
	        int style) {
51
	        ICdmFormElement parentElement, TermType termType, String labelString,
52
	        VOC selection, int style) {
50 53
        super(formFactory, parentElement);
51 54

  
52 55
        this.termType = termType;
......
65 68
	}
66 69

  
67 70
	public VocabularyComboElement(CdmFormFactory formFactory,
68
            ICdmFormElement parentElement, TermType termType, String labelString, TermVocabularyDto selection,
69
            int style) {
71
            ICdmFormElement parentElement, TermType termType, String labelString,
72
            TermVocabularyDto selection, int style) {
70 73
        super(formFactory, parentElement);
71 74

  
72 75
        this.termType = termType;
......
84 87
        }
85 88
    }
86 89

  
87

  
88

  
89

  
90 90
    /**
91 91
	 * <p>Sets the selection of the combo to the given T object.</p>
92 92
	 * <p>Passing <code>null</code> to this method will set the selection to
......
122 122
//		}
123 123
	}
124 124

  
125

  
126 125
    public void setSelectionDto(TermVocabularyDto selection) {
127 126
        Listener[] listeners = combo.getListeners(SWT.Selection);
128 127

  
......
255 254
		populateTerms(preferredTerms);
256 255
	}
257 256

  
258
	/** {@inheritDoc} */
259 257
	@Override
260 258
    public void widgetSelected(SelectionEvent e) {
261 259
	    int i = combo.getSelectionIndex();
......
267 265
		firePropertyChangeEvent(new CdmPropertyChangeEvent(this, e));
268 266
	}
269 267

  
270
	/** {@inheritDoc} */
271 268
	@Override
272 269
    public void propertyChange(PropertyChangeEvent event) {
273 270
		super.propertyChange(event);
......
290 287
        terms.remove(emptyElement);
291 288
        combo.remove(EMPTY_ELEMENT_LABEL);
292 289
    }
293

  
294
}
290
}

Also available in: Unified diff