Revision f561b00c
Added by Niels Hoffmann about 13 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DerivedUnitElement.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.occurrence.SpecimenOrObservationBase; |
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.AbstractSelectionElement; |
22 |
import eu.etaxonomy.taxeditor.ui.selection.DerivedUnitBaseSelectionElement; |
|
22 | 23 |
|
23 | 24 |
/** |
24 |
* <p>DerivedUnitElement class.</p> |
|
25 |
* |
|
25 |
* <p> |
|
26 |
* DerivedUnitElement class. |
|
27 |
* </p> |
|
28 |
* |
|
26 | 29 |
* @author n.hoffmann |
27 | 30 |
* @created Sep 16, 2010 |
28 | 31 |
* @version 1.0 |
29 | 32 |
*/ |
30 |
public class DerivedUnitElement extends AbstractEntityCollectionElement<SpecimenOrObservationBase> { |
|
31 |
|
|
33 |
public class DerivedUnitElement extends |
|
34 |
AbstractEntityCollectionElement<SpecimenOrObservationBase> { |
|
35 |
|
|
32 | 36 |
private AbstractSelectionElement selection_derivedUnit; |
33 | 37 |
|
34 | 38 |
/** |
35 |
* <p>Constructor for DerivedUnitElement.</p> |
|
36 |
* |
|
37 |
* @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object. |
|
38 |
* @param section a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} object. |
|
39 |
* @param entity a {@link eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase} object. |
|
40 |
* @param removeListener a {@link org.eclipse.swt.events.SelectionListener} object. |
|
41 |
* @param style a int. |
|
39 |
* <p> |
|
40 |
* Constructor for DerivedUnitElement. |
|
41 |
* </p> |
|
42 |
* |
|
43 |
* @param formFactory |
|
44 |
* a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} |
|
45 |
* object. |
|
46 |
* @param section |
|
47 |
* a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection} |
|
48 |
* object. |
|
49 |
* @param entity |
|
50 |
* a |
|
51 |
* {@link eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase} |
|
52 |
* object. |
|
53 |
* @param removeListener |
|
54 |
* a {@link org.eclipse.swt.events.SelectionListener} object. |
|
55 |
* @param style |
|
56 |
* a int. |
|
42 | 57 |
*/ |
43 | 58 |
public DerivedUnitElement(CdmFormFactory formFactory, |
44 | 59 |
AbstractFormSection section, SpecimenOrObservationBase entity, |
... | ... | |
46 | 61 |
super(formFactory, section, entity, removeListener, null, style); |
47 | 62 |
} |
48 | 63 |
|
49 |
/* (non-Javadoc) |
|
50 |
* @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#createControls(eu.etaxonomy.taxeditor.forms.ICdmFormElement, int) |
|
64 |
/* |
|
65 |
* (non-Javadoc) |
|
66 |
* |
|
67 |
* @see |
|
68 |
* eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#createControls |
|
69 |
* (eu.etaxonomy.taxeditor.forms.ICdmFormElement, int) |
|
51 | 70 |
*/ |
52 | 71 |
/** {@inheritDoc} */ |
53 | 72 |
@Override |
54 | 73 |
public void createControls(ICdmFormElement element, int style) { |
55 |
selection_derivedUnit = formFactory.createSelectionElement(SelectionType.DERIVED_UNIT, getConversationHolder(), element, "Specimen", null, style); |
|
74 |
selection_derivedUnit = formFactory.createSelectionElement( |
|
75 |
SelectionType.DERIVED_UNIT, getConversationHolder(), element, |
|
76 |
"Specimen", null, DerivedUnitBaseSelectionElement.DEFAULT, |
|
77 |
style); |
|
56 | 78 |
} |
57 | 79 |
|
58 |
/* (non-Javadoc) |
|
59 |
* @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent(java.lang.Object) |
|
80 |
/* |
|
81 |
* (non-Javadoc) |
|
82 |
* |
|
83 |
* @see |
|
84 |
* eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent |
|
85 |
* (java.lang.Object) |
|
60 | 86 |
*/ |
61 | 87 |
/** {@inheritDoc} */ |
62 | 88 |
@Override |
... | ... | |
67 | 93 |
/** {@inheritDoc} */ |
68 | 94 |
@Override |
69 | 95 |
public void setEntity(SpecimenOrObservationBase entity) { |
70 |
|
|
96 |
|
|
71 | 97 |
} |
72 | 98 |
} |
Also available in: Unified diff
Refactoring selection elements so they can be configured