4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
7 import java
.util
.ArrayList
;
8 import java
.util
.Comparator
;
9 import java
.util
.HashSet
;
10 import java
.util
.List
;
14 import javax
.inject
.Inject
;
16 import org
.eclipse
.e4
.core
.contexts
.IEclipseContext
;
17 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
18 import org
.eclipse
.jface
.viewers
.ISelection
;
19 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
20 import org
.eclipse
.jface
.window
.Window
;
21 //import org.eclipse.nebula.widgets.richtext.RichTextEditor;
22 import org
.eclipse
.swt
.SWT
;
23 import org
.eclipse
.swt
.custom
.StyledText
;
24 import org
.eclipse
.swt
.events
.FocusAdapter
;
25 import org
.eclipse
.swt
.events
.FocusEvent
;
26 import org
.eclipse
.swt
.events
.FocusListener
;
27 import org
.eclipse
.swt
.events
.MouseAdapter
;
28 import org
.eclipse
.swt
.events
.MouseEvent
;
29 import org
.eclipse
.swt
.events
.MouseListener
;
30 import org
.eclipse
.swt
.events
.SelectionEvent
;
31 import org
.eclipse
.swt
.events
.SelectionListener
;
32 import org
.eclipse
.swt
.events
.TypedEvent
;
33 import org
.eclipse
.swt
.graphics
.Color
;
34 import org
.eclipse
.swt
.graphics
.Font
;
35 import org
.eclipse
.swt
.widgets
.Composite
;
36 import org
.eclipse
.swt
.widgets
.Control
;
37 import org
.eclipse
.swt
.widgets
.Display
;
38 import org
.eclipse
.swt
.widgets
.Event
;
39 import org
.eclipse
.swt
.widgets
.Label
;
40 import org
.eclipse
.ui
.forms
.IFormColors
;
41 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
42 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
43 import org
.eclipse
.ui
.forms
.widgets
.Section
;
44 import org
.eclipse
.ui
.forms
.widgets
.TableWrapData
;
45 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
46 import org
.joda
.time
.DateTime
;
47 import org
.joda
.time
.Partial
;
48 import org
.springframework
.security
.core
.GrantedAuthority
;
50 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
51 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
52 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
53 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
54 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
55 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
56 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
57 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
58 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
59 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
60 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
61 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
62 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
63 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
64 import eu
.etaxonomy
.cdm
.model
.common
.IEnumTerm
;
65 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
66 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
67 import eu
.etaxonomy
.cdm
.model
.common
.LSID
;
68 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
69 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
70 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
71 import eu
.etaxonomy
.cdm
.model
.common
.Representation
;
72 import eu
.etaxonomy
.cdm
.model
.common
.TermBase
;
73 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
74 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
75 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
76 import eu
.etaxonomy
.cdm
.model
.common
.User
;
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
.IndividualsAssociation
;
86 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
87 import eu
.etaxonomy
.cdm
.model
.description
.MeasurementUnit
;
88 import eu
.etaxonomy
.cdm
.model
.description
.PresenceAbsenceTerm
;
89 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
90 import eu
.etaxonomy
.cdm
.model
.description
.State
;
91 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
92 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasure
;
93 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
94 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
95 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
96 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
97 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
98 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
99 import eu
.etaxonomy
.cdm
.model
.media
.ExternalLink
;
100 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
101 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
102 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
103 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
104 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
105 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
106 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
107 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
108 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
109 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
110 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
111 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
112 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
113 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
114 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
115 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNodeAgentRelation
;
116 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationshipType
;
117 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
118 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
119 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
120 import eu
.etaxonomy
.taxeditor
.ui
.combo
.MisappliedRelationshipComboElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
122 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.CloneClassificationDetailElement
;
124 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
125 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
126 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
127 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
128 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionElement
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionSection
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ExternalLinksElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ExternalLinksSection
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDetailElement
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDetailSection
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureNodeDetailElement
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureNodeDetailSection
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureTreeDetailElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureTreeDetailSection
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfCollectionElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfEntityCollectionSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfCollectionElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfEntityCollectionSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreaDetailElement
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopePolyKeyDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationDetailElement
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
323 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
324 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
325 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
326 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
327 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
328 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
329 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailSection
;
330 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonOfRelationshipElement
;
331 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
332 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
333 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
334 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
335 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
336 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
337 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
338 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
339 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
340 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
341 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
342 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
343 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
344 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
345 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.PresenceAbsenceTermDetailElement
;
346 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
347 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
348 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
349 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
350 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
351 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
352 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
353 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
354 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
355 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithAbbreviatedTitle
;
356 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
357 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
361 * CdmFormFactory class.
365 * @created Feb 24, 2010
367 public class CdmFormFactory
extends FormToolkit
{
369 private BoldFontHolder2 boldFontHolder2
;
370 private MouseListener selectionMouseHandler
;
371 private FocusListener selectionFocusHandler
;
374 private IEclipseContext context
;
376 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
378 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
380 private final int orientation
= Window
.getDefaultOrientation();
381 private ISelectionProvider selectionProvider
;
383 /** Constant <code>EMPTY_SELECTION</code> */
384 public static ISelection EMPTY_SELECTION
= new ISelection() {
386 public boolean isEmpty() {
397 private class SelectionMouseHandler
extends MouseAdapter
{
399 public void mouseDown(MouseEvent e
) {
400 notifySelectionListeners(e
);
410 private class SelectionFocusHandler
extends FocusAdapter
{
412 public void focusGained(FocusEvent e
) {
413 notifySelectionListeners(e
);
417 private void notifySelectionListeners(TypedEvent e
) {
418 Event event
= new Event();
419 event
.widget
= e
.widget
;
420 SelectionEvent selectionEvent
= new SelectionEvent(event
);
422 for (SelectionListener listener
: selectionListenerList
) {
423 listener
.widgetSelected(selectionEvent
);
427 public CdmFormFactory(Display display
) {
431 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
433 this.selectionProvider
= selectionProvider
;
437 private void init() {
438 boldFontHolder2
= new BoldFontHolder2();
439 selectionMouseHandler
= new SelectionMouseHandler();
440 selectionFocusHandler
= new SelectionFocusHandler();
443 public IEclipseContext
getContext() {
448 * Creates an instance initialized with the correct selectionProvider
450 * Make sure to remove the instance when the entityComposite disposes via
451 * destroySelectionArbitrator(..)
453 * @param entityElement
454 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
456 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
459 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
460 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
461 selectionArbitrator
.addSelectionProvider(selectionProvider
);
462 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
463 addSelectionListener(selectionArbitrator
);
464 return selectionArbitrator
;
469 * destroySelectionArbitrator
472 * @param selectionArbitrator
474 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
477 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
478 removeSelectionListener(selectionArbitrator
);
479 if (selectionProvider
!= null) {
480 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
482 MessagingUtils
.error(this.getClass(),
483 "Tried to destroy a selection listener from this factories listeners but was null", null);
489 * Adapts the {@link AbstractCdmFormElement}:<br>
490 * - sets the {@link IPropertyChangeListener}s handled by this class
495 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
498 public void adapt(ICdmFormElement formElement
) {
499 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
504 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
506 control
.addFocusListener(selectionFocusHandler
);
508 super.adapt(control
, trackFocus
, trackKeyboard
);
513 public void adapt(Composite composite
) {
514 composite
.addMouseListener(selectionMouseHandler
);
516 super.adapt(composite
);
525 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
528 public void destroyElement(ICdmFormElement formElement
) {
529 // return if element was not initialized
530 if (formElement
== null) {
533 // destroy selection arbitrator, if any
534 if (formElement
instanceof ISelectableElement
) {
535 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
537 // remove this element form its parents list of elements
538 // ICdmFormElement parentElement = formElement.getParentElement();
539 // if(parentElement != null){
540 // parentElement.removeElement(formElement);
542 // call destroy on child elements recursively
543 for (ICdmFormElement childElement
: formElement
.getElements()) {
544 destroyElement(childElement
);
546 // dispose of the controls
547 for (Control control
: formElement
.getControls()) {
548 // we added the layoutComposite of the parental element as the
549 // layout composite to this formElement
550 // but we do not want to destroy it.
551 if (control
.equals(formElement
.getLayoutComposite())) {
554 if (control
!= null && !control
.isDisposed()){
568 * a {@link org.eclipse.swt.widgets.Composite} object.
569 * @return a {@link org.eclipse.swt.widgets.Label} object.
571 public Label
createEmptyCell(Composite parent
) {
572 return this.createLabel(parent
, null);
577 * createMultiLanguageTextElement
580 * @param parentElement
581 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
584 * a {@link java.lang.String} object.
585 * @param multilanguageText
586 * a {@link java.util.Map} object.
592 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
595 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
596 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
597 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
598 multilanguageText
, textHeight
, style
);
600 parentElement
.addElement(element
);
606 * createMultiLanguageTextElement
609 * @param parentElement
610 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
613 * @param Representation
614 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
620 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
623 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
624 RepresentationElement element
= new RepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
626 parentElement
.addElement(element
);
632 * createMultiLanguageTextElement
635 * @param parentElement
636 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
639 * @param Representation
640 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
646 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
649 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
650 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
652 parentElement
.addElement(element
);
658 * createMultiLanguageTextElement
661 * @param parentElement
662 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
666 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
672 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
675 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, TermBase term
, int textHeight
, int style
, boolean fillDetails
) {
676 RepresentationElement element
= new RepresentationElement(this, parentElement
, term
, textHeight
, style
, fillDetails
);
678 parentElement
.addElement(element
);
684 * createMultiLanguageTextElement
687 * @param parentElement
688 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
692 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
698 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
701 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, TermBase term
, int textHeight
, int style
, boolean fillDetails
) {
702 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, term
, textHeight
, style
, fillDetails
);
704 parentElement
.addElement(element
);
708 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
709 KeyStatement keyStatement
, int textHeight
, int style
) {
710 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
713 parentElement
.addElement(element
);
718 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
720 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
721 * @param parentElement the parent container
722 * @param labelString the label name
723 * @param initialObject the object from which the <code>toString()</code> method is called
724 * @param style {@link SWT} style constant
725 * @return the created textfield with label
727 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
728 Object initialObject
, int style
) {
729 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
734 * createTextWithLabelElement
737 * @param parentElement
738 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
741 * a {@link java.lang.String} object.
743 * a {@link java.lang.String} object.
746 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
749 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
750 String initialText
, int style
) {
751 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
755 * createTextWithLabelElement
758 * @param parentElement
759 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
762 * a {@link java.lang.String} object.
764 * a {@link java.lang.String} object.
765 * @param textLimit maximal number of characters allowed
768 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
771 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
772 String initialText
, Integer textLimit
, int style
) {
773 if(initialText
==null){
777 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
780 parentElement
.addElement(element
);
784 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
785 int textHeight
, int style
) {
786 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
788 parentElement
.addElement(element
);
792 public LsidWithExceptionLabelElement
createLsidWithExceptionLabelElement(ICdmFormElement parentElement
, String labelString
,
793 LSID initialLsid
, int style
) {
794 LsidWithExceptionLabelElement element
= new LsidWithExceptionLabelElement(this, parentElement
, labelString
, initialLsid
, null, style
);
796 parentElement
.addElement(element
);
800 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
801 URI initialUri
, int style
) {
802 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
804 parentElement
.addElement(element
);
815 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
816 IOpenUrlEnabled openUrlEnabled
, int style
) {
817 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
820 parentElement
.addElement(element
);
826 * @param parentElement
828 * @param conversationEnabled
833 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
834 ConversationHolder conversation
, User user
, int style
) {
835 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
837 parentElement
.addElement(element
);
843 * createIntegerTextWithLabelElement
846 * @param parentElement
847 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
850 * a {@link java.lang.String} object.
851 * @param initialInteger
852 * a {@link java.lang.Integer} object.
856 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
859 public NumberWithLabelElement
createNumberTextWithLabelElement(
860 ICdmFormElement parentElement
, String labelString
,
861 Number initialNumber
, int style
) {
862 NumberWithLabelElement element
= new NumberWithLabelElement(this,
863 parentElement
, labelString
, initialNumber
, style
);
865 parentElement
.addElement(element
);
869 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
870 String labelString
, LanguageString languageString
, int style
) {
871 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
874 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
875 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
876 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
877 languageString
, height
, isMultiLine
, style
);
879 parentElement
.addElement(element
);
885 * createKeyValueViewerElement
888 * @param parentElement
889 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
892 * a {@link java.lang.String} object.
893 * @param valueHeading
894 * a {@link java.lang.String} object.
896 * a {@link java.util.Map} object.
897 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
900 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
901 String valueHeading
, Map
<Object
, Object
> map
) {
902 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
904 parentElement
.addElement(element
);
908 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
911 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
912 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
913 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
, selection
, true, style
);
915 parentElement
.addElement(element
);
919 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
921 ICdmFormElement parentElement
,
925 Comparator
<T
> comparator
) {
926 return this.createDefinedTermComboElement(termType
, null, parentElement
, labelString
, selection
, true, style
, false, comparator
);
929 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
931 ICdmFormElement parentElement
,
934 boolean addEmptyElement
,
936 return this.createDefinedTermComboElement(termType
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, false, null);
939 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
941 ICdmFormElement parentElement
,
945 return this.createDefinedTermComboElement(termType
, null, parentElement
, labelString
, selection
, true, style
, false, null);
947 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
949 ICdmFormElement parentElement
,
952 boolean addEmptyElement
,
954 boolean useAbbrevLabel
) {
955 return createDefinedTermComboElement(termType
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
959 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
960 TermVocabulary
<?
> termVocabulary
,
961 ICdmFormElement parentElement
,
965 return this.createDefinedTermComboElement(null, termVocabulary
, parentElement
, labelString
, selection
, true, style
, false, null);
968 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
969 TermVocabulary
<?
> termVocabulary
,
970 ICdmFormElement parentElement
,
973 boolean addEmptyElement
,
975 boolean useAbbrevLabel
) {
976 return createDefinedTermComboElement(null, termVocabulary
, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
979 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
981 TermVocabulary
<?
> termVocabulary
,
982 ICdmFormElement parentElement
,
985 boolean addEmptyElement
,
987 boolean useAbbrevLabel
,
988 Comparator
<T
> comparator
) {
990 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
992 parentElement
.addElement(element
);
995 else if(termVocabulary
!=null){
996 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
997 if (comparator
!= null){
998 element
.setTermComparator(comparator
);
1001 parentElement
.addElement(element
);
1005 //this should never happen
1009 public MisappliedRelationshipComboElement
createMisappliedRelationshipComboElement(
1010 ICdmFormElement parentElement
,
1012 TaxonRelationshipType selection
,
1014 MisappliedRelationshipComboElement combo
= new MisappliedRelationshipComboElement(this, parentElement
, labelString
, selection
, false, style
, false);
1016 parentElement
.addElement(combo
);
1020 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1021 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
1023 return createEnumComboElement(enumComboType
, parentElement
, null, style
);
1026 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1027 Class
<T
> enumComboType
, ICdmFormElement parentElement
, Comparator
<T
> comparator
,
1029 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, comparator
, style
);
1031 parentElement
.addElement(element
);
1035 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
1036 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1037 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1039 parentElement
.addElement(element
);
1045 * createBrowserElement
1049 * a {@link java.net.URI} object.
1052 * @param parentElement
1053 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1055 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1058 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1059 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1061 parentElement
.addElement(element
);
1067 * createImageElement
1070 * @param parentElement
1071 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1074 * a {@link java.net.URI} object.
1077 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1079 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1080 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1082 parentElement
.addElement(element
);
1088 * createTextActionElement
1091 * @param labelString
1092 * a {@link java.lang.String} object.
1093 * @param initialText
1094 * a {@link java.lang.String} object.
1097 * @param parentElement
1098 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1100 * @param buttonLabel
1101 * a {@link java.lang.String} object.
1102 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1105 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1106 String buttonLabel
, String initialText
, int style
) {
1107 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1110 parentElement
.addElement(element
);
1119 * @param parentElement
1120 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1123 * a {@link java.lang.String} object.
1124 * @param initialState
1128 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1131 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1132 if(initialState
==null){
1133 initialState
= Boolean
.FALSE
;
1135 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1137 parentElement
.addElement(element
);
1142 * Creates a section as a part of the form.
1144 * @return the section widget
1147 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1150 public Section
adapt(AbstractFormSection section
) {
1151 section
.setMenu(section
.getLayoutComposite().getMenu());
1152 adapt(section
, true, true);
1154 // handle focus and property change events for cdm use
1155 section
.addFocusListener(selectionFocusHandler
);
1156 section
.setPropertyChangeListeners(propertyChangeListeners
);
1158 if (section
.getToggle() != null) {
1159 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1160 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1163 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1165 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1166 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1167 getColors().initializeSectionToolBarColors();
1168 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1169 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1171 // call setTitleBarForeground regardless as it also sets the label color
1172 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1176 private class BoldFontHolder2
{
1177 private Font normalFont
;
1179 private Font boldFont
;
1181 public BoldFontHolder2() {
1184 public Font
getBoldFont(Font font
) {
1185 createBoldFont(font
);
1189 private void createBoldFont(Font font
) {
1190 if (normalFont
== null || !normalFont
.equals(font
)) {
1194 if (boldFont
== null) {
1195 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1199 public void dispose() {
1200 if (boldFont
!= null) {
1201 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1209 * createToggleableTextField
1212 * @param parentElement
1213 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1215 * @param labelString
1216 * a {@link java.lang.String} object.
1217 * @param initialText
1218 * a {@link java.lang.String} object.
1219 * @param initialState
1223 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1226 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1227 String initialText
, boolean initialState
, int style
) {
1228 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1229 initialState
, style
| orientation
);
1231 parentElement
.addElement(element
);
1237 * createTimePeriodElement
1240 * @param parentElement
1241 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1243 * @param labelString
1244 * a {@link java.lang.String} object.
1246 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1249 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1252 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1253 TimePeriod timePeriod
, int style
) {
1254 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1256 parentElement
.addElement(element
);
1262 * createVerbatimTimePeriodElement
1265 * @param parentElement
1266 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1268 * @param labelString
1269 * a {@link java.lang.String} object.
1271 * a {@link eu.etaxonomy.cdm.model.common.VerbatimTimePeriod} object.
1274 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimTimePeriodElement}
1277 public VerbatimTimePeriodElement
createVerbatimTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1278 VerbatimTimePeriod timePeriod
, int style
) {
1279 VerbatimTimePeriodElement element
= new VerbatimTimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1281 parentElement
.addElement(element
);
1287 * createGatheringEventUnitElement
1290 * @param parentElement
1291 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1293 * @param labelString
1294 * a {@link java.lang.String} object.
1296 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1299 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1302 public GatheringEventUnitElement
createGatheringEventUnitElement(
1303 ICdmFormElement parentElement
,
1305 DerivedUnitFacade gatheringEvent
,
1306 MinMaxTextSection
.UnitType unitType
,
1308 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1315 parentElement
.addElement(element
);
1321 * createPointElement
1326 * @param parentElement
1327 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1330 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1331 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1333 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1334 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1336 parentElement
.addElement(element
);
1341 * Creates an empty section with the given message.<br>
1342 * If message is <code>null</code> a default message will be displayed.
1344 public EmptySection
createEmptySection(String message
, CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1345 EmptySection section
= new EmptySection(message
, formFactory
, parentElement
, style
);
1346 parentElement
.addElement(section
);
1353 * createDateDetailSection
1356 * @param parentElement
1357 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1361 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1364 public DateDetailSection
<TimePeriod
> createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1365 DateDetailSection
<TimePeriod
> section
= new DateDetailSection
<TimePeriod
>(this, parentElement
, false, style
);
1366 parentElement
.addElement(section
);
1373 * createVerbatimDateDetailSection
1376 * @param parentElement
1377 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1381 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimDateDetailSection}
1384 public DateDetailSection
<VerbatimTimePeriod
> createVerbatimDateDetailSection(ICdmFormElement parentElement
, int style
) {
1385 DateDetailSection
<VerbatimTimePeriod
> section
1386 = new DateDetailSection
<VerbatimTimePeriod
>(this, parentElement
, true, style
);
1387 parentElement
.addElement(section
);
1394 * createDateDetailSection
1397 * @param parentElement
1398 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1402 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1405 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1406 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1407 parentElement
.addElement(section
);
1414 * createPartialElement
1417 * @param parentElement
1418 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1420 * @param labelString
1421 * a {@link java.lang.String} object.
1423 * a {@link org.joda.time.Partial} object.
1426 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1429 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1431 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1433 parentElement
.addElement(element
);
1439 * addSelectionListener
1443 * a {@link org.eclipse.swt.events.SelectionListener} object.
1445 public void addSelectionListener(SelectionListener listener
) {
1446 selectionListenerList
.add(listener
);
1451 * removeSelectionListener
1455 * a {@link org.eclipse.swt.events.SelectionListener} object.
1457 public void removeSelectionListener(SelectionListener listener
) {
1458 if (listener
== null) {
1459 MessagingUtils
.error(this.getClass(),
1460 "Tried to remove a selection listener from this factories listeners but was null", null);
1462 selectionListenerList
.remove(listener
);
1468 * addPropertyChangeListener
1472 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1475 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1476 if (propertyChangeListeners
.contains(listener
)) {
1479 propertyChangeListeners
.add(0, listener
);
1484 * removePropertyChangeListener
1488 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1491 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1492 propertyChangeListeners
.remove(listener
);
1496 * @return the propertyChangeListeners
1498 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1499 return propertyChangeListeners
;
1504 * createHorizontalSeparator
1507 * @param parentElement
1508 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1512 * @return a {@link org.eclipse.swt.widgets.Label} object.
1514 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1515 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1516 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1522 * createVersionElement
1525 * @param parentElement
1526 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1529 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1534 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1537 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1538 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1540 parentElement
.addElement(element
);
1545 * @param cdmBaseSection
1550 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1551 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1553 parentElement
.addElement(element
);
1559 * createVersionSection
1562 * @param parentElement
1563 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1568 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1571 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1572 VersionSection section
= new VersionSection(this, parentElement
, style
);
1573 parentElement
.addElement(section
);
1583 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1584 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1585 parentElement
.addElement(section
);
1592 * createEmptyElement
1595 * @param parentElement
1596 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1598 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1600 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1601 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1603 parentElement
.addElement(element
);
1609 * createHeadlineSection
1612 * @param parentElement
1613 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1616 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1619 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1620 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1621 parentElement
.addElement(section
);
1628 * createParsingMessageElement
1631 * @param parentElement
1632 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1634 * @param parserProblem
1635 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1640 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1643 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1644 ParserProblem parserProblem
, int style
) {
1645 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1647 parentElement
.addElement(element
);
1651 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1652 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1654 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1655 selectionProvider
, style
);
1657 parentElement
.addElement(section
);
1664 * @param definedTermClass
1665 * @param formElement
1669 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1670 AbstractCdmDetailSection parentElement
, int style
) {
1671 AbstractCdmDetailElement element
= null;
1673 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1674 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1675 } else if (definedTermClass
.equals(Feature
.class)) {
1676 element
= new FeatureDetailElement(this, parentElement
);
1677 } else if(definedTermClass
.equals(PresenceAbsenceTerm
.class)){
1678 element
= new PresenceAbsenceTermDetailElement(this, parentElement
);
1680 element
= new DefinedTermDetailElement(this, parentElement
);
1685 parentElement
.addElement(element
);
1689 public CharacterDetailSection
createCharacterDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1690 CharacterDetailSection section
= new CharacterDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1691 addAndAdaptSection(parentElement
, section
);
1695 public CharacterDetailElement
createCharacterDetailElement(ICdmFormElement parentElement
, int style
){
1696 CharacterDetailElement element
= new CharacterDetailElement(this, parentElement
);
1697 addAndAdaptElement(parentElement
, element
);
1701 public FeatureTreeDetailElement
createFeatureTreeDetailElement(ICdmFormElement parentElement
, int style
){
1702 FeatureTreeDetailElement element
= new FeatureTreeDetailElement(this, parentElement
);
1703 addAndAdaptElement(parentElement
, element
);
1707 public FeatureNodeDetailElement
createFeatureNodeDetailElement(ICdmFormElement parentElement
, int style
){
1708 FeatureNodeDetailElement element
= new FeatureNodeDetailElement(this, parentElement
);
1709 addAndAdaptElement(parentElement
, element
);
1714 //--------DetailSections---------
1715 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1716 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1717 addAndAdaptSection(parentElement
, section
);
1721 public FeatureNodeDetailSection
createFeatureNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1722 FeatureNodeDetailSection section
= new FeatureNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1723 addAndAdaptSection(parentElement
, section
);
1727 public FeatureTreeDetailSection
createFeatureTreeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1728 FeatureTreeDetailSection section
= new FeatureTreeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1729 addAndAdaptSection(parentElement
, section
);
1733 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1734 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1735 addAndAdaptSection(parentElement
, section
);
1739 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1740 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1741 addAndAdaptSection(parentElement
, section
);
1745 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1746 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1747 addAndAdaptSection(parentElement
, section
);
1751 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1752 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1753 addAndAdaptSection(parentElement
, section
);
1757 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1758 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1759 addAndAdaptSection(parentElement
, section
);
1763 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1764 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1765 addAndAdaptSection(parentElement
, section
);
1769 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1770 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1771 addAndAdaptSection(parentElement
, section
);
1775 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1776 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1777 addAndAdaptSection(parentElement
, section
);
1781 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1782 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1783 addAndAdaptSection(parentElement
, section
);
1787 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1788 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1789 addAndAdaptSection(parentElement
, section
);
1795 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
1796 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
1797 addAndAdaptSection(parentElement
, section
);
1801 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1802 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1803 addAndAdaptSection(parentElement
, section
);
1807 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1808 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1809 addAndAdaptSection(parentElement
, section
);
1813 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1814 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1815 addAndAdaptSection(parentElement
, section
);
1819 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1820 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1821 addAndAdaptSection(parentElement
, section
);
1825 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1826 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
1827 addAndAdaptSection(parentElement
, section
);
1831 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1832 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1833 addAndAdaptSection(parentElement
, section
);
1837 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1838 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1839 addAndAdaptSection(parentElement
, section
);
1843 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1844 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1845 addAndAdaptSection(parentElement
, section
);
1849 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1850 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1851 addAndAdaptSection(parentElement
, section
);
1855 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1856 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1857 addAndAdaptSection(parentElement
, section
);
1861 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1862 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1863 addAndAdaptSection(parentElement
, section
);
1867 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1868 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1869 addAndAdaptSection(parentElement
, section
);
1873 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1874 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1875 addAndAdaptSection(parentElement
, section
);
1879 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1880 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1881 addAndAdaptSection(parentElement
, section
);
1885 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1886 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1887 addAndAdaptSection(parentElement
, section
);
1891 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1892 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1893 addAndAdaptSection(parentElement
, section
);
1897 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1898 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1899 addAndAdaptSection(parentElement
, section
);
1903 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1904 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1905 addAndAdaptSection(parentElement
, section
);
1909 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1910 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1911 addAndAdaptSection(parentElement
, section
);
1915 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1916 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
1917 addAndAdaptSection(parentElement
, section
);
1921 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1922 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1923 addAndAdaptSection(parentElement
, section
);
1927 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1928 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1929 addAndAdaptSection(parentElement
, section
);
1933 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1934 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1935 addAndAdaptSection(parentElement
, section
);
1939 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1940 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1941 addAndAdaptSection(parentElement
, section
);
1945 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1946 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1947 addAndAdaptSection(parentElement
, section
);
1951 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1952 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1953 addAndAdaptSection(parentElement
, section
);
1957 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1958 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1959 addAndAdaptSection(parentElement
, section
);
1963 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1964 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1965 addAndAdaptSection(parentElement
, section
);
1969 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1970 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1971 addAndAdaptSection(parentElement
, section
);
1975 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1976 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1977 addAndAdaptSection(parentElement
, section
);
1981 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1982 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1983 addAndAdaptSection(parentElement
, section
);
1987 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1988 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1989 addAndAdaptSection(parentElement
, section
);
1993 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1994 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1995 addAndAdaptSection(parentElement
, section
);
1999 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2000 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2001 addAndAdaptSection(parentElement
, section
);
2005 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2006 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2007 addAndAdaptSection(parentElement
, section
);
2011 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2012 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2013 addAndAdaptSection(parentElement
, section
);
2017 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2018 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
, true);
2019 addAndAdaptSection(parentElement
, section
);
2023 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2024 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2025 addAndAdaptSection(parentElement
, section
);
2029 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2030 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2031 addAndAdaptSection(parentElement
, section
);
2035 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2036 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2037 addAndAdaptSection(parentElement
, section
);
2041 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2042 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2043 addAndAdaptSection(parentElement
, section
);
2047 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2048 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2049 addAndAdaptSection(parentElement
, section
);
2053 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
2054 parentElement
.addElement(section
);
2058 //--------DetailElements------------
2060 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
2061 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
2062 addAndAdaptElement(parentElement
, element
);
2066 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
2067 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
2068 addAndAdaptElement(parentElement
, element
);
2072 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
2073 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
2074 addAndAdaptElement(parentElement
, element
);
2078 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
2079 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
2080 addAndAdaptElement(parentElement
, element
);
2084 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
2085 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
2086 addAndAdaptElement(parentElement
, element
);
2090 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
2091 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
2092 addAndAdaptElement(parentElement
, element
);
2096 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
2097 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
2098 addAndAdaptElement(parentElement
, element
);
2102 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
2103 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
2104 addAndAdaptElement(parentElement
, element
);
2108 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
2109 UserDetailElement element
= new UserDetailElement(this, parentElement
);
2110 addAndAdaptElement(parentElement
, element
);
2114 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2115 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2116 addAndAdaptElement(parentElement
, element
);
2120 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2121 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2122 addAndAdaptElement(parentElement
, element
);
2126 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2127 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2128 addAndAdaptElement(parentElement
, element
);
2132 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2133 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2134 addAndAdaptElement(parentElement
, element
);
2138 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2139 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2140 addAndAdaptElement(parentElement
, element
);
2144 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2145 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2147 parentElement
.addElement(element
);
2152 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2153 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2154 addAndAdaptElement(parentElement
, element
);
2158 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2159 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2160 addAndAdaptElement(parentElement
, element
);
2164 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2165 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2166 addAndAdaptElement(parentElement
, element
);
2170 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2171 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2172 addAndAdaptElement(parentElement
, element
);
2176 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2177 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2178 addAndAdaptElement(parentElement
, element
);
2182 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2183 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2184 addAndAdaptElement(parentElement
, element
);
2188 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2189 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2190 addAndAdaptElement(parentElement
, element
);
2194 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2195 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2196 addAndAdaptElement(parentElement
, element
);
2200 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2201 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2202 addAndAdaptElement(parentElement
, element
);
2206 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2207 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2208 addAndAdaptElement(parentElement
, element
);
2212 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2213 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2214 addAndAdaptElement(parentElement
, element
);
2218 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2219 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2220 addAndAdaptElement(parentElement
, element
);
2224 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2225 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2226 addAndAdaptElement(parentElement
, element
);
2230 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
, boolean isWizard
){
2231 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
, isWizard
);
2232 addAndAdaptElement(parentElement
, element
);
2236 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2237 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2238 addAndAdaptElement(parentElement
, element
);
2243 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2244 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2245 addAndAdaptElement(parentElement
, element
);
2249 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2250 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2251 addAndAdaptElement(parentElement
, element
);
2255 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2256 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2257 addAndAdaptElement(parentElement
, element
);
2261 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2262 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2263 addAndAdaptElement(parentElement
, element
);
2267 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2268 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2269 addAndAdaptElement(parentElement
, element
);
2273 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2274 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2275 addAndAdaptElement(parentElement
, element
);
2279 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2280 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2281 addAndAdaptElement(parentElement
, element
);
2285 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2286 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2287 addAndAdaptElement(parentElement
, element
);
2291 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2292 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2293 addAndAdaptElement(parentElement
, element
);
2297 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2298 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2299 addAndAdaptElement(parentElement
, element
);
2303 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2304 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2305 addAndAdaptElement(parentElement
, element
);
2309 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2310 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2311 addAndAdaptElement(parentElement
, element
);
2315 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2316 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2317 addAndAdaptElement(parentElement
, element
);
2321 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2322 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2323 addAndAdaptElement(parentElement
, element
);
2327 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2328 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2329 addAndAdaptElement(parentElement
, element
);
2333 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2334 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2335 addAndAdaptElement(parentElement
, element
);
2339 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2340 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2341 addAndAdaptElement(parentElement
, mediaDetailElement
);
2342 return mediaDetailElement
;
2345 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2346 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2347 addAndAdaptElement(parentElement
, element
);
2351 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2352 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2353 addAndAdaptElement(parentElement
, element
);
2357 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2358 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2359 addAndAdaptElement(parentElement
, element
);
2363 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2364 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2365 addAndAdaptElement(parentElement
, element
);
2369 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2370 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2371 addAndAdaptElement(parentElement
, element
);
2375 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2376 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2377 addAndAdaptElement(parentElement
, element
);
2381 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2382 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2383 addAndAdaptElement(parentElement
, element
);
2388 * @param parentElement
2391 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2393 parentElement
.addElement(element
);
2396 //--------EntityCollectionSection----------
2397 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2398 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2399 addAndAdaptSection(parentElement
, section
);
2403 public InapplicableIfEntityCollectionSection
createInapplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2404 InapplicableIfEntityCollectionSection section
= new InapplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2405 addAndAdaptSection(parentElement
, section
);
2409 public OnlyApplicableIfEntityCollectionSection
createOnlyApplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2410 OnlyApplicableIfEntityCollectionSection section
= new OnlyApplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2411 addAndAdaptSection(parentElement
, section
);
2415 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2416 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2417 addAndAdaptSection(parentElement
, section
);
2421 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2422 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2423 addAndAdaptSection(parentElement
, section
);
2427 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2428 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2429 addAndAdaptSection(parentElement
, section
);
2433 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2434 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2435 addAndAdaptSection(parentElement
, section
);
2439 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2440 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2441 addAndAdaptSection(parentElement
, section
);
2445 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2446 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2447 addAndAdaptSection(parentElement
, section
);
2451 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2452 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2453 addAndAdaptSection(parentElement
, section
);
2457 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2458 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2459 addAndAdaptSection(parentElement
, section
);
2463 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2464 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2465 addAndAdaptSection(parentElement
, section
);
2469 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2470 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2471 addAndAdaptSection(parentElement
, section
);
2475 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2476 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2477 addAndAdaptSection(parentElement
, section
);
2481 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2482 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2483 addAndAdaptSection(parentElement
, section
);
2487 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2488 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2489 addAndAdaptSection(parentElement
, section
);
2492 public ExternalLinksSection
createExternalLinksSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2493 ExternalLinksSection section
= new ExternalLinksSection(this, conversation
, parentElement
, style
);
2494 addAndAdaptSection(parentElement
, section
);
2498 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2499 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2500 addAndAdaptSection(parentElement
, section
);
2504 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2505 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2506 addAndAdaptSection(parentElement
, section
);
2510 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2511 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2512 addAndAdaptSection(parentElement
, section
);
2516 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2517 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2518 addAndAdaptSection(parentElement
, section
);
2522 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2523 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2524 addAndAdaptSection(parentElement
, section
);
2528 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2529 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2530 addAndAdaptSection(parentElement
, section
);
2534 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2535 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2536 addAndAdaptSection(parentElement
, section
);
2540 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2541 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2542 addAndAdaptSection(parentElement
, section
);
2546 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2547 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2548 addAndAdaptSection(parentElement
, section
);
2552 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2553 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2554 addAndAdaptSection(parentElement
, section
);
2558 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2559 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2560 addAndAdaptSection(parentElement
, section
);
2564 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2565 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2566 addAndAdaptSection(parentElement
, section
);
2570 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2571 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2572 addAndAdaptSection(parentElement
, section
);
2576 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2577 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2578 addAndAdaptSection(parentElement
, section
);
2582 public GeoScopePolyKeyDetailSection
createGeoScopePolyKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2583 GeoScopePolyKeyDetailSection section
= new GeoScopePolyKeyDetailSection(this, conversation
, parentElement
, style
);
2584 addAndAdaptSection(parentElement
, section
);
2588 public IdentifierSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2589 IdentifierSection section
= new IdentifierSection(this, conversation
, parentElement
, style
);
2590 addAndAdaptSection(parentElement
, section
);
2594 public DerivedUnitFacadeIdentifierSection
createDerivedUnitFacadeIdentifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2595 DerivedUnitFacadeIdentifierSection section
= new DerivedUnitFacadeIdentifierSection(this, conversation
, parentElement
, style
);
2596 addAndAdaptSection(parentElement
, section
);
2600 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2601 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2602 addAndAdaptSection(parentElement
, section
);
2606 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2607 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2608 addAndAdaptSection(parentElement
, section
);
2612 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2613 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2614 addAndAdaptSection(parentElement
, section
);
2618 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2619 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2620 addAndAdaptSection(parentElement
, section
);
2624 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2625 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2626 addAndAdaptSection(parentElement
, section
);
2630 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2631 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2632 addAndAdaptSection(parentElement
, section
);
2636 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2637 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2638 addAndAdaptSection(parentElement
, section
);
2642 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2643 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2644 addAndAdaptSection(parentElement
, section
);
2648 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2649 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2650 addAndAdaptSection(parentElement
, section
);
2654 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2655 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2656 addAndAdaptSection(parentElement
, section
);
2660 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2661 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2662 addAndAdaptSection(parentElement
, section
);
2666 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2667 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2668 addAndAdaptSection(parentElement
, section
);
2672 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2673 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2674 addAndAdaptSection(parentElement
, section
);
2679 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2680 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2681 AbstractEntityCollectionElement
<?
> element
= null;
2683 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2685 if (entity
instanceof Annotation
) {
2686 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2687 }else if (entity
instanceof Person
) {
2688 boolean isNomenclatural
= false;
2689 if (parentElement
instanceof TeamMemberSection
){
2690 isNomenclatural
= ((TeamMemberSection
) parentElement
).isNomenclaturalTeam();
2692 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
, isNomenclatural
);
2693 } else if (entity
instanceof Credit
) {
2694 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2695 } else if (entity
instanceof Extension
) {
2696 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2697 } else if (entity
instanceof ExternalLink
) {
2698 element
= new ExternalLinksElement(this, parentElement
, (ExternalLink
) entity
, removeListener
, style
);
2699 } else if (entity
instanceof Marker
) {
2700 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2701 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2702 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
, removeListener
, backgroundColor
, style
);
2703 }else if (entity
instanceof Media
) {
2704 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2705 } else if (entity
instanceof MediaRepresentation
) {
2706 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2708 } else if (entity
instanceof ImageFile
) {
2709 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2710 } else if (entity
instanceof MediaRepresentationPart
) {
2711 element
= new MediaRepresentationPartElement
<>(this, parentElement
, (MediaRepresentationPart
) entity
,
2712 removeListener
, style
);
2713 } else if (entity
instanceof NomenclaturalStatus
) {
2714 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2716 } else if (entity
instanceof Rights
) {
2717 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2718 } else if (entity
instanceof DescriptionElementSource
) {
2719 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2720 removeListener
, style
);
2721 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2722 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
,
2723 removeListener
,backgroundColor
, style
);
2725 else if (entity
instanceof IdentifiableSource
) {
2726 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2728 } else if (entity
instanceof DefinedTerm
) {
2729 switch(((DefinedTerm
)entity
).getTermType()) {
2731 element
= new ScopeElement(this,
2733 (DefinedTerm
) entity
,
2738 element
= new ModifierElement(this,
2740 (DefinedTerm
) entity
,
2748 } else if (entity
instanceof Reference
) {
2749 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2750 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2753 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2755 } else if (entity
instanceof NameTypeDesignation
) {
2756 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2758 } else if (entity
instanceof NameRelationship
) {
2759 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2761 } else if (entity
instanceof SpecimenTypeDesignation
) {
2762 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
2763 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2764 removeListener
, style
);
2767 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2768 removeListener
, style
);
2770 } else if (entity
instanceof StateData
) {
2771 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2772 } else if (entity
instanceof StatisticalMeasurementValue
) {
2773 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2774 removeListener
, style
);
2775 } else if (entity
instanceof DerivedUnit
) {
2776 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2777 case LivingSpecimen
:
2778 case PreservedSpecimen
:
2780 element
= new SpecimenCollectionDetailElement(this,
2782 (DerivedUnit
) entity
,
2787 element
= new DerivedUnitElement(this,
2789 (DerivedUnit
) entity
,
2794 } else if (entity
instanceof NamedArea
) {
2795 element
= new CollectingAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2796 } else if (entity
instanceof DeterminationEvent
) {
2797 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2798 } else if (entity
instanceof User
) {
2799 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2800 } else if (entity
instanceof GrantedAuthority
) {
2801 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
, ((Group
)parentElement
.getEntity()),
2802 removeListener
, style
);
2803 } else if (entity
instanceof Group
) {
2804 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2805 } else if (entity
instanceof Taxon
) {
2806 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2807 } else if (entity
instanceof DescriptionElementBase
) {
2808 // this is the special case for protologs, maybe we can do this
2809 // differently when API improves
2810 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2811 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2812 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2814 } else if (entity
instanceof Identifier
) {
2815 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2816 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2819 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2821 } else if (entity
instanceof TermVocabulary
) {
2822 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
2823 switch (termVocabulary
.getTermType()) {
2825 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2828 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
2833 } else if (entity
instanceof MeasurementUnit
) {
2834 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2835 } else if (entity
instanceof StatisticalMeasure
) {
2836 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
2837 } else if (entity
instanceof State
&& parentElement
instanceof InapplicableIfEntityCollectionSection
) {
2838 element
= new InapplicableIfCollectionElement(this, parentElement
, (State
) entity
, removeListener
, backgroundColor
, style
);
2839 } else if (entity
instanceof State
&& parentElement
instanceof OnlyApplicableIfEntityCollectionSection
) {
2840 element
= new OnlyApplicableIfCollectionElement(this, parentElement
, (State
) entity
, removeListener
, backgroundColor
, style
);
2843 //check for parent section when entity is null
2844 //this happens when AbstractUnboundEntityCollectionSection is used
2846 if(parentElement
instanceof ScopeSection
|| parentElement
instanceof ScopeRestrictionSection
){
2847 element
= new ScopeElement(this,
2849 (DefinedTerm
) entity
,
2853 else if(parentElement
instanceof ModifierSection
){
2854 element
= new ModifierElement(this,
2856 (DefinedTerm
) entity
,
2863 if (element
== null) {
2864 MessagingUtils
.messageDialog(
2865 String
.format("Error when creating section %s",
2866 parentElement
.getClass().getSimpleName()),
2868 String
.format("Could not generate collection element for entity of class %s."
2869 + " Looks like the case is not yet handled. Check implementation.\n"
2870 + "Entity: %s", entity
.getClass(), entity
.toString()), null);
2874 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2875 element
.setPersistentBackground(backgroundColor
);
2878 parentElement
.addElement(element
);
2886 * Creates a selection element for the given type T.
2889 * <strong>Selection elements not handled by this method:</strong>
2891 * <li>{@link TaxonNodeSelectionElement} see
2892 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2894 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2895 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2901 * a {@link Class} object of the type that you want the selection
2903 * @param parentElement
2904 * a {@link ICdmFormElement} object.
2905 * @param labelString
2906 * a {@link String} object.
2907 * @param selectionType
2909 * a {@link ICdmBase} object.
2912 * @param conversation
2913 * a {@link ConversationHolder} object.
2914 * @return a {@link EntitySelectionElement} object.
2916 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2917 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2918 int style
, boolean filterElement
) {
2919 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, //conversation,
2920 parentElement
, clazz
,
2921 labelString
, selection
, mode
, style
, filterElement
);
2923 parentElement
.addElement(element
);
2927 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2928 // ConversationHolder conversation,
2929 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2931 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, //conversation,
2932 parentElement
, clazz
,
2933 labelString
, selection
, mode
, style
);
2935 parentElement
.addElement(element
);
2941 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
2944 * <strong>Selection elements not handled by this method:</strong>
2946 * <li>{@link TaxonNodeSelectionElement} see
2947 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2949 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2950 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2956 * a {@link Class} object of the type that you want the selection
2958 * @param parentElement
2959 * a {@link ICdmFormElement} object.
2960 * @param labelString
2961 * a {@link String} object.
2962 * @param selectionType
2964 * a {@link ICdmBase} object.
2967 * @param conversation
2968 * a {@link ConversationHolder} object.
2969 * @return a {@link EntitySelectionElement} object.
2971 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
2972 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
2973 T selection
, int mode
, int style
) {
2974 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, //conversation,
2975 parentElement
, clazz
,
2976 labelString
, selection
, mode
, style
);
2978 parentElement
.addElement(element
);
2982 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2983 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2984 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, //conversation,
2986 labelString
, selection
, mode
, style
);
2988 parentElement
.addElement(element
);
2994 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
2995 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
2996 // int mode, int style) {
2997 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
2998 // conversation, parentElement, labelString, selection, mode, style);
3000 // parentElement.addElement(element);
3004 /** {@inheritDoc} */
3005 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
3006 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
3007 adapt(labelElement
);
3008 parentElement
.addElement(labelElement
);
3009 return labelElement
;
3012 // public DateElementFormElement createDateElementForm(ICdmFormElement formElement, String labelText, DateTime dateTime, int style){
3013 // Label label = new Label(formElement.getLayoutComposite(), style);
3014 // label.setText(labelText+" (yyyy-MM-dd)");
3015 // DateElementFormElement dateElement = new DateElementFormElement(this, dateTime, style, formElement.getLayoutComposite());
3016 // dateElement.initInternalController();
3018 // return dateElement;
3021 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
, boolean editableText
){
3022 Label label
= new Label(formElement
.getLayoutComposite(), style
);
3023 label
.setText(labelText
);
3024 label
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3025 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, labelText
, style
, editableText
);
3026 dateElement
.initController(this, formElement
);
3027 dateElement
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3033 * Getter for the field <code>selectionProvider</code>.
3036 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
3038 public ISelectionProvider
getSelectionProvider() {
3039 return selectionProvider
;
3044 * createDetailedDescriptionDetailElement
3047 * @param parentElement
3048 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
3052 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
3057 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
3060 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
3061 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
, boolean enabled
) {
3062 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
3064 if (entity
instanceof CategoricalData
) {
3065 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
3066 (CategoricalData
) entity
, style
);
3067 } else if (entity
instanceof CommonTaxonName
) {
3068 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
3070 } else if (entity
instanceof Distribution
&& !enabled
) {
3071 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3073 } else if (entity
instanceof Distribution
) {
3074 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3076 }else if (entity
instanceof IndividualsAssociation
) {
3077 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
3078 (IndividualsAssociation
) entity
, style
);
3079 } else if (entity
instanceof QuantitativeData
) {
3080 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
3081 (QuantitativeData
) entity
, style
);
3082 } else if (entity
instanceof TaxonInteraction
) {
3083 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
3084 (TaxonInteraction
) entity
, style
);
3085 } else if (entity
instanceof TextData
) {
3086 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
3088 throw new IllegalStateException("There is no interface for the given description element");
3090 adapt(detailedDescriptionElement
);
3091 parentElement
.addElement(detailedDescriptionElement
);
3092 return detailedDescriptionElement
;
3097 * Creates a styled text as a part of the form.
3102 * the text initial value
3105 * @return the text widget
3107 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
3108 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
3109 if (value
!= null) {
3110 text
.setText(value
);
3112 text
.setForeground(getColors().getForeground());
3113 text
.setBackground(getColors().getBackground());
3114 // text.addFocusListener(visibilityHandler);
3118 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
3119 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
3120 addAndAdaptSection(parentElement
, section
);
3125 * @param formElement
3126 * @param conversationHolder
3130 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
3131 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
3132 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
3133 addAndAdaptSection(formElement
, section
);
3138 public TaxonOfRelationshipElement
createTaxonOfRelationshipDetailElement(
3139 ICdmFormElement parentElement
, int style
) {
3140 TaxonOfRelationshipElement section
= new TaxonOfRelationshipElement(this, parentElement
, style
);
3141 addAndAdaptElement(parentElement
, section
);
3145 public TaxonDetailSection
createTaxonDetailSection(ConversationHolder conversationHolder
,
3146 ICdmFormElement formElement
, ISelectionProvider selectionProvider
, int style
) {
3147 TaxonDetailSection section
= new TaxonDetailSection(this, conversationHolder
, formElement
, selectionProvider
, style
);
3148 addAndAdaptSection(formElement
, section
);
3154 // public RichTextWithLabelElement createRichTextLabelElement(ICdmFormElement parentElement, String labelString, String initialText, int textHeight, int style) {
3155 // RichTextWithLabelElement element = new RichTextWithLabelElement(this, parentElement, labelString,
3156 // initialText, textHeight, style);
3158 // parentElement.addElement(element);