Revision 89084783
Added by Katja Luther about 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AbstractTypeDesignationElement.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.taxeditor.ui.section.name; |
11 | 11 |
|
12 |
import org.eclipse.swt.SWT; |
|
12 | 13 |
import org.eclipse.swt.events.SelectionListener; |
13 | 14 |
|
14 | 15 |
import eu.etaxonomy.cdm.model.name.TypeDesignationBase; |
16 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
15 | 17 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
16 | 18 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
17 | 19 |
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement; |
18 | 20 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
21 |
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement; |
|
19 | 22 |
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractSourcedEntityBaseElement; |
23 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; |
|
20 | 24 |
|
21 | 25 |
/** |
22 | 26 |
* <p>Abstract AbstractTypeDesignationElement class.</p> |
... | ... | |
28 | 32 |
public abstract class AbstractTypeDesignationElement<T extends TypeDesignationBase> extends AbstractSourcedEntityBaseElement<T> { |
29 | 33 |
|
30 | 34 |
protected CheckboxElement checkbox_notDesignated; |
31 |
|
|
35 |
protected EntitySelectionElement<Reference> selection_reference; |
|
36 |
protected TextWithLabelElement text_referenceDetail; |
|
37 |
protected ICdmFormElement formElement; |
|
32 | 38 |
|
33 | 39 |
/** |
34 | 40 |
* <p>Constructor for AbstractTypeDesignationElement.</p> |
... | ... | |
50 | 56 |
@Override |
51 | 57 |
public void createControls(ICdmFormElement formElement, int style) { |
52 | 58 |
checkbox_notDesignated = formFactory.createCheckbox(formElement, "Not Designated", false, style); |
59 |
this.formElement = formElement; |
|
60 |
} |
|
61 |
|
|
62 |
@Override |
|
63 |
public void setEntity(T entity){ |
|
64 |
super.setEntity(entity); |
|
65 |
if (this.entity != null && this.entity.isLectoType()){ |
|
66 |
selection_reference = formFactory |
|
67 |
.createSelectionElement(Reference.class, formElement, "Reference", |
|
68 |
null, EntitySelectionElement.ALL, SWT.NULL); |
|
69 |
text_referenceDetail = formFactory.createTextWithLabelElement( |
|
70 |
formElement, "Reference Detail", null, SWT.NULL); |
|
71 |
} |
|
53 | 72 |
} |
54 | 73 |
|
55 | 74 |
} |
Also available in: Unified diff
ref #8136: add reference part for lectotype