1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.taxeditor.ui.element;
|
10
|
|
11
|
import java.util.ArrayList;
|
12
|
import java.util.Comparator;
|
13
|
import java.util.HashSet;
|
14
|
import java.util.List;
|
15
|
import java.util.Map;
|
16
|
import java.util.Set;
|
17
|
|
18
|
import javax.inject.Inject;
|
19
|
|
20
|
import org.eclipse.e4.core.contexts.IEclipseContext;
|
21
|
import org.eclipse.jface.util.IPropertyChangeListener;
|
22
|
import org.eclipse.jface.viewers.ISelection;
|
23
|
import org.eclipse.jface.viewers.ISelectionProvider;
|
24
|
import org.eclipse.jface.window.Window;
|
25
|
//import org.eclipse.nebula.widgets.richtext.RichTextEditor;
|
26
|
import org.eclipse.swt.SWT;
|
27
|
import org.eclipse.swt.custom.StyledText;
|
28
|
import org.eclipse.swt.events.FocusAdapter;
|
29
|
import org.eclipse.swt.events.FocusEvent;
|
30
|
import org.eclipse.swt.events.FocusListener;
|
31
|
import org.eclipse.swt.events.MouseAdapter;
|
32
|
import org.eclipse.swt.events.MouseEvent;
|
33
|
import org.eclipse.swt.events.MouseListener;
|
34
|
import org.eclipse.swt.events.SelectionEvent;
|
35
|
import org.eclipse.swt.events.SelectionListener;
|
36
|
import org.eclipse.swt.events.TypedEvent;
|
37
|
import org.eclipse.swt.graphics.Color;
|
38
|
import org.eclipse.swt.graphics.Font;
|
39
|
import org.eclipse.swt.widgets.Composite;
|
40
|
import org.eclipse.swt.widgets.Control;
|
41
|
import org.eclipse.swt.widgets.Display;
|
42
|
import org.eclipse.swt.widgets.Event;
|
43
|
import org.eclipse.swt.widgets.Label;
|
44
|
import org.eclipse.ui.forms.IFormColors;
|
45
|
import org.eclipse.ui.forms.events.ExpansionAdapter;
|
46
|
import org.eclipse.ui.forms.events.ExpansionEvent;
|
47
|
import org.eclipse.ui.forms.widgets.ExpandableComposite;
|
48
|
import org.eclipse.ui.forms.widgets.FormToolkit;
|
49
|
import org.eclipse.ui.forms.widgets.Section;
|
50
|
import org.eclipse.ui.forms.widgets.TableWrapData;
|
51
|
import org.eclipse.ui.internal.forms.widgets.FormFonts;
|
52
|
import org.joda.time.DateTime;
|
53
|
import org.joda.time.Partial;
|
54
|
import org.springframework.security.core.GrantedAuthority;
|
55
|
|
56
|
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
|
57
|
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
|
58
|
import eu.etaxonomy.cdm.common.DOI;
|
59
|
import eu.etaxonomy.cdm.common.URI;
|
60
|
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
|
61
|
import eu.etaxonomy.cdm.model.agent.AgentBase;
|
62
|
import eu.etaxonomy.cdm.model.agent.ORCID;
|
63
|
import eu.etaxonomy.cdm.model.agent.Person;
|
64
|
import eu.etaxonomy.cdm.model.agent.Team;
|
65
|
import eu.etaxonomy.cdm.model.common.Annotation;
|
66
|
import eu.etaxonomy.cdm.model.common.CdmBase;
|
67
|
import eu.etaxonomy.cdm.model.common.Credit;
|
68
|
import eu.etaxonomy.cdm.model.common.ExtendedTimePeriod;
|
69
|
import eu.etaxonomy.cdm.model.common.Extension;
|
70
|
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
|
71
|
import eu.etaxonomy.cdm.model.common.Identifier;
|
72
|
import eu.etaxonomy.cdm.model.common.LSID;
|
73
|
import eu.etaxonomy.cdm.model.common.Language;
|
74
|
import eu.etaxonomy.cdm.model.common.LanguageString;
|
75
|
import eu.etaxonomy.cdm.model.common.Marker;
|
76
|
import eu.etaxonomy.cdm.model.common.TimePeriod;
|
77
|
import eu.etaxonomy.cdm.model.common.VerbatimTimePeriod;
|
78
|
import eu.etaxonomy.cdm.model.common.VersionableEntity;
|
79
|
import eu.etaxonomy.cdm.model.description.CategoricalData;
|
80
|
import eu.etaxonomy.cdm.model.description.CommonTaxonName;
|
81
|
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
|
82
|
import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
|
83
|
import eu.etaxonomy.cdm.model.description.Distribution;
|
84
|
import eu.etaxonomy.cdm.model.description.Feature;
|
85
|
import eu.etaxonomy.cdm.model.description.FeatureState;
|
86
|
import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
|
87
|
import eu.etaxonomy.cdm.model.description.KeyStatement;
|
88
|
import eu.etaxonomy.cdm.model.description.MeasurementUnit;
|
89
|
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
|
90
|
import eu.etaxonomy.cdm.model.description.QuantitativeData;
|
91
|
import eu.etaxonomy.cdm.model.description.State;
|
92
|
import eu.etaxonomy.cdm.model.description.StateData;
|
93
|
import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
|
94
|
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
|
95
|
import eu.etaxonomy.cdm.model.description.TaxonInteraction;
|
96
|
import eu.etaxonomy.cdm.model.description.TemporalData;
|
97
|
import eu.etaxonomy.cdm.model.description.TextData;
|
98
|
import eu.etaxonomy.cdm.model.location.NamedArea;
|
99
|
import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
|
100
|
import eu.etaxonomy.cdm.model.location.Point;
|
101
|
import eu.etaxonomy.cdm.model.media.ExternalLink;
|
102
|
import eu.etaxonomy.cdm.model.media.ImageFile;
|
103
|
import eu.etaxonomy.cdm.model.media.Media;
|
104
|
import eu.etaxonomy.cdm.model.media.MediaRepresentation;
|
105
|
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
|
106
|
import eu.etaxonomy.cdm.model.media.Rights;
|
107
|
import eu.etaxonomy.cdm.model.name.NameRelationship;
|
108
|
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
|
109
|
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
|
110
|
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
|
111
|
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
|
112
|
import eu.etaxonomy.cdm.model.name.TextualTypeDesignation;
|
113
|
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
|
114
|
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
|
115
|
import eu.etaxonomy.cdm.model.occurrence.OccurrenceStatus;
|
116
|
import eu.etaxonomy.cdm.model.permission.GrantedAuthorityImpl;
|
117
|
import eu.etaxonomy.cdm.model.permission.Group;
|
118
|
import eu.etaxonomy.cdm.model.permission.User;
|
119
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
120
|
import eu.etaxonomy.cdm.model.taxon.Taxon;
|
121
|
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
|
122
|
import eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation;
|
123
|
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
|
124
|
import eu.etaxonomy.cdm.model.term.DefinedTerm;
|
125
|
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
|
126
|
import eu.etaxonomy.cdm.model.term.IEnumTerm;
|
127
|
import eu.etaxonomy.cdm.model.term.Representation;
|
128
|
import eu.etaxonomy.cdm.model.term.TermBase;
|
129
|
import eu.etaxonomy.cdm.model.term.TermTree;
|
130
|
import eu.etaxonomy.cdm.model.term.TermType;
|
131
|
import eu.etaxonomy.cdm.model.term.TermVocabulary;
|
132
|
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto;
|
133
|
import eu.etaxonomy.cdm.persistence.dto.FeatureStateDto;
|
134
|
import eu.etaxonomy.cdm.persistence.dto.TermDto;
|
135
|
import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
|
136
|
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
|
137
|
import eu.etaxonomy.taxeditor.model.MessagingUtils;
|
138
|
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
|
139
|
import eu.etaxonomy.taxeditor.store.StoreUtil;
|
140
|
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
|
141
|
import eu.etaxonomy.taxeditor.ui.combo.InverseTermWrapper;
|
142
|
import eu.etaxonomy.taxeditor.ui.combo.MisappliedRelationshipComboElement;
|
143
|
import eu.etaxonomy.taxeditor.ui.combo.RelationshipTypeCombo;
|
144
|
import eu.etaxonomy.taxeditor.ui.combo.VocabularyComboElement;
|
145
|
import eu.etaxonomy.taxeditor.ui.combo.term.TermComboElement;
|
146
|
import eu.etaxonomy.taxeditor.ui.dialog.CloneClassificationDetailElement;
|
147
|
import eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection.UnitType;
|
148
|
import eu.etaxonomy.taxeditor.ui.mvc.element.DateElement;
|
149
|
import eu.etaxonomy.taxeditor.ui.openurl.IOpenUrlEnabled;
|
150
|
import eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorElement;
|
151
|
import eu.etaxonomy.taxeditor.ui.password.EditPasswordElement;
|
152
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
|
153
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
|
154
|
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
|
155
|
import eu.etaxonomy.taxeditor.ui.section.EmptyElement;
|
156
|
import eu.etaxonomy.taxeditor.ui.section.agent.InstitutionDetailElement;
|
157
|
import eu.etaxonomy.taxeditor.ui.section.agent.InstitutionDetailSection;
|
158
|
import eu.etaxonomy.taxeditor.ui.section.agent.NomenclaturalTeamMemberElement;
|
159
|
import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailElement;
|
160
|
import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
|
161
|
import eu.etaxonomy.taxeditor.ui.section.agent.TeamDetailElement;
|
162
|
import eu.etaxonomy.taxeditor.ui.section.agent.TeamDetailSection;
|
163
|
import eu.etaxonomy.taxeditor.ui.section.agent.TeamMemberElement;
|
164
|
import eu.etaxonomy.taxeditor.ui.section.agent.TeamMemberSection;
|
165
|
import eu.etaxonomy.taxeditor.ui.section.agent.TeamOrPersonBaseDetailSection;
|
166
|
import eu.etaxonomy.taxeditor.ui.section.classification.ClassificationDetailElement;
|
167
|
import eu.etaxonomy.taxeditor.ui.section.classification.ClassificationDetailSection;
|
168
|
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeAgentRelationCollectionElement;
|
169
|
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeAgentRelationCollectionSection;
|
170
|
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailElement;
|
171
|
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailSection;
|
172
|
import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksElement;
|
173
|
import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksSection;
|
174
|
import eu.etaxonomy.taxeditor.ui.section.common.ReferenceEntityDetailElement;
|
175
|
import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
|
176
|
import eu.etaxonomy.taxeditor.ui.section.description.CommonNameSourceElement;
|
177
|
import eu.etaxonomy.taxeditor.ui.section.description.DerivedUnitElement;
|
178
|
import eu.etaxonomy.taxeditor.ui.section.description.DescribedSpecimenSection;
|
179
|
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailElement;
|
180
|
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailSection;
|
181
|
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailElement;
|
182
|
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailSection;
|
183
|
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementMediaSection;
|
184
|
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementSourceElement;
|
185
|
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementSourceSection;
|
186
|
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceElement;
|
187
|
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceSection;
|
188
|
import eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection;
|
189
|
import eu.etaxonomy.taxeditor.ui.section.description.ModifierElement;
|
190
|
import eu.etaxonomy.taxeditor.ui.section.description.ModifierSection;
|
191
|
import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageDetailElement;
|
192
|
import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageSection;
|
193
|
import eu.etaxonomy.taxeditor.ui.section.description.ScopeElement;
|
194
|
import eu.etaxonomy.taxeditor.ui.section.description.ScopeSection;
|
195
|
import eu.etaxonomy.taxeditor.ui.section.description.StateDataElement;
|
196
|
import eu.etaxonomy.taxeditor.ui.section.description.StateDataSection;
|
197
|
import eu.etaxonomy.taxeditor.ui.section.description.StatisticalMeasurementValueElement;
|
198
|
import eu.etaxonomy.taxeditor.ui.section.description.StatisticalMeasurementValueSection;
|
199
|
import eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement;
|
200
|
import eu.etaxonomy.taxeditor.ui.section.description.detail.CategoricalDataDetailElement;
|
201
|
import eu.etaxonomy.taxeditor.ui.section.description.detail.CommonNameDetailElement;
|
202
|
import eu.etaxonomy.taxeditor.ui.section.description.detail.DistributionDetailElement;
|
203
|
import eu.etaxonomy.taxeditor.ui.section.description.detail.IndividualsAssociationDetailElement;
|
204
|
import eu.etaxonomy.taxeditor.ui.section.description.detail.QuantitativeDataDetailElement;
|
205
|
import eu.etaxonomy.taxeditor.ui.section.description.detail.TaxonInteractionDetailElement;
|
206
|
import eu.etaxonomy.taxeditor.ui.section.description.detail.TemporalDataDetailElement;
|
207
|
import eu.etaxonomy.taxeditor.ui.section.description.detail.TextDataDetailElement;
|
208
|
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDetailElement;
|
209
|
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDetailSection;
|
210
|
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDtoDetailElement;
|
211
|
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDtoDetailSection;
|
212
|
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterNodeDetailElement;
|
213
|
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterNodeDetailSection;
|
214
|
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterNodeDtoDetailElement;
|
215
|
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterNodeDtoDetailSection;
|
216
|
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailElement;
|
217
|
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailSection;
|
218
|
import eu.etaxonomy.taxeditor.ui.section.feature.InapplicableIfCollectionElement;
|
219
|
import eu.etaxonomy.taxeditor.ui.section.feature.InapplicableIfCollectionElementForDto;
|
220
|
import eu.etaxonomy.taxeditor.ui.section.feature.InapplicableIfEntityCollectionSection;
|
221
|
import eu.etaxonomy.taxeditor.ui.section.feature.InapplicableIfEntityCollectionSectionForNode;
|
222
|
import eu.etaxonomy.taxeditor.ui.section.feature.OnlyApplicableIfCollectionElement;
|
223
|
import eu.etaxonomy.taxeditor.ui.section.feature.OnlyApplicableIfCollectionElementForDto;
|
224
|
import eu.etaxonomy.taxeditor.ui.section.feature.OnlyApplicableIfEntityCollectionSection;
|
225
|
import eu.etaxonomy.taxeditor.ui.section.feature.OnlyApplicableIfEntityCollectionSectionForNode;
|
226
|
import eu.etaxonomy.taxeditor.ui.section.feature.TermNodeDetailElement;
|
227
|
import eu.etaxonomy.taxeditor.ui.section.feature.TermNodeDetailSection;
|
228
|
import eu.etaxonomy.taxeditor.ui.section.feature.TermTreeDetailElement;
|
229
|
import eu.etaxonomy.taxeditor.ui.section.feature.TermTreeDetailElementForNode;
|
230
|
import eu.etaxonomy.taxeditor.ui.section.feature.TermTreeDetailSection;
|
231
|
import eu.etaxonomy.taxeditor.ui.section.feature.TermTreeDetailSectionForNode;
|
232
|
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityCollectionElement;
|
233
|
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailElement;
|
234
|
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection;
|
235
|
import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailElement;
|
236
|
import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailSection;
|
237
|
import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailElement;
|
238
|
import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
|
239
|
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailElement;
|
240
|
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
|
241
|
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailElement;
|
242
|
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
|
243
|
import eu.etaxonomy.taxeditor.ui.section.key.ScopeRestrictionSection;
|
244
|
import eu.etaxonomy.taxeditor.ui.section.key.TaxonomicScopeSection;
|
245
|
import eu.etaxonomy.taxeditor.ui.section.media.ImageFileElement;
|
246
|
import eu.etaxonomy.taxeditor.ui.section.media.MediaDetailElement;
|
247
|
import eu.etaxonomy.taxeditor.ui.section.media.MediaMetaElement;
|
248
|
import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationElement;
|
249
|
import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationPartElement;
|
250
|
import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationPartSection;
|
251
|
import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationSection;
|
252
|
import eu.etaxonomy.taxeditor.ui.section.media.MediaSection;
|
253
|
import eu.etaxonomy.taxeditor.ui.section.name.AuthorshipDetailElement;
|
254
|
import eu.etaxonomy.taxeditor.ui.section.name.AuthorshipDetailSection;
|
255
|
import eu.etaxonomy.taxeditor.ui.section.name.HybridDetailElement;
|
256
|
import eu.etaxonomy.taxeditor.ui.section.name.HybridDetailSection;
|
257
|
import eu.etaxonomy.taxeditor.ui.section.name.NameDetailElement;
|
258
|
import eu.etaxonomy.taxeditor.ui.section.name.NameDetailSection;
|
259
|
import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailElement;
|
260
|
import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
|
261
|
import eu.etaxonomy.taxeditor.ui.section.name.NameTypeDesignationElement;
|
262
|
import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusElement;
|
263
|
import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
|
264
|
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailElement;
|
265
|
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
|
266
|
import eu.etaxonomy.taxeditor.ui.section.name.RuleConsideredElement;
|
267
|
import eu.etaxonomy.taxeditor.ui.section.name.SpecimenTypeDesignationElement;
|
268
|
import eu.etaxonomy.taxeditor.ui.section.name.TextTypeDesignationElement;
|
269
|
import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
|
270
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectingAreaDetailElement;
|
271
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectingAreasDetailSection;
|
272
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectionDetailElement;
|
273
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.CurrentDeterminationDetailSection;
|
274
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailElement;
|
275
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
|
276
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailElement;
|
277
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailSection;
|
278
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitMediaSection;
|
279
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailElement;
|
280
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
|
281
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationEventDetailElement;
|
282
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationHistoryDetailSection;
|
283
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.EmptySection;
|
284
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitFacadeDetailElement;
|
285
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitFacadeDetailSection;
|
286
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitFacadeGeneralDetailElement;
|
287
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitFacadeGeneralDetailSection;
|
288
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailElement;
|
289
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
|
290
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.GeoScopeDetailSection;
|
291
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.GeoScopePolyKeyDetailSection;
|
292
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.OccurrenceStatusElement;
|
293
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.OriginalLabelDataSection;
|
294
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.SourceCollectionDetailSection;
|
295
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailElement;
|
296
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailSection;
|
297
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.StatusCollectionDetailSection;
|
298
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.DerivedUnitTypeDesignationElement;
|
299
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.DerivedUnitTypeDesignationSection;
|
300
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailElement;
|
301
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailSection;
|
302
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenCurrentDeterminationDetailSection;
|
303
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenDetailElement;
|
304
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenDetailSection;
|
305
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenGeneralDetailElement;
|
306
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenGeneralDetailSection;
|
307
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenSourceCollectionDetailSection;
|
308
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AbstractSampleDesignationDetailSection;
|
309
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationCloningDetailElement;
|
310
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationCloningDetailSection;
|
311
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationGelPhotoCollectionDetailSection;
|
312
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationGelPhotoDetailElement;
|
313
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationGeneralDetailElement;
|
314
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationGeneralDetailSection;
|
315
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationPrimerDetailElement;
|
316
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationPrimerDetailSection;
|
317
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.CurrentSampleDesignationDetailSection;
|
318
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailElement;
|
319
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailSection;
|
320
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailElement;
|
321
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailSection;
|
322
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSamplePreparationPreservationDetailElement;
|
323
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSamplePreparationPreservationSection;
|
324
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.PrimerGeneralDetailElement;
|
325
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailElement;
|
326
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailSection;
|
327
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationHistoryDetailSection;
|
328
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationTextDetailElement;
|
329
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceContigFileCollectionDetailSection;
|
330
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailElement;
|
331
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailSection;
|
332
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceReferenceCollectionDetailElement;
|
333
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceReferenceCollectionDetailSection;
|
334
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadGeneralDetailElement;
|
335
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadGeneralDetailSection;
|
336
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadPherogramCollectionDetailSection;
|
337
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailElement;
|
338
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailSection;
|
339
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailElement;
|
340
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailSection;
|
341
|
import eu.etaxonomy.taxeditor.ui.section.reference.AdvancedNomenclaturalSourceElement;
|
342
|
import eu.etaxonomy.taxeditor.ui.section.reference.AdvancedSourceElement;
|
343
|
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalSourceDetailElement;
|
344
|
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalSourceDetailSection;
|
345
|
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalSourceElement;
|
346
|
import eu.etaxonomy.taxeditor.ui.section.reference.OriginalSourceAdvancedSection;
|
347
|
import eu.etaxonomy.taxeditor.ui.section.reference.OriginalSourceElement;
|
348
|
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailElement;
|
349
|
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
|
350
|
import eu.etaxonomy.taxeditor.ui.section.reference.SecundumSourceElement;
|
351
|
import eu.etaxonomy.taxeditor.ui.section.reference.SingleSourceSection;
|
352
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationElement;
|
353
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection;
|
354
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.CdmBaseElement;
|
355
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.CdmBaseSection;
|
356
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.CreditElement;
|
357
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.CreditSection;
|
358
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.ExtensionElement;
|
359
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.ExtensionSection;
|
360
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection;
|
361
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.IdentifiableSourceElement;
|
362
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.MarkerElement;
|
363
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.MarkerSection;
|
364
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsElement;
|
365
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsSection;
|
366
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.SourceSection;
|
367
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement;
|
368
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection;
|
369
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.identifier.DerivedUnitFacadeIdentifierSection;
|
370
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.identifier.IdentifierElement;
|
371
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.identifier.IdentifierSection;
|
372
|
import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement;
|
373
|
import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
|
374
|
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailElement;
|
375
|
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
|
376
|
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonDetailElement;
|
377
|
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonDetailSection;
|
378
|
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonOfRelationshipElement;
|
379
|
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailElement;
|
380
|
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
|
381
|
import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailElement;
|
382
|
import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
|
383
|
import eu.etaxonomy.taxeditor.ui.section.user.UserDetailElement;
|
384
|
import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
|
385
|
import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailElement;
|
386
|
import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
|
387
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailElement;
|
388
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailSection;
|
389
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.FeatureDetailElement;
|
390
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.LanguageDetailElement;
|
391
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitCollectionElement;
|
392
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitCollectionSection;
|
393
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitDtoCollectionElement;
|
394
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitDtoCollectionSection;
|
395
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailSection;
|
396
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.PresenceAbsenceTermDetailElement;
|
397
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierDtoVocabulariesElement;
|
398
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierVocabulariesCollectionSection;
|
399
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierVocabulariesDtoCollectionSection;
|
400
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierVocabulariesElement;
|
401
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyCollectionElement;
|
402
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyCollectionSection;
|
403
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyDtoCollectionElement;
|
404
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyDtoCollectionSection;
|
405
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureCollectionElement;
|
406
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureCollectionSection;
|
407
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureDtoCollectionElement;
|
408
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureDtoCollectionSection;
|
409
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermMediaSection;
|
410
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailElement;
|
411
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
|
412
|
import eu.etaxonomy.taxeditor.ui.selection.CollectorSelectionElement;
|
413
|
import eu.etaxonomy.taxeditor.ui.selection.CommonNameReferenceSelectionElement;
|
414
|
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
|
415
|
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElementWithAbbreviatedTitle;
|
416
|
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElementWithIdInVocabulary;
|
417
|
import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement;
|
418
|
import eu.etaxonomy.taxeditor.view.detail.CdmSectionPart;
|
419
|
|
420
|
/**
|
421
|
* CdmFormFactory class.
|
422
|
*
|
423
|
* @author n.hoffmann
|
424
|
* @created Feb 24, 2010
|
425
|
*/
|
426
|
public class CdmFormFactory extends FormToolkit {
|
427
|
|
428
|
private BoldFontHolder2 boldFontHolder2;
|
429
|
private MouseListener selectionMouseHandler;
|
430
|
private FocusListener selectionFocusHandler;
|
431
|
|
432
|
@Inject
|
433
|
private IEclipseContext context;
|
434
|
|
435
|
private final Set<SelectionListener> selectionListenerList = new HashSet<>();
|
436
|
|
437
|
private final List<IPropertyChangeListener> propertyChangeListeners = new ArrayList<>();
|
438
|
|
439
|
private final int orientation = Window.getDefaultOrientation();
|
440
|
private ISelectionProvider selectionProvider;
|
441
|
|
442
|
/** Constant <code>EMPTY_SELECTION</code> */
|
443
|
public static ISelection EMPTY_SELECTION = new ISelection() {
|
444
|
@Override
|
445
|
public boolean isEmpty() {
|
446
|
return true;
|
447
|
}
|
448
|
};
|
449
|
|
450
|
/**
|
451
|
* @author n.hoffmann
|
452
|
* @date Jan 25, 2010
|
453
|
*/
|
454
|
private class SelectionMouseHandler extends MouseAdapter {
|
455
|
@Override
|
456
|
public void mouseDown(MouseEvent e) {
|
457
|
notifySelectionListeners(e);
|
458
|
}
|
459
|
}
|
460
|
|
461
|
/**
|
462
|
* @author n.hoffmann
|
463
|
* @date Jan 25, 2010
|
464
|
*/
|
465
|
private class SelectionFocusHandler extends FocusAdapter {
|
466
|
@Override
|
467
|
public void focusGained(FocusEvent e) {
|
468
|
notifySelectionListeners(e);
|
469
|
}
|
470
|
}
|
471
|
|
472
|
private void notifySelectionListeners(TypedEvent e) {
|
473
|
Event event = new Event();
|
474
|
event.widget = e.widget;
|
475
|
SelectionEvent selectionEvent = new SelectionEvent(event);
|
476
|
|
477
|
for (SelectionListener listener : selectionListenerList) {
|
478
|
listener.widgetSelected(selectionEvent);
|
479
|
}
|
480
|
}
|
481
|
|
482
|
public CdmFormFactory(Display display) {
|
483
|
this(display, null);
|
484
|
}
|
485
|
|
486
|
public CdmFormFactory(Display display, ISelectionProvider selectionProvider) {
|
487
|
super(display);
|
488
|
this.selectionProvider = selectionProvider;
|
489
|
init();
|
490
|
}
|
491
|
|
492
|
private void init() {
|
493
|
boldFontHolder2 = new BoldFontHolder2();
|
494
|
selectionMouseHandler = new SelectionMouseHandler();
|
495
|
selectionFocusHandler = new SelectionFocusHandler();
|
496
|
}
|
497
|
|
498
|
public IEclipseContext getContext() {
|
499
|
return context;
|
500
|
}
|
501
|
|
502
|
/**
|
503
|
* Creates an instance initialized with the correct selectionProvider
|
504
|
*
|
505
|
* Make sure to remove the instance when the entityComposite disposes via
|
506
|
* destroySelectionArbitrator(..)
|
507
|
*
|
508
|
* @param entityElement
|
509
|
* a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
|
510
|
* object.
|
511
|
* @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
|
512
|
* object.
|
513
|
*/
|
514
|
public SelectionArbitrator createSelectionArbitrator(IEntityElement entityElement) {
|
515
|
SelectionArbitrator selectionArbitrator = new SelectionArbitrator(entityElement);
|
516
|
selectionArbitrator.addSelectionProvider(selectionProvider);
|
517
|
selectionProvider.addSelectionChangedListener(selectionArbitrator);
|
518
|
addSelectionListener(selectionArbitrator);
|
519
|
return selectionArbitrator;
|
520
|
}
|
521
|
|
522
|
/**
|
523
|
* <p>
|
524
|
* destroySelectionArbitrator
|
525
|
* </p>
|
526
|
*
|
527
|
* @param selectionArbitrator
|
528
|
* a
|
529
|
* {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
|
530
|
* object.
|
531
|
*/
|
532
|
public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator) {
|
533
|
if(selectionArbitrator==null){
|
534
|
return;
|
535
|
}
|
536
|
removeSelectionListener(selectionArbitrator);
|
537
|
if (selectionProvider != null) {
|
538
|
selectionProvider.removeSelectionChangedListener(selectionArbitrator);
|
539
|
} else {
|
540
|
MessagingUtils.error(this.getClass(),
|
541
|
"Tried to destroy a selection listener from this factories listeners but was null", null);
|
542
|
}
|
543
|
}
|
544
|
|
545
|
/**
|
546
|
* <p>
|
547
|
* Adapts the {@link AbstractCdmFormElement}:<br>
|
548
|
* - sets the {@link IPropertyChangeListener}s handled by this class
|
549
|
* </p>
|
550
|
*
|
551
|
* @param formElement
|
552
|
* a
|
553
|
* {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
|
554
|
* object.
|
555
|
*/
|
556
|
public void adapt(ICdmFormElement formElement) {
|
557
|
formElement.setPropertyChangeListeners(propertyChangeListeners);
|
558
|
}
|
559
|
|
560
|
@Override
|
561
|
public void adapt(Control control, boolean trackFocus, boolean trackKeyboard) {
|
562
|
if (trackFocus) {
|
563
|
control.addFocusListener(selectionFocusHandler);
|
564
|
}
|
565
|
super.adapt(control, trackFocus, trackKeyboard);
|
566
|
}
|
567
|
|
568
|
@Override
|
569
|
public void adapt(Composite composite) {
|
570
|
composite.addMouseListener(selectionMouseHandler);
|
571
|
|
572
|
super.adapt(composite);
|
573
|
}
|
574
|
|
575
|
/**
|
576
|
* destroyElement
|
577
|
*
|
578
|
* @param formElement
|
579
|
* a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
|
580
|
* object.
|
581
|
*/
|
582
|
public void destroyElement(ICdmFormElement formElement) {
|
583
|
// return if element was not initialized
|
584
|
if (formElement == null) {
|
585
|
return;
|
586
|
}
|
587
|
// destroy selection arbitrator, if any
|
588
|
if (formElement instanceof ISelectableElement) {
|
589
|
destroySelectionArbitrator(((ISelectableElement) formElement).getSelectionArbitrator());
|
590
|
}
|
591
|
// remove this element form its parents list of elements
|
592
|
// ICdmFormElement parentElement = formElement.getParentElement();
|
593
|
// if(parentElement != null){
|
594
|
// parentElement.removeElement(formElement);
|
595
|
// }
|
596
|
// call destroy on child elements recursively
|
597
|
|
598
|
Set<ICdmFormElement> tempFormElements = new HashSet<>();
|
599
|
tempFormElements.addAll(formElement.getElements());
|
600
|
for(ICdmFormElement childElement: tempFormElements) {
|
601
|
destroyElement(childElement);
|
602
|
}
|
603
|
// dispose of the controls
|
604
|
for (Control control : formElement.getControls()) {
|
605
|
// we added the layoutComposite of the parental element as the
|
606
|
// layout composite to this formElement
|
607
|
// but we do not want to destroy it.
|
608
|
if (control.equals(formElement.getLayoutComposite())) {
|
609
|
continue;
|
610
|
} else {
|
611
|
if (!control.isDisposed()){
|
612
|
control.dispose();
|
613
|
}
|
614
|
control = null; //needed?
|
615
|
}
|
616
|
}
|
617
|
}
|
618
|
|
619
|
/**
|
620
|
* createEmptyCell
|
621
|
*
|
622
|
* @param parent
|
623
|
* a {@link org.eclipse.swt.widgets.Composite} object.
|
624
|
* @return a {@link org.eclipse.swt.widgets.Label} object.
|
625
|
*/
|
626
|
public Label createEmptyCell(Composite parent) {
|
627
|
return this.createLabel(parent, null);
|
628
|
}
|
629
|
|
630
|
/**
|
631
|
* createMultiLanguageTextElement
|
632
|
*
|
633
|
* @param parentElement
|
634
|
* a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
|
635
|
* object.
|
636
|
* @param labelString
|
637
|
* a {@link java.lang.String} object.
|
638
|
* @param multilanguageText
|
639
|
* a {@link java.util.Map} object.
|
640
|
* @param textHeight
|
641
|
* a int.
|
642
|
* @param style
|
643
|
* a int.
|
644
|
* @return a
|
645
|
* {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
|
646
|
* object.
|
647
|
*/
|
648
|
public MultilanguageTextElement createMultiLanguageTextElement(ICdmFormElement parentElement, String labelString,
|
649
|
Map<Language, LanguageString> multilanguageText, int textHeight, int style) {
|
650
|
MultilanguageTextElement element = new MultilanguageTextElement(this, parentElement, labelString,
|
651
|
multilanguageText, textHeight, style);
|
652
|
adapt(element);
|
653
|
parentElement.addElement(element);
|
654
|
return element;
|
655
|
}
|
656
|
|
657
|
/**
|
658
|
* createMultiLanguageTextElement
|
659
|
*
|
660
|
* @param parentElement
|
661
|
* a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
|
662
|
* object.
|
663
|
*
|
664
|
* @param Representation
|
665
|
* a {@link eu.etaxonomy.cdm.model.term.Representation} object.
|
666
|
* @param textHeight
|
667
|
* a int.
|
668
|
* @param style
|
669
|
* a int.
|
670
|
* @return a
|
671
|
* {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
|
672
|
* object.
|
673
|
*/
|
674
|
public RepresentationElement createRepresentationElement(ICdmFormElement parentElement, Representation representation, TermBase term,int textHeight, int style, boolean fillDetails) {
|
675
|
RepresentationElement element = new RepresentationElement(this, parentElement, representation, term, textHeight, style, fillDetails);
|
676
|
adapt(element);
|
677
|
parentElement.addElement(element);
|
678
|
return element;
|
679
|
}
|
680
|
|
681
|
public RepresentationElement createRepresentationElement(ICdmFormElement parentElement, Representation representation, AbstractTermDto term,int textHeight, int style, boolean fillDetails) {
|
682
|
RepresentationElement element = new RepresentationElement(this, parentElement, representation, term, textHeight, style, fillDetails);
|
683
|
adapt(element);
|
684
|
parentElement.addElement(element);
|
685
|
return element;
|
686
|
}
|
687
|
|
688
|
/**
|
689
|
* createMultiLanguageTextElement
|
690
|
*
|
691
|
* @param parentElement
|
692
|
* a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
|
693
|
* object.
|
694
|
*
|
695
|
* @param Representation
|
696
|
* a {@link eu.etaxonomy.cdm.model.term.Representation} object.
|
697
|
* @param textHeight
|
698
|
* a int.
|
699
|
* @param style
|
700
|
* a int.
|
701
|
* @return a
|
702
|
* {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
|
703
|
* object.
|
704
|
*/
|
705
|
public TranslatableRepresentationElement createTranslatableRepresentationElement(ICdmFormElement parentElement, Representation representation, TermBase term,int textHeight, int style, boolean fillDetails) {
|
706
|
TranslatableRepresentationElement element = new TranslatableRepresentationElement(this, parentElement, representation, term, textHeight, style, fillDetails);
|
707
|
adapt(element);
|
708
|
parentElement.addElement(element);
|
709
|
return element;
|
710
|
}
|
711
|
|
712
|
public TranslatableRepresentationElement createTranslatableRepresentationElementDto(ICdmFormElement parentElement, Representation representation, AbstractTermDto term,int textHeight, int style, boolean fillDetails) {
|
713
|
TranslatableRepresentationElement element = new TranslatableRepresentationElement(this, parentElement, representation, term, textHeight, style, fillDetails);
|
714
|
adapt(element);
|
715
|
parentElement.addElement(element);
|
716
|
return element;
|
717
|
}
|
718
|
|
719
|
|
720
|
public KeyStatementElement createKeyStatementElement(ICdmFormElement parentElement, String labelString,
|
721
|
KeyStatement keyStatement, int textHeight, int style) {
|
722
|
KeyStatementElement element = new KeyStatementElement(this, parentElement, labelString, keyStatement,
|
723
|
textHeight, style);
|
724
|
adapt(element);
|
725
|
parentElement.addElement(element);
|
726
|
return element;
|
727
|
}
|
728
|
|
729
|
/**
|
730
|
* Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
|
731
|
* method.<br>
|
732
|
* <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
|
733
|
* @param parentElement the parent container
|
734
|
* @param labelString the label name
|
735
|
* @param initialObject the object from which the <code>toString()</code> method is called
|
736
|
* @param style {@link SWT} style constant
|
737
|
* @return the created textfield with label
|
738
|
*/
|
739
|
public TextWithLabelElement createTextWithLabelElement(ICdmFormElement parentElement, String labelString,
|
740
|
Object initialObject, int style) {
|
741
|
return createTextWithLabelElement(parentElement, labelString, initialObject==null?"":initialObject.toString(), style);
|
742
|
}
|
743
|
|
744
|
/**
|
745
|
* <p>
|
746
|
* createTextWithLabelElement
|
747
|
* </p>
|
748
|
*
|
749
|
* @param parentElement
|
750
|
* a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
|
751
|
* object.
|
752
|
* @param labelString
|
753
|
* a {@link java.lang.String} object.
|
754
|
* @param initialText
|
755
|
* a {@link java.lang.String} object.
|
756
|
* @param style
|
757
|
* a int.
|
758
|
* @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
|
759
|
* object.
|
760
|
*/
|
761
|
public TextWithLabelElement createTextWithLabelElement(ICdmFormElement parentElement, String labelString,
|
762
|
String initialText, int style) {
|
763
|
return createTextWithLabelElement(parentElement, labelString, initialText, null, style);
|
764
|
}
|
765
|
|
766
|
|
767
|
|
768
|
/**
|
769
|
* createTextWithLabelAndSetNullElement
|
770
|
*
|
771
|
* @param parentElement
|
772
|
* a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
|
773
|
* object.
|
774
|
* @param labelString
|
775
|
* a {@link java.lang.String} object.
|
776
|
* @param initialText
|
777
|
* a {@link java.lang.String} object.
|
778
|
* @param textLimit maximal number of characters allowed
|
779
|
* @param style
|
780
|
* a int.
|
781
|
* @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelAndSetNullElement}
|
782
|
* object.
|
783
|
*/
|
784
|
public TextWithLabelAndSetNullElement createTextWithLabelAndSetNullElement(ICdmFormElement parentElement,
|
785
|
String labelString, String initialText, int style) {
|
786
|
TextWithLabelAndSetNullElement element = new TextWithLabelAndSetNullElement(this, parentElement, labelString, initialText, style) ;
|
787
|
|
788
|
adapt(element);
|
789
|
parentElement.addElement(element);
|
790
|
return element;
|
791
|
}
|
792
|
|
793
|
/**
|
794
|
* createTextWithLabelElement
|
795
|
*
|
796
|
* @param parentElement
|
797
|
* a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
|
798
|
* object.
|
799
|
* @param labelString
|
800
|
* a {@link java.lang.String} object.
|
801
|
* @param initialText
|
802
|
* a {@link java.lang.String} object.
|
803
|
* @param textLimit maximal number of characters allowed
|
804
|
* @param style
|
805
|
* a int.
|
806
|
* @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
|
807
|
* object.
|
808
|
*/
|
809
|
public TextWithLabelElement createTextWithLabelElement(ICdmFormElement parentElement, String labelString,
|
810
|
String initialText, Integer textLimit, int style) {
|
811
|
if(initialText==null){
|
812
|
initialText = "";
|
813
|
}
|
814
|
|
815
|
TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, initialText, null,
|
816
|
textLimit, style);
|
817
|
adapt(element);
|
818
|
parentElement.addElement(element);
|
819
|
return element;
|
820
|
}
|
821
|
|
822
|
public TextWithLabelElement createMultiLineTextWithLabel(ICdmFormElement parentElement, String labelString,
|
823
|
int textHeight, int style) {
|
824
|
TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, "", textHeight, true, style);
|
825
|
adapt(element);
|
826
|
parentElement.addElement(element);
|
827
|
return element;
|
828
|
}
|
829
|
|
830
|
public LsidWithExceptionLabelElement createLsidWithExceptionLabelElement(ICdmFormElement parentElement, String labelString,
|
831
|
LSID initialLsid, int style) {
|
832
|
LsidWithExceptionLabelElement element = new LsidWithExceptionLabelElement(this, parentElement, labelString, initialLsid, null, style);
|
833
|
adapt(element);
|
834
|
parentElement.addElement(element);
|
835
|
return element;
|
836
|
}
|
837
|
|
838
|
public UriWithLabelElement createUriWithLabelElement(ICdmFormElement parentElement, String labelString,
|
839
|
URI initialUri, int style) {
|
840
|
UriWithLabelElement element = new UriWithLabelElement(this, parentElement, labelString, initialUri, null, style);
|
841
|
adapt(element);
|
842
|
parentElement.addElement(element);
|
843
|
return element;
|
844
|
}
|
845
|
public UriWithLabelElement createUriWithLabelElement(ICdmFormElement parentElement, String labelString,
|
846
|
URI initialUri,Integer textHeight, int style) {
|
847
|
UriWithLabelElement element = new UriWithLabelElement(this, parentElement, labelString, initialUri, textHeight, style);
|
848
|
adapt(element);
|
849
|
parentElement.addElement(element);
|
850
|
return element;
|
851
|
}
|
852
|
|
853
|
|
854
|
public DoiWithLabelElement createDoiWithLabelElement(ICdmFormElement parentElement, String labelString,
|
855
|
DOI initialDoi, int style) {
|
856
|
DoiWithLabelElement element = new DoiWithLabelElement(this, parentElement, labelString, initialDoi, null, style);
|
857
|
adapt(element);
|
858
|
parentElement.addElement(element);
|
859
|
return element;
|
860
|
}
|
861
|
public DoiWithLabelElement createDoiWithLabelElement(ICdmFormElement parentElement, String labelString,
|
862
|
DOI initialDoi,Integer textHeight, int style) {
|
863
|
DoiWithLabelElement element = new DoiWithLabelElement(this, parentElement, labelString, initialDoi, textHeight, style);
|
864
|
adapt(element);
|
865
|
parentElement.addElement(element);
|
866
|
return element;
|
867
|
}
|
868
|
|
869
|
public OrcidWithLabelElement createOrcidWithLabelElement(ICdmFormElement parentElement, String labelString,
|
870
|
ORCID initialDoi, int style) {
|
871
|
OrcidWithLabelElement element = new OrcidWithLabelElement(this, parentElement, labelString, initialDoi, null, style);
|
872
|
adapt(element);
|
873
|
parentElement.addElement(element);
|
874
|
return element;
|
875
|
}
|
876
|
public OrcidWithLabelElement createDoiWithLabelElement(ICdmFormElement parentElement, String labelString,
|
877
|
ORCID initialDoi,Integer textHeight, int style) {
|
878
|
OrcidWithLabelElement element = new OrcidWithLabelElement(this, parentElement, labelString, initialDoi, textHeight, style);
|
879
|
adapt(element);
|
880
|
parentElement.addElement(element);
|
881
|
return element;
|
882
|
}
|
883
|
|
884
|
/**
|
885
|
* @param element
|
886
|
* @param string
|
887
|
* @param uri
|
888
|
* @param style
|
889
|
* @return
|
890
|
*/
|
891
|
public OpenUrlSelectorElement createOpenUrlSelectorElement(ICdmFormElement parentElement, String labelString,
|
892
|
IOpenUrlEnabled openUrlEnabled, int style) {
|
893
|
OpenUrlSelectorElement element = new OpenUrlSelectorElement(this, parentElement, labelString, openUrlEnabled,
|
894
|
style);
|
895
|
adapt(element);
|
896
|
parentElement.addElement(element);
|
897
|
return element;
|
898
|
}
|
899
|
|
900
|
public EditPasswordElement createEditPasswordElement(ICdmFormElement parentElement, String labelString, User user, int style) {
|
901
|
EditPasswordElement element = new EditPasswordElement(this, parentElement, labelString, user);
|
902
|
adapt(element);
|
903
|
parentElement.addElement(element);
|
904
|
return element;
|
905
|
}
|
906
|
|
907
|
public FloatWithLabelElement createFloatTextWithLabelElement(
|
908
|
ICdmFormElement parentElement, String labelString,
|
909
|
Number initialNumber, int style) {
|
910
|
FloatWithLabelElement element = new FloatWithLabelElement(this,
|
911
|
parentElement, labelString, initialNumber, style);
|
912
|
adapt(element);
|
913
|
parentElement.addElement(element);
|
914
|
return element;
|
915
|
}
|
916
|
|
917
|
public BigDecimalWithLabelElement createBigDecimalTextWithLabelElement(
|
918
|
ICdmFormElement parentElement, String labelString,
|
919
|
Number initialNumber, int style) {
|
920
|
BigDecimalWithLabelElement element = new BigDecimalWithLabelElement(this,
|
921
|
parentElement, labelString, initialNumber, style);
|
922
|
adapt(element);
|
923
|
parentElement.addElement(element);
|
924
|
return element;
|
925
|
}
|
926
|
|
927
|
public LanguageStringWithLabelElement createLanguageStringWithLabelElement(ICdmFormElement parentElement,
|
928
|
String labelString, LanguageString languageString, int style) {
|
929
|
return createLanguageStringWithLabelElement(parentElement, labelString, languageString, null, false, style);
|
930
|
}
|
931
|
|
932
|
public LanguageStringWithLabelElement createLanguageStringWithLabelElement(ICdmFormElement parentElement,
|
933
|
String labelString, LanguageString languageString, Integer height, boolean isMultiLine, int style) {
|
934
|
LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(this, parentElement, labelString,
|
935
|
languageString, height, isMultiLine, style);
|
936
|
adapt(element);
|
937
|
parentElement.addElement(element);
|
938
|
return element;
|
939
|
}
|
940
|
|
941
|
public KeyValueViewerElement createKeyValueViewerElement(ICdmFormElement parentElement, String keyHeading,
|
942
|
String valueHeading, Map<Object, Object> map) {
|
943
|
KeyValueViewerElement element = new KeyValueViewerElement(this, parentElement, keyHeading, valueHeading, map);
|
944
|
adapt(element);
|
945
|
parentElement.addElement(element);
|
946
|
return element;
|
947
|
}
|
948
|
|
949
|
/**
|
950
|
* @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
|
951
|
*/
|
952
|
@Deprecated
|
953
|
public <T extends DefinedTermBase> TermComboElement<T> createTermComboElement(Class<T> termComboType,
|
954
|
ICdmFormElement parentElement, String labelString, T selection, int style) {
|
955
|
TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termComboType, labelString, selection, true, style);
|
956
|
adapt(element);
|
957
|
parentElement.addElement(element);
|
958
|
return element;
|
959
|
}
|
960
|
|
961
|
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
962
|
TermType termType,
|
963
|
ICdmFormElement parentElement,
|
964
|
String labelString,
|
965
|
T selection,
|
966
|
int style,
|
967
|
Comparator<T> comparator) {
|
968
|
return this.createDefinedTermComboElement(termType, null, null, parentElement, labelString, selection, true, style, false, comparator);
|
969
|
}
|
970
|
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
971
|
List<T> terms,
|
972
|
ICdmFormElement parentElement,
|
973
|
String labelString,
|
974
|
T selection,
|
975
|
int style,
|
976
|
Comparator<T> comparator) {
|
977
|
return this.createDefinedTermComboElement(null, null, terms, parentElement, labelString, selection, true, style, false, comparator);
|
978
|
}
|
979
|
|
980
|
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
981
|
TermType termType,
|
982
|
ICdmFormElement parentElement,
|
983
|
String labelString,
|
984
|
T selection,
|
985
|
boolean addEmptyElement,
|
986
|
int style) {
|
987
|
return this.createDefinedTermComboElement(termType, null, null, parentElement, labelString, selection, addEmptyElement, style, false, null);
|
988
|
}
|
989
|
|
990
|
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
991
|
TermType termType,
|
992
|
ICdmFormElement parentElement,
|
993
|
String labelString,
|
994
|
T selection,
|
995
|
int style) {
|
996
|
return this.createDefinedTermComboElement(termType, null, null, parentElement, labelString, selection, true, style, false, null);
|
997
|
}
|
998
|
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElementDto(
|
999
|
TermType termType,
|
1000
|
ICdmFormElement parentElement,
|
1001
|
String labelString,
|
1002
|
TermDto selection,
|
1003
|
int style) {
|
1004
|
return this.createDefinedTermComboElement(termType, null, null, parentElement, labelString, selection, true, style, false, null);
|
1005
|
}
|
1006
|
|
1007
|
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
1008
|
List<T> terms,
|
1009
|
ICdmFormElement parentElement,
|
1010
|
String labelString,
|
1011
|
T selection,
|
1012
|
int style) {
|
1013
|
return this.createDefinedTermComboElement(null, null, terms, parentElement, labelString, selection, true, style, false, null);
|
1014
|
}
|
1015
|
|
1016
|
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
1017
|
List<T> terms,
|
1018
|
ICdmFormElement parentElement,
|
1019
|
String labelString,
|
1020
|
T selection,
|
1021
|
boolean addEmptyElement,
|
1022
|
int style) {
|
1023
|
return this.createDefinedTermComboElement(null, null, terms, parentElement, labelString, selection, addEmptyElement, style, false, null);
|
1024
|
}
|
1025
|
|
1026
|
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
1027
|
TermType termType,
|
1028
|
ICdmFormElement parentElement,
|
1029
|
String labelString,
|
1030
|
T selection,
|
1031
|
boolean addEmptyElement,
|
1032
|
int style,
|
1033
|
boolean useAbbrevLabel) {
|
1034
|
return createDefinedTermComboElement(termType, null, null, parentElement, labelString, selection, addEmptyElement, style, useAbbrevLabel, null);
|
1035
|
}
|
1036
|
|
1037
|
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
1038
|
TermVocabulary<?> termVocabulary,
|
1039
|
ICdmFormElement parentElement,
|
1040
|
String labelString,
|
1041
|
T selection,
|
1042
|
int style) {
|
1043
|
return this.createDefinedTermComboElement(null, termVocabulary, null, parentElement, labelString, selection, true, style, false, null);
|
1044
|
}
|
1045
|
|
1046
|
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
1047
|
TermVocabulary<?> termVocabulary,
|
1048
|
ICdmFormElement parentElement,
|
1049
|
String labelString,
|
1050
|
T selection,
|
1051
|
boolean addEmptyElement,
|
1052
|
int style,
|
1053
|
boolean useAbbrevLabel) {
|
1054
|
return createDefinedTermComboElement(null, termVocabulary, null, parentElement, labelString, selection, addEmptyElement, style, useAbbrevLabel, null);
|
1055
|
}
|
1056
|
|
1057
|
private <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
1058
|
TermType termType,
|
1059
|
TermVocabulary<?> termVocabulary,
|
1060
|
List<T> terms,
|
1061
|
ICdmFormElement parentElement,
|
1062
|
String labelString,
|
1063
|
T selection,
|
1064
|
boolean addEmptyElement,
|
1065
|
int style,
|
1066
|
boolean useAbbrevLabel,
|
1067
|
Comparator<T> comparator) {
|
1068
|
|
1069
|
if(termType!=null){
|
1070
|
TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, addEmptyElement, style, useAbbrevLabel, comparator);
|
1071
|
adapt(element);
|
1072
|
parentElement.addElement(element);
|
1073
|
return element;
|
1074
|
}
|
1075
|
else if(termVocabulary!=null){
|
1076
|
TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termVocabulary, labelString, selection, addEmptyElement, style, useAbbrevLabel, comparator);
|
1077
|
// if (comparator!= null){
|
1078
|
// element.setTermComparator(comparator);
|
1079
|
// }
|
1080
|
adapt(element);
|
1081
|
parentElement.addElement(element);
|
1082
|
return element;
|
1083
|
}else if (terms != null){
|
1084
|
|
1085
|
TermComboElement<T> element = new TermComboElement<T>(this, parentElement, terms, labelString, selection, addEmptyElement, style, useAbbrevLabel, comparator);
|
1086
|
|
1087
|
adapt(element);
|
1088
|
parentElement.addElement(element);
|
1089
|
return element;
|
1090
|
}
|
1091
|
else {
|
1092
|
//this should never happen
|
1093
|
return null;
|
1094
|
}
|
1095
|
}
|
1096
|
|
1097
|
private <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
|
1098
|
TermType termType,
|
1099
|
TermVocabulary<?> termVocabulary,
|
1100
|
List<T> terms,
|
1101
|
ICdmFormElement parentElement,
|
1102
|
String labelString,
|
1103
|
TermDto selection,
|
1104
|
boolean addEmptyElement,
|
1105
|
int style,
|
1106
|
boolean useAbbrevLabel,
|
1107
|
Comparator<T> comparator) {
|
1108
|
if(termType!=null){
|
1109
|
TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, addEmptyElement, style, useAbbrevLabel, comparator);
|
1110
|
adapt(element);
|
1111
|
parentElement.addElement(element);
|
1112
|
return element;
|
1113
|
}
|
1114
|
|
1115
|
else {
|
1116
|
//this should never happen
|
1117
|
return null;
|
1118
|
}
|
1119
|
}
|
1120
|
|
1121
|
public RelationshipTypeCombo createNameRelationshipTypeCombo(ICdmFormElement parentElement,
|
1122
|
String labelString,
|
1123
|
int style,
|
1124
|
boolean useAbbrevLabel,
|
1125
|
Comparator<NameRelationshipType> comparator) {
|
1126
|
|
1127
|
RelationshipTypeCombo<InverseTermWrapper> element = new RelationshipTypeCombo(this, parentElement, TermType.NameRelationshipType, labelString, true, style, useAbbrevLabel, comparator);
|
1128
|
adapt(element);
|
1129
|
parentElement.addElement(element);
|
1130
|
return element;
|
1131
|
}
|
1132
|
|
1133
|
public RelationshipTypeCombo createTaxonRelationshipTypeCombo(ICdmFormElement parentElement,
|
1134
|
String labelString,
|
1135
|
int style,
|
1136
|
boolean useAbbrevLabel,
|
1137
|
Comparator<TaxonRelationshipType> comparator) {
|
1138
|
|
1139
|
RelationshipTypeCombo<InverseTermWrapper> element = new RelationshipTypeCombo(this, parentElement, TermType.TaxonRelationshipType, labelString, true, style, useAbbrevLabel, comparator);
|
1140
|
adapt(element);
|
1141
|
parentElement.addElement(element);
|
1142
|
return element;
|
1143
|
}
|
1144
|
|
1145
|
public MisappliedRelationshipComboElement createMisappliedRelationshipComboElement(
|
1146
|
ICdmFormElement parentElement,
|
1147
|
String labelString,
|
1148
|
TaxonRelationshipType selection,
|
1149
|
int style) {
|
1150
|
MisappliedRelationshipComboElement combo = new MisappliedRelationshipComboElement(this, parentElement, labelString, selection, false, style, false);
|
1151
|
adapt(combo);
|
1152
|
parentElement.addElement(combo);
|
1153
|
return combo;
|
1154
|
}
|
1155
|
|
1156
|
public <T extends IEnumTerm<T>> EnumComboElement<T> createEnumComboElement(
|
1157
|
Class<T> enumComboType, ICdmFormElement parentElement,
|
1158
|
int style, boolean hasNullValue) {
|
1159
|
return createEnumComboElement(enumComboType, parentElement, null, style, hasNullValue);
|
1160
|
}
|
1161
|
public <T extends IEnumTerm<T>> EnumComboElement<T> createEnumComboElement(
|
1162
|
Class<T> enumComboType, ICdmFormElement parentElement,
|
1163
|
int style) {
|
1164
|
return createEnumComboElement(enumComboType, parentElement, null, style, false);
|
1165
|
}
|
1166
|
|
1167
|
public <T extends IEnumTerm<T>> EnumComboElement<T> createEnumComboElement(
|
1168
|
Class<T> enumComboType, ICdmFormElement parentElement, Comparator<T> comparator,
|
1169
|
int style, boolean hasNullValue) {
|
1170
|
EnumComboElement<T> element = new EnumComboElement<T>(this, parentElement, enumComboType, comparator, style, hasNullValue);
|
1171
|
adapt(element);
|
1172
|
parentElement.addElement(element);
|
1173
|
return element;
|
1174
|
}
|
1175
|
|
1176
|
public <TERM extends DefinedTermBase<TERM>, VOC extends TermVocabulary<TERM>> VocabularyComboElement<TERM, VOC> createVocabularyComboElement(
|
1177
|
TermType termType, String label, VOC selection, ICdmFormElement parentElement, int style) {
|
1178
|
VocabularyComboElement<TERM, VOC> element = new VocabularyComboElement<TERM, VOC>(this, parentElement, termType, label, selection, style);
|
1179
|
adapt(element);
|
1180
|
parentElement.addElement(element);
|
1181
|
return element;
|
1182
|
}
|
1183
|
|
1184
|
public <TERM extends DefinedTermBase<TERM>, VOC extends TermVocabulary<TERM>> VocabularyComboElement<TERM, VOC> createVocabularyDtoComboElement(
|
1185
|
TermType termType, String label, TermVocabularyDto selection, ICdmFormElement parentElement, int style) {
|
1186
|
VocabularyComboElement<TERM, VOC> element = new VocabularyComboElement<TERM, VOC>(this, parentElement, termType, label, selection, style);
|
1187
|
adapt(element);
|
1188
|
parentElement.addElement(element);
|
1189
|
return element;
|
1190
|
}
|
1191
|
|
1192
|
public BrowserElement createBrowserElement(ICdmFormElement parentElement, URI imageUri, int style) {
|
1193
|
BrowserElement element = new BrowserElement(this, parentElement, imageUri, style);
|
1194
|
adapt(element);
|
1195
|
parentElement.addElement(element);
|
1196
|
return element;
|
1197
|
}
|
1198
|
|
1199
|
public ImageElement createImageElement(ICdmFormElement parentElement, URI imageUri, int style) {
|
1200
|
ImageElement element = new ImageElement(this, parentElement, imageUri, style);
|
1201
|
adapt(element);
|
1202
|
parentElement.addElement(element);
|
1203
|
return element;
|
1204
|
}
|
1205
|
|
1206
|
public TextActionElement createTextActionElement(ICdmFormElement parentElement, String labelString,
|
1207
|
String buttonLabel, String initialText, int style) {
|
1208
|
TextActionElement element = new TextActionElement(this, parentElement, labelString, buttonLabel, initialText,
|
1209
|
style);
|
1210
|
adapt(element);
|
1211
|
parentElement.addElement(element);
|
1212
|
return element;
|
1213
|
}
|
1214
|
|
1215
|
public CheckboxElement createCheckbox(ICdmFormElement parentElement, String label, Boolean initialState, int style) {
|
1216
|
if(initialState==null){
|
1217
|
initialState = Boolean.FALSE;
|
1218
|
}
|
1219
|
CheckboxElement element = new CheckboxElement(this, parentElement, label, initialState, style | orientation);
|
1220
|
adapt(element);
|
1221
|
parentElement.addElement(element);
|
1222
|
return element;
|
1223
|
}
|
1224
|
|
1225
|
/**
|
1226
|
* Creates a section as a part of the form.
|
1227
|
*
|
1228
|
* @return the section widget
|
1229
|
*/
|
1230
|
public Section adapt(AbstractFormSection section) {
|
1231
|
section.setMenu(section.getLayoutComposite().getMenu());
|
1232
|
adapt(section, true, true);
|
1233
|
|
1234
|
// handle focus and property change events for cdm use
|
1235
|
section.addFocusListener(selectionFocusHandler);
|
1236
|
section.setPropertyChangeListeners(propertyChangeListeners);
|
1237
|
|
1238
|
section.addExpansionListener(new ExpansionAdapter(){
|
1239
|
@Override
|
1240
|
public void expansionStateChanged(ExpansionEvent e) {
|
1241
|
super.expansionStateChanged(e);
|
1242
|
if(section.getEntity()!=null){
|
1243
|
PreferencesUtil.setStringValue(StoreUtil.getPrefKey(section.getClass(), section.getEntity().getClass().getCanonicalName()), e.getState()?CdmSectionPart.EXPANDED:CdmSectionPart.COLLAPSED);
|
1244
|
}
|
1245
|
}
|
1246
|
});
|
1247
|
|
1248
|
if (section.getToggle() != null) {
|
1249
|
section.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors.TB_TOGGLE_HOVER));
|
1250
|
section.getToggle().setDecorationColor(getColors().getColor(IFormColors.TB_TOGGLE));
|
1251
|
}
|
1252
|
|
1253
|
section.setFont(boldFontHolder2.getBoldFont(section.getLayoutComposite().getFont()));
|
1254
|
|
1255
|
if ((section.getStyle() & ExpandableComposite.TITLE_BAR) != 0
|
1256
|
|| (section.getStyle() & ExpandableComposite.SHORT_TITLE_BAR) != 0) {
|
1257
|
getColors().initializeSectionToolBarColors();
|
1258
|
section.setTitleBarBackground(getColors().getColor(IFormColors.TB_BG));
|
1259
|
section.setTitleBarBorderColor(getColors().getColor(IFormColors.TB_BORDER));
|
1260
|
}
|
1261
|
// call setTitleBarForeground regardless as it also sets the label color
|
1262
|
section.setTitleBarForeground(getColors().getColor(IFormColors.TB_TOGGLE));
|
1263
|
return section;
|
1264
|
}
|
1265
|
|
1266
|
private class BoldFontHolder2 {
|
1267
|
private Font normalFont;
|
1268
|
|
1269
|
private Font boldFont;
|
1270
|
|
1271
|
public BoldFontHolder2() {
|
1272
|
}
|
1273
|
|
1274
|
public Font getBoldFont(Font font) {
|
1275
|
createBoldFont(font);
|
1276
|
return boldFont;
|
1277
|
}
|
1278
|
|
1279
|
private void createBoldFont(Font font) {
|
1280
|
if (normalFont == null || !normalFont.equals(font)) {
|
1281
|
normalFont = font;
|
1282
|
dispose();
|
1283
|
}
|
1284
|
if (boldFont == null) {
|
1285
|
boldFont = FormFonts.getInstance().getBoldFont(getColors().getDisplay(), normalFont);
|
1286
|
}
|
1287
|
}
|
1288
|
|
1289
|
public void dispose() {
|
1290
|
if (boldFont != null) {
|
1291
|
FormFonts.getInstance().markFinished(boldFont, getColors().getDisplay());
|
1292
|
boldFont = null;
|
1293
|
}
|
1294
|
}
|
1295
|
}
|
1296
|
|
1297
|
/**
|
1298
|
* createToggleableTextField with relevance
|
1299
|
*/
|
1300
|
public ToggleableTextElement createToggleableTextField(ICdmFormElement parentElement, String labelString,
|
1301
|
String initialText, boolean initialState, CacheRelevance relevance, int style) {
|
1302
|
|
1303
|
ToggleableTextElement element = new ToggleableTextElement(this, parentElement, labelString, initialText,
|
1304
|
initialState, relevance, style | orientation);
|
1305
|
adapt(element);
|
1306
|
parentElement.addElement(element);
|
1307
|
return element;
|
1308
|
}
|
1309
|
|
1310
|
/**
|
1311
|
* like {@link #createToggleableTextField(ICdmFormElement, String, String, boolean, CacheRelevance, int)}
|
1312
|
* but with predefined cache relevance == 1
|
1313
|
*/
|
1314
|
public ToggleableTextElement createToggleableTextField(ICdmFormElement parentElement, String labelString,
|
1315
|
String initialText, boolean initialState, int style) {
|
1316
|
return createToggleableTextField(parentElement, labelString, initialText, initialState, CacheRelevance.CACHE1, style);
|
1317
|
}
|
1318
|
|
1319
|
/**
|
1320
|
* like {@link #createToggleableTextField(ICdmFormElement, String, String, boolean, CacheRelevance, int)}
|
1321
|
* but with predefined cache relevance == 1
|
1322
|
*/
|
1323
|
public RemovableTextElement createRemovableTextField(ICdmFormElement parentElement, String labelString,
|
1324
|
String initialText, int style) {
|
1325
|
RemovableTextElement element = new RemovableTextElement(this, parentElement, labelString, initialText,
|
1326
|
style | orientation);
|
1327
|
|
1328
|
adapt(element);
|
1329
|
parentElement.addElement(element);
|
1330
|
return element;
|
1331
|
}
|
1332
|
|
1333
|
|
1334
|
/**
|
1335
|
* createTimePeriodElement
|
1336
|
*/
|
1337
|
public TimePeriodElement createTimePeriodElement(ICdmFormElement parentElement, String labelString,
|
1338
|
TimePeriod timePeriod, int style) {
|
1339
|
TimePeriodElement element = new TimePeriodElement(this, parentElement, labelString, timePeriod, style);
|
1340
|
adapt(element);
|
1341
|
parentElement.addElement(element);
|
1342
|
return element;
|
1343
|
}
|
1344
|
|
1345
|
/**
|
1346
|
* createVerbatimTimePeriodElement
|
1347
|
*/
|
1348
|
public VerbatimTimePeriodElement createVerbatimTimePeriodElement(ICdmFormElement parentElement, String labelString,
|
1349
|
VerbatimTimePeriod timePeriod, int style) {
|
1350
|
VerbatimTimePeriodElement element = new VerbatimTimePeriodElement(this, parentElement, labelString, timePeriod, style);
|
1351
|
adapt(element);
|
1352
|
parentElement.addElement(element);
|
1353
|
return element;
|
1354
|
}
|
1355
|
|
1356
|
/**
|
1357
|
* createGatheringEventUnitElement
|
1358
|
*/
|
1359
|
public GatheringEventUnitElement createGatheringEventUnitElement(
|
1360
|
ICdmFormElement parentElement,
|
1361
|
String labelString,
|
1362
|
DerivedUnitFacade gatheringEvent,
|
1363
|
MinMaxTextSection.UnitType unitType,
|
1364
|
int style) {
|
1365
|
GatheringEventUnitElement element = new GatheringEventUnitElement(this,
|
1366
|
parentElement,
|
1367
|
labelString,
|
1368
|
gatheringEvent,
|
1369
|
unitType,
|
1370
|
style);
|
1371
|
adapt(element);
|
1372
|
parentElement.addElement(element);
|
1373
|
return element;
|
1374
|
}
|
1375
|
|
1376
|
/**
|
1377
|
* createPointElement
|
1378
|
*/
|
1379
|
public PointElement createPointElement(ICdmFormElement parentElement, Point point, int style) {
|
1380
|
PointElement element = new PointElement(this, parentElement, point, style);
|
1381
|
adapt(element);
|
1382
|
parentElement.addElement(element);
|
1383
|
return element;
|
1384
|
}
|
1385
|
|
1386
|
/**
|
1387
|
* Creates an empty section with the given message.<br>
|
1388
|
* If message is <code>null</code> a default message will be displayed.
|
1389
|
*/
|
1390
|
public EmptySection createEmptySection(String message, CdmFormFactory formFactory, ICdmFormElement parentElement, int style) {
|
1391
|
EmptySection section = new EmptySection(message, formFactory, parentElement, style);
|
1392
|
parentElement.addElement(section);
|
1393
|
adapt(section);
|
1394
|
return section;
|
1395
|
}
|
1396
|
|
1397
|
public DateDetailSection<TimePeriod> createDateDetailSection(ICdmFormElement parentElement, int style) {
|
1398
|
DateDetailSection<TimePeriod> section = new DateDetailSection<TimePeriod>(this, parentElement, false, style);
|
1399
|
parentElement.addElement(section);
|
1400
|
adapt(section);
|
1401
|
return section;
|
1402
|
}
|
1403
|
|
1404
|
public DateDetailSection<VerbatimTimePeriod> createVerbatimDateDetailSection(ICdmFormElement parentElement, int style) {
|
1405
|
DateDetailSection<VerbatimTimePeriod> section
|
1406
|
= new DateDetailSection<VerbatimTimePeriod>(this, parentElement, true, style);
|
1407
|
parentElement.addElement(section);
|
1408
|
adapt(section);
|
1409
|
return section;
|
1410
|
}
|
1411
|
|
1412
|
public MinMaxTextSection createMinMaxTextSection(ICdmFormElement parentElement, UnitType unitType, int style) {
|
1413
|
MinMaxTextSection section = new MinMaxTextSection(this, parentElement, unitType, style);
|
1414
|
parentElement.addElement(section);
|
1415
|
adapt(section);
|
1416
|
return section;
|
1417
|
}
|
1418
|
|
1419
|
public PartialElement createPartialElement(ICdmFormElement parentElement, String labelString, Partial partial,
|
1420
|
int style) {
|
1421
|
PartialElement element = new PartialElement(this, parentElement, labelString, style);
|
1422
|
adapt(element);
|
1423
|
parentElement.addElement(element);
|
1424
|
return element;
|
1425
|
}
|
1426
|
|
1427
|
public PartialElement createPartialElement(ICdmFormElement parentElement, String labelString, Partial partial, boolean showYear,
|
1428
|
int style) {
|
1429
|
PartialElement element = new PartialElement(this, parentElement, labelString, style, showYear);
|
1430
|
adapt(element);
|
1431
|
parentElement.addElement(element);
|
1432
|
return element;
|
1433
|
}
|
1434
|
|
1435
|
public void addSelectionListener(SelectionListener listener) {
|
1436
|
selectionListenerList.add(listener);
|
1437
|
}
|
1438
|
|
1439
|
public void removeSelectionListener(SelectionListener listener) {
|
1440
|
if (listener == null) {
|
1441
|
MessagingUtils.error(this.getClass(),
|
1442
|
"Tried to remove a selection listener from this factories listeners but was null", null);
|
1443
|
} else {
|
1444
|
selectionListenerList.remove(listener);
|
1445
|
}
|
1446
|
}
|
1447
|
|
1448
|
public void addPropertyChangeListener(IPropertyChangeListener listener) {
|
1449
|
if (propertyChangeListeners.contains(listener)) {
|
1450
|
return;
|
1451
|
}
|
1452
|
propertyChangeListeners.add(0, listener);
|
1453
|
}
|
1454
|
|
1455
|
public void removePropertyChangeListener(IPropertyChangeListener listener) {
|
1456
|
propertyChangeListeners.remove(listener);
|
1457
|
}
|
1458
|
|
1459
|
public List<IPropertyChangeListener> getPropertyChangeListeners() {
|
1460
|
return propertyChangeListeners;
|
1461
|
}
|
1462
|
|
1463
|
public Label createHorizontalSeparator(ICdmFormElement parentElement, int style) {
|
1464
|
Label separator = this.createSeparator(parentElement.getLayoutComposite(), SWT.HORIZONTAL | style);
|
1465
|
separator.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
|
1466
|
return separator;
|
1467
|
}
|
1468
|
|
1469
|
public VersionElement createVersionElement(ICdmFormElement parentElement, VersionableEntity entity, int style) {
|
1470
|
VersionElement element = new VersionElement(this, parentElement, entity, style);
|
1471
|
adapt(element);
|
1472
|
parentElement.addElement(element);
|
1473
|
return element;
|
1474
|
}
|
1475
|
|
1476
|
public CdmBaseElement createCdmBaseElement(ICdmFormElement parentElement, CdmBase entity, int style) {
|
1477
|
CdmBaseElement element = new CdmBaseElement(this, parentElement, entity, style);
|
1478
|
adapt(element);
|
1479
|
parentElement.addElement(element);
|
1480
|
return element;
|
1481
|
}
|
1482
|
|
1483
|
public VersionSection createVersionSection(ICdmFormElement parentElement, int style) {
|
1484
|
VersionSection section = new VersionSection(this, parentElement, style);
|
1485
|
parentElement.addElement(section);
|
1486
|
adapt(section);
|
1487
|
return section;
|
1488
|
}
|
1489
|
|
1490
|
public CdmBaseSection createCdmBaseSection(ICdmFormElement parentElement, int style) {
|
1491
|
CdmBaseSection section = new CdmBaseSection(this, parentElement, style);
|
1492
|
parentElement.addElement(section);
|
1493
|
adapt(section);
|
1494
|
return section;
|
1495
|
}
|
1496
|
|
1497
|
public EmptyElement createEmptyElement(ICdmFormElement parentElement, String emptyText) {
|
1498
|
EmptyElement element = new EmptyElement(this, parentElement, emptyText, SWT.NULL);
|
1499
|
adapt(element);
|
1500
|
parentElement.addElement(element);
|
1501
|
return element;
|
1502
|
}
|
1503
|
|
1504
|
public HeadlineSection createHeadlineSection(ICdmFormElement parentElement) {
|
1505
|
HeadlineSection section = new HeadlineSection(this, parentElement, SWT.NULL);
|
1506
|
parentElement.addElement(section);
|
1507
|
adapt(section);
|
1508
|
return section;
|
1509
|
}
|
1510
|
|
1511
|
public ParsingMessageElement createParsingMessageElement(ICdmFormElement parentElement,
|
1512
|
ParserProblem parserProblem, int style) {
|
1513
|
ParsingMessageElement element = new ParsingMessageElement(this, parentElement, parserProblem, style);
|
1514
|
adapt(element);
|
1515
|
parentElement.addElement(element);
|
1516
|
return element;
|
1517
|
}
|
1518
|
|
1519
|
public <T extends DefinedTermBase> DefinedTermDetailSection<T> createDefinedTermDetailSection(Class clazz,
|
1520
|
ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
|
1521
|
@SuppressWarnings("unchecked")
|
1522
|
Class<T> definedTermClass = clazz;
|
1523
|
DefinedTermDetailSection<T> section = new DefinedTermDetailSection<>(this, definedTermClass, parentElement,
|
1524
|
selectionProvider, style);
|
1525
|
|
1526
|
parentElement.addElement(section);
|
1527
|
adapt(section);
|
1528
|
return section;
|
1529
|
}
|
1530
|
|
1531
|
public TermMediaSection createTermMediaSection(
|
1532
|
ICdmFormElement parentElement, int style) {
|
1533
|
TermMediaSection section = new TermMediaSection(this, parentElement, style);
|
1534
|
parentElement.addElement(section);
|
1535
|
adapt(section);
|
1536
|
return section;
|
1537
|
}
|
1538
|
|
1539
|
public DerivedUnitMediaSection createDerivedUnitMediaSection(
|
1540
|
ICdmFormElement parentElement, int style) {
|
1541
|
DerivedUnitMediaSection section = new DerivedUnitMediaSection(this, parentElement, style);
|
1542
|
parentElement.addElement(section);
|
1543
|
adapt(section);
|
1544
|
return section;
|
1545
|
}
|
1546
|
|
1547
|
public AbstractCdmDetailElement createDefinedTermDetailElement(Class definedTermClass,
|
1548
|
ICdmFormElement parentElement, int style) {
|
1549
|
AbstractCdmDetailElement<?> element = null;
|
1550
|
|
1551
|
if (NamedArea.class.isAssignableFrom(definedTermClass)) {
|
1552
|
element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
|
1553
|
} else if (definedTermClass.equals(Feature.class)) {
|
1554
|
element = new FeatureDetailElement(this, parentElement);
|
1555
|
} else if(definedTermClass.equals(PresenceAbsenceTerm.class)){
|
1556
|
element = new PresenceAbsenceTermDetailElement(this, parentElement);
|
1557
|
} else if(definedTermClass.equals(Language.class)){
|
1558
|
element = new LanguageDetailElement(this, parentElement);
|
1559
|
} else {
|
1560
|
element = new DefinedTermDetailElement<>(this, parentElement);
|
1561
|
}
|
1562
|
|
1563
|
adapt(element);
|
1564
|
parentElement.addElement(element);
|
1565
|
return element;
|
1566
|
}
|
1567
|
|
1568
|
public CharacterNodeDetailSection createCharacterNodeDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1569
|
CharacterNodeDetailSection section = new CharacterNodeDetailSection(this, parentElement, selectionProvider, style);
|
1570
|
addAndAdaptSection(parentElement, section);
|
1571
|
return section;
|
1572
|
}
|
1573
|
|
1574
|
public CharacterNodeDtoDetailSection createCharacterNodeDtoDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1575
|
CharacterNodeDtoDetailSection section = new CharacterNodeDtoDetailSection(this, parentElement, selectionProvider, style);
|
1576
|
addAndAdaptSection(parentElement, section);
|
1577
|
return section;
|
1578
|
}
|
1579
|
|
1580
|
public CharacterDetailSection createCharacterDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1581
|
CharacterDetailSection section = new CharacterDetailSection(this, parentElement, selectionProvider, style);
|
1582
|
addAndAdaptSection(parentElement, section);
|
1583
|
return section;
|
1584
|
}
|
1585
|
|
1586
|
public CharacterDtoDetailSection createCharacterDtoDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1587
|
CharacterDtoDetailSection section = new CharacterDtoDetailSection(this, parentElement, selectionProvider, style);
|
1588
|
addAndAdaptSection(parentElement, section);
|
1589
|
return section;
|
1590
|
}
|
1591
|
|
1592
|
public CharacterNodeDetailElement createCharacterNodeDetailElement(ICdmFormElement parentElement, int style){
|
1593
|
CharacterNodeDetailElement element = new CharacterNodeDetailElement(this, parentElement);
|
1594
|
addAndAdaptElement(parentElement, element);
|
1595
|
return element;
|
1596
|
}
|
1597
|
public CharacterNodeDtoDetailElement createCharacterNodeDtoDetailElement(ICdmFormElement parentElement, int style){
|
1598
|
CharacterNodeDtoDetailElement element = new CharacterNodeDtoDetailElement(this, parentElement);
|
1599
|
addAndAdaptElement(parentElement, element);
|
1600
|
return element;
|
1601
|
}
|
1602
|
|
1603
|
public CharacterDetailElement createCharacterDetailElement(ICdmFormElement parentElement, int style){
|
1604
|
CharacterDetailElement element = new CharacterDetailElement(this, parentElement);
|
1605
|
addAndAdaptElement(parentElement, element);
|
1606
|
return element;
|
1607
|
}
|
1608
|
public CharacterDtoDetailElement createCharacterDtoDetailElement(ICdmFormElement parentElement, int style){
|
1609
|
CharacterDtoDetailElement element = new CharacterDtoDetailElement(this, parentElement);
|
1610
|
addAndAdaptElement(parentElement, element);
|
1611
|
return element;
|
1612
|
}
|
1613
|
|
1614
|
public TermTreeDetailElement createFeatureTreeDetailElement(ICdmFormElement parentElement, int style){
|
1615
|
TermTreeDetailElement element = new TermTreeDetailElement(this, parentElement);
|
1616
|
addAndAdaptElement(parentElement, element);
|
1617
|
return element;
|
1618
|
}
|
1619
|
|
1620
|
public AbstractCdmDetailElement<TermTree> createFeatureTreeDetailElementForTree(
|
1621
|
AbstractCdmDetailSection<TermTree> parentElement, int style) {
|
1622
|
TermTreeDetailElementForNode element = new TermTreeDetailElementForNode(this, parentElement);
|
1623
|
addAndAdaptElement(parentElement, element);
|
1624
|
return element;
|
1625
|
}
|
1626
|
|
1627
|
public TermNodeDetailElement createFeatureNodeDetailElement(ICdmFormElement parentElement, int style){
|
1628
|
TermNodeDetailElement element = new TermNodeDetailElement(this, parentElement);
|
1629
|
addAndAdaptElement(parentElement, element);
|
1630
|
return element;
|
1631
|
}
|
1632
|
|
1633
|
|
1634
|
//--------DetailSections---------
|
1635
|
public NameDetailSection createNameDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1636
|
NameDetailSection section = new NameDetailSection(this, parentElement, selectionProvider, style);
|
1637
|
addAndAdaptSection(parentElement, section);
|
1638
|
return section;
|
1639
|
}
|
1640
|
|
1641
|
public TermNodeDetailSection createFeatureNodeDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1642
|
TermNodeDetailSection section = new TermNodeDetailSection(this, parentElement, selectionProvider, style);
|
1643
|
addAndAdaptSection(parentElement, section);
|
1644
|
return section;
|
1645
|
}
|
1646
|
|
1647
|
public TermTreeDetailSection createFeatureTreeDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1648
|
TermTreeDetailSection section = new TermTreeDetailSection(this, parentElement, selectionProvider, style);
|
1649
|
addAndAdaptSection(parentElement, section);
|
1650
|
return section;
|
1651
|
}
|
1652
|
public TermTreeDetailSectionForNode createFeatureTreeDetailSectionForTree(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1653
|
TermTreeDetailSectionForNode section = new TermTreeDetailSectionForNode(this, parentElement, selectionProvider, style);
|
1654
|
addAndAdaptSection(parentElement, section);
|
1655
|
return section;
|
1656
|
}
|
1657
|
|
1658
|
public ReferenceDetailSection createReferenceDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1659
|
ReferenceDetailSection section = new ReferenceDetailSection(this, parentElement, selectionProvider, style);
|
1660
|
addAndAdaptSection(parentElement, section);
|
1661
|
return section;
|
1662
|
}
|
1663
|
|
1664
|
public NomenclaturalSourceDetailSection createNomenclaturalReferenceDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1665
|
NomenclaturalSourceDetailSection section = new NomenclaturalSourceDetailSection(this, parentElement, selectionProvider, style);
|
1666
|
addAndAdaptSection(parentElement, section);
|
1667
|
return section;
|
1668
|
}
|
1669
|
|
1670
|
public OriginalSourceAdvancedSection createOriginalSourceAdvancedSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1671
|
OriginalSourceAdvancedSection section = new OriginalSourceAdvancedSection(this, parentElement, selectionProvider, style);
|
1672
|
addAndAdaptSection(parentElement, section);
|
1673
|
return section;
|
1674
|
}
|
1675
|
|
1676
|
public AdvancedSourceElement createAdvancedSourceDetailElement(ICdmFormElement parentElement, int style){
|
1677
|
AdvancedSourceElement element = new AdvancedSourceElement(this, parentElement);
|
1678
|
addAndAdaptElement(parentElement, element);
|
1679
|
return element;
|
1680
|
}
|
1681
|
|
1682
|
public AdvancedSourceElement createAdvancedNomenclaturalSourceDetailElement(ICdmFormElement parentElement, int style){
|
1683
|
AdvancedNomenclaturalSourceElement element = new AdvancedNomenclaturalSourceElement(this, parentElement);
|
1684
|
addAndAdaptElement(parentElement, element);
|
1685
|
return element;
|
1686
|
}
|
1687
|
|
1688
|
public SingleSourceSection createSingleSourceSection(ICdmFormElement parentElement, CdmBase cdmEntity, ISelectionProvider selectionProvider, String label, int style){
|
1689
|
SingleSourceSection section = new SingleSourceSection(this, parentElement, cdmEntity, selectionProvider, style, label);
|
1690
|
addAndAdaptSection(parentElement, section);
|
1691
|
return section;
|
1692
|
}
|
1693
|
|
1694
|
public TaxonBaseDetailSection createTaxonBaseDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1695
|
TaxonBaseDetailSection section = new TaxonBaseDetailSection(this, parentElement, selectionProvider, style);
|
1696
|
addAndAdaptSection(parentElement, section);
|
1697
|
return section;
|
1698
|
}
|
1699
|
|
1700
|
public AuthorshipDetailSection createAuthorshipDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1701
|
AuthorshipDetailSection section = new AuthorshipDetailSection(this, parentElement, selectionProvider, style);
|
1702
|
addAndAdaptSection(parentElement, section);
|
1703
|
return section;
|
1704
|
}
|
1705
|
|
1706
|
public TeamOrPersonBaseDetailSection createTeamOrPersonBaseDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1707
|
TeamOrPersonBaseDetailSection section = new TeamOrPersonBaseDetailSection(this, parentElement, selectionProvider, style);
|
1708
|
addAndAdaptSection(parentElement, section);
|
1709
|
return section;
|
1710
|
}
|
1711
|
|
1712
|
public TeamDetailSection createTeamDetailSection(ICdmFormElement parentElement, int style){
|
1713
|
TeamDetailSection section = new TeamDetailSection(this, parentElement, null, style);
|
1714
|
addAndAdaptSection(parentElement, section);
|
1715
|
return section;
|
1716
|
}
|
1717
|
|
1718
|
public PersonDetailSection createPersonDetailSection(ICdmFormElement parentElement, int style){
|
1719
|
PersonDetailSection section = new PersonDetailSection(this, parentElement, null, style);
|
1720
|
addAndAdaptSection(parentElement, section);
|
1721
|
return section;
|
1722
|
}
|
1723
|
|
1724
|
public DescriptionDetailSection createDescriptionDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1725
|
DescriptionDetailSection section = new DescriptionDetailSection(this, parentElement, selectionProvider, style);
|
1726
|
addAndAdaptSection(parentElement, section);
|
1727
|
return section;
|
1728
|
}
|
1729
|
|
1730
|
public DescriptionElementDetailSection createDescriptionElementDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1731
|
DescriptionElementDetailSection section = new DescriptionElementDetailSection(this, parentElement, selectionProvider, style);
|
1732
|
addAndAdaptSection(parentElement, section);
|
1733
|
return section;
|
1734
|
}
|
1735
|
|
1736
|
public ParsingMessagesSection createParsingMessagesSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1737
|
ParsingMessagesSection section = new ParsingMessagesSection(this, parentElement, selectionProvider, style);
|
1738
|
addAndAdaptSection(parentElement, section);
|
1739
|
return section;
|
1740
|
}
|
1741
|
|
1742
|
|
1743
|
|
1744
|
public NonViralNameDetailSection createNonViralNameDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, boolean nameChoosable, int style){
|
1745
|
NonViralNameDetailSection section = new NonViralNameDetailSection(this, parentElement, selectionProvider, nameChoosable, style);
|
1746
|
addAndAdaptSection(parentElement, section);
|
1747
|
return section;
|
1748
|
}
|
1749
|
|
1750
|
public MediaDetailsSection createMediaDetailsSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1751
|
MediaDetailsSection section = new MediaDetailsSection(this, parentElement, selectionProvider, style);
|
1752
|
addAndAdaptSection(parentElement, section);
|
1753
|
return section;
|
1754
|
}
|
1755
|
|
1756
|
public FieldUnitFacadeDetailSection createFieldUnitFacadeDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1757
|
FieldUnitFacadeDetailSection section = new FieldUnitFacadeDetailSection(this, parentElement, selectionProvider, style);
|
1758
|
addAndAdaptSection(parentElement, section);
|
1759
|
return section;
|
1760
|
}
|
1761
|
|
1762
|
public GatheringEventDetailSection createGatheringEventDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1763
|
GatheringEventDetailSection section = new GatheringEventDetailSection(this, parentElement, selectionProvider, style);
|
1764
|
addAndAdaptSection(parentElement, section);
|
1765
|
return section;
|
1766
|
}
|
1767
|
|
1768
|
public DerivedUnitBaseDetailSection createDerivedUnitBaseDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1769
|
DerivedUnitBaseDetailSection section = new DerivedUnitBaseDetailSection(this, parentElement, selectionProvider, style);
|
1770
|
addAndAdaptSection(parentElement, section);
|
1771
|
return section;
|
1772
|
}
|
1773
|
|
1774
|
public DerivedUnitTypeDesignationSection createDerivedUnitTypeDesignationSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1775
|
DerivedUnitTypeDesignationSection section = new DerivedUnitTypeDesignationSection(this, parentElement, style);
|
1776
|
addAndAdaptSection(parentElement, section);
|
1777
|
return section;
|
1778
|
}
|
1779
|
|
1780
|
public TaxonAssociationDetailSection createTaxonAssociationDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1781
|
TaxonAssociationDetailSection section = new TaxonAssociationDetailSection(this, parentElement, selectionProvider, style);
|
1782
|
addAndAdaptSection(parentElement, section);
|
1783
|
return section;
|
1784
|
}
|
1785
|
|
1786
|
public OriginalLabelDataSection createOriginalLabelDataSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1787
|
OriginalLabelDataSection section = new OriginalLabelDataSection(this, parentElement, selectionProvider, style);
|
1788
|
addAndAdaptSection(parentElement, section);
|
1789
|
return section;
|
1790
|
}
|
1791
|
|
1792
|
public NaturalLanguageSection createNaturalLanguageSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1793
|
NaturalLanguageSection section = new NaturalLanguageSection(this, parentElement, selectionProvider, style);
|
1794
|
addAndAdaptSection(parentElement, section);
|
1795
|
return section;
|
1796
|
}
|
1797
|
|
1798
|
public FeatureDistributionDetailSection createFeatureDistributionDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1799
|
FeatureDistributionDetailSection section = new FeatureDistributionDetailSection(this, parentElement, selectionProvider, style);
|
1800
|
addAndAdaptSection(parentElement, section);
|
1801
|
return section;
|
1802
|
}
|
1803
|
|
1804
|
public ClassificationDetailSection createClassificationDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1805
|
ClassificationDetailSection section = new ClassificationDetailSection(this, parentElement, selectionProvider, style);
|
1806
|
addAndAdaptSection(parentElement, section);
|
1807
|
return section;
|
1808
|
}
|
1809
|
|
1810
|
public TaxonNodeDetailSection createTaxonNodeDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1811
|
TaxonNodeDetailSection section = new TaxonNodeDetailSection(this, parentElement, selectionProvider, style);
|
1812
|
addAndAdaptSection(parentElement, section);
|
1813
|
return section;
|
1814
|
}
|
1815
|
|
1816
|
public PolytomousKeyDetailSection createPolytomousKeyDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1817
|
PolytomousKeyDetailSection section = new PolytomousKeyDetailSection(this, parentElement, selectionProvider, style);
|
1818
|
addAndAdaptSection(parentElement, section);
|
1819
|
return section;
|
1820
|
}
|
1821
|
|
1822
|
public PolytomousKeyNodeDetailSection createPolytomousKeyNodeDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1823
|
PolytomousKeyNodeDetailSection section = new PolytomousKeyNodeDetailSection(this, parentElement, selectionProvider, style);
|
1824
|
addAndAdaptSection(parentElement, section);
|
1825
|
return section;
|
1826
|
}
|
1827
|
|
1828
|
public InstitutionDetailSection createInstitutionDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1829
|
InstitutionDetailSection section = new InstitutionDetailSection(this, parentElement, selectionProvider, style);
|
1830
|
addAndAdaptSection(parentElement, section);
|
1831
|
return section;
|
1832
|
}
|
1833
|
|
1834
|
public FieldUnitFacadeGeneralDetailSection createFieldUnitFacadeGeneralDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1835
|
FieldUnitFacadeGeneralDetailSection section = new FieldUnitFacadeGeneralDetailSection(this, parentElement, selectionProvider, style);
|
1836
|
addAndAdaptSection(parentElement, section);
|
1837
|
return section;
|
1838
|
}
|
1839
|
|
1840
|
public DerivedUnitGeneralDetailSection createDerivedUnitGeneralDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1841
|
DerivedUnitGeneralDetailSection section = new DerivedUnitGeneralDetailSection(this, parentElement, selectionProvider, style);
|
1842
|
addAndAdaptSection(parentElement, section);
|
1843
|
return section;
|
1844
|
}
|
1845
|
|
1846
|
public PreservedSpecimenGeneralDetailSection createPreservedSpecimenGeneralDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1847
|
PreservedSpecimenGeneralDetailSection section = new PreservedSpecimenGeneralDetailSection(this, parentElement, selectionProvider, style);
|
1848
|
addAndAdaptSection(parentElement, section);
|
1849
|
return section;
|
1850
|
}
|
1851
|
|
1852
|
public TissueSampleGeneralDetailSection createTissueSampleGeneralDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1853
|
TissueSampleGeneralDetailSection section = new TissueSampleGeneralDetailSection(this, parentElement, selectionProvider, style);
|
1854
|
addAndAdaptSection(parentElement, section);
|
1855
|
return section;
|
1856
|
}
|
1857
|
|
1858
|
public DnaSampleGeneralDetailSection createDnaSampleGeneralDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1859
|
DnaSampleGeneralDetailSection section = new DnaSampleGeneralDetailSection(this, parentElement, selectionProvider, style);
|
1860
|
addAndAdaptSection(parentElement, section);
|
1861
|
return section;
|
1862
|
}
|
1863
|
|
1864
|
public DnaSamplePreparationPreservationSection createDnaSamplePreparationPreservationSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1865
|
DnaSamplePreparationPreservationSection section = new DnaSamplePreparationPreservationSection(this, parentElement, selectionProvider, style);
|
1866
|
addAndAdaptSection(parentElement, section);
|
1867
|
return section;
|
1868
|
}
|
1869
|
|
1870
|
public DnaQualityDetailSection createDnaQualityDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1871
|
DnaQualityDetailSection section = new DnaQualityDetailSection(this, parentElement, selectionProvider, style);
|
1872
|
addAndAdaptSection(parentElement, section);
|
1873
|
return section;
|
1874
|
}
|
1875
|
|
1876
|
public SequenceGeneralDetailSection createSequenceGeneralDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1877
|
SequenceGeneralDetailSection section = new SequenceGeneralDetailSection(this, parentElement, selectionProvider, style);
|
1878
|
addAndAdaptSection(parentElement, section);
|
1879
|
return section;
|
1880
|
}
|
1881
|
|
1882
|
public SequenceContigFileCollectionDetailSection createSequenceContigFileCollectionDetailSection(ICdmFormElement parentElement, int style){
|
1883
|
SequenceContigFileCollectionDetailSection section = new SequenceContigFileCollectionDetailSection(this, parentElement, style);
|
1884
|
addAndAdaptSection(parentElement, section);
|
1885
|
return section;
|
1886
|
}
|
1887
|
|
1888
|
public SingleReadPherogramCollectionDetailSection createSingleReadPherogramCollectionDetailSection(ICdmFormElement parentElement, int style){
|
1889
|
SingleReadPherogramCollectionDetailSection section = new SingleReadPherogramCollectionDetailSection(this, parentElement, style);
|
1890
|
addAndAdaptSection(parentElement, section);
|
1891
|
return section;
|
1892
|
}
|
1893
|
|
1894
|
public SequenceReferenceCollectionDetailSection createSequenceReferenceCollectionDetailSection(ICdmFormElement parentElement, int style){
|
1895
|
SequenceReferenceCollectionDetailSection section = new SequenceReferenceCollectionDetailSection(this, parentElement, style);
|
1896
|
addAndAdaptSection(parentElement, section);
|
1897
|
return section;
|
1898
|
}
|
1899
|
|
1900
|
public SingleReadGeneralDetailSection createSingleReadGeneralDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1901
|
SingleReadGeneralDetailSection section = new SingleReadGeneralDetailSection(this, parentElement, selectionProvider, style);
|
1902
|
addAndAdaptSection(parentElement, section);
|
1903
|
return section;
|
1904
|
}
|
1905
|
|
1906
|
public AmplificationGeneralDetailSection createAmplificationGeneralDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1907
|
AmplificationGeneralDetailSection section = new AmplificationGeneralDetailSection(this, parentElement, selectionProvider, style);
|
1908
|
addAndAdaptSection(parentElement, section);
|
1909
|
return section;
|
1910
|
}
|
1911
|
|
1912
|
public AmplificationPrimerDetailSection createAmplificationPrimerDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1913
|
AmplificationPrimerDetailSection section = new AmplificationPrimerDetailSection(this, parentElement, selectionProvider, style);
|
1914
|
addAndAdaptSection(parentElement, section);
|
1915
|
return section;
|
1916
|
}
|
1917
|
|
1918
|
public AmplificationCloningDetailSection createAmplificationCloningDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1919
|
AmplificationCloningDetailSection section = new AmplificationCloningDetailSection(this, parentElement, selectionProvider, style);
|
1920
|
addAndAdaptSection(parentElement, section);
|
1921
|
return section;
|
1922
|
}
|
1923
|
|
1924
|
public AmplificationGelPhotoCollectionDetailSection createAmplificationGelPhotoCollectionDetailSection(ICdmFormElement parentElement, int style){
|
1925
|
AmplificationGelPhotoCollectionDetailSection section = new AmplificationGelPhotoCollectionDetailSection(this, parentElement, style);
|
1926
|
addAndAdaptSection(parentElement, section);
|
1927
|
return section;
|
1928
|
}
|
1929
|
|
1930
|
public MediaSpecimenGeneralDetailSection createMediaSpecimenGeneralDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1931
|
MediaSpecimenGeneralDetailSection section = new MediaSpecimenGeneralDetailSection(this, parentElement, selectionProvider, style);
|
1932
|
addAndAdaptSection(parentElement, section);
|
1933
|
return section;
|
1934
|
}
|
1935
|
|
1936
|
public HybridDetailSection createHybridDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1937
|
HybridDetailSection section = new HybridDetailSection(this, parentElement, selectionProvider, style);
|
1938
|
addAndAdaptSection(parentElement, section);
|
1939
|
return section;
|
1940
|
}
|
1941
|
|
1942
|
public UserDetailSection createUserDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1943
|
UserDetailSection section = new UserDetailSection(this, parentElement, selectionProvider, style);
|
1944
|
addAndAdaptSection(parentElement, section);
|
1945
|
return section;
|
1946
|
}
|
1947
|
|
1948
|
public GroupDetailSection createGroupDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1949
|
GroupDetailSection section = new GroupDetailSection(this, parentElement, selectionProvider, style);
|
1950
|
addAndAdaptSection(parentElement, section);
|
1951
|
return section;
|
1952
|
}
|
1953
|
|
1954
|
public DeterminationDetailSection createDeterminationDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1955
|
DeterminationDetailSection section = new DeterminationDetailSection(this, parentElement, selectionProvider, style);
|
1956
|
addAndAdaptSection(parentElement, section);
|
1957
|
return section;
|
1958
|
}
|
1959
|
|
1960
|
public SampleDesignationDetailSection createSampleDesignationDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1961
|
SampleDesignationDetailSection section = new SampleDesignationDetailSection(this, parentElement, selectionProvider, style);
|
1962
|
addAndAdaptSection(parentElement, section);
|
1963
|
return section;
|
1964
|
}
|
1965
|
|
1966
|
public TaxonRelationshipDetailSection createTaxonRelationshipDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1967
|
TaxonRelationshipDetailSection section = new TaxonRelationshipDetailSection(this, parentElement, selectionProvider, style, true);
|
1968
|
addAndAdaptSection(parentElement, section);
|
1969
|
return section;
|
1970
|
}
|
1971
|
|
1972
|
public ReferencedEntityDetailSection createReferencedEntityDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1973
|
ReferencedEntityDetailSection section = new ReferencedEntityDetailSection(this, parentElement, selectionProvider, style);
|
1974
|
addAndAdaptSection(parentElement, section);
|
1975
|
return section;
|
1976
|
}
|
1977
|
|
1978
|
public TermVocabularyDetailSection createTermVocabularyDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1979
|
TermVocabularyDetailSection section = new TermVocabularyDetailSection(this, parentElement, selectionProvider, style);
|
1980
|
addAndAdaptSection(parentElement, section);
|
1981
|
return section;
|
1982
|
}
|
1983
|
|
1984
|
public GatheringEventDetailSection createGatheringSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1985
|
GatheringEventDetailSection section = new GatheringEventDetailSection(this, parentElement, selectionProvider, style);
|
1986
|
addAndAdaptSection(parentElement, section);
|
1987
|
return section;
|
1988
|
}
|
1989
|
|
1990
|
public NamedAreaDetailSection createNamedAreaDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1991
|
NamedAreaDetailSection section = new NamedAreaDetailSection(this, parentElement, selectionProvider, style);
|
1992
|
addAndAdaptSection(parentElement, section);
|
1993
|
return section;
|
1994
|
}
|
1995
|
|
1996
|
public UseRecordDetailSection createUseRecordDetailSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
|
1997
|
UseRecordDetailSection section = new UseRecordDetailSection(this, parentElement, selectionProvider, style);
|
1998
|
addAndAdaptSection(parentElement, section);
|
1999
|
return section;
|
2000
|
}
|
2001
|
|
2002
|
private void addAndAdaptSection(ICdmFormElement parentElement, AbstractFormSection<?> section) {
|
2003
|
parentElement.addElement(section);
|
2004
|
adapt(section);
|
2005
|
}
|
2006
|
|
2007
|
//--------DetailElements------------
|
2008
|
|
2009
|
public UseRecordDetailElement createUseRecordDetailElement(ICdmFormElement parentElement){
|
2010
|
UseRecordDetailElement element = new UseRecordDetailElement(this, parentElement);
|
2011
|
addAndAdaptElement(parentElement, element);
|
2012
|
return element;
|
2013
|
}
|
2014
|
|
2015
|
public DefinedTermDetailElement<NamedAreaLevel> createNamedAreaLevelElement(ICdmFormElement parentElement){
|
2016
|
DefinedTermDetailElement<NamedAreaLevel> element = new DefinedTermDetailElement<NamedAreaLevel>(this, parentElement);
|
2017
|
addAndAdaptElement(parentElement, element);
|
2018
|
return element;
|
2019
|
}
|
2020
|
|
2021
|
public eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement createNamedAreaDetailElement(ICdmFormElement parentElement){
|
2022
|
eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
|
2023
|
addAndAdaptElement(parentElement, element);
|
2024
|
return element;
|
2025
|
}
|
2026
|
|
2027
|
public TermVocabularyDetailElement createTermVocabularyDetailElement(ICdmFormElement parentElement){
|
2028
|
TermVocabularyDetailElement element = new TermVocabularyDetailElement(this, parentElement);
|
2029
|
addAndAdaptElement(parentElement, element);
|
2030
|
return element;
|
2031
|
}
|
2032
|
|
2033
|
public ReferenceEntityDetailElement createReferenceEntityDetailElement(ICdmFormElement parentElement){
|
2034
|
ReferenceEntityDetailElement element = new ReferenceEntityDetailElement(this, parentElement);
|
2035
|
addAndAdaptElement(parentElement, element);
|
2036
|
return element;
|
2037
|
}
|
2038
|
public OriginalSourceElement createOriginalSourceElement(ICdmFormElement parentElement, CdmBase cdmEntity, String label){
|
2039
|
OriginalSourceElement<?> element = new OriginalSourceElement<>(this, parentElement, cdmEntity, label);
|
2040
|
addAndAdaptElement(parentElement, element);
|
2041
|
return element;
|
2042
|
}
|
2043
|
|
2044
|
public SecundumSourceElement createSecundumSourceElement(ICdmFormElement parentElement, CdmBase cdmEntity, String label){
|
2045
|
SecundumSourceElement element = new SecundumSourceElement(this, parentElement, cdmEntity, label);
|
2046
|
addAndAdaptElement(parentElement, element);
|
2047
|
return element;
|
2048
|
}
|
2049
|
public NomenclaturalSourceElement createNomenclaturalSourceElement(ICdmFormElement parentElement, CdmBase cdmEntity, String label){
|
2050
|
NomenclaturalSourceElement element = new NomenclaturalSourceElement(this, parentElement, cdmEntity, label);
|
2051
|
addAndAdaptElement(parentElement, element);
|
2052
|
return element;
|
2053
|
}
|
2054
|
|
2055
|
public TaxonRelationshipDetailElement createTaxonRelationshipDetailElement(ICdmFormElement parentElement){
|
2056
|
TaxonRelationshipDetailElement element = new TaxonRelationshipDetailElement(this, parentElement);
|
2057
|
addAndAdaptElement(parentElement, element);
|
2058
|
return element;
|
2059
|
}
|
2060
|
|
2061
|
public GrantedAuthorityDetailElement createGrantedAuthorityDetailElement(ICdmFormElement parentElement){
|
2062
|
GrantedAuthorityDetailElement element = new GrantedAuthorityDetailElement(this, parentElement);
|
2063
|
addAndAdaptElement(parentElement, element);
|
2064
|
return element;
|
2065
|
}
|
2066
|
|
2067
|
public GroupDetailElement createGroupDetailElement(ICdmFormElement parentElement){
|
2068
|
GroupDetailElement element = new GroupDetailElement(this, parentElement);
|
2069
|
addAndAdaptElement(parentElement, element);
|
2070
|
return element;
|
2071
|
}
|
2072
|
|
2073
|
public UserDetailElement createUserDetailElement(ICdmFormElement parentElement){
|
2074
|
UserDetailElement element = new UserDetailElement(this, parentElement);
|
2075
|
addAndAdaptElement(parentElement, element);
|
2076
|
return element;
|
2077
|
}
|
2078
|
|
2079
|
public HybridDetailElement createHybridDetailElement(ICdmFormElement parentElement){
|
2080
|
HybridDetailElement element = new HybridDetailElement(this, parentElement);
|
2081
|
addAndAdaptElement(parentElement, element);
|
2082
|
return element;
|
2083
|
}
|
2084
|
|
2085
|
public InstitutionDetailElement createInstitutionDetailElement(ICdmFormElement parentElement){
|
2086
|
InstitutionDetailElement element = new InstitutionDetailElement(this, parentElement);
|
2087
|
addAndAdaptElement(parentElement, element);
|
2088
|
return element;
|
2089
|
}
|
2090
|
|
2091
|
public PolytomousKeyNodeDetailElement createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement){
|
2092
|
PolytomousKeyNodeDetailElement element = new PolytomousKeyNodeDetailElement(this, parentElement);
|
2093
|
addAndAdaptElement(parentElement, element);
|
2094
|
return element;
|
2095
|
}
|
2096
|
|
2097
|
public PolytomousKeyDetailElement createPolytomousKeyDetailElement(ICdmFormElement parentElement){
|
2098
|
PolytomousKeyDetailElement element = new PolytomousKeyDetailElement(this, parentElement);
|
2099
|
addAndAdaptElement(parentElement, element);
|
2100
|
return element;
|
2101
|
}
|
2102
|
|
2103
|
public CollectionDetailElement createCollectionDetailElement(ICdmFormElement parentElement){
|
2104
|
CollectionDetailElement element = new CollectionDetailElement(this, parentElement);
|
2105
|
addAndAdaptElement(parentElement, element);
|
2106
|
return element;
|
2107
|
}
|
2108
|
|
2109
|
public TaxonNodeAgentRelationCollectionSection createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement, int style){
|
2110
|
TaxonNodeAgentRelationCollectionSection element = new TaxonNodeAgentRelationCollectionSection(this, parentElement, style);
|
2111
|
adapt(element);
|
2112
|
parentElement.addElement(element);
|
2113
|
|
2114
|
return element;
|
2115
|
}
|
2116
|
|
2117
|
public TaxonNodeDetailElement createTaxonNodeDetailElement(ICdmFormElement parentElement, boolean createNew){
|
2118
|
TaxonNodeDetailElement element = new TaxonNodeDetailElement(this, parentElement, createNew);
|
2119
|
addAndAdaptElement(parentElement, element);
|
2120
|
return element;
|
2121
|
}
|
2122
|
|
2123
|
public ClassificationDetailElement createClassificationDetailElement(ICdmFormElement parentElement){
|
2124
|
ClassificationDetailElement element = new ClassificationDetailElement(this, parentElement);
|
2125
|
addAndAdaptElement(parentElement, element);
|
2126
|
return element;
|
2127
|
}
|
2128
|
|
2129
|
public CloneClassificationDetailElement createCloneClassificationDetailElement(ICdmFormElement parentElement){
|
2130
|
CloneClassificationDetailElement element = new CloneClassificationDetailElement(this, parentElement);
|
2131
|
addAndAdaptElement(parentElement, element);
|
2132
|
return element;
|
2133
|
}
|
2134
|
|
2135
|
public FeatureDistributionDetailElement createFeatureDistributionDetailElement(ICdmFormElement parentElement){
|
2136
|
FeatureDistributionDetailElement element = new FeatureDistributionDetailElement(this, parentElement);
|
2137
|
addAndAdaptElement(parentElement, element);
|
2138
|
return element;
|
2139
|
}
|
2140
|
|
2141
|
public NaturalLanguageDetailElement createNaturalLanguageDetailElement(ICdmFormElement parentElement){
|
2142
|
NaturalLanguageDetailElement element = new NaturalLanguageDetailElement(this, parentElement);
|
2143
|
addAndAdaptElement(parentElement, element);
|
2144
|
return element;
|
2145
|
}
|
2146
|
|
2147
|
public NonViralNameDetailElement createNonViralNameDetailElement(ICdmFormElement parentElement){
|
2148
|
NonViralNameDetailElement element = new NonViralNameDetailElement(this, parentElement);
|
2149
|
addAndAdaptElement(parentElement, element);
|
2150
|
return element;
|
2151
|
}
|
2152
|
|
2153
|
public DescriptionElementDetailElement createDescriptionElementDetailElement(ICdmFormElement parentElement, int style){
|
2154
|
DescriptionElementDetailElement element = new DescriptionElementDetailElement(this, parentElement, style);
|
2155
|
addAndAdaptElement(parentElement, element);
|
2156
|
return element;
|
2157
|
}
|
2158
|
|
2159
|
public DescriptionDetailElement createDescriptionDetailElement(ICdmFormElement parentElement, int style){
|
2160
|
DescriptionDetailElement element = new DescriptionDetailElement(this, parentElement, style);
|
2161
|
addAndAdaptElement(parentElement, element);
|
2162
|
return element;
|
2163
|
}
|
2164
|
|
2165
|
public PersonDetailElement createPersonDetailElement(ICdmFormElement parentElement, int style){
|
2166
|
PersonDetailElement element = new PersonDetailElement(this, parentElement, style);
|
2167
|
addAndAdaptElement(parentElement, element);
|
2168
|
return element;
|
2169
|
}
|
2170
|
|
2171
|
public TeamDetailElement createTeamDetailElement(ICdmFormElement parentElement, int style, boolean isNomenclatural, boolean isCollectorTeam){
|
2172
|
TeamDetailElement element = new TeamDetailElement(this, parentElement, style, isNomenclatural, isCollectorTeam);
|
2173
|
addAndAdaptElement(parentElement, element);
|
2174
|
return element;
|
2175
|
}
|
2176
|
|
2177
|
public AuthorshipDetailElement createAuthorshipDetailElement(ICdmFormElement parentElement, int style){
|
2178
|
AuthorshipDetailElement element = new AuthorshipDetailElement(this, parentElement, style);
|
2179
|
addAndAdaptElement(parentElement, element);
|
2180
|
return element;
|
2181
|
}
|
2182
|
|
2183
|
public TaxonBaseDetailElement createTaxonBaseDetailElement(ICdmFormElement parentElement, int style){
|
2184
|
TaxonBaseDetailElement element = new TaxonBaseDetailElement(this, parentElement, style);
|
2185
|
addAndAdaptElement(parentElement, element);
|
2186
|
return element;
|
2187
|
}
|
2188
|
|
2189
|
public NameDetailElement createNameDetailElement(ICdmFormElement parentElement, int style){
|
2190
|
NameDetailElement element = new NameDetailElement(this, parentElement, style);
|
2191
|
addAndAdaptElement(parentElement, element);
|
2192
|
return element;
|
2193
|
}
|
2194
|
|
2195
|
public ReferenceDetailElement createReferenceDetailElement(ICdmFormElement parentElement, int style){
|
2196
|
ReferenceDetailElement element = new ReferenceDetailElement(this, parentElement, style);
|
2197
|
addAndAdaptElement(parentElement, element);
|
2198
|
return element;
|
2199
|
}
|
2200
|
public ReferenceDetailElement createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement, int style){
|
2201
|
ReferenceDetailElement element = new ReferenceDetailElement(this, parentElement, true, style);
|
2202
|
addAndAdaptElement(parentElement, element);
|
2203
|
return element;
|
2204
|
}
|
2205
|
|
2206
|
public NomenclaturalSourceDetailElement createNomenclaturalSourceDetailElement(ICdmFormElement parentElement, int style){
|
2207
|
NomenclaturalSourceDetailElement element = new NomenclaturalSourceDetailElement(this, parentElement, style);
|
2208
|
addAndAdaptElement(parentElement, element);
|
2209
|
return element;
|
2210
|
}
|
2211
|
|
2212
|
|
2213
|
public FieldUnitFacadeGeneralDetailElement createFieldUnitFacadeGeneralDetailElement(ICdmFormElement parentElement){
|
2214
|
FieldUnitFacadeGeneralDetailElement element = new FieldUnitFacadeGeneralDetailElement(this, parentElement);
|
2215
|
addAndAdaptElement(parentElement, element);
|
2216
|
return element;
|
2217
|
}
|
2218
|
|
2219
|
public DerivedUnitGeneralDetailElement createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement){
|
2220
|
DerivedUnitGeneralDetailElement element = new DerivedUnitGeneralDetailElement(this, parentElement);
|
2221
|
addAndAdaptElement(parentElement, element);
|
2222
|
return element;
|
2223
|
}
|
2224
|
|
2225
|
public TaxonAssociationDetailElement createTaxonAssociationDetailElement(ICdmFormElement parentElement){
|
2226
|
TaxonAssociationDetailElement element = new TaxonAssociationDetailElement(this, parentElement);
|
2227
|
addAndAdaptElement(parentElement, element);
|
2228
|
return element;
|
2229
|
}
|
2230
|
|
2231
|
public PreservedSpecimenGeneralDetailElement createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement){
|
2232
|
PreservedSpecimenGeneralDetailElement element = new PreservedSpecimenGeneralDetailElement(this, parentElement);
|
2233
|
addAndAdaptElement(parentElement, element);
|
2234
|
return element;
|
2235
|
}
|
2236
|
|
2237
|
public TissueSampleGeneralDetailElement createTissueSampleGeneralDetailElement(ICdmFormElement parentElement){
|
2238
|
TissueSampleGeneralDetailElement element = new TissueSampleGeneralDetailElement(this, parentElement);
|
2239
|
addAndAdaptElement(parentElement, element);
|
2240
|
return element;
|
2241
|
}
|
2242
|
|
2243
|
public DnaSampleGeneralDetailElement createDnaSampleGeneralDetailElement(ICdmFormElement parentElement){
|
2244
|
DnaSampleGeneralDetailElement element = new DnaSampleGeneralDetailElement(this, parentElement);
|
2245
|
addAndAdaptElement(parentElement, element);
|
2246
|
return element;
|
2247
|
}
|
2248
|
|
2249
|
public DnaSamplePreparationPreservationDetailElement createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement){
|
2250
|
DnaSamplePreparationPreservationDetailElement element = new DnaSamplePreparationPreservationDetailElement(this, parentElement);
|
2251
|
addAndAdaptElement(parentElement, element);
|
2252
|
return element;
|
2253
|
}
|
2254
|
|
2255
|
public DnaQualityDetailElement createDnaQualityDetailElement(ICdmFormElement parentElement){
|
2256
|
DnaQualityDetailElement element = new DnaQualityDetailElement(this, parentElement);
|
2257
|
addAndAdaptElement(parentElement, element);
|
2258
|
return element;
|
2259
|
}
|
2260
|
|
2261
|
public SequenceGeneralDetailElement createSequenceGeneralDetailElement(ICdmFormElement parentElement){
|
2262
|
SequenceGeneralDetailElement element = new SequenceGeneralDetailElement(this, parentElement);
|
2263
|
addAndAdaptElement(parentElement, element);
|
2264
|
return element;
|
2265
|
}
|
2266
|
|
2267
|
public SingleReadGeneralDetailElement createSingleReadGeneralDetailElement(ICdmFormElement parentElement){
|
2268
|
SingleReadGeneralDetailElement element = new SingleReadGeneralDetailElement(this, parentElement);
|
2269
|
addAndAdaptElement(parentElement, element);
|
2270
|
return element;
|
2271
|
}
|
2272
|
|
2273
|
public PrimerGeneralDetailElement createPrimerGeneralDetailElement(ICdmFormElement parentElement){
|
2274
|
PrimerGeneralDetailElement element = new PrimerGeneralDetailElement(this, parentElement);
|
2275
|
addAndAdaptElement(parentElement, element);
|
2276
|
return element;
|
2277
|
}
|
2278
|
|
2279
|
public AmplificationGeneralDetailElement createAmplificationGeneralDetailElement(ICdmFormElement parentElement){
|
2280
|
AmplificationGeneralDetailElement element = new AmplificationGeneralDetailElement(this, parentElement);
|
2281
|
addAndAdaptElement(parentElement, element);
|
2282
|
return element;
|
2283
|
}
|
2284
|
|
2285
|
public AmplificationPrimerDetailElement createAmplificationPrimerDetailElement(ICdmFormElement parentElement){
|
2286
|
AmplificationPrimerDetailElement element = new AmplificationPrimerDetailElement(this, parentElement);
|
2287
|
addAndAdaptElement(parentElement, element);
|
2288
|
return element;
|
2289
|
}
|
2290
|
|
2291
|
public AmplificationCloningDetailElement createAmplificationCloningDetailElement(ICdmFormElement parentElement){
|
2292
|
AmplificationCloningDetailElement element = new AmplificationCloningDetailElement(this, parentElement);
|
2293
|
addAndAdaptElement(parentElement, element);
|
2294
|
return element;
|
2295
|
}
|
2296
|
|
2297
|
public AmplificationGelPhotoDetailElement createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement){
|
2298
|
AmplificationGelPhotoDetailElement element = new AmplificationGelPhotoDetailElement(this, parentElement);
|
2299
|
addAndAdaptElement(parentElement, element);
|
2300
|
return element;
|
2301
|
}
|
2302
|
|
2303
|
public MediaSpecimenGeneralDetailElement createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement){
|
2304
|
MediaSpecimenGeneralDetailElement element = new MediaSpecimenGeneralDetailElement(this, parentElement);
|
2305
|
addAndAdaptElement(parentElement, element);
|
2306
|
return element;
|
2307
|
}
|
2308
|
|
2309
|
public MediaDetailElement createMediaDetailElement(ICdmFormElement parentElement){
|
2310
|
MediaDetailElement mediaDetailElement = new MediaDetailElement(this, parentElement);
|
2311
|
addAndAdaptElement(parentElement, mediaDetailElement);
|
2312
|
return mediaDetailElement;
|
2313
|
}
|
2314
|
|
2315
|
public GatheringEventDetailElement createGatheringEventDetailElement(ICdmFormElement parentElement) {
|
2316
|
GatheringEventDetailElement element = new GatheringEventDetailElement(this, parentElement);
|
2317
|
addAndAdaptElement(parentElement, element);
|
2318
|
return element;
|
2319
|
}
|
2320
|
|
2321
|
public FieldUnitFacadeDetailElement createFieldUnitFacadeDetailElement(ICdmFormElement parentElement) {
|
2322
|
FieldUnitFacadeDetailElement element = new FieldUnitFacadeDetailElement(this, parentElement);
|
2323
|
addAndAdaptElement(parentElement, element);
|
2324
|
return element;
|
2325
|
}
|
2326
|
|
2327
|
public DerivedUnitBaseDetailElement createDerivedUnitBaseDetailElement(ICdmFormElement parentElement) {
|
2328
|
DerivedUnitBaseDetailElement element = new DerivedUnitBaseDetailElement(this, parentElement);
|
2329
|
addAndAdaptElement(parentElement, element);
|
2330
|
return element;
|
2331
|
}
|
2332
|
|
2333
|
public OriginalLabelDataElement createOriginalLabelDataElement(ICdmFormElement parentElement) {
|
2334
|
OriginalLabelDataElement element = new OriginalLabelDataElement(this, parentElement);
|
2335
|
addAndAdaptElement(parentElement, element);
|
2336
|
return element;
|
2337
|
}
|
2338
|
|
2339
|
public PreservedSpecimenDetailElement createPreservedSpecimenDetailElement(ICdmFormElement parentElement) {
|
2340
|
PreservedSpecimenDetailElement element = new PreservedSpecimenDetailElement(this, parentElement);
|
2341
|
addAndAdaptElement(parentElement, element);
|
2342
|
return element;
|
2343
|
}
|
2344
|
|
2345
|
public DeterminationDetailElement createDeterminationDetailElement(ICdmFormElement parentElement) {
|
2346
|
DeterminationDetailElement element = new DeterminationDetailElement(this, parentElement);
|
2347
|
addAndAdaptElement(parentElement, element);
|
2348
|
return element;
|
2349
|
}
|
2350
|
|
2351
|
public SampleDesignationDetailElement createSampleDesignationDetailElement(ICdmFormElement parentElement) {
|
2352
|
SampleDesignationDetailElement element = new SampleDesignationDetailElement(this, parentElement);
|
2353
|
addAndAdaptElement(parentElement, element);
|
2354
|
return element;
|
2355
|
}
|
2356
|
|
2357
|
private void addAndAdaptElement(ICdmFormElement parentElement, AbstractCdmDetailElement<?> element) {
|
2358
|
adapt(element);
|
2359
|
parentElement.addElement(element);
|
2360
|
}
|
2361
|
|
2362
|
//--------EntityCollectionSection----------
|
2363
|
public TeamMemberSection createTeamMemberSection(ICdmFormElement parentElement, int style, boolean isNomenclatural, boolean isCollector){
|
2364
|
TeamMemberSection section = new TeamMemberSection(this, parentElement, style, isNomenclatural, isCollector);
|
2365
|
addAndAdaptSection(parentElement, section);
|
2366
|
return section;
|
2367
|
}
|
2368
|
|
2369
|
public InapplicableIfEntityCollectionSection createInapplicableIfEntityCollectionSection(ICdmFormElement parentElement, int style){
|
2370
|
InapplicableIfEntityCollectionSection section = new InapplicableIfEntityCollectionSection(this, parentElement, style);
|
2371
|
addAndAdaptSection(parentElement, section);
|
2372
|
return section;
|
2373
|
}
|
2374
|
|
2375
|
public OnlyApplicableIfEntityCollectionSection createOnlyApplicableIfEntityCollectionSection(ICdmFormElement parentElement, int style){
|
2376
|
OnlyApplicableIfEntityCollectionSection section = new OnlyApplicableIfEntityCollectionSection(this, parentElement, style);
|
2377
|
addAndAdaptSection(parentElement, section);
|
2378
|
return section;
|
2379
|
}
|
2380
|
|
2381
|
public InapplicableIfEntityCollectionSectionForNode createInapplicableIfEntityCollectionSectionForNode(ICdmFormElement parentElement, int style){
|
2382
|
InapplicableIfEntityCollectionSectionForNode section = new InapplicableIfEntityCollectionSectionForNode(this, parentElement, style);
|
2383
|
addAndAdaptSection(parentElement, section);
|
2384
|
return section;
|
2385
|
}
|
2386
|
|
2387
|
public OnlyApplicableIfEntityCollectionSectionForNode createOnlyApplicableIfEntityCollectionSectionForNode(ICdmFormElement parentElement, int style){
|
2388
|
OnlyApplicableIfEntityCollectionSectionForNode section = new OnlyApplicableIfEntityCollectionSectionForNode(this, parentElement, style);
|
2389
|
addAndAdaptSection(parentElement, section);
|
2390
|
return section;
|
2391
|
}
|
2392
|
|
2393
|
public AnnotationSection createAnnotationSection(ICdmFormElement parentElement, int style){
|
2394
|
AnnotationSection section = new AnnotationSection(this, parentElement, style);
|
2395
|
addAndAdaptSection(parentElement, section);
|
2396
|
return section;
|
2397
|
}
|
2398
|
|
2399
|
public CreditSection createCreditSection(ICdmFormElement parentElement, int style){
|
2400
|
CreditSection section = new CreditSection(this, parentElement, style);
|
2401
|
addAndAdaptSection(parentElement, section);
|
2402
|
return section;
|
2403
|
}
|
2404
|
public DescriptionElementSourceSection createDescriptionElementSourceSection(ICdmFormElement parentElement, int style){
|
2405
|
DescriptionElementSourceSection section = new DescriptionElementSourceSection(this, parentElement, style);
|
2406
|
addAndAdaptSection(parentElement, section);
|
2407
|
return section;
|
2408
|
}
|
2409
|
public DescriptionElementSourceSection createDescriptionElementSourceSection(ICdmFormElement parentElement, Reference defaultSource, int style){
|
2410
|
DescriptionElementSourceSection section = new DescriptionElementSourceSection(this, parentElement, defaultSource, style);
|
2411
|
addAndAdaptSection(parentElement, section);
|
2412
|
return section;
|
2413
|
}
|
2414
|
|
2415
|
public ExtensionSection createExtensionSection(ICdmFormElement parentElement, int style){
|
2416
|
ExtensionSection section = new ExtensionSection(this, parentElement, style);
|
2417
|
addAndAdaptSection(parentElement, section);
|
2418
|
return section;
|
2419
|
}
|
2420
|
|
2421
|
public MarkerSection createMarkerSection(ICdmFormElement parentElement, int style){
|
2422
|
MarkerSection section = new MarkerSection(this, parentElement, style);
|
2423
|
addAndAdaptSection(parentElement, section);
|
2424
|
return section;
|
2425
|
}
|
2426
|
|
2427
|
public MediaSection createMediaSection(ICdmFormElement parentElement, int style){
|
2428
|
MediaSection section = new MediaSection(this, parentElement, style);
|
2429
|
addAndAdaptSection(parentElement, section);
|
2430
|
return section;
|
2431
|
}
|
2432
|
|
2433
|
public DescriptionElementMediaSection createDescriptionElementMediaSection(ICdmFormElement parentElement, int style){
|
2434
|
DescriptionElementMediaSection section = new DescriptionElementMediaSection(this, parentElement, style);
|
2435
|
addAndAdaptSection(parentElement, section);
|
2436
|
return section;
|
2437
|
}
|
2438
|
|
2439
|
public MediaRepresentationSection createMediaRepresentationSection(ICdmFormElement parentElement, int style){
|
2440
|
MediaRepresentationSection section = new MediaRepresentationSection(this, parentElement, style);
|
2441
|
addAndAdaptSection(parentElement, section);
|
2442
|
return section;
|
2443
|
}
|
2444
|
|
2445
|
public MediaRepresentationPartSection createMediaRepresentationPartSection(ICdmFormElement parentElement, int style){
|
2446
|
MediaRepresentationPartSection section = new MediaRepresentationPartSection(this, parentElement, style);
|
2447
|
addAndAdaptSection(parentElement, section);
|
2448
|
return section;
|
2449
|
}
|
2450
|
|
2451
|
public ModifierSection createModifierSection(ICdmFormElement parentElement, int style){
|
2452
|
ModifierSection section = new ModifierSection(this, parentElement, style);
|
2453
|
addAndAdaptSection(parentElement, section);
|
2454
|
return section;
|
2455
|
}
|
2456
|
|
2457
|
public NomenclaturalStatusSection createNomenclaturalStatusSection(ICdmFormElement parentElement, int style){
|
2458
|
NomenclaturalStatusSection section = new NomenclaturalStatusSection(this, parentElement, style);
|
2459
|
addAndAdaptSection(parentElement, section);
|
2460
|
return section;
|
2461
|
}
|
2462
|
|
2463
|
public NameRelationshipDetailSection createNameRelationshipDetailSection(ICdmFormElement parentElement, int style){
|
2464
|
NameRelationshipDetailSection section = new NameRelationshipDetailSection(this, parentElement, style);
|
2465
|
addAndAdaptSection(parentElement, section);
|
2466
|
return section;
|
2467
|
}
|
2468
|
|
2469
|
public ExternalLinksSection createExternalLinksSection(ICdmFormElement parentElement, int style){
|
2470
|
ExternalLinksSection section = new ExternalLinksSection(this, parentElement, style);
|
2471
|
addAndAdaptSection(parentElement, section);
|
2472
|
return section;
|
2473
|
}
|
2474
|
|
2475
|
public ExternalLinksSection createExternalLinksSection(ICdmFormElement parentElement, String label, int style){
|
2476
|
ExternalLinksSection section = new ExternalLinksSection(this, parentElement, true, label, style);
|
2477
|
addAndAdaptSection(parentElement, section);
|
2478
|
return section;
|
2479
|
}
|
2480
|
|
2481
|
public ExternalLinksSection createExternalLinksSection(ICdmFormElement parentElement, String label, boolean isWithTypeAndDesc, int style){
|
2482
|
ExternalLinksSection section = new ExternalLinksSection(this, parentElement, isWithTypeAndDesc, label, style);
|
2483
|
addAndAdaptSection(parentElement, section);
|
2484
|
return section;
|
2485
|
}
|
2486
|
|
2487
|
public RightsSection createRightsSection(ICdmFormElement parentElement, int style){
|
2488
|
RightsSection section = new RightsSection(this, parentElement, style);
|
2489
|
|
2490
|
addAndAdaptSection(parentElement, section);
|
2491
|
return section;
|
2492
|
}
|
2493
|
|
2494
|
public SourceSection createSourceSection(ICdmFormElement parentElement, int style){
|
2495
|
SourceSection section = new SourceSection(this, parentElement, style);
|
2496
|
addAndAdaptSection(parentElement, section);
|
2497
|
return section;
|
2498
|
}
|
2499
|
|
2500
|
public ScopeSection createScopeSection(ICdmFormElement parentElement, int style){
|
2501
|
ScopeSection section = new ScopeSection(this, parentElement, style);
|
2502
|
addAndAdaptSection(parentElement, section);
|
2503
|
return section;
|
2504
|
}
|
2505
|
|
2506
|
public DescriptionSourceSection createDescriptionSourceSection(ICdmFormElement parentElement, int style){
|
2507
|
DescriptionSourceSection section = new DescriptionSourceSection(this, parentElement, style);
|
2508
|
addAndAdaptSection(parentElement, section);
|
2509
|
return section;
|
2510
|
}
|
2511
|
|
2512
|
public TypeDesignationSection createTypeDesignationSection(ICdmFormElement parentElement, int style){
|
2513
|
TypeDesignationSection section = new TypeDesignationSection(this, parentElement, style);
|
2514
|
addAndAdaptSection(parentElement, section);
|
2515
|
return section;
|
2516
|
}
|
2517
|
|
2518
|
public StateDataSection createStateDataSection(ICdmFormElement parentElement, int style){
|
2519
|
StateDataSection section = new StateDataSection(this, parentElement, style);
|
2520
|
addAndAdaptSection(parentElement, section);
|
2521
|
return section;
|
2522
|
}
|
2523
|
|
2524
|
public StatisticalMeasurementValueSection createStatisticalMeasurementValueSection(ICdmFormElement parentElement, int style){
|
2525
|
StatisticalMeasurementValueSection section = new StatisticalMeasurementValueSection(this, parentElement, style);
|
2526
|
addAndAdaptSection(parentElement, section);
|
2527
|
return section;
|
2528
|
}
|
2529
|
|
2530
|
public DescribedSpecimenSection createDescribedSpecimenSection(ICdmFormElement parentElement, int style){
|
2531
|
DescribedSpecimenSection section = new DescribedSpecimenSection(this, parentElement, style);
|
2532
|
addAndAdaptSection(parentElement, section);
|
2533
|
return section;
|
2534
|
}
|
2535
|
|
2536
|
public StateVocabularyCollectionSection createStateVocabulariesSection(ICdmFormElement parentElement, int style){
|
2537
|
StateVocabularyCollectionSection section = new StateVocabularyCollectionSection(this, parentElement, style);
|
2538
|
addAndAdaptSection(parentElement, section);
|
2539
|
return section;
|
2540
|
}
|
2541
|
|
2542
|
public StateVocabularyDtoCollectionSection createStateVocabulariesDtoSection(ICdmFormElement parentElement, int style){
|
2543
|
StateVocabularyDtoCollectionSection section = new StateVocabularyDtoCollectionSection(this, parentElement, style);
|
2544
|
addAndAdaptSection(parentElement, section);
|
2545
|
return section;
|
2546
|
}
|
2547
|
|
2548
|
public RecommendedModifierVocabulariesCollectionSection createRecommendedModifierVocabulariesCollectionSection(ICdmFormElement parentElement, int style){
|
2549
|
RecommendedModifierVocabulariesCollectionSection section = new RecommendedModifierVocabulariesCollectionSection(this, parentElement, style);
|
2550
|
addAndAdaptSection(parentElement, section);
|
2551
|
return section;
|
2552
|
}
|
2553
|
public RecommendedModifierVocabulariesDtoCollectionSection createRecommendedModifierVocabulariesDtoCollectionSection(ICdmFormElement parentElement, int style){
|
2554
|
RecommendedModifierVocabulariesDtoCollectionSection section = new RecommendedModifierVocabulariesDtoCollectionSection(this, parentElement, style);
|
2555
|
addAndAdaptSection(parentElement, section);
|
2556
|
return section;
|
2557
|
}
|
2558
|
|
2559
|
public MeasurementUnitCollectionSection createMeasurementUnitCollectionSection(ICdmFormElement parentElement, int style){
|
2560
|
MeasurementUnitCollectionSection section = new MeasurementUnitCollectionSection(this, parentElement, style);
|
2561
|
addAndAdaptSection(parentElement, section);
|
2562
|
return section;
|
2563
|
}
|
2564
|
|
2565
|
public MeasurementUnitDtoCollectionSection createMeasurementUnitDtoCollectionSection(ICdmFormElement parentElement, int style){
|
2566
|
MeasurementUnitDtoCollectionSection section = new MeasurementUnitDtoCollectionSection(this, parentElement, style);
|
2567
|
addAndAdaptSection(parentElement, section);
|
2568
|
return section;
|
2569
|
}
|
2570
|
public StatisticalMeasureCollectionSection createStatisticalMeasureCollectionSection(ICdmFormElement parentElement, int style){
|
2571
|
StatisticalMeasureCollectionSection section = new StatisticalMeasureCollectionSection(this, parentElement, style);
|
2572
|
addAndAdaptSection(parentElement, section);
|
2573
|
return section;
|
2574
|
}
|
2575
|
|
2576
|
public StatisticalMeasureDtoCollectionSection createStatisticalMeasureDtoCollectionSection(ICdmFormElement parentElement, int style){
|
2577
|
StatisticalMeasureDtoCollectionSection section = new StatisticalMeasureDtoCollectionSection(this, parentElement, style);
|
2578
|
addAndAdaptSection(parentElement, section);
|
2579
|
return section;
|
2580
|
}
|
2581
|
|
2582
|
public CollectingAreasDetailSection createCollectingAreasDetailSection(ICdmFormElement parentElement, int style){
|
2583
|
CollectingAreasDetailSection section = new CollectingAreasDetailSection(this, parentElement, style);
|
2584
|
addAndAdaptSection(parentElement, section);
|
2585
|
return section;
|
2586
|
}
|
2587
|
|
2588
|
public GeoScopeDetailSection createGeoScopeDetailSection(ICdmFormElement parentElement, int style){
|
2589
|
GeoScopeDetailSection section = new GeoScopeDetailSection(this, parentElement, style);
|
2590
|
addAndAdaptSection(parentElement, section);
|
2591
|
return section;
|
2592
|
}
|
2593
|
|
2594
|
public GeoScopePolyKeyDetailSection createGeoScopePolyKeyDetailSection(ICdmFormElement parentElement, int style){
|
2595
|
GeoScopePolyKeyDetailSection section = new GeoScopePolyKeyDetailSection(this, parentElement, style);
|
2596
|
addAndAdaptSection(parentElement, section);
|
2597
|
return section;
|
2598
|
}
|
2599
|
|
2600
|
public IdentifierSection createIdentifierDetailSection(ICdmFormElement parentElement, int style){
|
2601
|
IdentifierSection section = new IdentifierSection(this, parentElement, style);
|
2602
|
addAndAdaptSection(parentElement, section);
|
2603
|
return section;
|
2604
|
}
|
2605
|
|
2606
|
public DerivedUnitFacadeIdentifierSection createDerivedUnitFacadeIdentifierSection(ICdmFormElement parentElement, int style){
|
2607
|
DerivedUnitFacadeIdentifierSection section = new DerivedUnitFacadeIdentifierSection(this, parentElement, style);
|
2608
|
addAndAdaptSection(parentElement, section);
|
2609
|
return section;
|
2610
|
}
|
2611
|
|
2612
|
public CurrentSampleDesignationDetailSection createCurrentSampleDesignationDetailSection(ICdmFormElement parentElement, int style){
|
2613
|
CurrentSampleDesignationDetailSection section = new CurrentSampleDesignationDetailSection(this, parentElement, style);
|
2614
|
addAndAdaptSection(parentElement, section);
|
2615
|
return section;
|
2616
|
}
|
2617
|
|
2618
|
public CurrentDeterminationDetailSection createCurrentDeterminationDetailSection(ICdmFormElement parentElement, int style){
|
2619
|
CurrentDeterminationDetailSection section = new CurrentDeterminationDetailSection(this, parentElement, style);
|
2620
|
addAndAdaptSection(parentElement, section);
|
2621
|
return section;
|
2622
|
}
|
2623
|
|
2624
|
public PreservedSpecimenCurrentDeterminationDetailSection createPreservedSpecimenCurrentDeterminationDetailSection(ICdmFormElement parentElement, int style){
|
2625
|
PreservedSpecimenCurrentDeterminationDetailSection section = new PreservedSpecimenCurrentDeterminationDetailSection(this, parentElement, style);
|
2626
|
addAndAdaptSection(parentElement, section);
|
2627
|
return section;
|
2628
|
}
|
2629
|
|
2630
|
public SampleDesignationHistoryDetailSection createSampleDesignationHistoryDetailSection(ICdmFormElement parentElement, int style){
|
2631
|
SampleDesignationHistoryDetailSection section = new SampleDesignationHistoryDetailSection(this, parentElement, style);
|
2632
|
addAndAdaptSection(parentElement, section);
|
2633
|
return section;
|
2634
|
}
|
2635
|
|
2636
|
public DeterminationHistoryDetailSection createDeterminationHistoryDetailSection(ICdmFormElement parentElement, int style){
|
2637
|
DeterminationHistoryDetailSection section = new DeterminationHistoryDetailSection(this, parentElement, style);
|
2638
|
addAndAdaptSection(parentElement, section);
|
2639
|
return section;
|
2640
|
}
|
2641
|
|
2642
|
public SpecimenCollectionDetailSection createSpecimenCollectionDetailSection(ICdmFormElement parentElement, int style){
|
2643
|
SpecimenCollectionDetailSection section = new SpecimenCollectionDetailSection(this, parentElement, style);
|
2644
|
addAndAdaptSection(parentElement, section);
|
2645
|
return section;
|
2646
|
}
|
2647
|
|
2648
|
public PreservedSpecimenSourceCollectionDetailSection createPreservedSpecimenSourceCollectionDetailSection(ICdmFormElement parentElement, int style){
|
2649
|
PreservedSpecimenSourceCollectionDetailSection section = new PreservedSpecimenSourceCollectionDetailSection(this, parentElement, style);
|
2650
|
addAndAdaptSection(parentElement, section);
|
2651
|
return section;
|
2652
|
}
|
2653
|
|
2654
|
public SourceCollectionDetailSection createSourceCollectionDetailSection(ICdmFormElement parentElement, int style){
|
2655
|
SourceCollectionDetailSection section = new SourceCollectionDetailSection(this, parentElement, style);
|
2656
|
addAndAdaptSection(parentElement, section);
|
2657
|
return section;
|
2658
|
}
|
2659
|
|
2660
|
public StatusCollectionDetailSection createStatusCollectionDetailSection(ICdmFormElement parentElement, int style){
|
2661
|
StatusCollectionDetailSection section = new StatusCollectionDetailSection(this, parentElement, style);
|
2662
|
addAndAdaptSection(parentElement, section);
|
2663
|
return section;
|
2664
|
}
|
2665
|
|
2666
|
public ScopeRestrictionSection createScopeRestrictionSection(ICdmFormElement parentElement, int style){
|
2667
|
ScopeRestrictionSection section = new ScopeRestrictionSection(this, parentElement, style);
|
2668
|
addAndAdaptSection(parentElement, section);
|
2669
|
return section;
|
2670
|
}
|
2671
|
|
2672
|
public MemberDetailSection createMemberDetailSection(ICdmFormElement parentElement, int style){
|
2673
|
MemberDetailSection section = new MemberDetailSection(this, parentElement, style);
|
2674
|
addAndAdaptSection(parentElement, section);
|
2675
|
return section;
|
2676
|
}
|
2677
|
|
2678
|
public GrantedAuthorityDetailSection createGrantedAuthorityDetailSection(ICdmFormElement parentElement, int style){
|
2679
|
GrantedAuthorityDetailSection section = new GrantedAuthorityDetailSection(this, parentElement, style);
|
2680
|
addAndAdaptSection(parentElement, section);
|
2681
|
return section;
|
2682
|
}
|
2683
|
|
2684
|
public GroupsByUserDetailSection createGroupsByUserDetailSection(ICdmFormElement parentElement, int style){
|
2685
|
GroupsByUserDetailSection section = new GroupsByUserDetailSection(this, parentElement, style);
|
2686
|
addAndAdaptSection(parentElement, section);
|
2687
|
return section;
|
2688
|
}
|
2689
|
|
2690
|
public TaxonomicScopeSection createTaxonomicScopeSection(ICdmFormElement parentElement, int style){
|
2691
|
TaxonomicScopeSection section = new TaxonomicScopeSection(this, parentElement, style);
|
2692
|
addAndAdaptSection(parentElement, section);
|
2693
|
return section;
|
2694
|
}
|
2695
|
|
2696
|
public AbstractEntityCollectionElement createEntityCollectionElement(AbstractFormSection parentElement,
|
2697
|
Object versionableEntity, SelectionListener removeListener, Color backgroundColor, int style) {
|
2698
|
AbstractEntityCollectionElement<?> element = null;
|
2699
|
|
2700
|
Object entity = HibernateProxyHelper.deproxy(versionableEntity);
|
2701
|
|
2702
|
if (entity instanceof Annotation) {
|
2703
|
element = new AnnotationElement(this, parentElement, (Annotation) entity, removeListener, style);
|
2704
|
}else if (entity instanceof Person ) {
|
2705
|
boolean isNomenclatural = false;
|
2706
|
if (parentElement instanceof TeamMemberSection){
|
2707
|
isNomenclatural = ((TeamMemberSection) parentElement).isNomenclaturalTeam();
|
2708
|
}
|
2709
|
if (isNomenclatural){
|
2710
|
element = new NomenclaturalTeamMemberElement(this, parentElement, (Person) entity, removeListener, style);
|
2711
|
}else{
|
2712
|
element = new TeamMemberElement(this, parentElement, (Person) entity, removeListener, style);
|
2713
|
}
|
2714
|
} else if (entity instanceof Credit) {
|
2715
|
element = new CreditElement(this, parentElement, (Credit) entity, removeListener, style);
|
2716
|
} else if (entity instanceof Extension) {
|
2717
|
element = new ExtensionElement(this, parentElement, (Extension) entity, removeListener, style);
|
2718
|
} else if (entity instanceof ExternalLink) {
|
2719
|
boolean isAdvanced = true;
|
2720
|
if(parentElement instanceof ExternalLinksSection){
|
2721
|
isAdvanced = ((ExternalLinksSection)parentElement).isAdvanced();
|
2722
|
}
|
2723
|
element = new ExternalLinksElement(this, parentElement, (ExternalLink) entity, isAdvanced, removeListener, style);
|
2724
|
} else if (entity instanceof Marker) {
|
2725
|
element = new MarkerElement(this, parentElement, (Marker) entity, removeListener, style);
|
2726
|
} else if (entity instanceof TaxonNodeAgentRelation) {
|
2727
|
element = new TaxonNodeAgentRelationCollectionElement(this, parentElement, (TaxonNodeAgentRelation) entity, removeListener, backgroundColor, style);
|
2728
|
}else if (entity instanceof Media) {
|
2729
|
element = new MediaMetaElement(this, parentElement, (Media) entity, removeListener, style);
|
2730
|
} else if (entity instanceof MediaRepresentation) {
|
2731
|
element = new MediaRepresentationElement(this, parentElement, (MediaRepresentation) entity, removeListener,
|
2732
|
style);
|
2733
|
} else if (entity instanceof ImageFile) {
|
2734
|
element = new ImageFileElement(this, parentElement, (ImageFile) entity, removeListener, style);
|
2735
|
} else if (entity instanceof MediaRepresentationPart) {
|
2736
|
element = new MediaRepresentationPartElement<>(this, parentElement, (MediaRepresentationPart) entity,
|
2737
|
removeListener, style);
|
2738
|
} else if (entity instanceof NomenclaturalStatus) {
|
2739
|
element = new NomenclaturalStatusElement(this, parentElement, (NomenclaturalStatus) entity, removeListener,
|
2740
|
style);
|
2741
|
} else if (entity instanceof Rights) {
|
2742
|
element = new RightsElement(this, parentElement, (Rights) entity, removeListener, style);
|
2743
|
} else if (entity instanceof DescriptionElementSource && parentElement.getEntity() instanceof CommonTaxonName) {
|
2744
|
element = new CommonNameSourceElement(this, parentElement, (DescriptionElementSource) entity,
|
2745
|
removeListener, style);
|
2746
|
} else if (entity instanceof DescriptionElementSource && parentElement.getEntity() instanceof Distribution) {
|
2747
|
Composite parent = null;
|
2748
|
if (parentElement instanceof DescriptionElementSourceSection){
|
2749
|
parent = ((DescriptionElementSourceSection)parentElement).getParent();
|
2750
|
}
|
2751
|
element = new DescriptionElementSourceElement(this, parentElement, (DescriptionElementSource) entity,
|
2752
|
removeListener, style, false);
|
2753
|
} else if (entity instanceof DescriptionElementSource) {
|
2754
|
element = new DescriptionElementSourceElement(this, parentElement, (DescriptionElementSource) entity,
|
2755
|
removeListener, style, false);
|
2756
|
}else if (entity instanceof TaxonNodeAgentRelation) {
|
2757
|
element = new TaxonNodeAgentRelationCollectionElement(this, parentElement, (TaxonNodeAgentRelation) entity,
|
2758
|
removeListener,backgroundColor, style);
|
2759
|
}else if (entity instanceof IdentifiableSource && parentElement.getEntity() instanceof DescriptionElementBase) {
|
2760
|
element = new IdentifiableSourceElement(this, parentElement, (IdentifiableSource) entity, removeListener,
|
2761
|
style, true);
|
2762
|
} else if (entity instanceof IdentifiableSource ) {
|
2763
|
element = new IdentifiableSourceElement(this, parentElement, (IdentifiableSource) entity, removeListener,
|
2764
|
style, true);
|
2765
|
} else if (entity instanceof DefinedTerm) {
|
2766
|
switch(((DefinedTerm)entity).getTermType()) {
|
2767
|
case Scope:
|
2768
|
element = new ScopeElement(this,
|
2769
|
parentElement,
|
2770
|
(DefinedTerm) entity,
|
2771
|
removeListener,
|
2772
|
style);
|
2773
|
break;
|
2774
|
case Modifier:
|
2775
|
element = new ModifierElement(this,
|
2776
|
parentElement,
|
2777
|
(DefinedTerm) entity,
|
2778
|
removeListener,
|
2779
|
style);
|
2780
|
break;
|
2781
|
default:
|
2782
|
break;
|
2783
|
|
2784
|
}
|
2785
|
} else if (entity instanceof Reference) {
|
2786
|
if(parentElement instanceof SequenceReferenceCollectionDetailSection){
|
2787
|
element = new SequenceReferenceCollectionDetailElement(this, parentElement, (Reference) entity, removeListener, style);
|
2788
|
}
|
2789
|
else{
|
2790
|
element = new DescriptionSourceElement(this, parentElement, (Reference) entity, removeListener, style);
|
2791
|
}
|
2792
|
} else if (entity instanceof NameTypeDesignation) {
|
2793
|
element = new NameTypeDesignationElement(this, parentElement, (NameTypeDesignation) entity, removeListener,
|
2794
|
style);
|
2795
|
} else if (entity instanceof TextualTypeDesignation) {
|
2796
|
element = new TextTypeDesignationElement(this, parentElement, (TextualTypeDesignation) entity, removeListener,
|
2797
|
style);
|
2798
|
} else if (entity instanceof NameRelationship) {
|
2799
|
element = new NameRelationshipDetailElement(this, parentElement, (NameRelationship) entity, removeListener,
|
2800
|
style);
|
2801
|
} else if (entity instanceof SpecimenTypeDesignation) {
|
2802
|
if(parentElement instanceof DerivedUnitTypeDesignationSection){
|
2803
|
element = new DerivedUnitTypeDesignationElement(this, parentElement, (SpecimenTypeDesignation) entity,
|
2804
|
removeListener, style);
|
2805
|
}
|
2806
|
else{
|
2807
|
element = new SpecimenTypeDesignationElement(this, parentElement, (SpecimenTypeDesignation) entity,
|
2808
|
removeListener, style);
|
2809
|
}
|
2810
|
} else if (entity instanceof StateData) {
|
2811
|
element = new StateDataElement(this, parentElement, (StateData) entity, removeListener, style);
|
2812
|
} else if (entity instanceof StatisticalMeasurementValue) {
|
2813
|
element = new StatisticalMeasurementValueElement(this, parentElement, (StatisticalMeasurementValue) entity,
|
2814
|
removeListener, style);
|
2815
|
} else if (entity instanceof DerivedUnit) {
|
2816
|
switch(((DerivedUnit)entity).getRecordBasis()) {
|
2817
|
case LivingSpecimen:
|
2818
|
case PreservedSpecimen:
|
2819
|
case OtherSpecimen:
|
2820
|
element = new SpecimenCollectionDetailElement(this,
|
2821
|
parentElement,
|
2822
|
(DerivedUnit) entity,
|
2823
|
removeListener,
|
2824
|
style);
|
2825
|
break;
|
2826
|
default:
|
2827
|
element = new DerivedUnitElement(this,
|
2828
|
parentElement,
|
2829
|
(DerivedUnit) entity,
|
2830
|
removeListener,
|
2831
|
style);
|
2832
|
}
|
2833
|
} else if (entity instanceof NamedArea) {
|
2834
|
element = new CollectingAreaDetailElement(this, parentElement, (NamedArea) entity, removeListener, style);
|
2835
|
} else if (entity instanceof DeterminationEvent) {
|
2836
|
element = new DeterminationEventDetailElement(this, parentElement, (DeterminationEvent) entity, removeListener, style);
|
2837
|
} else if (entity instanceof User) {
|
2838
|
element = new MemberDetailElement(this, parentElement, (User) entity, removeListener, style);
|
2839
|
} else if (entity instanceof GrantedAuthority) {
|
2840
|
element = new GrantedAuthorityCollectionElement(this, parentElement, (GrantedAuthorityImpl) entity, ((Group)parentElement.getEntity()),
|
2841
|
removeListener, style);
|
2842
|
} else if (entity instanceof Group) {
|
2843
|
element = new GroupsByUserDetailElement(this, parentElement, (Group) entity, removeListener, style);
|
2844
|
} else if (entity instanceof Taxon) {
|
2845
|
element = new TaxonDetailElement(this, parentElement, (Taxon) entity, removeListener, style);
|
2846
|
} else if (entity instanceof DescriptionElementBase) {
|
2847
|
// this is the special case for protologs, maybe we can do this
|
2848
|
// differently when API improves
|
2849
|
DescriptionElementBase descriptionElement = (DescriptionElementBase) entity;
|
2850
|
// if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
|
2851
|
// element = new ProtologueElement(this, parentElement, descriptionElement, removeListener, style);
|
2852
|
// }
|
2853
|
} else if (entity instanceof Identifier) {
|
2854
|
if(parentElement instanceof AbstractSampleDesignationDetailSection){
|
2855
|
element = new SampleDesignationTextDetailElement(this, parentElement, (Identifier) entity, removeListener, backgroundColor, style);
|
2856
|
}
|
2857
|
else{
|
2858
|
element = new IdentifierElement(this, parentElement, (Identifier) entity, removeListener, style);
|
2859
|
}
|
2860
|
} else if (entity instanceof TermVocabulary) {
|
2861
|
TermVocabulary<?> termVocabulary = (TermVocabulary<?>)entity;
|
2862
|
switch (termVocabulary.getTermType()) {
|
2863
|
case State:
|
2864
|
element = new StateVocabularyCollectionElement(this, parentElement, (TermVocabulary<State>) entity, removeListener, backgroundColor, style);
|
2865
|
break;
|
2866
|
case Modifier:
|
2867
|
element = new RecommendedModifierVocabulariesElement(this, parentElement, (TermVocabulary<DefinedTerm>) entity, removeListener, backgroundColor, style);
|
2868
|
break;
|
2869
|
default:
|
2870
|
break;
|
2871
|
}
|
2872
|
}else if (entity instanceof TermVocabularyDto) {
|
2873
|
TermVocabularyDto termVocabulary = (TermVocabularyDto)entity;
|
2874
|
switch (termVocabulary.getTermType()) {
|
2875
|
case State:
|
2876
|
element = new StateVocabularyDtoCollectionElement(this, parentElement, termVocabulary, removeListener, backgroundColor, style);
|
2877
|
break;
|
2878
|
case Modifier:
|
2879
|
element = new RecommendedModifierDtoVocabulariesElement(this, parentElement, termVocabulary, removeListener, backgroundColor, style);
|
2880
|
break;
|
2881
|
default:
|
2882
|
break;
|
2883
|
}
|
2884
|
}else if (entity instanceof MeasurementUnit) {
|
2885
|
element = new MeasurementUnitCollectionElement(this, parentElement, (MeasurementUnit) entity, removeListener, backgroundColor, style);
|
2886
|
}else if (entity instanceof TermDto) {
|
2887
|
if(((TermDto)entity).getTermType().equals(TermType.MeasurementUnit)){
|
2888
|
element = new MeasurementUnitDtoCollectionElement(this, parentElement, (TermDto) entity, removeListener, backgroundColor, style);
|
2889
|
}else if (((TermDto)entity).getTermType().equals(TermType.StatisticalMeasure)){
|
2890
|
element = new StatisticalMeasureDtoCollectionElement(this, parentElement, (TermDto) entity, removeListener, backgroundColor, style);
|
2891
|
}
|
2892
|
}else if (entity instanceof StatisticalMeasure) {
|
2893
|
element = new StatisticalMeasureCollectionElement(this, parentElement, (StatisticalMeasure) entity, removeListener, backgroundColor, style);
|
2894
|
} else if (entity instanceof FeatureState && parentElement instanceof InapplicableIfEntityCollectionSection) {
|
2895
|
element = new InapplicableIfCollectionElement(this, parentElement, (FeatureState) entity, removeListener, backgroundColor, style);
|
2896
|
} else if (entity instanceof FeatureState && parentElement instanceof OnlyApplicableIfEntityCollectionSection) {
|
2897
|
element = new OnlyApplicableIfCollectionElement(this, parentElement, (FeatureState) entity, removeListener, backgroundColor, style);
|
2898
|
} else if (entity instanceof FeatureState && parentElement instanceof InapplicableIfEntityCollectionSectionForNode) {
|
2899
|
element = new InapplicableIfCollectionElement(this, parentElement, (FeatureState) entity, removeListener, backgroundColor, style);
|
2900
|
} else if (entity instanceof FeatureState && parentElement instanceof OnlyApplicableIfEntityCollectionSectionForNode) {
|
2901
|
element = new OnlyApplicableIfCollectionElement(this, parentElement, (FeatureState) entity, removeListener, backgroundColor, style);
|
2902
|
} else if (entity instanceof FeatureStateDto && parentElement instanceof InapplicableIfEntityCollectionSection) {
|
2903
|
element = new InapplicableIfCollectionElementForDto(this, parentElement, (FeatureStateDto) entity, removeListener, backgroundColor, style);
|
2904
|
} else if (entity instanceof FeatureStateDto && parentElement instanceof OnlyApplicableIfEntityCollectionSection) {
|
2905
|
element = new OnlyApplicableIfCollectionElementForDto(this, parentElement, (FeatureStateDto) entity, removeListener, backgroundColor, style);
|
2906
|
}else if (entity instanceof OccurrenceStatus) {
|
2907
|
element = new OccurrenceStatusElement(this, parentElement, (OccurrenceStatus)entity, removeListener, style);
|
2908
|
}
|
2909
|
|
2910
|
//check for parent section when entity is null
|
2911
|
//this happens when AbstractUnboundEntityCollectionSection is used
|
2912
|
if(element==null){
|
2913
|
if(parentElement instanceof ScopeSection || parentElement instanceof ScopeRestrictionSection){
|
2914
|
element = new ScopeElement(this,
|
2915
|
parentElement,
|
2916
|
(DefinedTerm) entity,
|
2917
|
removeListener,
|
2918
|
style);
|
2919
|
}
|
2920
|
else if(parentElement instanceof ModifierSection){
|
2921
|
element = new ModifierElement(this,
|
2922
|
parentElement,
|
2923
|
(DefinedTerm) entity,
|
2924
|
removeListener,
|
2925
|
style);
|
2926
|
}
|
2927
|
}
|
2928
|
|
2929
|
|
2930
|
if (element == null) {
|
2931
|
MessagingUtils.messageDialog(
|
2932
|
String.format("Error when creating section %s",
|
2933
|
parentElement.getClass().getSimpleName()),
|
2934
|
this,
|
2935
|
String.format("Could not generate collection element for entity of class %s."
|
2936
|
+ " Looks like the case is not yet handled. Check implementation.\n"
|
2937
|
+ "Entity: %s", entity.getClass(), entity.toString()), null);
|
2938
|
}
|
2939
|
|
2940
|
else{
|
2941
|
if (backgroundColor != null && !backgroundColor.isDisposed()) {
|
2942
|
element.setPersistentBackground(backgroundColor);
|
2943
|
}
|
2944
|
adapt(element);
|
2945
|
parentElement.addElement(element);
|
2946
|
}
|
2947
|
|
2948
|
return element;
|
2949
|
}
|
2950
|
|
2951
|
/**
|
2952
|
* <p>
|
2953
|
* Creates a selection element for the given type T.
|
2954
|
* </p>
|
2955
|
* <p>
|
2956
|
* <strong>Selection elements not handled by this method:</strong>
|
2957
|
* <ul>
|
2958
|
* <li>{@link TaxonNodeSelectionElement} see
|
2959
|
* {@link #createTaxonNodeSelectionElement(ICdmFormElement, String, TaxonNode, int, int)}
|
2960
|
* </li>
|
2961
|
* <li>{@link NomenclaturalAuthorTeamSelectionElement} see
|
2962
|
* {@link #createNomenclaturalAuthorTeamSelectionElement(ICdmFormElement, String, Team, int, int)}
|
2963
|
* </li>
|
2964
|
* </ul>
|
2965
|
* </p>
|
2966
|
*/
|
2967
|
public <T extends CdmBase> EntitySelectionElement<T> createSelectionElement(Class<T> clazz,
|
2968
|
ICdmFormElement parentElement, String labelString, T selection, int mode,
|
2969
|
int style, Integer limit) {
|
2970
|
EntitySelectionElement<T> element = new EntitySelectionElement<T>(this,
|
2971
|
parentElement, clazz,
|
2972
|
labelString, selection, mode, style, limit);
|
2973
|
adapt(element);
|
2974
|
parentElement.addElement(element);
|
2975
|
return element;
|
2976
|
}
|
2977
|
|
2978
|
public <T extends CdmBase> EntitySelectionElement<T> createSelectionElement(Class<T> clazz,
|
2979
|
ICdmFormElement parentElement, String labelString, T selection, int mode,
|
2980
|
int style, boolean filterElement) {
|
2981
|
EntitySelectionElement<T> element = new EntitySelectionElement<T>(this,
|
2982
|
parentElement, clazz,
|
2983
|
labelString, selection, mode, style, filterElement);
|
2984
|
adapt(element);
|
2985
|
parentElement.addElement(element);
|
2986
|
return element;
|
2987
|
}
|
2988
|
|
2989
|
public <T extends CdmBase> EntitySelectionElement<T> createSelectionElement(Class<T> clazz,
|
2990
|
ICdmFormElement parentElement, String labelString, T selection, int mode,
|
2991
|
int style) {
|
2992
|
EntitySelectionElement<T> element = new EntitySelectionElement<T>(this,
|
2993
|
parentElement, clazz,
|
2994
|
labelString, selection, mode, style);
|
2995
|
adapt(element);
|
2996
|
parentElement.addElement(element);
|
2997
|
return element;
|
2998
|
}
|
2999
|
|
3000
|
public CollectorSelectionElement createCollectorSelectionElement(ICdmFormElement parentElement, String labelString, AgentBase selection, int mode,
|
3001
|
int style) {
|
3002
|
CollectorSelectionElement element = new CollectorSelectionElement(this, parentElement,
|
3003
|
labelString, selection, mode, style);
|
3004
|
adapt(element);
|
3005
|
parentElement.addElement(element);
|
3006
|
return element;
|
3007
|
}
|
3008
|
|
3009
|
public CollectorSelectionElement createCollectorSelectionElement(ICdmFormElement parentElement, String labelString, AgentBase team, Person member, int mode,
|
3010
|
int style) {
|
3011
|
CollectorSelectionElement element = new CollectorSelectionElement(this, parentElement,
|
3012
|
labelString, team, member, mode, style);
|
3013
|
adapt(element);
|
3014
|
parentElement.addElement(element);
|
3015
|
return element;
|
3016
|
}
|
3017
|
|
3018
|
public CommonNameReferenceSelectionElement createCommonNameReferenceSelectionElement(ICdmFormElement parentElement, String labelString, Reference selection, int mode,
|
3019
|
int style) {
|
3020
|
CommonNameReferenceSelectionElement element = new CommonNameReferenceSelectionElement(this,
|
3021
|
parentElement, labelString, selection, mode, style);
|
3022
|
adapt(element);
|
3023
|
parentElement.addElement(element);
|
3024
|
return element;
|
3025
|
}
|
3026
|
|
3027
|
/**
|
3028
|
* <p>
|
3029
|
* Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
|
3030
|
* </p>
|
3031
|
* <p>
|
3032
|
* <strong>Selection elements not handled by this method:</strong>
|
3033
|
* <ul>
|
3034
|
* <li>{@link TaxonNodeSelectionElement} see
|
3035
|
* {@link #createTaxonNodeSelectionElement(ICdmFormElement, String, TaxonNode, int, int)}
|
3036
|
* </li>
|
3037
|
* <li>{@link NomenclaturalAuthorTeamSelectionElement} see
|
3038
|
* {@link #createNomenclaturalAuthorTeamSelectionElement(ICdmFormElement, String, Team, int, int)}
|
3039
|
* </li>
|
3040
|
* </ul>
|
3041
|
* </p>
|
3042
|
*/
|
3043
|
public <T extends CdmBase> EntitySelectionElementWithAbbreviatedTitle<T> createSelectionElementWithAbbreviatedTitle(
|
3044
|
Class<T> clazz, ICdmFormElement parentElement, String labelString,
|
3045
|
T selection, int mode, int style) {
|
3046
|
EntitySelectionElementWithAbbreviatedTitle<T> element = new EntitySelectionElementWithAbbreviatedTitle<T>(this,
|
3047
|
parentElement, clazz,
|
3048
|
labelString, selection, mode, style);
|
3049
|
adapt(element);
|
3050
|
parentElement.addElement(element);
|
3051
|
return element;
|
3052
|
}
|
3053
|
|
3054
|
public TaxonNodeSelectionElement createTaxonNodeSelectionElement(
|
3055
|
ICdmFormElement parentElement, String labelString, TaxonNode selection, int mode, int style) {
|
3056
|
TaxonNodeSelectionElement element = new TaxonNodeSelectionElement(this,
|
3057
|
parentElement,
|
3058
|
labelString, selection, mode, style, null);
|
3059
|
adapt(element);
|
3060
|
parentElement.addElement(element);
|
3061
|
return element;
|
3062
|
}
|
3063
|
|
3064
|
public TaxonNodeSelectionElement createTaxonNodeSelectionElement(
|
3065
|
ICdmFormElement parentElement, String labelString, TaxonNode selection, int mode, int style, Integer limit) {
|
3066
|
TaxonNodeSelectionElement element = new TaxonNodeSelectionElement(this,
|
3067
|
parentElement,
|
3068
|
labelString, selection, mode, style, limit);
|
3069
|
adapt(element);
|
3070
|
parentElement.addElement(element);
|
3071
|
return element;
|
3072
|
}
|
3073
|
|
3074
|
// public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
|
3075
|
// ICdmFormElement parentElement, String labelString, Team selection,
|
3076
|
// int mode, int style) {
|
3077
|
// NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
|
3078
|
// parentElement, labelString, selection, mode, style);
|
3079
|
// adapt(element);
|
3080
|
// parentElement.addElement(element);
|
3081
|
// return element;
|
3082
|
// }
|
3083
|
|
3084
|
public LabelElement createLabel(ICdmFormElement parentElement, String text) {
|
3085
|
LabelElement labelElement = new LabelElement(this, parentElement, text);
|
3086
|
adapt(labelElement);
|
3087
|
parentElement.addElement(labelElement);
|
3088
|
return labelElement;
|
3089
|
}
|
3090
|
|
3091
|
// public DateElementFormElement createDateElementForm(ICdmFormElement formElement, String labelText, DateTime dateTime, int style){
|
3092
|
// Label label = new Label(formElement.getLayoutComposite(), style);
|
3093
|
// label.setText(labelText+" (yyyy-MM-dd)");
|
3094
|
// DateElementFormElement dateElement = new DateElementFormElement(this, dateTime, style, formElement.getLayoutComposite());
|
3095
|
// dateElement.initInternalController();
|
3096
|
//
|
3097
|
// return dateElement;
|
3098
|
// }
|
3099
|
|
3100
|
public DateElement createDateElement(ICdmFormElement formElement, String labelText, DateTime dateTime, int style, boolean editableText){
|
3101
|
Label label = new Label(formElement.getLayoutComposite(), style);
|
3102
|
label.setText(labelText);
|
3103
|
label.setLayoutData(new TableWrapData(TableWrapData.LEFT, TableWrapData.MIDDLE, 1, 1));
|
3104
|
DateElement dateElement = new DateElement(formElement.getLayoutComposite(), dateTime, labelText, style, editableText);
|
3105
|
dateElement.initController(this, formElement);
|
3106
|
dateElement.setLayoutData(new TableWrapData(TableWrapData.LEFT, TableWrapData.MIDDLE, 1, 1));
|
3107
|
return dateElement;
|
3108
|
}
|
3109
|
|
3110
|
public ISelectionProvider getSelectionProvider() {
|
3111
|
return selectionProvider;
|
3112
|
}
|
3113
|
|
3114
|
public AbstractDetailedDescriptionDetailElement<?> createDetailedDescriptionDetailElement(
|
3115
|
ICdmFormElement parentElement, DescriptionElementBase entity, int style, boolean enabled) {
|
3116
|
AbstractDetailedDescriptionDetailElement<?> detailedDescriptionElement = null;
|
3117
|
|
3118
|
if (entity instanceof CategoricalData) {
|
3119
|
detailedDescriptionElement = new CategoricalDataDetailElement(this, parentElement,
|
3120
|
(CategoricalData) entity, enabled, style);
|
3121
|
} else if (entity instanceof CommonTaxonName) {
|
3122
|
detailedDescriptionElement = new CommonNameDetailElement(this, parentElement, (CommonTaxonName) entity, enabled, style);
|
3123
|
} else if (entity instanceof Distribution && !enabled) {
|
3124
|
detailedDescriptionElement = new DistributionDetailElement(this, parentElement, (Distribution) entity,
|
3125
|
enabled, style);
|
3126
|
} else if (entity instanceof Distribution) {
|
3127
|
detailedDescriptionElement = new DistributionDetailElement(this, parentElement, (Distribution) entity,
|
3128
|
true, style);
|
3129
|
}else if (entity instanceof IndividualsAssociation) {
|
3130
|
detailedDescriptionElement = new IndividualsAssociationDetailElement(this, parentElement,
|
3131
|
(IndividualsAssociation) entity, enabled, style);
|
3132
|
} else if (entity instanceof QuantitativeData) {
|
3133
|
detailedDescriptionElement = new QuantitativeDataDetailElement(this, parentElement,
|
3134
|
(QuantitativeData) entity, enabled, style);
|
3135
|
} else if (entity instanceof TaxonInteraction) {
|
3136
|
detailedDescriptionElement = new TaxonInteractionDetailElement(this, parentElement,
|
3137
|
(TaxonInteraction) entity, enabled, style);
|
3138
|
} else if (entity instanceof TemporalData) {
|
3139
|
detailedDescriptionElement = new TemporalDataDetailElement(this, parentElement, (TemporalData) entity, enabled, style);
|
3140
|
} else if (entity instanceof TextData) {
|
3141
|
detailedDescriptionElement = new TextDataDetailElement(this, parentElement, (TextData) entity, enabled, style);
|
3142
|
}
|
3143
|
else {
|
3144
|
throw new IllegalStateException("There is no interface for the given description element");
|
3145
|
}
|
3146
|
// detailedDescriptionElement.setEnabled(enabled);
|
3147
|
adapt(detailedDescriptionElement);
|
3148
|
parentElement.addElement(detailedDescriptionElement);
|
3149
|
return detailedDescriptionElement;
|
3150
|
}
|
3151
|
|
3152
|
public StyledText createStyledText(Composite parent, String value, int style) {
|
3153
|
StyledText text = new StyledText(parent, getBorderStyle() | style | getOrientation());
|
3154
|
if (value != null) {
|
3155
|
text.setText(value);
|
3156
|
}
|
3157
|
text.setForeground(getColors().getForeground());
|
3158
|
text.setBackground(getColors().getBackground());
|
3159
|
// text.addFocusListener(visibilityHandler);
|
3160
|
return text;
|
3161
|
}
|
3162
|
|
3163
|
public PreservedSpecimenDetailSection createPreservedSpecimenDetailsSection(ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
|
3164
|
PreservedSpecimenDetailSection section = new PreservedSpecimenDetailSection(this, parentElement, selectionProvider, style);
|
3165
|
addAndAdaptSection(parentElement, section);
|
3166
|
return section;
|
3167
|
}
|
3168
|
|
3169
|
public TaxonNodeAgentRelationCollectionSection createTaxonNodeAgentRelationCollectionSection(
|
3170
|
ICdmFormElement formElement, int style) {
|
3171
|
TaxonNodeAgentRelationCollectionSection section = new TaxonNodeAgentRelationCollectionSection(this, formElement, style);
|
3172
|
addAndAdaptSection(formElement, section);
|
3173
|
return section;
|
3174
|
}
|
3175
|
|
3176
|
public TaxonOfRelationshipElement createTaxonOfRelationshipDetailElement(
|
3177
|
ICdmFormElement parentElement, int style) {
|
3178
|
TaxonOfRelationshipElement section = new TaxonOfRelationshipElement(this, parentElement, style);
|
3179
|
addAndAdaptElement(parentElement, section);
|
3180
|
return section;
|
3181
|
}
|
3182
|
|
3183
|
public TaxonDetailSection createTaxonDetailSection(
|
3184
|
ICdmFormElement formElement, ISelectionProvider selectionProvider, int style) {
|
3185
|
TaxonDetailSection section = new TaxonDetailSection(this, formElement, selectionProvider, style);
|
3186
|
addAndAdaptSection(formElement, section);
|
3187
|
return section;
|
3188
|
}
|
3189
|
|
3190
|
public RuleConsideredElement createRuleConsideredElement(ICdmFormElement parentElement, String labelString, boolean isShowCodeEdition, int style) {
|
3191
|
RuleConsideredElement element = new RuleConsideredElement(this, parentElement, labelString, isShowCodeEdition, style);
|
3192
|
adapt(element);
|
3193
|
parentElement.addElement(element);
|
3194
|
return element;
|
3195
|
}
|
3196
|
|
3197
|
public EntitySelectionElementWithIdInVocabulary createSelectionElementWithIdInVocabulary(Class<NamedArea> clazz,
|
3198
|
ICdmFormElement formElement, String labelString, NamedArea area, int mode, int style) {
|
3199
|
EntitySelectionElementWithIdInVocabulary element = new EntitySelectionElementWithIdInVocabulary(this,
|
3200
|
formElement, clazz, labelString, area, mode, style);
|
3201
|
adapt(element);
|
3202
|
formElement.addElement(element);
|
3203
|
return element;
|
3204
|
}
|
3205
|
|
3206
|
public ExtendedTimeDetailSection createExtendedTimeDetailSection(
|
3207
|
ExtendedTimePeriodElement parentElement, int style) {
|
3208
|
ExtendedTimeDetailSection section = new ExtendedTimeDetailSection(this, parentElement, style);
|
3209
|
parentElement.addElement(section);
|
3210
|
adapt(section);
|
3211
|
return section;
|
3212
|
}
|
3213
|
|
3214
|
public ExtendedTimePeriodElement createExtendedTimePeriodElement(
|
3215
|
ICdmFormElement parentElement, String labelString, ExtendedTimePeriod timePeriod, int style) {
|
3216
|
ExtendedTimePeriodElement section = new ExtendedTimePeriodElement(this, parentElement, labelString, timePeriod, style);
|
3217
|
parentElement.addElement(section);
|
3218
|
adapt(section);
|
3219
|
return section;
|
3220
|
}
|
3221
|
|
3222
|
// public RichTextWithLabelElement createRichTextLabelElement(ICdmFormElement parentElement, String labelString, String initialText, int textHeight, int style) {
|
3223
|
// RichTextWithLabelElement element = new RichTextWithLabelElement(this, parentElement, labelString,
|
3224
|
// initialText, textHeight, style);
|
3225
|
// adapt(element);
|
3226
|
// parentElement.addElement(element);
|
3227
|
// return element;
|
3228
|
// }
|
3229
|
}
|