Project

General

Profile

« Previous | Next » 

Revision 75b33001

Added by Cherian Mathew over 11 years ago

merge of trunk to the security branch

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
1

  
1 2
// $Id$
2 3
/**
3 4
 * Copyright (C) 2011 EDIT
......
66 67
import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageSection;
67 68
import eu.etaxonomy.taxeditor.ui.section.description.ScopeSection;
68 69
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailSection;
69
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection;
70
import eu.etaxonomy.taxeditor.ui.section.group.GrantedAuthorityDetailSection;
70 71
import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailSection;
71 72
import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
72 73
import eu.etaxonomy.taxeditor.ui.section.key.GeographicalScopeDetailSection;
......
169 170
	/** {@inheritDoc} */
170 171
	@Override
171 172
	protected void showParts() {
173
	    // FIXME (CM) : Need to clean out this code.
174
	    // Too much type checking to decide which detail view to display.
175
	    // Need to build in a mechanism where navigators / editors are 'aware'
176
	    // of the corresponding detail viewer.
172 177
		if (getInput() instanceof TaxonBase) {
173 178
			createTaxonSections(rootElement);
174 179

  
......
232 237
			createFeatureDistributionSection(rootElement);
233 238

  
234 239
		} else if (getInput() instanceof PolytomousKey) {
235
			createPolytomousKeySection(rootElement);
240
			//createPolytomousKeySection(rootElement);
236 241

  
237 242
		} else if ((getInput() instanceof PolytomousKeyNode)
238 243
				|| (getInput() instanceof PolytomousKeyRelationship)) {
......
712 717
	private void createPolytomousKeyNodeSection(RootElement parent) {
713 718
		destroySections();
714 719

  
715
		PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = (PolytomousKeyNodeDetailSection) formFactory
716
				.createCdmDetailSection(DetailType.POLYTOMOUS_KEY_NODE,
717
						getConversationHolder(), parent, this, Section.TWISTIE
718
								| Section.EXPANDED);
720
        PolytomousKeyDetailSection polytomousKeyDetailSection = (PolytomousKeyDetailSection) formFactory
721
                .createCdmDetailSection(DetailType.POLYTOMOUS_KEY,
722
                        getConversationHolder(), parent, this, Section.TWISTIE
723
                               | Section.COMPACT);
724
        
725
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
726
        
727
        PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = (PolytomousKeyNodeDetailSection) formFactory
728
                .createCdmDetailSection(DetailType.POLYTOMOUS_KEY_NODE,
729
                        getConversationHolder(), parent, this, Section.TWISTIE
730
                                | Section.EXPANDED);
731

  
732
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
733

  
734
//        GeographicalScopeDetailSection geographicalScopeDetailSection = (GeographicalScopeDetailSection) formFactory
735
//                .createEntityDetailSection(EntityDetailType.GEOGRAPHICAL_SCOPE,
736
//                        getConversationHolder(), parent, Section.TWISTIE | Section.COMPACT);
737
//
738
//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
739
//
740
//        ScopeRestrictionSection scopeRestrictionSection = (ScopeRestrictionSection) formFactory
741
//                .createEntityDetailSection(EntityDetailType.SCOPE_RESTRICTION,
742
//                        getConversationHolder(), parent, Section.TWISTIE | Section.COMPACT);
743
//
744
//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
745

  
746
        TaxonomicScopeSection taxonomicScopeSection = (TaxonomicScopeSection) formFactory
747
                .createEntityDetailSection(EntityDetailType.TAXONOMIC_SCOPE,
748
                        getConversationHolder(), parent, Section.TWISTIE | Section.COMPACT);        
749

  
750
	    addPart(polytomousKeyDetailSection);
751
	    addPart(polytomousKeyNodeDetailSection);
752
//	    addPart(geographicalScopeDetailSection);
753
//	    addPart(scopeRestrictionSection);
754
	    addPart(taxonomicScopeSection);
719 755

  
720
		addPart(polytomousKeyNodeDetailSection);
721 756
	}
722 757
	
723 758
	/**

Also available in: Unified diff