Revision db81978c
Added by Alexander Oppermann over 9 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldUnitGeneralDetailElement.java | ||
---|---|---|
9 | 9 |
*/ |
10 | 10 |
package eu.etaxonomy.taxeditor.ui.section.occurrence; |
11 | 11 |
|
12 |
import org.eclipse.ui.forms.widgets.ExpandableComposite; |
|
13 |
|
|
12 | 14 |
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade; |
13 | 15 |
import eu.etaxonomy.cdm.model.agent.AgentBase; |
14 | 16 |
import eu.etaxonomy.cdm.model.common.LanguageString; |
15 | 17 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
16 | 18 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType; |
19 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; |
|
20 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
|
17 | 21 |
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement; |
18 | 22 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
19 | 23 |
import eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement; |
20 | 24 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
21 | 25 |
import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement; |
26 |
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; |
|
22 | 27 |
import eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection; |
23 | 28 |
import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement; |
24 | 29 |
import eu.etaxonomy.taxeditor.ui.element.PointElement; |
... | ... | |
38 | 43 |
private ToggleableTextElement toggleableText_titleCache; |
39 | 44 |
private EnumComboElement<SpecimenOrObservationType> combo_specorobstype; |
40 | 45 |
private EntitySelectionElement<NamedArea> selection_country; |
46 |
private CollectingAreasDetailSection section_collectingAreas; |
|
41 | 47 |
private LanguageStringWithLabelElement languageText_locality; |
42 | 48 |
private PointElement element_point; |
43 | 49 |
private NumberWithLabelElement number_elevation; |
... | ... | |
70 | 76 |
combo_specorobstype.setSelection(entity.getType()); |
71 | 77 |
selection_country = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(), formElement, |
72 | 78 |
"Country", entity.getCountry(), EntitySelectionElement.NOTHING, style); |
79 |
if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION)){ |
|
80 |
section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE); |
|
81 |
section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
82 |
section_collectingAreas.setEntity(entity); |
|
83 |
} |
|
84 |
|
|
73 | 85 |
languageText_locality = formFactory.createLanguageStringWithLabelElement(formElement, "Locality", |
74 | 86 |
entity.getLocality(), style); |
75 | 87 |
element_point = formFactory.createPointElement(formElement, entity.getExactLocation(), style); |
Also available in: Unified diff
latest changes from trunk