Revision 89e7a3e1
Added by Patrick Plitzner almost 9 years ago
- reverted accidentally commited changes of campanula branch
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldObservationDetailElement.java | ||
---|---|---|
11 | 11 |
package eu.etaxonomy.taxeditor.ui.section.occurrence; |
12 | 12 |
|
13 | 13 |
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade; |
14 |
import eu.etaxonomy.cdm.model.description.Sex; |
|
15 |
import eu.etaxonomy.cdm.model.description.Stage; |
|
14 | 16 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
17 |
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement; |
|
15 | 18 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
16 | 19 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
17 | 20 |
import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement; |
... | ... | |
37 | 40 |
|
38 | 41 |
private NumberWithLabelElement number_individualCount; |
39 | 42 |
|
40 |
// private TermComboElement<Sex> combo_sex;
|
|
41 |
// |
|
42 |
// private TermComboElement<Stage> combo_lifeStage;
|
|
43 |
private TermComboElement<Sex> combo_sex; |
|
44 |
|
|
45 |
private TermComboElement<Stage> combo_lifeStage; |
|
43 | 46 |
|
44 | 47 |
/** |
45 | 48 |
* <p>Constructor for FieldObservationDetailElement.</p> |
... | ... | |
63 | 66 |
text_fieldNotes = formFactory.createTextWithLabelElement(formElement, "Field Notes", entity.getFieldNotes(), style); |
64 | 67 |
|
65 | 68 |
number_individualCount = formFactory.createIntegerTextWithLabelElement(formElement, "Individual Count", entity.getIndividualCount(), style); |
66 |
// combo_lifeStage = formFactory.createTermComboElement(Stage.class, formElement, "Life Stage", entity.getLifeStage(), style);
|
|
67 |
// combo_sex = formFactory.createTermComboElement(Sex.class, formElement, "Sex", entity.getSex(), style);
|
|
69 |
combo_lifeStage = formFactory.createTermComboElement(Stage.class, formElement, "Life Stage", entity.getLifeStage(), style); |
|
70 |
combo_sex = formFactory.createTermComboElement(Sex.class, formElement, "Sex", entity.getSex(), style); |
|
68 | 71 |
} |
69 | 72 |
|
70 | 73 |
/** {@inheritDoc} */ |
... | ... | |
85 | 88 |
else if(eventSource == number_individualCount){ |
86 | 89 |
getEntity().setIndividualCount(number_individualCount.getInteger()); |
87 | 90 |
} |
88 |
// else if(eventSource == combo_lifeStage){
|
|
89 |
// getEntity().setLifeStage(combo_lifeStage.getSelection());
|
|
90 |
// }
|
|
91 |
// else if(eventSource == combo_sex){
|
|
92 |
// getEntity().setSex(combo_sex.getSelection());
|
|
93 |
// }
|
|
91 |
else if(eventSource == combo_lifeStage){ |
|
92 |
getEntity().setLifeStage(combo_lifeStage.getSelection()); |
|
93 |
} |
|
94 |
else if(eventSource == combo_sex){ |
|
95 |
getEntity().setSex(combo_sex.getSelection()); |
|
96 |
} |
|
94 | 97 |
} |
95 | 98 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GeneralDetailElement.java | ||
---|---|---|
14 | 14 |
import eu.etaxonomy.cdm.model.agent.AgentBase; |
15 | 15 |
import eu.etaxonomy.cdm.model.common.LanguageString; |
16 | 16 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
17 |
import eu.etaxonomy.cdm.model.occurrence.Collection; |
|
17 | 18 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
18 | 19 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
19 | 20 |
import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement; |
... | ... | |
42 | 43 |
private TimePeriodElement element_date; |
43 | 44 |
private EntitySelectionElement<AgentBase> selection_collector; |
44 | 45 |
private TextWithLabelElement text_collectingNumber; |
45 |
// private EntitySelectionElement<Collection> selection_collection;
|
|
46 |
// private TextWithLabelElement text_accessionNumber;
|
|
46 |
private EntitySelectionElement<Collection> selection_collection; |
|
47 |
private TextWithLabelElement text_accessionNumber; |
|
47 | 48 |
|
48 | 49 |
/** |
49 | 50 |
* @param formFactory |
... | ... | |
88 | 89 |
style); |
89 | 90 |
text_collectingNumber = formFactory.createTextWithLabelElement(formElement, |
90 | 91 |
"Collecting number", entity.getFieldNumber(), style); |
91 |
// selection_collection = formFactory
|
|
92 |
// .createSelectionElement(Collection.class,
|
|
93 |
// getConversationHolder(), formElement, "Collection",
|
|
94 |
// entity.getCollection(),
|
|
95 |
// EntitySelectionElement.ALL, style);
|
|
96 |
// text_accessionNumber = formFactory.createTextWithLabelElement(
|
|
97 |
// formElement, "Accession Number", entity.getAccessionNumber(),
|
|
98 |
// style);
|
|
92 |
selection_collection = formFactory |
|
93 |
.createSelectionElement(Collection.class, |
|
94 |
getConversationHolder(), formElement, "Collection", |
|
95 |
entity.getCollection(), |
|
96 |
EntitySelectionElement.ALL, style); |
|
97 |
text_accessionNumber = formFactory.createTextWithLabelElement( |
|
98 |
formElement, "Accession Number", entity.getAccessionNumber(), |
|
99 |
style); |
|
99 | 100 |
|
100 | 101 |
} |
101 | 102 |
|
... | ... | |
127 | 128 |
} else if (eventSource == text_collectingNumber) { |
128 | 129 |
getEntity().setFieldNumber(text_collectingNumber.getText()); |
129 | 130 |
} |
130 |
// else if (eventSource == selection_collection) {
|
|
131 |
// getEntity().setCollection(selection_collection.getSelection());
|
|
132 |
// } else if (eventSource == text_accessionNumber) {
|
|
133 |
// getEntity().setAccessionNumber(text_accessionNumber.getText());
|
|
134 |
// }
|
|
131 |
else if (eventSource == selection_collection) { |
|
132 |
getEntity().setCollection(selection_collection.getSelection()); |
|
133 |
} else if (eventSource == text_accessionNumber) { |
|
134 |
getEntity().setAccessionNumber(text_accessionNumber.getText()); |
|
135 |
} |
|
135 | 136 |
|
136 | 137 |
if (eventSource != toggleableText_titleCache) { |
137 | 138 |
toggleableText_titleCache.setText(getEntity().getTitleCache()); |
Also available in: Unified diff