Project

General

Profile

« Previous | Next » 

Revision f561b00c

Added by Niels Hoffmann about 13 years ago

Refactoring selection elements so they can be configured

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionSourceElement.java
1 1
// $Id$
2 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
*/
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 10

  
11 11
package eu.etaxonomy.taxeditor.ui.section.description;
12 12

  
......
15 15
import eu.etaxonomy.cdm.model.reference.Reference;
16 16
import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
17 17
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
18
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
19 18
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
19
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
20 20
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
21 21
import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
22 22

  
23 23
/**
24
 * <p>DescriptionSourceElement class.</p>
25
 *
24
 * <p>
25
 * DescriptionSourceElement class.
26
 * </p>
27
 * 
26 28
 * @author n.hoffmann
27 29
 * @created Mar 18, 2010
28 30
 * @version 1.0
29 31
 */
30
public class DescriptionSourceElement extends AbstractEntityCollectionElement<Reference> {
32
public class DescriptionSourceElement extends
33
		AbstractEntityCollectionElement<Reference> {
31 34

  
32 35
	private ReferenceSelectionElement selection_descriptionSource;
33 36

  
34 37
	/**
35
	 * <p>Constructor for DescriptionSourceElement.</p>
36
	 *
37
	 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
38
	 * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object.
39
	 * @param element a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
40
	 * @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object.
41
	 * @param style a int.
38
	 * <p>
39
	 * Constructor for DescriptionSourceElement.
40
	 * </p>
41
	 * 
42
	 * @param cdmFormFactory
43
	 *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
44
	 *            object.
45
	 * @param formElement
46
	 *            a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
47
	 *            object.
48
	 * @param element
49
	 *            a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase}
50
	 *            object.
51
	 * @param removeListener
52
	 *            a {@link org.eclipse.swt.events.SelectionListener} object.
53
	 * @param style
54
	 *            a int.
42 55
	 */
43 56
	public DescriptionSourceElement(CdmFormFactory cdmFormFactory,
44 57
			AbstractFormSection formElement, Reference element,
45 58
			SelectionListener removeListener, int style) {
46 59
		super(cdmFormFactory, formElement, element, removeListener, null, style);
47 60
	}
48
	
61

  
49 62
	/** {@inheritDoc} */
50 63
	@Override
51 64
	public void createControls(ICdmFormElement element, int style) {
52
		selection_descriptionSource = (ReferenceSelectionElement) formFactory.createSelectionElement(SelectionType.REFERENCE, getConversationHolder(), element, "Description Source", null, style);
65
		selection_descriptionSource = (ReferenceSelectionElement) formFactory
66
				.createSelectionElement(SelectionType.REFERENCE,
67
						getConversationHolder(), element, "Description Source",
68
						null, ReferenceSelectionElement.DEFAULT, style);
53 69
	}
54 70

  
55 71
	/** {@inheritDoc} */
......
61 77
	/** {@inheritDoc} */
62 78
	@Override
63 79
	public void handleEvent(Object eventSource) {
64
		
80

  
65 81
	}
66 82
}

Also available in: Unified diff