Revision ac1659d4
Added by Patrick Plitzner over 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java | ||
---|---|---|
27 | 27 |
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement; |
28 | 28 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
29 | 29 |
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; |
30 |
import eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement; |
|
30 | 31 |
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement; |
31 | 32 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; |
32 | 33 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; |
... | ... | |
61 | 62 |
|
62 | 63 |
private CheckboxElement checkbox_openInEditor; |
63 | 64 |
|
64 |
private CheckboxElement checkbox_excluded;
|
|
65 |
private CheckboxElement checkbox_unplaced;
|
|
65 | 66 |
|
66 |
private CheckboxElement checkbox_unplaced; |
|
67 |
private CheckboxElement checkbox_excluded; |
|
68 |
|
|
69 |
private MultilanguageTextElement multiLanguageTextExcludedNotes; |
|
67 | 70 |
|
68 | 71 |
private boolean openInEditor; |
69 | 72 |
|
... | ... | |
111 | 114 |
|
112 | 115 |
} |
113 | 116 |
|
114 |
|
|
115 | 117 |
if (isCreateNew()){ |
116 | 118 |
setParentTreeNode(entity); |
117 |
|
|
118 | 119 |
} else{ |
119 | 120 |
setTreeNode(entity); |
120 | 121 |
complete = true; |
121 | 122 |
} |
122 | 123 |
if (entity instanceof TaxonNode) { |
123 |
checkbox_excluded = formFactory.createCheckbox(formElement, |
|
124 |
"Taxon is excluded", ((TaxonNode) entity).isExcluded(), style); |
|
125 | 124 |
checkbox_unplaced = formFactory.createCheckbox(formElement, |
126 | 125 |
"Taxon is unplaced", ((TaxonNode) entity).isUnplaced(), style); |
126 |
checkbox_excluded = formFactory.createCheckbox(formElement, |
|
127 |
"Taxon is excluded", ((TaxonNode) entity).isExcluded(), style); |
|
128 |
multiLanguageTextExcludedNotes = formFactory.createMultiLanguageTextElement(formElement, "Excluded Notes", ((TaxonNode)entity).getExcludedNote(), 50, style); |
|
129 |
multiLanguageTextExcludedNotes.setEnabled(((TaxonNode) entity).isExcluded()); |
|
127 | 130 |
} |
128 | 131 |
|
129 | 132 |
if (!isCreateNew()){ |
... | ... | |
135 | 138 |
checkbox_openInEditor = formFactory.createCheckbox(formElement, |
136 | 139 |
"Open in Editor", true, style); |
137 | 140 |
setOpenInEditor(true); |
138 |
|
|
139 | 141 |
} |
140 | 142 |
|
141 | 143 |
private void preFillTaxonName() { |
... | ... | |
163 | 165 |
} |
164 | 166 |
} |
165 | 167 |
} |
166 |
|
|
167 | 168 |
} |
168 |
|
|
169 | 169 |
} |
170 |
|
|
171 | 170 |
} |
172 | 171 |
} |
173 | 172 |
|
... | ... | |
195 | 194 |
selection_reuseExistingTaxon.setEnabled(enabled); |
196 | 195 |
textNewTaxonName.setEnabled(enabled); |
197 | 196 |
|
198 |
//setTaxon(selection_reuseExistingName.getEntity()); |
|
199 |
|
|
200 | 197 |
complete = !textNewTaxonName.getText().isEmpty(); |
201 | 198 |
} else if (eventSource == textNewTaxonName) { |
202 | 199 |
boolean enabled = CdmUtils.isBlank(textNewTaxonName.getText()); |
... | ... | |
205 | 202 |
|
206 | 203 |
complete = CdmUtils.isNotBlank(textNewTaxonName.getText()); |
207 | 204 |
} else if (eventSource == checkbox_excluded) { |
208 |
((TaxonNode) getEntity()).setExcluded(checkbox_excluded.getSelection()); |
|
205 |
boolean isExcluded = checkbox_excluded.getSelection(); |
|
206 |
((TaxonNode) getEntity()).setExcluded(isExcluded); |
|
207 |
multiLanguageTextExcludedNotes.setEnabled(isExcluded); |
|
209 | 208 |
} else if (eventSource == checkbox_unplaced) { |
210 | 209 |
((TaxonNode) getEntity()).setUnplaced(checkbox_unplaced.getSelection()); |
211 | 210 |
} else if (eventSource == checkbox_openInEditor) { |
... | ... | |
215 | 214 |
for (ICdmFormElement element : selectionNodeAgentRelation.getElements()){ |
216 | 215 |
allComplete &=((TaxonNodeAgentRelationCollectionElement)element).isComplete(); |
217 | 216 |
} |
218 |
|
|
219 | 217 |
complete = !isCreateNew() && allComplete; |
220 | 218 |
} |
221 | 219 |
} |
... | ... | |
319 | 317 |
} |
320 | 318 |
complete = allComplete; |
321 | 319 |
} |
322 |
|
|
323 |
|
|
324 | 320 |
return complete; |
325 | 321 |
} |
326 | 322 |
|
327 |
/** |
|
328 |
* @return the createNew |
|
329 |
*/ |
|
330 | 323 |
public boolean isCreateNew() { |
331 | 324 |
return createNew; |
332 | 325 |
} |
Also available in: Unified diff
fix #6199 Excluded note for excluded taxon nodes in TaxEditor