Project

General

Profile

« Previous | Next » 

Revision e8cc5fb9

Added by Patrick Plitzner over 9 years ago

  • added preference for showing Collecting Areas below Country in DetailsView (#4473)

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/GatheringEventDetailElement.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;
16
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
17
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
14 18
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
15 19
import eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement;
16 20
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
21
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
17 22
import eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection;
18 23
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
19 24
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
......
40 45

  
41 46
	private TextWithLabelElement text_gatheringEventDescription;
42 47

  
48
	private CollectingAreasDetailSection section_collectingAreas;
49

  
43 50
	/**
44 51
	 * <p>
45 52
	 * Constructor for GatheringEventDetailElement.
......
60 67
	/** {@inheritDoc} */
61 68
	@Override
62 69
	protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) {
63
        text_collectingMethod = formFactory.createTextWithLabelElement(formElement, "Collecting Method", entity.getCollectingMethod(), style);
70

  
71
	    text_collectingMethod = formFactory.createTextWithLabelElement(formElement, "Collecting Method", entity.getCollectingMethod(), style);
64 72

  
65 73
        text_gatheringEventDescription = formFactory.createTextWithLabelElement(
66 74
        		formElement, "Gathering Event Description", entity.getGatheringEventDescription(), style);
......
71 79
		element_distToWater = formFactory.createGatheringEventUnitElement(
72 80
				formElement, "Dist. To Watersurface : ", entity, MinMaxTextSection.UnitType.DIST_TO_WATER,  style);
73 81

  
82

  
83
        if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION)){
84
            section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
85
            section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
86
            section_collectingAreas.setEntity(entity);
87
        }
88

  
74 89
	}
75 90

  
76 91
	/** {@inheritDoc} */

Also available in: Unified diff