Revision 98db3bf7
Added by Patrick Plitzner almost 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/supplementaldata/SupplementalDataViewerE4.java | ||
---|---|---|
28 | 28 |
import eu.etaxonomy.taxeditor.model.IElementHasDetails; |
29 | 29 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; |
30 | 30 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
31 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
|
31 | 32 |
import eu.etaxonomy.taxeditor.ui.element.RootElement; |
32 | 33 |
import eu.etaxonomy.taxeditor.ui.section.media.MediaSection; |
33 | 34 |
import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection; |
... | ... | |
114 | 115 |
} |
115 | 116 |
|
116 | 117 |
private void createSourceSection(RootElement parent){ |
117 |
int expandStyle = getSectionStyle(SourceSection.class, false);
|
|
118 |
int expandStyle = StoreUtil.getSectionStyle(SourceSection.class, getInput().getClass().getCanonicalName(), false);
|
|
118 | 119 |
SourceSection sourceSection = formFactory.createSourceSection(getConversationHolder(), parent, expandStyle); |
119 | 120 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
120 | 121 |
addPart(sourceSection); |
121 | 122 |
} |
122 | 123 |
|
123 | 124 |
private void createAnnotationSections(RootElement parent) { |
124 |
int expandStyle = getSectionStyle(AnnotationSection.class, false);
|
|
125 |
int expandStyle = StoreUtil.getSectionStyle(AnnotationSection.class, getInput().getClass().getCanonicalName(), false);
|
|
125 | 126 |
AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), parent, expandStyle); |
126 | 127 |
|
127 | 128 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
128 |
expandStyle = getSectionStyle(MarkerSection.class, false);
|
|
129 |
expandStyle = StoreUtil.getSectionStyle(MarkerSection.class, getInput().getClass().getCanonicalName(), false);
|
|
129 | 130 |
MarkerSection markerSection = formFactory.createMarkerSection(getConversationHolder(), parent, expandStyle); |
130 | 131 |
|
131 | 132 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
... | ... | |
135 | 136 |
} |
136 | 137 |
|
137 | 138 |
private void createIdentifiableSections(RootElement parent) { |
138 |
int expandStyle = getSectionStyle(SourceSection.class, false);
|
|
139 |
int expandStyle = StoreUtil.getSectionStyle(SourceSection.class, getInput().getClass().getCanonicalName(), false);
|
|
139 | 140 |
SourceSection sourceSection = formFactory.createSourceSection(getConversationHolder(), parent, expandStyle); |
140 | 141 |
|
141 | 142 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
142 |
expandStyle = getSectionStyle(IdentifierSection.class, false);
|
|
143 |
expandStyle = StoreUtil.getSectionStyle(IdentifierSection.class, getInput().getClass().getCanonicalName(), false);
|
|
143 | 144 |
IdentifierSection identifierSection = formFactory.createIdentifierDetailSection(getConversationHolder(), parent, expandStyle); |
144 | 145 |
|
145 | 146 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
146 |
expandStyle = getSectionStyle(ExtensionSection.class, false);
|
|
147 |
expandStyle = StoreUtil.getSectionStyle(ExtensionSection.class, getInput().getClass().getCanonicalName(), false);
|
|
147 | 148 |
ExtensionSection extensionSection = formFactory.createExtensionSection(getConversationHolder(), parent, expandStyle); |
148 | 149 |
|
149 | 150 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
150 |
expandStyle = getSectionStyle(CreditSection.class, false);
|
|
151 |
expandStyle = StoreUtil.getSectionStyle(CreditSection.class, getInput().getClass().getCanonicalName(), false);
|
|
151 | 152 |
CreditSection creditSection = formFactory.createCreditSection(getConversationHolder(), parent, expandStyle); |
152 | 153 |
|
153 | 154 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
154 |
expandStyle = getSectionStyle(RightsSection.class, false);
|
|
155 |
expandStyle = StoreUtil.getSectionStyle(RightsSection.class, getInput().getClass().getCanonicalName(), false);
|
|
155 | 156 |
RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, expandStyle); |
156 | 157 |
|
157 | 158 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
... | ... | |
165 | 166 |
} |
166 | 167 |
|
167 | 168 |
private void createIdentifiableMediaSections(RootElement parent) { |
168 |
int expandStyle = getSectionStyle(MediaSection.class, false);
|
|
169 |
int expandStyle = StoreUtil.getSectionStyle(MediaSection.class, getInput().getClass().getCanonicalName(), false);
|
|
169 | 170 |
MediaSection mediaSection = formFactory.createMediaSection(getConversationHolder(), parent, expandStyle); |
170 | 171 |
|
171 | 172 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
... | ... | |
174 | 175 |
} |
175 | 176 |
|
176 | 177 |
private void createVersionSection(RootElement parent){ |
177 |
VersionSection versionSection = formFactory.createVersionSection(parent, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED);
|
|
178 |
VersionSection versionSection = formFactory.createVersionSection(parent, ExpandableComposite.NO_TITLE | StoreUtil.getSectionStyle(VersionSection.class, getInput().getClass().getCanonicalName(), true));
|
|
178 | 179 |
addPart(versionSection); |
179 | 180 |
} |
180 | 181 |
|
181 | 182 |
private void createCdmBaseSection(RootElement parent) { |
182 | 183 |
|
183 |
CdmBaseSection cdmBaseSection = formFactory.createCdmBaseSection(parent, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED);
|
|
184 |
CdmBaseSection cdmBaseSection = formFactory.createCdmBaseSection(parent, ExpandableComposite.NO_TITLE | StoreUtil.getSectionStyle(CdmBaseSection.class, getInput().getClass().getCanonicalName(), true));
|
|
184 | 185 |
addPart(cdmBaseSection); |
185 | 186 |
} |
186 | 187 |
|
Also available in: Unified diff
ref #8260 Complete refactoring of expansion state saving