Project

General

Profile

« Previous | Next » 

Revision e42715ba

Added by Patrick Plitzner over 10 years ago

  • adapted detail views to new cdm3.3 model

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
38 38
import eu.etaxonomy.cdm.model.media.Media;
39 39
import eu.etaxonomy.cdm.model.name.NonViralName;
40 40
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
41
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
41 42
import eu.etaxonomy.cdm.model.reference.Reference;
42 43
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
43 44
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
......
47 48
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
48 49
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
49 50
import eu.etaxonomy.taxeditor.store.CdmStore;
50
import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.FieldObservationSection;
51
import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.FieldObservationDetailsSection;
52
import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.FieldObservationGeneralSection;
53
import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.GatheringEventSection;
51 54
import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.SpecimenSection;
52 55
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
53 56
import eu.etaxonomy.taxeditor.ui.element.RootElement;
......
76 79
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
77 80
import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
78 81
import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
79
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldObservationDetailSection;
80
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
81 82
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
82 83
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
83 84
import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
......
136 137
    public void setInput(Object input) {
137 138
		if (input instanceof DerivedUnit) {
138 139
            try {
139
				input = DerivedUnitFacade.NewInstance((DerivedUnit) input,
140
                        PreferencesUtil.getDerivedUnitConfigurator());
140
				input = DerivedUnitFacade.NewInstance((DerivedUnit) input,PreferencesUtil.getDerivedUnitConfigurator());
141 141
            } catch (DerivedUnitFacadeNotSupportedException e) {
142 142
                AbstractUtility.error(getClass(), e);
143 143
            }
......
227 227
            createMediaElementSection(rootElement);
228 228

  
229 229
        } else if (input instanceof DerivedUnitFacade) {
230
            createSpecimenDetailsView(rootElement);
231

  
232
        } else if (input instanceof FieldUnit) {
230 233
            createDerivedUnitBaseElementSection(rootElement);
231 234

  
232 235
        } else if (input instanceof FeatureNodeContainer) {
......
540 543
    private void createDerivedUnitBaseElementSection(RootElement parent) {
541 544
        destroySections();
542 545

  
543
        FieldObservationSection fieldObservationSection = formFactory.createFieldObservationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
544

  
545
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
546

  
547
        GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
546
        FieldObservationGeneralSection fieldObservationSection = formFactory.createFieldObservationGeneralSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
548 547

  
549 548
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
550 549

  
551
        FieldObservationDetailSection fieldObservationDetailSection = formFactory.createFieldObservationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
550
        GatheringEventSection gatheringEventDetailSection = formFactory.createGatheringEventSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
552 551

  
553 552
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
554 553

  
555
        SpecimenSection specimenSection = formFactory.createSpecimenSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
554
        FieldObservationDetailsSection fieldObservationDetailSection = formFactory.createFieldObservationDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
556 555

  
557 556
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
558 557

  
559

  
560 558
//        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
561 559
//
562 560
//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
......
566 564
        addPart(fieldObservationSection);
567 565
        addPart(gatheringEventDetailSection);
568 566
        addPart(fieldObservationDetailSection);
569
        addPart(specimenSection);
570 567
//        addPart(derivedUnitBaseDetailSection);
571 568
//        addPart(determinationDetailSection);
572 569
    }
573 570

  
571
    /**
572
     * createDerivedUnitBaseElementSection
573
     *
574
     * @param parent
575
     */
576
    private void createSpecimenDetailsView(RootElement parent) {
577
        destroySections();
578

  
579
        SpecimenSection specimenSection = formFactory.createSpecimenSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
580

  
581
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
582

  
583
        addPart(specimenSection);
584
    }
585

  
574 586
    /**
575 587
     * @param rootElement
576 588
     */

Also available in: Unified diff