Revision 6ac58758
Added by Patrick Plitzner over 10 years ago
- commented compile errors due to model changes (Ticket #3732)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitBaseDetailElement.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 2 |
/** |
3 | 3 |
* Copyright (C) 2007 EDIT |
4 |
* European Distributed Institute of Taxonomy
|
|
4 |
* European Distributed Institute of Taxonomy |
|
5 | 5 |
* http://www.e-taxonomy.eu |
6 |
*
|
|
6 |
* |
|
7 | 7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
8 | 8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
9 | 9 |
*/ |
... | ... | |
14 | 14 |
|
15 | 15 |
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade; |
16 | 16 |
import eu.etaxonomy.cdm.api.facade.MethodNotSupportedByDerivedUnitTypeException; |
17 |
import eu.etaxonomy.cdm.model.name.NomenclaturalCode; |
|
18 | 17 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
19 |
import eu.etaxonomy.cdm.model.occurrence.PreservationMethod; |
|
20 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType; |
|
21 | 18 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
22 | 19 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
23 |
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement; |
|
24 |
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement; |
|
25 | 20 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
26 | 21 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
27 | 22 |
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; |
... | ... | |
33 | 28 |
* <p> |
34 | 29 |
* DerivedUnitBaseDetailElement class. |
35 | 30 |
* </p> |
36 |
*
|
|
31 |
* |
|
37 | 32 |
* @author n.hoffmann |
38 | 33 |
* @created Jun 24, 2010 |
39 | 34 |
* @version 1.0 |
... | ... | |
50 | 45 |
private EntitySelectionElement<TaxonNameBase> selection_storedUnder; |
51 | 46 |
|
52 | 47 |
private TextWithLabelElement text_exsicatum; |
53 |
|
|
54 |
|
|
55 |
private TermComboElement<PreservationMethod> combo_preservationMethod; |
|
48 |
|
|
49 |
//FIXME:3.3MC---- see Ticket #3732 |
|
50 |
// private TermComboElement<PreservationMethod> combo_preservationMethod; |
|
51 |
//FIXME:3.3MC---- |
|
56 | 52 |
|
57 | 53 |
private SpecimenCollectionDetailSection section_duplicates; |
58 | 54 |
|
... | ... | |
62 | 58 |
* <p> |
63 | 59 |
* Constructor for DerivedUnitBaseDetailElement. |
64 | 60 |
* </p> |
65 |
*
|
|
61 |
* |
|
66 | 62 |
* @param formFactory |
67 | 63 |
* a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} |
68 | 64 |
* object. |
... | ... | |
87 | 83 |
text_barcode = formFactory.createTextWithLabelElement(formElement, "Barcode", entity.getBarcode(), style); |
88 | 84 |
text_catalogNumber = formFactory.createTextWithLabelElement(formElement, "Catalog Number", entity.getCatalogNumber(), style); |
89 | 85 |
|
90 |
|
|
91 |
try { |
|
92 |
combo_preservationMethod = formFactory.createTermComboElement(PreservationMethod.class, formElement, "Preservation Method", entity.getPreservationMethod(), style); |
|
93 |
} catch (MethodNotSupportedByDerivedUnitTypeException e) { |
|
94 |
// we ignore this |
|
95 |
AbstractUtility.info(e.getMessage()); |
|
96 |
} |
|
86 |
|
|
87 |
//FIXME:3.3MC---- |
|
88 |
// try { |
|
89 |
// combo_preservationMethod = formFactory.createTermComboElement(PreservationMethod.class, formElement, "Preservation Method", entity.getPreservationMethod(), style); |
|
90 |
// } catch (MethodNotSupportedByDerivedUnitTypeException e) { |
|
91 |
// // we ignore this |
|
92 |
// AbstractUtility.info(e.getMessage()); |
|
93 |
// } |
|
94 |
//FIXME:3.3MC---- |
|
97 | 95 |
selection_storedUnder = formFactory.createSelectionElement(TaxonNameBase.class, getConversationHolder(), formElement, "Stored Under", entity.getStoredUnder(), EntitySelectionElement.ALL, style); |
98 | 96 |
|
99 | 97 |
try { |
... | ... | |
127 | 125 |
getEntity().setBarcode(text_barcode.getText()); |
128 | 126 |
} else if (eventSource == text_catalogNumber) { |
129 | 127 |
getEntity().setCatalogNumber(text_catalogNumber.getText()); |
130 |
} else if (eventSource == combo_preservationMethod) { |
|
131 |
try { |
|
132 |
getEntity().setPreservationMethod( |
|
133 |
combo_preservationMethod.getSelection()); |
|
134 |
} catch (MethodNotSupportedByDerivedUnitTypeException e) { |
|
135 |
AbstractUtility |
|
136 |
.errorDialog( |
|
137 |
"MethodNotSupportedByDerivedUnitTypeException", |
|
138 |
this, |
|
139 |
"MethodNotSupportedByDerivedUnitTypeException when trying to set preservation method for derive unit", |
|
140 |
e); |
|
141 |
} |
|
128 |
//FIXME:3.3MC---- |
|
129 |
// } else if (eventSource == combo_preservationMethod) { |
|
130 |
// try { |
|
131 |
// getEntity().setPreservationMethod( |
|
132 |
// combo_preservationMethod.getSelection()); |
|
133 |
// } catch (MethodNotSupportedByDerivedUnitTypeException e) { |
|
134 |
// AbstractUtility |
|
135 |
// .errorDialog( |
|
136 |
// "MethodNotSupportedByDerivedUnitTypeException", |
|
137 |
// this, |
|
138 |
// "MethodNotSupportedByDerivedUnitTypeException when trying to set preservation method for derive unit", |
|
139 |
// e); |
|
140 |
// } |
|
141 |
//FIXME:3.3MC---- |
|
142 | 142 |
} else if (eventSource == selection_storedUnder) { |
143 | 143 |
getEntity().setStoredUnder(selection_storedUnder.getEntity()); |
144 | 144 |
} else if (eventSource == text_exsicatum) { |
Also available in: Unified diff