Revision bba5f991
Added by Patrick Plitzner over 8 years ago
- added collecting area section to general section DerivedUnit DetailsView (fixes #4473)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitGeneralDetailElement.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
package eu.etaxonomy.taxeditor.ui.section.occurrence; |
12 | 12 |
|
13 |
import org.eclipse.ui.forms.widgets.ExpandableComposite; |
|
14 |
|
|
13 | 15 |
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade; |
14 | 16 |
import eu.etaxonomy.cdm.model.agent.AgentBase; |
15 | 17 |
import eu.etaxonomy.cdm.model.common.LanguageString; |
16 | 18 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
17 | 19 |
import eu.etaxonomy.cdm.model.occurrence.Collection; |
18 | 20 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType; |
21 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; |
|
22 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
|
19 | 23 |
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement; |
20 | 24 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
21 | 25 |
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement; |
22 | 26 |
import eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement; |
23 | 27 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
24 | 28 |
import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement; |
29 |
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; |
|
25 | 30 |
import eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection; |
26 | 31 |
import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement; |
27 | 32 |
import eu.etaxonomy.taxeditor.ui.element.PointElement; |
... | ... | |
44 | 49 |
private ToggleableTextElement toggleableText_titleCache; |
45 | 50 |
private EnumComboElement<SpecimenOrObservationType> combo_specorobstype; |
46 | 51 |
private EntitySelectionElement<NamedArea> selection_country; |
52 |
private CollectingAreasDetailSection section_collectingAreas; |
|
47 | 53 |
private LanguageStringWithLabelElement languageText_locality; |
48 | 54 |
private PointElement element_point; |
49 | 55 |
private NumberWithLabelElement number_elevation; |
... | ... | |
88 | 94 |
selection_country = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(), |
89 | 95 |
formElement, "Country", |
90 | 96 |
entity.getCountry(), EntitySelectionElement.NOTHING, style); |
97 |
|
|
98 |
if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION)){ |
|
99 |
section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE); |
|
100 |
section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
101 |
section_collectingAreas.setEntity(entity); |
|
102 |
} |
|
91 | 103 |
languageText_locality = formFactory |
92 | 104 |
.createLanguageStringWithLabelElement(formElement, "Locality", |
93 | 105 |
entity.getLocality(), style); |
Also available in: Unified diff