4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
7 import java
.util
.ArrayList
;
8 import java
.util
.HashSet
;
13 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
14 import org
.eclipse
.jface
.viewers
.ISelection
;
15 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
16 import org
.eclipse
.jface
.window
.Window
;
17 import org
.eclipse
.swt
.SWT
;
18 import org
.eclipse
.swt
.custom
.StyledText
;
19 import org
.eclipse
.swt
.events
.FocusAdapter
;
20 import org
.eclipse
.swt
.events
.FocusEvent
;
21 import org
.eclipse
.swt
.events
.FocusListener
;
22 import org
.eclipse
.swt
.events
.MouseAdapter
;
23 import org
.eclipse
.swt
.events
.MouseEvent
;
24 import org
.eclipse
.swt
.events
.MouseListener
;
25 import org
.eclipse
.swt
.events
.SelectionEvent
;
26 import org
.eclipse
.swt
.events
.SelectionListener
;
27 import org
.eclipse
.swt
.events
.TypedEvent
;
28 import org
.eclipse
.swt
.graphics
.Color
;
29 import org
.eclipse
.swt
.graphics
.Font
;
30 import org
.eclipse
.swt
.widgets
.Composite
;
31 import org
.eclipse
.swt
.widgets
.Control
;
32 import org
.eclipse
.swt
.widgets
.Display
;
33 import org
.eclipse
.swt
.widgets
.Event
;
34 import org
.eclipse
.swt
.widgets
.Label
;
35 import org
.eclipse
.ui
.forms
.IFormColors
;
36 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
37 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
38 import org
.eclipse
.ui
.forms
.widgets
.Section
;
39 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
40 import org
.joda
.time
.DateTime
;
41 import org
.joda
.time
.Partial
;
42 import org
.springframework
.security
.core
.GrantedAuthority
;
44 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
45 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
46 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
47 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
48 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
49 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
50 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
51 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
52 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
53 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
54 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
55 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
56 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
57 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
58 import eu
.etaxonomy
.cdm
.model
.common
.IEnumTerm
;
59 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
60 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
61 import eu
.etaxonomy
.cdm
.model
.common
.LSID
;
62 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
63 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
64 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
65 import eu
.etaxonomy
.cdm
.model
.common
.Representation
;
66 import eu
.etaxonomy
.cdm
.model
.common
.TermBase
;
67 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
68 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
69 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
70 import eu
.etaxonomy
.cdm
.model
.common
.User
;
71 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
72 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
73 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
74 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
75 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
76 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
77 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
78 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
79 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
80 import eu
.etaxonomy
.cdm
.model
.description
.MeasurementUnit
;
81 import eu
.etaxonomy
.cdm
.model
.description
.PresenceAbsenceTerm
;
82 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
83 import eu
.etaxonomy
.cdm
.model
.description
.State
;
84 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
85 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasure
;
86 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
87 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
88 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
89 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
90 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
91 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
92 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
93 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
94 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
95 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
96 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
97 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
98 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
99 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
100 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
101 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
102 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
103 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
104 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
105 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
106 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
107 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNodeAgentRelation
;
108 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
109 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
110 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
111 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.CloneClassificationDetailElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
115 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
116 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
117 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
118 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionElement
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionSection
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopePolyKeyDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationElement
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationDetailElement
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
323 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.PresenceAbsenceTermDetailElement
;
324 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
325 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
326 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
327 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
328 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
329 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
330 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
331 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
332 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
333 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithAbbreviatedTitle
;
334 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
335 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
339 * CdmFormFactory class.
343 * @created Feb 24, 2010
346 public class CdmFormFactory
extends FormToolkit
{
348 private BoldFontHolder2 boldFontHolder2
;
349 private MouseListener selectionMouseHandler
;
350 private FocusListener selectionFocusHandler
;
352 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
354 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
356 private final int orientation
= Window
.getDefaultOrientation();
357 private ISelectionProvider selectionProvider
;
359 /** Constant <code>EMPTY_SELECTION</code> */
360 public static ISelection EMPTY_SELECTION
= new ISelection() {
362 public boolean isEmpty() {
373 private class SelectionMouseHandler
extends MouseAdapter
{
375 public void mouseDown(MouseEvent e
) {
376 notifySelectionListeners(e
);
386 private class SelectionFocusHandler
extends FocusAdapter
{
388 public void focusGained(FocusEvent e
) {
389 notifySelectionListeners(e
);
393 private void notifySelectionListeners(TypedEvent e
) {
394 Event event
= new Event();
395 event
.widget
= e
.widget
;
396 SelectionEvent selectionEvent
= new SelectionEvent(event
);
398 for (SelectionListener listener
: selectionListenerList
) {
399 listener
.widgetSelected(selectionEvent
);
405 * Constructor for CdmFormFactory.
409 * a {@link org.eclipse.swt.widgets.Display} object.
410 * @param selectionProvider
411 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
413 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
415 this.selectionProvider
= selectionProvider
;
421 * Constructor for CdmFormFactory.
425 * a {@link org.eclipse.swt.widgets.Display} object.
427 public CdmFormFactory(Display display
) {
435 private void init() {
436 boldFontHolder2
= new BoldFontHolder2();
437 selectionMouseHandler
= new SelectionMouseHandler();
438 selectionFocusHandler
= new SelectionFocusHandler();
442 * Creates an instance initialized with the correct selectionProvider
444 * Make sure to remove the instance when the entityComposite disposes via
445 * destroySelectionArbitrator(..)
447 * @param entityElement
448 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
450 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
453 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
454 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
455 selectionArbitrator
.addSelectionProvider(selectionProvider
);
456 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
457 addSelectionListener(selectionArbitrator
);
458 return selectionArbitrator
;
463 * destroySelectionArbitrator
466 * @param selectionArbitrator
468 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
471 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
472 removeSelectionListener(selectionArbitrator
);
473 if (selectionProvider
!= null) {
474 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
476 MessagingUtils
.error(this.getClass(),
477 "Tried to destroy a selection listener from this factories listeners but was null", null);
483 * Adapts the {@link AbstractCdmFormElement}:<br>
484 * - sets the {@link IPropertyChangeListener}s handled by this class
489 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
492 public void adapt(ICdmFormElement formElement
) {
493 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
498 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
500 control
.addFocusListener(selectionFocusHandler
);
502 super.adapt(control
, trackFocus
, trackKeyboard
);
507 public void adapt(Composite composite
) {
508 composite
.addMouseListener(selectionMouseHandler
);
509 super.adapt(composite
);
518 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
521 public void destroyElement(ICdmFormElement formElement
) {
522 // return if element was not initialized
523 if (formElement
== null) {
526 // destroy selection arbitrator, if any
527 if (formElement
instanceof ISelectableElement
) {
528 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
530 // remove this element form its parents list of elements
531 // ICdmFormElement parentElement = formElement.getParentElement();
532 // if(parentElement != null){
533 // parentElement.removeElement(formElement);
535 // call destroy on child elements recursively
536 for (ICdmFormElement childElement
: formElement
.getElements()) {
537 destroyElement(childElement
);
539 // dispose of the controls
540 for (Control control
: formElement
.getControls()) {
541 // we added the layoutComposite of the parental element as the
542 // layout composite to this formElement
543 // but we do not want to destroy it.
544 if (control
.equals(formElement
.getLayoutComposite())) {
559 * a {@link org.eclipse.swt.widgets.Composite} object.
560 * @return a {@link org.eclipse.swt.widgets.Label} object.
562 public Label
createEmptyCell(Composite parent
) {
563 return this.createLabel(parent
, null);
568 * createMultiLanguageTextElement
571 * @param parentElement
572 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
575 * a {@link java.lang.String} object.
576 * @param multilanguageText
577 * a {@link java.util.Map} object.
583 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
586 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
587 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
588 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
589 multilanguageText
, textHeight
, style
);
591 parentElement
.addElement(element
);
597 * createMultiLanguageTextElement
600 * @param parentElement
601 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
604 * @param Representation
605 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
611 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
614 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
615 RepresentationElement element
= new RepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
617 parentElement
.addElement(element
);
623 * createMultiLanguageTextElement
626 * @param parentElement
627 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
630 * @param Representation
631 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
637 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
640 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
641 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
643 parentElement
.addElement(element
);
649 * createMultiLanguageTextElement
652 * @param parentElement
653 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
657 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
663 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
666 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, TermBase term
, int textHeight
, int style
, boolean fillDetails
) {
667 RepresentationElement element
= new RepresentationElement(this, parentElement
, term
, textHeight
, style
, fillDetails
);
669 parentElement
.addElement(element
);
675 * createMultiLanguageTextElement
678 * @param parentElement
679 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
683 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
689 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
692 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, TermBase term
, int textHeight
, int style
, boolean fillDetails
) {
693 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, term
, textHeight
, style
, fillDetails
);
695 parentElement
.addElement(element
);
699 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
700 KeyStatement keyStatement
, int textHeight
, int style
) {
701 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
704 parentElement
.addElement(element
);
709 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
711 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
712 * @param parentElement the parent container
713 * @param labelString the label name
714 * @param initialObject the object from which the <code>toString()</code> method is called
715 * @param style {@link SWT} style constant
716 * @return the created textfield with label
718 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
719 Object initialObject
, int style
) {
720 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
725 * createTextWithLabelElement
728 * @param parentElement
729 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
732 * a {@link java.lang.String} object.
734 * a {@link java.lang.String} object.
737 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
740 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
741 String initialText
, int style
) {
742 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
746 * createTextWithLabelElement
749 * @param parentElement
750 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
753 * a {@link java.lang.String} object.
755 * a {@link java.lang.String} object.
756 * @param textLimit maximal number of characters allowed
759 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
762 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
763 String initialText
, Integer textLimit
, int style
) {
764 if(initialText
==null){
768 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
771 parentElement
.addElement(element
);
775 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
776 int textHeight
, int style
) {
777 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
779 parentElement
.addElement(element
);
783 public LsidWithExceptionLabelElement
createLsidWithExceptionLabelElement(ICdmFormElement parentElement
, String labelString
,
784 LSID initialLsid
, int style
) {
785 LsidWithExceptionLabelElement element
= new LsidWithExceptionLabelElement(this, parentElement
, labelString
, initialLsid
, null, style
);
787 parentElement
.addElement(element
);
791 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
792 URI initialUri
, int style
) {
793 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
795 parentElement
.addElement(element
);
806 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
807 IOpenUrlEnabled openUrlEnabled
, int style
) {
808 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
811 parentElement
.addElement(element
);
817 * @param parentElement
819 * @param conversationEnabled
824 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
825 ConversationHolder conversation
, User user
, int style
) {
826 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
828 parentElement
.addElement(element
);
834 * createIntegerTextWithLabelElement
837 * @param parentElement
838 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
841 * a {@link java.lang.String} object.
842 * @param initialInteger
843 * a {@link java.lang.Integer} object.
847 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
850 public NumberWithLabelElement
createNumberTextWithLabelElement(
851 ICdmFormElement parentElement
, String labelString
,
852 Number initialNumber
, int style
) {
853 NumberWithLabelElement element
= new NumberWithLabelElement(this,
854 parentElement
, labelString
, initialNumber
, style
);
856 parentElement
.addElement(element
);
860 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
861 String labelString
, LanguageString languageString
, int style
) {
862 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
865 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
866 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
867 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
868 languageString
, height
, isMultiLine
, style
);
870 parentElement
.addElement(element
);
876 * createKeyValueViewerElement
879 * @param parentElement
880 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
883 * a {@link java.lang.String} object.
884 * @param valueHeading
885 * a {@link java.lang.String} object.
887 * a {@link java.util.Map} object.
888 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
891 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
892 String valueHeading
, Map
<Object
, Object
> map
) {
893 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
895 parentElement
.addElement(element
);
899 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
902 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
903 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
904 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
905 selection
, true, style
);
907 parentElement
.addElement(element
);
911 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
913 ICdmFormElement parentElement
,
917 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, true, style
, false);
919 parentElement
.addElement(element
);
923 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
925 ICdmFormElement parentElement
,
928 boolean addEmptyElement
,
930 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, false);
932 parentElement
.addElement(element
);
935 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
937 ICdmFormElement parentElement
,
940 boolean addEmptyElement
,
941 int style
, boolean useAbbrevLabel
) {
942 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
944 parentElement
.addElement(element
);
949 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
950 TermVocabulary
<?
> termVocabulary
,
951 ICdmFormElement parentElement
,
955 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, true, style
);
957 parentElement
.addElement(element
);
961 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
962 TermVocabulary
<?
> termVocabulary
,
963 ICdmFormElement parentElement
,
966 boolean addEmptyElement
,
968 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
);
970 parentElement
.addElement(element
);
976 * createEnumComboElement
979 * @param enumComboType
981 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
983 * @param parentElement
984 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
988 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
991 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
992 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
994 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
996 parentElement
.addElement(element
);
1000 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
1001 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1002 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1004 parentElement
.addElement(element
);
1010 * createBrowserElement
1014 * a {@link java.net.URI} object.
1017 * @param parentElement
1018 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1020 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1023 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1024 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1026 parentElement
.addElement(element
);
1032 * createImageElement
1035 * @param parentElement
1036 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1039 * a {@link java.net.URI} object.
1042 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1044 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1045 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1047 parentElement
.addElement(element
);
1053 * createTextActionElement
1056 * @param labelString
1057 * a {@link java.lang.String} object.
1058 * @param initialText
1059 * a {@link java.lang.String} object.
1062 * @param parentElement
1063 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1065 * @param buttonLabel
1066 * a {@link java.lang.String} object.
1067 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1070 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1071 String buttonLabel
, String initialText
, int style
) {
1072 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1075 parentElement
.addElement(element
);
1084 * @param parentElement
1085 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1088 * a {@link java.lang.String} object.
1089 * @param initialState
1093 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1096 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1097 if(initialState
==null){
1098 initialState
= Boolean
.FALSE
;
1100 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1102 parentElement
.addElement(element
);
1107 * Creates a section as a part of the form.
1109 * @return the section widget
1112 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1115 public Section
adapt(AbstractFormSection section
) {
1116 section
.setMenu(section
.getLayoutComposite().getMenu());
1117 adapt(section
, true, true);
1119 // handle focus and property change events for cdm use
1120 section
.addFocusListener(selectionFocusHandler
);
1121 section
.setPropertyChangeListeners(propertyChangeListeners
);
1123 if (section
.getToggle() != null) {
1124 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1125 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1128 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1130 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1131 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1132 getColors().initializeSectionToolBarColors();
1133 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1134 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1136 // call setTitleBarForeground regardless as it also sets the label color
1137 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1141 private class BoldFontHolder2
{
1142 private Font normalFont
;
1144 private Font boldFont
;
1146 public BoldFontHolder2() {
1149 public Font
getBoldFont(Font font
) {
1150 createBoldFont(font
);
1154 private void createBoldFont(Font font
) {
1155 if (normalFont
== null || !normalFont
.equals(font
)) {
1159 if (boldFont
== null) {
1160 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1164 public void dispose() {
1165 if (boldFont
!= null) {
1166 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1174 * createToggleableTextField
1177 * @param parentElement
1178 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1180 * @param labelString
1181 * a {@link java.lang.String} object.
1182 * @param initialText
1183 * a {@link java.lang.String} object.
1184 * @param initialState
1188 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1191 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1192 String initialText
, boolean initialState
, int style
) {
1193 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1194 initialState
, style
| orientation
);
1196 parentElement
.addElement(element
);
1202 * createTimePeriodElement
1205 * @param parentElement
1206 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1208 * @param labelString
1209 * a {@link java.lang.String} object.
1211 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1214 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1217 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1218 TimePeriod timePeriod
, int style
) {
1219 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1221 parentElement
.addElement(element
);
1227 * createGatheringEventUnitElement
1230 * @param parentElement
1231 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1233 * @param labelString
1234 * a {@link java.lang.String} object.
1236 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1239 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1242 public GatheringEventUnitElement
createGatheringEventUnitElement(
1243 ICdmFormElement parentElement
,
1245 DerivedUnitFacade gatheringEvent
,
1246 MinMaxTextSection
.UnitType unitType
,
1248 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1255 parentElement
.addElement(element
);
1261 * createPointElement
1266 * @param parentElement
1267 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1270 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1271 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1273 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1274 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1276 parentElement
.addElement(element
);
1283 * @param conversationHolder
1285 * @param detailsViewer
1289 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1290 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1291 parentElement
.addElement(section
);
1298 * createDateDetailSection
1301 * @param parentElement
1302 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1306 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1309 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1310 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1311 parentElement
.addElement(section
);
1318 * createDateDetailSection
1321 * @param parentElement
1322 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1326 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1329 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1330 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1331 parentElement
.addElement(section
);
1338 * createPartialElement
1341 * @param parentElement
1342 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1344 * @param labelString
1345 * a {@link java.lang.String} object.
1347 * a {@link org.joda.time.Partial} object.
1350 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1353 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1355 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1357 parentElement
.addElement(element
);
1363 * addSelectionListener
1367 * a {@link org.eclipse.swt.events.SelectionListener} object.
1369 public void addSelectionListener(SelectionListener listener
) {
1370 selectionListenerList
.add(listener
);
1375 * removeSelectionListener
1379 * a {@link org.eclipse.swt.events.SelectionListener} object.
1381 public void removeSelectionListener(SelectionListener listener
) {
1382 if (listener
== null) {
1383 MessagingUtils
.error(this.getClass(),
1384 "Tried to remove a selection listener from this factories listeners but was null", null);
1386 selectionListenerList
.remove(listener
);
1392 * addPropertyChangeListener
1396 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1399 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1400 if (propertyChangeListeners
.contains(listener
)) {
1403 propertyChangeListeners
.add(0, listener
);
1408 * removePropertyChangeListener
1412 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1415 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1416 propertyChangeListeners
.remove(listener
);
1420 * @return the propertyChangeListeners
1422 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1423 return propertyChangeListeners
;
1428 * createHorizontalSeparator
1431 * @param parentElement
1432 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1436 * @return a {@link org.eclipse.swt.widgets.Label} object.
1438 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1439 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1440 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1446 * createVersionElement
1449 * @param parentElement
1450 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1453 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1458 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1461 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1462 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1464 parentElement
.addElement(element
);
1469 * @param cdmBaseSection
1474 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1475 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1477 parentElement
.addElement(element
);
1483 * createVersionSection
1486 * @param parentElement
1487 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1492 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1495 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1496 VersionSection section
= new VersionSection(this, parentElement
, style
);
1497 parentElement
.addElement(section
);
1507 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1508 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1509 parentElement
.addElement(section
);
1516 * createEmptyElement
1519 * @param parentElement
1520 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1522 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1524 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1525 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1527 parentElement
.addElement(element
);
1533 * createHeadlineSection
1536 * @param parentElement
1537 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1540 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1543 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1544 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1545 parentElement
.addElement(section
);
1552 * createParsingMessageElement
1555 * @param parentElement
1556 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1558 * @param parserProblem
1559 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1564 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1567 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1568 ParserProblem parserProblem
, int style
) {
1569 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1571 parentElement
.addElement(element
);
1575 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1576 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1578 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1579 selectionProvider
, style
);
1581 parentElement
.addElement(section
);
1588 * @param definedTermClass
1589 * @param formElement
1593 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1594 AbstractCdmDetailSection parentElement
, int style
) {
1595 AbstractCdmDetailElement element
= null;
1597 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1598 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1599 } else if (definedTermClass
.equals(Feature
.class)) {
1600 element
= new FeatureDetailElement(this, parentElement
);
1601 } else if(definedTermClass
.equals(PresenceAbsenceTerm
.class)){
1602 element
= new PresenceAbsenceTermDetailElement(this, parentElement
);
1604 element
= new DefinedTermDetailElement(this, parentElement
);
1609 parentElement
.addElement(element
);
1614 //--------DetailSections---------
1615 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1616 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1617 addAndAdaptSection(parentElement
, section
);
1621 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1622 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1623 addAndAdaptSection(parentElement
, section
);
1627 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1628 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1629 addAndAdaptSection(parentElement
, section
);
1633 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1634 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1635 addAndAdaptSection(parentElement
, section
);
1639 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1640 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1641 addAndAdaptSection(parentElement
, section
);
1645 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1646 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1647 addAndAdaptSection(parentElement
, section
);
1651 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1652 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1653 addAndAdaptSection(parentElement
, section
);
1657 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1658 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1659 addAndAdaptSection(parentElement
, section
);
1663 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1664 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1665 addAndAdaptSection(parentElement
, section
);
1669 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1670 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1671 addAndAdaptSection(parentElement
, section
);
1675 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1676 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1677 addAndAdaptSection(parentElement
, section
);
1681 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
1682 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
1683 addAndAdaptSection(parentElement
, section
);
1687 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1688 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1689 addAndAdaptSection(parentElement
, section
);
1693 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1694 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1695 addAndAdaptSection(parentElement
, section
);
1699 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1700 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1701 addAndAdaptSection(parentElement
, section
);
1705 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1706 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1707 addAndAdaptSection(parentElement
, section
);
1711 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1712 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1713 addAndAdaptSection(parentElement
, section
);
1717 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1718 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
1719 addAndAdaptSection(parentElement
, section
);
1723 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1724 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1725 addAndAdaptSection(parentElement
, section
);
1729 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1730 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1731 addAndAdaptSection(parentElement
, section
);
1735 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1736 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1737 addAndAdaptSection(parentElement
, section
);
1741 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1742 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1743 addAndAdaptSection(parentElement
, section
);
1747 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1748 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1749 addAndAdaptSection(parentElement
, section
);
1753 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1754 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1755 addAndAdaptSection(parentElement
, section
);
1759 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1760 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1761 addAndAdaptSection(parentElement
, section
);
1765 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1766 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1767 addAndAdaptSection(parentElement
, section
);
1771 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1772 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1773 addAndAdaptSection(parentElement
, section
);
1777 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1778 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1779 addAndAdaptSection(parentElement
, section
);
1783 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1784 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1785 addAndAdaptSection(parentElement
, section
);
1789 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1790 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1791 addAndAdaptSection(parentElement
, section
);
1795 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1796 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1797 addAndAdaptSection(parentElement
, section
);
1801 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1802 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1803 addAndAdaptSection(parentElement
, section
);
1807 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1808 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
1809 addAndAdaptSection(parentElement
, section
);
1813 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1814 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1815 addAndAdaptSection(parentElement
, section
);
1819 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1820 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1821 addAndAdaptSection(parentElement
, section
);
1825 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1826 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1827 addAndAdaptSection(parentElement
, section
);
1831 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1832 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1833 addAndAdaptSection(parentElement
, section
);
1837 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1838 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1839 addAndAdaptSection(parentElement
, section
);
1843 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1844 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1845 addAndAdaptSection(parentElement
, section
);
1849 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1850 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1851 addAndAdaptSection(parentElement
, section
);
1855 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1856 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1857 addAndAdaptSection(parentElement
, section
);
1861 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1862 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1863 addAndAdaptSection(parentElement
, section
);
1867 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1868 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1869 addAndAdaptSection(parentElement
, section
);
1873 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1874 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1875 addAndAdaptSection(parentElement
, section
);
1879 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1880 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1881 addAndAdaptSection(parentElement
, section
);
1885 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1886 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1887 addAndAdaptSection(parentElement
, section
);
1891 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1892 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1893 addAndAdaptSection(parentElement
, section
);
1897 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1898 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1899 addAndAdaptSection(parentElement
, section
);
1903 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1904 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1905 addAndAdaptSection(parentElement
, section
);
1909 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1910 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1911 addAndAdaptSection(parentElement
, section
);
1915 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1916 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1917 addAndAdaptSection(parentElement
, section
);
1921 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1922 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1923 addAndAdaptSection(parentElement
, section
);
1927 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1928 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1929 addAndAdaptSection(parentElement
, section
);
1933 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1934 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1935 addAndAdaptSection(parentElement
, section
);
1939 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1940 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1941 addAndAdaptSection(parentElement
, section
);
1945 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1946 parentElement
.addElement(section
);
1950 //--------DetailElements------------
1952 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1953 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1954 addAndAdaptElement(parentElement
, element
);
1958 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1959 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1960 addAndAdaptElement(parentElement
, element
);
1964 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1965 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1966 addAndAdaptElement(parentElement
, element
);
1970 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1971 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1972 addAndAdaptElement(parentElement
, element
);
1976 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1977 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1978 addAndAdaptElement(parentElement
, element
);
1982 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1983 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1984 addAndAdaptElement(parentElement
, element
);
1988 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1989 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1990 addAndAdaptElement(parentElement
, element
);
1994 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1995 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1996 addAndAdaptElement(parentElement
, element
);
2000 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
2001 UserDetailElement element
= new UserDetailElement(this, parentElement
);
2002 addAndAdaptElement(parentElement
, element
);
2006 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2007 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2008 addAndAdaptElement(parentElement
, element
);
2012 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2013 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2014 addAndAdaptElement(parentElement
, element
);
2018 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2019 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2020 addAndAdaptElement(parentElement
, element
);
2024 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2025 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2026 addAndAdaptElement(parentElement
, element
);
2030 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2031 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2032 addAndAdaptElement(parentElement
, element
);
2036 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2037 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2039 parentElement
.addElement(element
);
2044 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2045 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2046 addAndAdaptElement(parentElement
, element
);
2050 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2051 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2052 addAndAdaptElement(parentElement
, element
);
2056 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2057 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2058 addAndAdaptElement(parentElement
, element
);
2062 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2063 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2064 addAndAdaptElement(parentElement
, element
);
2068 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2069 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2070 addAndAdaptElement(parentElement
, element
);
2074 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2075 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2076 addAndAdaptElement(parentElement
, element
);
2080 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2081 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2082 addAndAdaptElement(parentElement
, element
);
2086 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2087 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2088 addAndAdaptElement(parentElement
, element
);
2092 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2093 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2094 addAndAdaptElement(parentElement
, element
);
2098 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2099 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2100 addAndAdaptElement(parentElement
, element
);
2104 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2105 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2106 addAndAdaptElement(parentElement
, element
);
2110 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2111 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2112 addAndAdaptElement(parentElement
, element
);
2116 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2117 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2118 addAndAdaptElement(parentElement
, element
);
2122 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
, boolean isWizard
){
2123 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
, isWizard
);
2124 addAndAdaptElement(parentElement
, element
);
2128 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2129 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2130 addAndAdaptElement(parentElement
, element
);
2135 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2136 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2137 addAndAdaptElement(parentElement
, element
);
2141 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2142 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2143 addAndAdaptElement(parentElement
, element
);
2147 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2148 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2149 addAndAdaptElement(parentElement
, element
);
2153 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2154 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2155 addAndAdaptElement(parentElement
, element
);
2159 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2160 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2161 addAndAdaptElement(parentElement
, element
);
2165 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2166 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2167 addAndAdaptElement(parentElement
, element
);
2171 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2172 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2173 addAndAdaptElement(parentElement
, element
);
2177 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2178 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2179 addAndAdaptElement(parentElement
, element
);
2183 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2184 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2185 addAndAdaptElement(parentElement
, element
);
2189 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2190 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2191 addAndAdaptElement(parentElement
, element
);
2195 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2196 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2197 addAndAdaptElement(parentElement
, element
);
2201 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2202 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2203 addAndAdaptElement(parentElement
, element
);
2207 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2208 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2209 addAndAdaptElement(parentElement
, element
);
2213 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2214 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2215 addAndAdaptElement(parentElement
, element
);
2219 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2220 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2221 addAndAdaptElement(parentElement
, element
);
2225 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2226 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2227 addAndAdaptElement(parentElement
, element
);
2231 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2232 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2233 addAndAdaptElement(parentElement
, mediaDetailElement
);
2234 return mediaDetailElement
;
2237 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2238 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2239 addAndAdaptElement(parentElement
, element
);
2243 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2244 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2245 addAndAdaptElement(parentElement
, element
);
2249 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2250 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2251 addAndAdaptElement(parentElement
, element
);
2255 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2256 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2257 addAndAdaptElement(parentElement
, element
);
2261 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2262 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2263 addAndAdaptElement(parentElement
, element
);
2267 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2268 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2269 addAndAdaptElement(parentElement
, element
);
2273 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2274 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2275 addAndAdaptElement(parentElement
, element
);
2279 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2280 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2281 addAndAdaptElement(parentElement
, element
);
2286 * @param parentElement
2289 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2291 parentElement
.addElement(element
);
2294 //--------EntityCollectionSection----------
2295 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2296 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2297 addAndAdaptSection(parentElement
, section
);
2301 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2302 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2303 addAndAdaptSection(parentElement
, section
);
2307 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2308 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2309 addAndAdaptSection(parentElement
, section
);
2313 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2314 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2315 addAndAdaptSection(parentElement
, section
);
2319 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2320 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2321 addAndAdaptSection(parentElement
, section
);
2325 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2326 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2327 addAndAdaptSection(parentElement
, section
);
2331 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2332 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2333 addAndAdaptSection(parentElement
, section
);
2337 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2338 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2339 addAndAdaptSection(parentElement
, section
);
2343 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2344 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2345 addAndAdaptSection(parentElement
, section
);
2349 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2350 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2351 addAndAdaptSection(parentElement
, section
);
2355 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2356 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2357 addAndAdaptSection(parentElement
, section
);
2361 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2362 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2363 addAndAdaptSection(parentElement
, section
);
2367 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2368 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2369 addAndAdaptSection(parentElement
, section
);
2373 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2374 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2375 addAndAdaptSection(parentElement
, section
);
2379 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2380 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2381 addAndAdaptSection(parentElement
, section
);
2385 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2386 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2387 addAndAdaptSection(parentElement
, section
);
2391 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2392 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2393 addAndAdaptSection(parentElement
, section
);
2397 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2398 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2399 addAndAdaptSection(parentElement
, section
);
2403 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2404 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2405 addAndAdaptSection(parentElement
, section
);
2409 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2410 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2411 addAndAdaptSection(parentElement
, section
);
2415 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2416 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2417 addAndAdaptSection(parentElement
, section
);
2421 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2422 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2423 addAndAdaptSection(parentElement
, section
);
2427 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2428 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2429 addAndAdaptSection(parentElement
, section
);
2433 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2434 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2435 addAndAdaptSection(parentElement
, section
);
2439 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2440 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2441 addAndAdaptSection(parentElement
, section
);
2445 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2446 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2447 addAndAdaptSection(parentElement
, section
);
2451 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2452 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2453 addAndAdaptSection(parentElement
, section
);
2457 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2458 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2459 addAndAdaptSection(parentElement
, section
);
2463 public GeoScopePolyKeyDetailSection
createGeoScopePolyKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2464 GeoScopePolyKeyDetailSection section
= new GeoScopePolyKeyDetailSection(this, conversation
, parentElement
, style
);
2465 addAndAdaptSection(parentElement
, section
);
2469 public IdentifierSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2470 IdentifierSection section
= new IdentifierSection(this, conversation
, parentElement
, style
);
2471 addAndAdaptSection(parentElement
, section
);
2475 public DerivedUnitFacadeIdentifierSection
createDerivedUnitFacadeIdentifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2476 DerivedUnitFacadeIdentifierSection section
= new DerivedUnitFacadeIdentifierSection(this, conversation
, parentElement
, style
);
2477 addAndAdaptSection(parentElement
, section
);
2481 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2482 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2483 addAndAdaptSection(parentElement
, section
);
2487 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2488 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2489 addAndAdaptSection(parentElement
, section
);
2493 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2494 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2495 addAndAdaptSection(parentElement
, section
);
2499 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2500 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2501 addAndAdaptSection(parentElement
, section
);
2505 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2506 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2507 addAndAdaptSection(parentElement
, section
);
2511 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2512 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2513 addAndAdaptSection(parentElement
, section
);
2517 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2518 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2519 addAndAdaptSection(parentElement
, section
);
2523 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2524 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2525 addAndAdaptSection(parentElement
, section
);
2529 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2530 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2531 addAndAdaptSection(parentElement
, section
);
2535 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2536 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2537 addAndAdaptSection(parentElement
, section
);
2541 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2542 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2543 addAndAdaptSection(parentElement
, section
);
2547 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2548 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2549 addAndAdaptSection(parentElement
, section
);
2553 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2554 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2555 addAndAdaptSection(parentElement
, section
);
2560 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2561 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2562 AbstractEntityCollectionElement element
= null;
2564 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2566 if (entity
instanceof Annotation
) {
2567 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2568 }else if (entity
instanceof Person
) {
2569 boolean isNomenclatural
= false;
2570 if (parentElement
instanceof TeamMemberSection
){
2571 isNomenclatural
= ((TeamMemberSection
) parentElement
).isNomenclaturalTeam();
2573 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
, isNomenclatural
);
2574 } else if (entity
instanceof Credit
) {
2575 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2576 } else if (entity
instanceof Extension
) {
2577 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2578 } else if (entity
instanceof Marker
) {
2579 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2580 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2581 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
, removeListener
, backgroundColor
, style
);
2582 }else if (entity
instanceof Media
) {
2583 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, true, style
);
2584 } else if (entity
instanceof MediaRepresentation
) {
2585 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2587 } else if (entity
instanceof ImageFile
) {
2588 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2589 } else if (entity
instanceof MediaRepresentationPart
) {
2590 element
= new MediaRepresentationPartElement
<>(this, parentElement
, (MediaRepresentationPart
) entity
,
2591 removeListener
, style
);
2592 } else if (entity
instanceof NomenclaturalStatus
) {
2593 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2595 } else if (entity
instanceof Rights
) {
2596 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2597 } else if (entity
instanceof DescriptionElementSource
) {
2598 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2599 removeListener
, style
);
2600 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2601 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
,
2602 removeListener
,backgroundColor
, style
);
2604 else if (entity
instanceof IdentifiableSource
) {
2605 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2607 } else if (entity
instanceof DefinedTerm
) {
2608 switch(((DefinedTerm
)entity
).getTermType()) {
2610 element
= new ScopeElement(this,
2612 (DefinedTerm
) entity
,
2617 element
= new ModifierElement(this,
2619 (DefinedTerm
) entity
,
2627 } else if (entity
instanceof Reference
) {
2628 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2629 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2632 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2634 } else if (entity
instanceof NameTypeDesignation
) {
2635 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2637 } else if (entity
instanceof NameRelationship
) {
2638 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2640 } else if (entity
instanceof SpecimenTypeDesignation
) {
2641 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
2642 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2643 removeListener
, style
);
2646 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2647 removeListener
, style
);
2649 } else if (entity
instanceof StateData
) {
2650 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2651 } else if (entity
instanceof StatisticalMeasurementValue
) {
2652 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2653 removeListener
, style
);
2654 } else if (entity
instanceof DerivedUnit
) {
2655 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2656 case LivingSpecimen
:
2657 case PreservedSpecimen
:
2659 element
= new SpecimenCollectionDetailElement(this,
2661 (DerivedUnit
) entity
,
2666 element
= new DerivedUnitElement(this,
2668 (DerivedUnit
) entity
,
2673 } else if (entity
instanceof NamedArea
) {
2674 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2675 } else if (entity
instanceof DeterminationEvent
) {
2676 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2677 } else if (entity
instanceof User
) {
2678 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2679 } else if (entity
instanceof GrantedAuthority
) {
2680 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2681 removeListener
, style
);
2682 } else if (entity
instanceof Group
) {
2683 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2684 } else if (entity
instanceof Taxon
) {
2685 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2686 } else if (entity
instanceof DescriptionElementBase
) {
2687 // this is the special case for protologs, maybe we can do this
2688 // differently when API improves
2689 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2690 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2691 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2693 } else if (entity
instanceof Identifier
) {
2694 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2695 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2698 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2700 } else if (entity
instanceof TermVocabulary
) {
2701 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
2702 switch (termVocabulary
.getTermType()) {
2704 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2707 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
2712 } else if (entity
instanceof MeasurementUnit
) {
2713 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2714 } else if (entity
instanceof StatisticalMeasure
) {
2715 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
2719 if (element
== null) {
2720 MessagingUtils
.messageDialog("No element for entity", this,
2721 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2726 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2727 element
.setPersistentBackground(backgroundColor
);
2730 parentElement
.addElement(element
);
2738 * Creates a selection element for the given type T.
2741 * <strong>Selection elements not handled by this method:</strong>
2743 * <li>{@link TaxonNodeSelectionElement} see
2744 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2746 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2747 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2753 * a {@link Class} object of the type that you want the selection
2755 * @param parentElement
2756 * a {@link ICdmFormElement} object.
2757 * @param labelString
2758 * a {@link String} object.
2759 * @param selectionType
2761 * a {@link ICdmBase} object.
2764 * @param conversation
2765 * a {@link ConversationHolder} object.
2766 * @return a {@link EntitySelectionElement} object.
2768 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2769 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2771 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2772 labelString
, selection
, mode
, style
);
2774 parentElement
.addElement(element
);
2780 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
2783 * <strong>Selection elements not handled by this method:</strong>
2785 * <li>{@link TaxonNodeSelectionElement} see
2786 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2788 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2789 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2795 * a {@link Class} object of the type that you want the selection
2797 * @param parentElement
2798 * a {@link ICdmFormElement} object.
2799 * @param labelString
2800 * a {@link String} object.
2801 * @param selectionType
2803 * a {@link ICdmBase} object.
2806 * @param conversation
2807 * a {@link ConversationHolder} object.
2808 * @return a {@link EntitySelectionElement} object.
2810 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
2811 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
2812 T selection
, int mode
, int style
) {
2813 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, conversation
, parentElement
, clazz
,
2814 labelString
, selection
, mode
, style
);
2816 parentElement
.addElement(element
);
2820 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2821 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2822 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2823 labelString
, selection
, mode
, style
);
2825 parentElement
.addElement(element
);
2829 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
2830 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
2831 // int mode, int style) {
2832 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
2833 // conversation, parentElement, labelString, selection, mode, style);
2835 // parentElement.addElement(element);
2839 /** {@inheritDoc} */
2840 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2841 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2842 adapt(labelElement
);
2843 parentElement
.addElement(labelElement
);
2844 return labelElement
;
2847 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2848 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2849 label
.setText(labelText
+" (yyyy-MM-dd)");
2850 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2851 dateElement
.initController(this, formElement
);
2857 * Getter for the field <code>selectionProvider</code>.
2860 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2862 public ISelectionProvider
getSelectionProvider() {
2863 return selectionProvider
;
2868 * createDetailedDescriptionDetailElement
2871 * @param parentElement
2872 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2876 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2881 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2884 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2885 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2886 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2888 if (entity
instanceof CategoricalData
) {
2889 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2890 (CategoricalData
) entity
, style
);
2891 } else if (entity
instanceof CommonTaxonName
) {
2892 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2894 } else if (entity
instanceof Distribution
) {
2895 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2897 } else if (entity
instanceof IndividualsAssociation
) {
2898 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2899 (IndividualsAssociation
) entity
, style
);
2900 } else if (entity
instanceof QuantitativeData
) {
2901 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2902 (QuantitativeData
) entity
, style
);
2903 } else if (entity
instanceof TaxonInteraction
) {
2904 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2905 (TaxonInteraction
) entity
, style
);
2906 } else if (entity
instanceof TextData
) {
2907 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2909 throw new IllegalStateException("There is no interface for the given description element");
2911 adapt(detailedDescriptionElement
);
2912 parentElement
.addElement(detailedDescriptionElement
);
2913 return detailedDescriptionElement
;
2918 * Creates a styled text as a part of the form.
2923 * the text initial value
2926 * @return the text widget
2928 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2929 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2930 if (value
!= null) {
2931 text
.setText(value
);
2933 text
.setForeground(getColors().getForeground());
2934 text
.setBackground(getColors().getBackground());
2935 // text.addFocusListener(visibilityHandler);
2939 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2940 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2941 addAndAdaptSection(parentElement
, section
);
2946 * @param formElement
2947 * @param conversationHolder
2951 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
2952 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
2953 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
2954 addAndAdaptSection(formElement
, section
);
2959 * @param conversationHolder
2960 * @param formElement
2964 public TeamMemberSection
createNomenclaturalTeamMemberSection(ConversationHolder conversationHolder
,
2965 ICdmFormElement formElement
, int expanded
) {
2966 // TODO Auto-generated method stub