Revision 1e816532
Added by Katja Luther almost 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java | ||
---|---|---|
68 | 68 |
@Override |
69 | 69 |
protected void createControls(ICdmFormElement formElement, |
70 | 70 |
TaxonRelationship entity, int style) { |
71 |
if (!(entity.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR()) || entity.getType().equals(TaxonRelationshipType.PRO_PARTE_MISAPPLIED_NAME_FOR())) ){ |
|
72 |
combo_taxonRelationshipType = formFactory.createTermComboElement( |
|
73 |
TaxonRelationshipTypeInverseContainer.class, |
|
74 |
formElement, "Relationship Type", |
|
75 |
getTaxonRelationshipTypeInverseContainer(), style); |
|
71 |
if ((entity.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR()) || entity.getType().equals(TaxonRelationshipType.PRO_PARTE_MISAPPLIED_NAME_FOR())) ){ |
|
76 | 72 |
|
77 |
combo_taxonRelationshipType.setEnabled(false); |
|
78 |
selection_relatedTaxon = formFactory.createSelectionElement( |
|
79 |
Taxon.class, //getConversationHolder(), |
|
80 |
formElement, "Related Taxon", getRelatedTaxon(), |
|
81 |
EntitySelectionElement.SELECTABLE, style); |
|
82 |
checkBoxDoubtful = formFactory.createCheckbox(formElement, "Relation Doubtful", entity.isDoubtful(), style); |
|
83 |
|
|
84 |
}else{ |
|
85 | 73 |
taxon = entity.getFromTaxon(); |
86 | 74 |
|
87 |
taxonElement = formFactory.createTaxonDetailSection(getConversationHolder(), formElement, null, style); |
|
88 |
taxonElement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
89 |
addControl(taxonElement); |
|
90 |
addElement(taxonElement); |
|
91 |
combo_misappliedRelationshipType = formFactory.createMisappliedRelationshipComboElement(formElement, "Relationship Type", |
|
75 |
taxonElement = formFactory.createTaxonDetailSection(getConversationHolder(), formElement, null, style); |
|
76 |
taxonElement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
77 |
addControl(taxonElement); |
|
78 |
addElement(taxonElement); |
|
79 |
combo_misappliedRelationshipType = formFactory.createMisappliedRelationshipComboElement(formElement, "Relationship Type", |
|
80 |
entity.getType(), style); |
|
81 |
|
|
82 |
combo_misappliedRelationshipType.setEnabled(true); |
|
83 |
|
|
84 |
sensuReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(), |
|
85 |
formElement, "Sensu", |
|
86 |
taxon.getSec(), EntitySelectionElement.ALL, |
|
87 |
style); |
|
88 |
|
|
89 |
text_sensu_microreference = formFactory.createTextWithLabelElement( |
|
90 |
formElement, "Detail", |
|
91 |
taxon.getSecMicroReference(),null, |
|
92 |
SWT.WRAP); |
|
93 |
|
|
94 |
secReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(), |
|
95 |
formElement, "Misappl. Sec.", |
|
96 |
entity.getCitation(), EntitySelectionElement.ALL, |
|
97 |
style); |
|
98 |
|
|
99 |
text_secundum_microreference = formFactory.createTextWithLabelElement( |
|
100 |
formElement, "Detail", |
|
101 |
entity.getCitationMicroReference(),null, |
|
102 |
SWT.WRAP); |
|
103 |
checkBoxDoubtful = formFactory.createCheckbox(formElement, "Misapplication Doubtful", entity.isDoubtful(), style); |
|
104 |
}else if ((entity.getType().equals(TaxonRelationshipType.PRO_PARTE_SYNONYM_FOR()) || entity.getType().equals(TaxonRelationshipType.PARTIAL_SYNONYM_FOR())) ){ |
|
105 |
taxon = entity.getFromTaxon(); |
|
106 |
|
|
107 |
taxonElement = formFactory.createTaxonDetailSection(getConversationHolder(), formElement, null, style); |
|
108 |
taxonElement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
109 |
addControl(taxonElement); |
|
110 |
addElement(taxonElement); |
|
111 |
combo_misappliedRelationshipType = formFactory.createMisappliedRelationshipComboElement(formElement, "Relationship Type", |
|
92 | 112 |
entity.getType(), style); |
93 | 113 |
|
94 |
combo_misappliedRelationshipType.setEnabled(true); |
|
114 |
combo_misappliedRelationshipType.setEnabled(true); |
|
115 |
|
|
116 |
sensuReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(), |
|
117 |
formElement, "Sensu", |
|
118 |
taxon.getSec(), EntitySelectionElement.ALL, |
|
119 |
style); |
|
120 |
|
|
121 |
text_sensu_microreference = formFactory.createTextWithLabelElement( |
|
122 |
formElement, "Detail", |
|
123 |
taxon.getSecMicroReference(),null, |
|
124 |
SWT.WRAP); |
|
95 | 125 |
|
96 |
sensuReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(),
|
|
97 |
formElement, "Sensu",
|
|
98 |
taxon.getSec(), EntitySelectionElement.ALL,
|
|
99 |
style);
|
|
126 |
secReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(),
|
|
127 |
formElement, "Syn Sec.",
|
|
128 |
entity.getCitation(), EntitySelectionElement.ALL,
|
|
129 |
style);
|
|
100 | 130 |
|
101 |
text_sensu_microreference = formFactory.createTextWithLabelElement( |
|
102 |
formElement, "Detail", |
|
103 |
taxon.getSecMicroReference(),null, |
|
104 |
SWT.WRAP); |
|
131 |
text_secundum_microreference = formFactory.createTextWithLabelElement( |
|
132 |
formElement, "Detail", |
|
133 |
entity.getCitationMicroReference(),null, |
|
134 |
SWT.WRAP); |
|
135 |
checkBoxDoubtful = formFactory.createCheckbox(formElement, "PP Doubtful", entity.isDoubtful(), style); |
|
105 | 136 |
|
106 |
secReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(), |
|
107 |
formElement, "Misappl. Sec.", |
|
108 |
entity.getCitation(), EntitySelectionElement.ALL, |
|
109 |
style); |
|
137 |
}else{ |
|
138 |
combo_taxonRelationshipType = formFactory.createTermComboElement( |
|
139 |
TaxonRelationshipTypeInverseContainer.class, |
|
140 |
formElement, "Relationship Type", |
|
141 |
getTaxonRelationshipTypeInverseContainer(), style); |
|
110 | 142 |
|
111 |
text_secundum_microreference = formFactory.createTextWithLabelElement( |
|
112 |
formElement, "Detail", |
|
113 |
entity.getCitationMicroReference(),null, |
|
114 |
SWT.WRAP); |
|
115 |
checkBoxDoubtful = formFactory.createCheckbox(formElement, "Misapplication Doubtful", entity.isDoubtful(), style); |
|
143 |
combo_taxonRelationshipType.setEnabled(false); |
|
144 |
selection_relatedTaxon = formFactory.createSelectionElement( |
|
145 |
Taxon.class, //getConversationHolder(), |
|
146 |
formElement, "Related Taxon", getRelatedTaxon(), |
|
147 |
EntitySelectionElement.SELECTABLE, style); |
|
148 |
checkBoxDoubtful = formFactory.createCheckbox(formElement, "Relation Doubtful", entity.isDoubtful(), style); |
|
116 | 149 |
|
117 | 150 |
|
118 | 151 |
} |
Also available in: Unified diff
smaller changes in io wizards and navigator menu