ref #8260: save expansion state for supplemental data
authorKatja Luther <k.luther@bgbm.org>
Tue, 7 May 2019 13:29:00 +0000 (15:29 +0200)
committerKatja Luther <k.luther@bgbm.org>
Tue, 4 Jun 2019 08:45:22 +0000 (10:45 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/supplementaldata/SupplementalDataViewerE4.java

index a72039deeddae9570abe2bc714104f8d849a25cc..3522c3fa2a037bdc8d5efe1a1e6a57ccc11b6423 100644 (file)
@@ -113,16 +113,18 @@ public class SupplementalDataViewerE4 extends AbstractCdmDataViewerE4 {
        }
 
        private void createSourceSection(RootElement parent){
-        SourceSection sourceSection =  formFactory.createSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+           int expandStyle = getSectionStyle(SourceSection.class, false);
+        SourceSection sourceSection =  formFactory.createSourceSection(getConversationHolder(), parent, expandStyle);
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
         addPart(sourceSection);
     }
 
     private void createAnnotationSections(RootElement parent) {
-        AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        int expandStyle = getSectionStyle(AnnotationSection.class, false);
+        AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), parent, expandStyle);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
+        expandStyle = getSectionStyle(MarkerSection.class, false);
         MarkerSection markerSection = formFactory.createMarkerSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
@@ -132,24 +134,24 @@ public class SupplementalDataViewerE4 extends AbstractCdmDataViewerE4 {
     }
 
     private void createIdentifiableSections(RootElement parent) {
-
-        SourceSection sourceSection = formFactory.createSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        int expandStyle = getSectionStyle(SourceSection.class, false);
+        SourceSection sourceSection = formFactory.createSourceSection(getConversationHolder(), parent, expandStyle);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        IdentifierSection identifierSection = formFactory.createIdentifierDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        expandStyle =  getSectionStyle(IdentifierSection.class, false);
+        IdentifierSection identifierSection = formFactory.createIdentifierDetailSection(getConversationHolder(), parent, expandStyle);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        ExtensionSection extensionSection = formFactory.createExtensionSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        expandStyle =  getSectionStyle(ExtensionSection.class, false);
+        ExtensionSection extensionSection = formFactory.createExtensionSection(getConversationHolder(), parent, expandStyle);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        CreditSection creditSection = formFactory.createCreditSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        expandStyle =  getSectionStyle(CreditSection.class, false);
+        CreditSection creditSection = formFactory.createCreditSection(getConversationHolder(), parent, expandStyle);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        expandStyle =  getSectionStyle(RightsSection.class, false);
+        RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, expandStyle);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -162,7 +164,8 @@ public class SupplementalDataViewerE4 extends AbstractCdmDataViewerE4 {
        }
 
     private void createIdentifiableMediaSections(RootElement parent) {
-        MediaSection mediaSection = formFactory.createMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        int expandStyle = getSectionStyle(MediaSection.class, false);
+        MediaSection mediaSection = formFactory.createMediaSection(getConversationHolder(), parent, expandStyle);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);