4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
7 import java
.util
.ArrayList
;
8 import java
.util
.Comparator
;
9 import java
.util
.HashSet
;
10 import java
.util
.List
;
14 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
15 import org
.eclipse
.jface
.viewers
.ISelection
;
16 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
17 import org
.eclipse
.jface
.window
.Window
;
18 import org
.eclipse
.swt
.SWT
;
19 import org
.eclipse
.swt
.custom
.StyledText
;
20 import org
.eclipse
.swt
.events
.FocusAdapter
;
21 import org
.eclipse
.swt
.events
.FocusEvent
;
22 import org
.eclipse
.swt
.events
.FocusListener
;
23 import org
.eclipse
.swt
.events
.MouseAdapter
;
24 import org
.eclipse
.swt
.events
.MouseEvent
;
25 import org
.eclipse
.swt
.events
.MouseListener
;
26 import org
.eclipse
.swt
.events
.SelectionEvent
;
27 import org
.eclipse
.swt
.events
.SelectionListener
;
28 import org
.eclipse
.swt
.events
.TypedEvent
;
29 import org
.eclipse
.swt
.graphics
.Color
;
30 import org
.eclipse
.swt
.graphics
.Font
;
31 import org
.eclipse
.swt
.widgets
.Composite
;
32 import org
.eclipse
.swt
.widgets
.Control
;
33 import org
.eclipse
.swt
.widgets
.Display
;
34 import org
.eclipse
.swt
.widgets
.Event
;
35 import org
.eclipse
.swt
.widgets
.Label
;
36 import org
.eclipse
.ui
.forms
.IFormColors
;
37 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
38 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
39 import org
.eclipse
.ui
.forms
.widgets
.Section
;
40 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
41 import org
.joda
.time
.DateTime
;
42 import org
.joda
.time
.Partial
;
43 import org
.springframework
.security
.core
.GrantedAuthority
;
45 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
46 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
47 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
48 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
49 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
50 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
51 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
52 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
53 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
54 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
55 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
56 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
57 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
58 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
59 import eu
.etaxonomy
.cdm
.model
.common
.IEnumTerm
;
60 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
61 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
62 import eu
.etaxonomy
.cdm
.model
.common
.LSID
;
63 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
64 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
65 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
66 import eu
.etaxonomy
.cdm
.model
.common
.Representation
;
67 import eu
.etaxonomy
.cdm
.model
.common
.TermBase
;
68 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
69 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
70 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
71 import eu
.etaxonomy
.cdm
.model
.common
.User
;
72 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
73 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
74 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
75 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
76 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
77 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
78 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
79 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
80 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
81 import eu
.etaxonomy
.cdm
.model
.description
.MeasurementUnit
;
82 import eu
.etaxonomy
.cdm
.model
.description
.PresenceAbsenceTerm
;
83 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
84 import eu
.etaxonomy
.cdm
.model
.description
.State
;
85 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
86 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasure
;
87 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
88 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
89 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
90 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
91 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
92 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
93 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
94 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
95 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
96 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
97 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
98 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
99 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
100 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
101 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
102 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
103 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
104 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
105 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
106 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
107 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
108 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNodeAgentRelation
;
109 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
110 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
111 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.CloneClassificationDetailElement
;
115 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
116 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
118 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionElement
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionSection
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopePolyKeyDetailSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
323 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
324 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.PresenceAbsenceTermDetailElement
;
325 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
326 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
327 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
328 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
329 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
330 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
331 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
332 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
333 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
334 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithAbbreviatedTitle
;
335 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
336 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
340 * CdmFormFactory class.
344 * @created Feb 24, 2010
347 public class CdmFormFactory
extends FormToolkit
{
349 private BoldFontHolder2 boldFontHolder2
;
350 private MouseListener selectionMouseHandler
;
351 private FocusListener selectionFocusHandler
;
353 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
355 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
357 private final int orientation
= Window
.getDefaultOrientation();
358 private ISelectionProvider selectionProvider
;
360 /** Constant <code>EMPTY_SELECTION</code> */
361 public static ISelection EMPTY_SELECTION
= new ISelection() {
363 public boolean isEmpty() {
374 private class SelectionMouseHandler
extends MouseAdapter
{
376 public void mouseDown(MouseEvent e
) {
377 notifySelectionListeners(e
);
387 private class SelectionFocusHandler
extends FocusAdapter
{
389 public void focusGained(FocusEvent e
) {
390 notifySelectionListeners(e
);
394 private void notifySelectionListeners(TypedEvent e
) {
395 Event event
= new Event();
396 event
.widget
= e
.widget
;
397 SelectionEvent selectionEvent
= new SelectionEvent(event
);
399 for (SelectionListener listener
: selectionListenerList
) {
400 listener
.widgetSelected(selectionEvent
);
406 * Constructor for CdmFormFactory.
410 * a {@link org.eclipse.swt.widgets.Display} object.
411 * @param selectionProvider
412 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
414 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
416 this.selectionProvider
= selectionProvider
;
422 * Constructor for CdmFormFactory.
426 * a {@link org.eclipse.swt.widgets.Display} object.
428 public CdmFormFactory(Display display
) {
436 private void init() {
437 boldFontHolder2
= new BoldFontHolder2();
438 selectionMouseHandler
= new SelectionMouseHandler();
439 selectionFocusHandler
= new SelectionFocusHandler();
443 * Creates an instance initialized with the correct selectionProvider
445 * Make sure to remove the instance when the entityComposite disposes via
446 * destroySelectionArbitrator(..)
448 * @param entityElement
449 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
451 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
454 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
455 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
456 selectionArbitrator
.addSelectionProvider(selectionProvider
);
457 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
458 addSelectionListener(selectionArbitrator
);
459 return selectionArbitrator
;
464 * destroySelectionArbitrator
467 * @param selectionArbitrator
469 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
472 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
473 removeSelectionListener(selectionArbitrator
);
474 if (selectionProvider
!= null) {
475 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
477 MessagingUtils
.error(this.getClass(),
478 "Tried to destroy a selection listener from this factories listeners but was null", null);
484 * Adapts the {@link AbstractCdmFormElement}:<br>
485 * - sets the {@link IPropertyChangeListener}s handled by this class
490 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
493 public void adapt(ICdmFormElement formElement
) {
494 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
499 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
501 control
.addFocusListener(selectionFocusHandler
);
503 super.adapt(control
, trackFocus
, trackKeyboard
);
508 public void adapt(Composite composite
) {
509 composite
.addMouseListener(selectionMouseHandler
);
510 super.adapt(composite
);
519 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
522 public void destroyElement(ICdmFormElement formElement
) {
523 // return if element was not initialized
524 if (formElement
== null) {
527 // destroy selection arbitrator, if any
528 if (formElement
instanceof ISelectableElement
) {
529 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
531 // remove this element form its parents list of elements
532 // ICdmFormElement parentElement = formElement.getParentElement();
533 // if(parentElement != null){
534 // parentElement.removeElement(formElement);
536 // call destroy on child elements recursively
537 for (ICdmFormElement childElement
: formElement
.getElements()) {
538 destroyElement(childElement
);
540 // dispose of the controls
541 for (Control control
: formElement
.getControls()) {
542 // we added the layoutComposite of the parental element as the
543 // layout composite to this formElement
544 // but we do not want to destroy it.
545 if (control
.equals(formElement
.getLayoutComposite())) {
560 * a {@link org.eclipse.swt.widgets.Composite} object.
561 * @return a {@link org.eclipse.swt.widgets.Label} object.
563 public Label
createEmptyCell(Composite parent
) {
564 return this.createLabel(parent
, null);
569 * createMultiLanguageTextElement
572 * @param parentElement
573 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
576 * a {@link java.lang.String} object.
577 * @param multilanguageText
578 * a {@link java.util.Map} object.
584 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
587 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
588 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
589 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
590 multilanguageText
, textHeight
, style
);
592 parentElement
.addElement(element
);
598 * createMultiLanguageTextElement
601 * @param parentElement
602 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
605 * @param Representation
606 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
612 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
615 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
616 RepresentationElement element
= new RepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
618 parentElement
.addElement(element
);
624 * createMultiLanguageTextElement
627 * @param parentElement
628 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
631 * @param Representation
632 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
638 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
641 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
642 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
644 parentElement
.addElement(element
);
650 * createMultiLanguageTextElement
653 * @param parentElement
654 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
658 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
664 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
667 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, TermBase term
, int textHeight
, int style
, boolean fillDetails
) {
668 RepresentationElement element
= new RepresentationElement(this, parentElement
, term
, textHeight
, style
, fillDetails
);
670 parentElement
.addElement(element
);
676 * createMultiLanguageTextElement
679 * @param parentElement
680 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
684 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
690 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
693 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, TermBase term
, int textHeight
, int style
, boolean fillDetails
) {
694 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, term
, textHeight
, style
, fillDetails
);
696 parentElement
.addElement(element
);
700 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
701 KeyStatement keyStatement
, int textHeight
, int style
) {
702 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
705 parentElement
.addElement(element
);
710 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
712 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
713 * @param parentElement the parent container
714 * @param labelString the label name
715 * @param initialObject the object from which the <code>toString()</code> method is called
716 * @param style {@link SWT} style constant
717 * @return the created textfield with label
719 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
720 Object initialObject
, int style
) {
721 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
726 * createTextWithLabelElement
729 * @param parentElement
730 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
733 * a {@link java.lang.String} object.
735 * a {@link java.lang.String} object.
738 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
741 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
742 String initialText
, int style
) {
743 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
747 * createTextWithLabelElement
750 * @param parentElement
751 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
754 * a {@link java.lang.String} object.
756 * a {@link java.lang.String} object.
757 * @param textLimit maximal number of characters allowed
760 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
763 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
764 String initialText
, Integer textLimit
, int style
) {
765 if(initialText
==null){
769 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
772 parentElement
.addElement(element
);
776 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
777 int textHeight
, int style
) {
778 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
780 parentElement
.addElement(element
);
784 public LsidWithExceptionLabelElement
createLsidWithExceptionLabelElement(ICdmFormElement parentElement
, String labelString
,
785 LSID initialLsid
, int style
) {
786 LsidWithExceptionLabelElement element
= new LsidWithExceptionLabelElement(this, parentElement
, labelString
, initialLsid
, null, style
);
788 parentElement
.addElement(element
);
792 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
793 URI initialUri
, int style
) {
794 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
796 parentElement
.addElement(element
);
807 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
808 IOpenUrlEnabled openUrlEnabled
, int style
) {
809 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
812 parentElement
.addElement(element
);
818 * @param parentElement
820 * @param conversationEnabled
825 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
826 ConversationHolder conversation
, User user
, int style
) {
827 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
829 parentElement
.addElement(element
);
835 * createIntegerTextWithLabelElement
838 * @param parentElement
839 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
842 * a {@link java.lang.String} object.
843 * @param initialInteger
844 * a {@link java.lang.Integer} object.
848 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
851 public NumberWithLabelElement
createNumberTextWithLabelElement(
852 ICdmFormElement parentElement
, String labelString
,
853 Number initialNumber
, int style
) {
854 NumberWithLabelElement element
= new NumberWithLabelElement(this,
855 parentElement
, labelString
, initialNumber
, style
);
857 parentElement
.addElement(element
);
861 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
862 String labelString
, LanguageString languageString
, int style
) {
863 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
866 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
867 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
868 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
869 languageString
, height
, isMultiLine
, style
);
871 parentElement
.addElement(element
);
877 * createKeyValueViewerElement
880 * @param parentElement
881 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
884 * a {@link java.lang.String} object.
885 * @param valueHeading
886 * a {@link java.lang.String} object.
888 * a {@link java.util.Map} object.
889 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
892 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
893 String valueHeading
, Map
<Object
, Object
> map
) {
894 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
896 parentElement
.addElement(element
);
900 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
903 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
904 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
905 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
, selection
, true, style
);
907 parentElement
.addElement(element
);
911 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
913 ICdmFormElement parentElement
,
917 return this.createDefinedTermComboElement(termType
, null, parentElement
, labelString
, selection
, true, style
, false);
920 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
922 ICdmFormElement parentElement
,
925 boolean addEmptyElement
,
927 return this.createDefinedTermComboElement(termType
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, false);
929 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
931 ICdmFormElement parentElement
,
934 boolean addEmptyElement
,
936 boolean useAbbrevLabel
) {
937 return createDefinedTermComboElement(termType
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
941 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
942 TermVocabulary
<?
> termVocabulary
,
943 ICdmFormElement parentElement
,
947 return this.createDefinedTermComboElement(null, termVocabulary
, parentElement
, labelString
, selection
, true, style
, false);
950 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
951 TermVocabulary
<?
> termVocabulary
,
952 ICdmFormElement parentElement
,
955 boolean addEmptyElement
,
957 boolean useAbbrevLabel
) {
958 return createDefinedTermComboElement(null, termVocabulary
, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
961 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
963 TermVocabulary
<?
> termVocabulary
,
964 ICdmFormElement parentElement
,
967 boolean addEmptyElement
,
969 boolean useAbbrevLabel
) {
971 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
973 parentElement
.addElement(element
);
976 else if(termVocabulary
!=null){
977 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
979 parentElement
.addElement(element
);
983 //this should never happen
988 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
989 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
991 return createEnumComboElement(enumComboType
, parentElement
, null, style
);
994 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
995 Class
<T
> enumComboType
, ICdmFormElement parentElement
, Comparator
<T
> comparator
,
997 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, comparator
, style
);
999 parentElement
.addElement(element
);
1003 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
1004 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1005 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1007 parentElement
.addElement(element
);
1013 * createBrowserElement
1017 * a {@link java.net.URI} object.
1020 * @param parentElement
1021 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1023 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1026 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1027 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1029 parentElement
.addElement(element
);
1035 * createImageElement
1038 * @param parentElement
1039 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1042 * a {@link java.net.URI} object.
1045 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1047 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1048 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1050 parentElement
.addElement(element
);
1056 * createTextActionElement
1059 * @param labelString
1060 * a {@link java.lang.String} object.
1061 * @param initialText
1062 * a {@link java.lang.String} object.
1065 * @param parentElement
1066 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1068 * @param buttonLabel
1069 * a {@link java.lang.String} object.
1070 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1073 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1074 String buttonLabel
, String initialText
, int style
) {
1075 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1078 parentElement
.addElement(element
);
1087 * @param parentElement
1088 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1091 * a {@link java.lang.String} object.
1092 * @param initialState
1096 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1099 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1100 if(initialState
==null){
1101 initialState
= Boolean
.FALSE
;
1103 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1105 parentElement
.addElement(element
);
1110 * Creates a section as a part of the form.
1112 * @return the section widget
1115 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1118 public Section
adapt(AbstractFormSection section
) {
1119 section
.setMenu(section
.getLayoutComposite().getMenu());
1120 adapt(section
, true, true);
1122 // handle focus and property change events for cdm use
1123 section
.addFocusListener(selectionFocusHandler
);
1124 section
.setPropertyChangeListeners(propertyChangeListeners
);
1126 if (section
.getToggle() != null) {
1127 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1128 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1131 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1133 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1134 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1135 getColors().initializeSectionToolBarColors();
1136 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1137 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1139 // call setTitleBarForeground regardless as it also sets the label color
1140 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1144 private class BoldFontHolder2
{
1145 private Font normalFont
;
1147 private Font boldFont
;
1149 public BoldFontHolder2() {
1152 public Font
getBoldFont(Font font
) {
1153 createBoldFont(font
);
1157 private void createBoldFont(Font font
) {
1158 if (normalFont
== null || !normalFont
.equals(font
)) {
1162 if (boldFont
== null) {
1163 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1167 public void dispose() {
1168 if (boldFont
!= null) {
1169 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1177 * createToggleableTextField
1180 * @param parentElement
1181 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1183 * @param labelString
1184 * a {@link java.lang.String} object.
1185 * @param initialText
1186 * a {@link java.lang.String} object.
1187 * @param initialState
1191 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1194 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1195 String initialText
, boolean initialState
, int style
) {
1196 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1197 initialState
, style
| orientation
);
1199 parentElement
.addElement(element
);
1205 * createTimePeriodElement
1208 * @param parentElement
1209 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1211 * @param labelString
1212 * a {@link java.lang.String} object.
1214 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1217 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1220 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1221 TimePeriod timePeriod
, int style
) {
1222 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1224 parentElement
.addElement(element
);
1230 * createGatheringEventUnitElement
1233 * @param parentElement
1234 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1236 * @param labelString
1237 * a {@link java.lang.String} object.
1239 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1242 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1245 public GatheringEventUnitElement
createGatheringEventUnitElement(
1246 ICdmFormElement parentElement
,
1248 DerivedUnitFacade gatheringEvent
,
1249 MinMaxTextSection
.UnitType unitType
,
1251 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1258 parentElement
.addElement(element
);
1264 * createPointElement
1269 * @param parentElement
1270 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1273 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1274 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1276 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1277 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1279 parentElement
.addElement(element
);
1286 * @param conversationHolder
1288 * @param detailsViewer
1292 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1293 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1294 parentElement
.addElement(section
);
1301 * createDateDetailSection
1304 * @param parentElement
1305 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1309 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1312 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1313 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1314 parentElement
.addElement(section
);
1321 * createDateDetailSection
1324 * @param parentElement
1325 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1329 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1332 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1333 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1334 parentElement
.addElement(section
);
1341 * createPartialElement
1344 * @param parentElement
1345 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1347 * @param labelString
1348 * a {@link java.lang.String} object.
1350 * a {@link org.joda.time.Partial} object.
1353 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1356 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1358 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1360 parentElement
.addElement(element
);
1366 * addSelectionListener
1370 * a {@link org.eclipse.swt.events.SelectionListener} object.
1372 public void addSelectionListener(SelectionListener listener
) {
1373 selectionListenerList
.add(listener
);
1378 * removeSelectionListener
1382 * a {@link org.eclipse.swt.events.SelectionListener} object.
1384 public void removeSelectionListener(SelectionListener listener
) {
1385 if (listener
== null) {
1386 MessagingUtils
.error(this.getClass(),
1387 "Tried to remove a selection listener from this factories listeners but was null", null);
1389 selectionListenerList
.remove(listener
);
1395 * addPropertyChangeListener
1399 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1402 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1403 if (propertyChangeListeners
.contains(listener
)) {
1406 propertyChangeListeners
.add(0, listener
);
1411 * removePropertyChangeListener
1415 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1418 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1419 propertyChangeListeners
.remove(listener
);
1423 * @return the propertyChangeListeners
1425 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1426 return propertyChangeListeners
;
1431 * createHorizontalSeparator
1434 * @param parentElement
1435 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1439 * @return a {@link org.eclipse.swt.widgets.Label} object.
1441 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1442 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1443 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1449 * createVersionElement
1452 * @param parentElement
1453 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1456 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1461 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1464 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1465 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1467 parentElement
.addElement(element
);
1472 * @param cdmBaseSection
1477 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1478 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1480 parentElement
.addElement(element
);
1486 * createVersionSection
1489 * @param parentElement
1490 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1495 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1498 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1499 VersionSection section
= new VersionSection(this, parentElement
, style
);
1500 parentElement
.addElement(section
);
1510 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1511 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1512 parentElement
.addElement(section
);
1519 * createEmptyElement
1522 * @param parentElement
1523 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1525 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1527 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1528 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1530 parentElement
.addElement(element
);
1536 * createHeadlineSection
1539 * @param parentElement
1540 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1543 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1546 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1547 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1548 parentElement
.addElement(section
);
1555 * createParsingMessageElement
1558 * @param parentElement
1559 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1561 * @param parserProblem
1562 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1567 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1570 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1571 ParserProblem parserProblem
, int style
) {
1572 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1574 parentElement
.addElement(element
);
1578 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1579 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1581 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1582 selectionProvider
, style
);
1584 parentElement
.addElement(section
);
1591 * @param definedTermClass
1592 * @param formElement
1596 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1597 AbstractCdmDetailSection parentElement
, int style
) {
1598 AbstractCdmDetailElement element
= null;
1600 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1601 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1602 } else if (definedTermClass
.equals(Feature
.class)) {
1603 element
= new FeatureDetailElement(this, parentElement
);
1604 } else if(definedTermClass
.equals(PresenceAbsenceTerm
.class)){
1605 element
= new PresenceAbsenceTermDetailElement(this, parentElement
);
1607 element
= new DefinedTermDetailElement(this, parentElement
);
1612 parentElement
.addElement(element
);
1617 //--------DetailSections---------
1618 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1619 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1620 addAndAdaptSection(parentElement
, section
);
1624 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1625 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1626 addAndAdaptSection(parentElement
, section
);
1630 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1631 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1632 addAndAdaptSection(parentElement
, section
);
1636 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1637 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1638 addAndAdaptSection(parentElement
, section
);
1642 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1643 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1644 addAndAdaptSection(parentElement
, section
);
1648 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1649 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1650 addAndAdaptSection(parentElement
, section
);
1654 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1655 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1656 addAndAdaptSection(parentElement
, section
);
1660 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1661 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1662 addAndAdaptSection(parentElement
, section
);
1666 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1667 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1668 addAndAdaptSection(parentElement
, section
);
1672 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1673 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1674 addAndAdaptSection(parentElement
, section
);
1678 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1679 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1680 addAndAdaptSection(parentElement
, section
);
1684 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
1685 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
1686 addAndAdaptSection(parentElement
, section
);
1690 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1691 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1692 addAndAdaptSection(parentElement
, section
);
1696 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1697 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1698 addAndAdaptSection(parentElement
, section
);
1702 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1703 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1704 addAndAdaptSection(parentElement
, section
);
1708 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1709 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1710 addAndAdaptSection(parentElement
, section
);
1714 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1715 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1716 addAndAdaptSection(parentElement
, section
);
1720 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1721 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
1722 addAndAdaptSection(parentElement
, section
);
1726 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1727 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1728 addAndAdaptSection(parentElement
, section
);
1732 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1733 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1734 addAndAdaptSection(parentElement
, section
);
1738 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1739 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1740 addAndAdaptSection(parentElement
, section
);
1744 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1745 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1746 addAndAdaptSection(parentElement
, section
);
1750 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1751 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1752 addAndAdaptSection(parentElement
, section
);
1756 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1757 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1758 addAndAdaptSection(parentElement
, section
);
1762 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1763 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1764 addAndAdaptSection(parentElement
, section
);
1768 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1769 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1770 addAndAdaptSection(parentElement
, section
);
1774 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1775 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1776 addAndAdaptSection(parentElement
, section
);
1780 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1781 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1782 addAndAdaptSection(parentElement
, section
);
1786 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1787 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1788 addAndAdaptSection(parentElement
, section
);
1792 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1793 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1794 addAndAdaptSection(parentElement
, section
);
1798 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1799 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1800 addAndAdaptSection(parentElement
, section
);
1804 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1805 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1806 addAndAdaptSection(parentElement
, section
);
1810 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1811 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
1812 addAndAdaptSection(parentElement
, section
);
1816 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1817 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1818 addAndAdaptSection(parentElement
, section
);
1822 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1823 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1824 addAndAdaptSection(parentElement
, section
);
1828 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1829 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1830 addAndAdaptSection(parentElement
, section
);
1834 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1835 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1836 addAndAdaptSection(parentElement
, section
);
1840 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1841 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1842 addAndAdaptSection(parentElement
, section
);
1846 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1847 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1848 addAndAdaptSection(parentElement
, section
);
1852 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1853 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1854 addAndAdaptSection(parentElement
, section
);
1858 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1859 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1860 addAndAdaptSection(parentElement
, section
);
1864 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1865 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1866 addAndAdaptSection(parentElement
, section
);
1870 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1871 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1872 addAndAdaptSection(parentElement
, section
);
1876 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1877 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1878 addAndAdaptSection(parentElement
, section
);
1882 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1883 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1884 addAndAdaptSection(parentElement
, section
);
1888 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1889 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1890 addAndAdaptSection(parentElement
, section
);
1894 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1895 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1896 addAndAdaptSection(parentElement
, section
);
1900 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1901 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1902 addAndAdaptSection(parentElement
, section
);
1906 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1907 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1908 addAndAdaptSection(parentElement
, section
);
1912 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1913 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1914 addAndAdaptSection(parentElement
, section
);
1918 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1919 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1920 addAndAdaptSection(parentElement
, section
);
1924 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1925 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1926 addAndAdaptSection(parentElement
, section
);
1930 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1931 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1932 addAndAdaptSection(parentElement
, section
);
1936 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1937 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1938 addAndAdaptSection(parentElement
, section
);
1942 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1943 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1944 addAndAdaptSection(parentElement
, section
);
1948 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1949 parentElement
.addElement(section
);
1953 //--------DetailElements------------
1955 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1956 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1957 addAndAdaptElement(parentElement
, element
);
1961 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1962 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1963 addAndAdaptElement(parentElement
, element
);
1967 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1968 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1969 addAndAdaptElement(parentElement
, element
);
1973 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1974 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1975 addAndAdaptElement(parentElement
, element
);
1979 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1980 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1981 addAndAdaptElement(parentElement
, element
);
1985 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1986 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1987 addAndAdaptElement(parentElement
, element
);
1991 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1992 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1993 addAndAdaptElement(parentElement
, element
);
1997 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1998 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1999 addAndAdaptElement(parentElement
, element
);
2003 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
2004 UserDetailElement element
= new UserDetailElement(this, parentElement
);
2005 addAndAdaptElement(parentElement
, element
);
2009 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2010 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2011 addAndAdaptElement(parentElement
, element
);
2015 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2016 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2017 addAndAdaptElement(parentElement
, element
);
2021 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2022 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2023 addAndAdaptElement(parentElement
, element
);
2027 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2028 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2029 addAndAdaptElement(parentElement
, element
);
2033 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2034 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2035 addAndAdaptElement(parentElement
, element
);
2039 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2040 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2042 parentElement
.addElement(element
);
2047 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2048 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2049 addAndAdaptElement(parentElement
, element
);
2053 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2054 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2055 addAndAdaptElement(parentElement
, element
);
2059 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2060 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2061 addAndAdaptElement(parentElement
, element
);
2065 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2066 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2067 addAndAdaptElement(parentElement
, element
);
2071 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2072 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2073 addAndAdaptElement(parentElement
, element
);
2077 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2078 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2079 addAndAdaptElement(parentElement
, element
);
2083 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2084 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2085 addAndAdaptElement(parentElement
, element
);
2089 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2090 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2091 addAndAdaptElement(parentElement
, element
);
2095 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2096 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2097 addAndAdaptElement(parentElement
, element
);
2101 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2102 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2103 addAndAdaptElement(parentElement
, element
);
2107 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2108 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2109 addAndAdaptElement(parentElement
, element
);
2113 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2114 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2115 addAndAdaptElement(parentElement
, element
);
2119 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2120 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2121 addAndAdaptElement(parentElement
, element
);
2125 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
, boolean isWizard
){
2126 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
, isWizard
);
2127 addAndAdaptElement(parentElement
, element
);
2131 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2132 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2133 addAndAdaptElement(parentElement
, element
);
2138 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2139 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2140 addAndAdaptElement(parentElement
, element
);
2144 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2145 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2146 addAndAdaptElement(parentElement
, element
);
2150 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2151 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2152 addAndAdaptElement(parentElement
, element
);
2156 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2157 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2158 addAndAdaptElement(parentElement
, element
);
2162 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2163 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2164 addAndAdaptElement(parentElement
, element
);
2168 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2169 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2170 addAndAdaptElement(parentElement
, element
);
2174 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2175 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2176 addAndAdaptElement(parentElement
, element
);
2180 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2181 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2182 addAndAdaptElement(parentElement
, element
);
2186 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2187 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2188 addAndAdaptElement(parentElement
, element
);
2192 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2193 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2194 addAndAdaptElement(parentElement
, element
);
2198 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2199 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2200 addAndAdaptElement(parentElement
, element
);
2204 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2205 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2206 addAndAdaptElement(parentElement
, element
);
2210 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2211 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2212 addAndAdaptElement(parentElement
, element
);
2216 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2217 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2218 addAndAdaptElement(parentElement
, element
);
2222 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2223 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2224 addAndAdaptElement(parentElement
, element
);
2228 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2229 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2230 addAndAdaptElement(parentElement
, element
);
2234 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2235 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2236 addAndAdaptElement(parentElement
, mediaDetailElement
);
2237 return mediaDetailElement
;
2240 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2241 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2242 addAndAdaptElement(parentElement
, element
);
2246 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2247 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2248 addAndAdaptElement(parentElement
, element
);
2252 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2253 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2254 addAndAdaptElement(parentElement
, element
);
2258 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2259 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2260 addAndAdaptElement(parentElement
, element
);
2264 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2265 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2266 addAndAdaptElement(parentElement
, element
);
2270 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2271 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2272 addAndAdaptElement(parentElement
, element
);
2276 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2277 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2278 addAndAdaptElement(parentElement
, element
);
2282 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2283 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2284 addAndAdaptElement(parentElement
, element
);
2289 * @param parentElement
2292 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2294 parentElement
.addElement(element
);
2297 //--------EntityCollectionSection----------
2298 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2299 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2300 addAndAdaptSection(parentElement
, section
);
2304 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2305 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2306 addAndAdaptSection(parentElement
, section
);
2310 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2311 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2312 addAndAdaptSection(parentElement
, section
);
2316 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2317 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2318 addAndAdaptSection(parentElement
, section
);
2322 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2323 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2324 addAndAdaptSection(parentElement
, section
);
2328 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2329 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2330 addAndAdaptSection(parentElement
, section
);
2334 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2335 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2336 addAndAdaptSection(parentElement
, section
);
2340 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2341 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2342 addAndAdaptSection(parentElement
, section
);
2346 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2347 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2348 addAndAdaptSection(parentElement
, section
);
2352 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2353 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2354 addAndAdaptSection(parentElement
, section
);
2358 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2359 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2360 addAndAdaptSection(parentElement
, section
);
2364 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2365 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2366 addAndAdaptSection(parentElement
, section
);
2370 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2371 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2372 addAndAdaptSection(parentElement
, section
);
2376 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2377 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2378 addAndAdaptSection(parentElement
, section
);
2382 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2383 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2384 addAndAdaptSection(parentElement
, section
);
2388 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2389 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2390 addAndAdaptSection(parentElement
, section
);
2394 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2395 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2396 addAndAdaptSection(parentElement
, section
);
2400 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2401 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2402 addAndAdaptSection(parentElement
, section
);
2406 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2407 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2408 addAndAdaptSection(parentElement
, section
);
2412 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2413 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2414 addAndAdaptSection(parentElement
, section
);
2418 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2419 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2420 addAndAdaptSection(parentElement
, section
);
2424 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2425 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2426 addAndAdaptSection(parentElement
, section
);
2430 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2431 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2432 addAndAdaptSection(parentElement
, section
);
2436 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2437 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2438 addAndAdaptSection(parentElement
, section
);
2442 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2443 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2444 addAndAdaptSection(parentElement
, section
);
2448 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2449 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2450 addAndAdaptSection(parentElement
, section
);
2454 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2455 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2456 addAndAdaptSection(parentElement
, section
);
2460 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2461 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2462 addAndAdaptSection(parentElement
, section
);
2466 public GeoScopePolyKeyDetailSection
createGeoScopePolyKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2467 GeoScopePolyKeyDetailSection section
= new GeoScopePolyKeyDetailSection(this, conversation
, parentElement
, style
);
2468 addAndAdaptSection(parentElement
, section
);
2472 public IdentifierSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2473 IdentifierSection section
= new IdentifierSection(this, conversation
, parentElement
, style
);
2474 addAndAdaptSection(parentElement
, section
);
2478 public DerivedUnitFacadeIdentifierSection
createDerivedUnitFacadeIdentifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2479 DerivedUnitFacadeIdentifierSection section
= new DerivedUnitFacadeIdentifierSection(this, conversation
, parentElement
, style
);
2480 addAndAdaptSection(parentElement
, section
);
2484 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2485 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2486 addAndAdaptSection(parentElement
, section
);
2490 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2491 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2492 addAndAdaptSection(parentElement
, section
);
2496 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2497 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2498 addAndAdaptSection(parentElement
, section
);
2502 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2503 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2504 addAndAdaptSection(parentElement
, section
);
2508 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2509 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2510 addAndAdaptSection(parentElement
, section
);
2514 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2515 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2516 addAndAdaptSection(parentElement
, section
);
2520 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2521 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2522 addAndAdaptSection(parentElement
, section
);
2526 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2527 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2528 addAndAdaptSection(parentElement
, section
);
2532 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2533 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2534 addAndAdaptSection(parentElement
, section
);
2538 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2539 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2540 addAndAdaptSection(parentElement
, section
);
2544 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2545 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2546 addAndAdaptSection(parentElement
, section
);
2550 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2551 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2552 addAndAdaptSection(parentElement
, section
);
2556 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2557 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2558 addAndAdaptSection(parentElement
, section
);
2563 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2564 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2565 AbstractEntityCollectionElement element
= null;
2567 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2569 if (entity
instanceof Annotation
) {
2570 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2571 }else if (entity
instanceof Person
) {
2572 boolean isNomenclatural
= false;
2573 if (parentElement
instanceof TeamMemberSection
){
2574 isNomenclatural
= ((TeamMemberSection
) parentElement
).isNomenclaturalTeam();
2576 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
, isNomenclatural
);
2577 } else if (entity
instanceof Credit
) {
2578 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2579 } else if (entity
instanceof Extension
) {
2580 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2581 } else if (entity
instanceof Marker
) {
2582 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2583 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2584 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
, removeListener
, backgroundColor
, style
);
2585 }else if (entity
instanceof Media
) {
2586 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2587 } else if (entity
instanceof MediaRepresentation
) {
2588 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2590 } else if (entity
instanceof ImageFile
) {
2591 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2592 } else if (entity
instanceof MediaRepresentationPart
) {
2593 element
= new MediaRepresentationPartElement
<>(this, parentElement
, (MediaRepresentationPart
) entity
,
2594 removeListener
, style
);
2595 } else if (entity
instanceof NomenclaturalStatus
) {
2596 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2598 } else if (entity
instanceof Rights
) {
2599 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2600 } else if (entity
instanceof DescriptionElementSource
) {
2601 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2602 removeListener
, style
);
2603 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2604 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
,
2605 removeListener
,backgroundColor
, style
);
2607 else if (entity
instanceof IdentifiableSource
) {
2608 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2610 } else if (entity
instanceof DefinedTerm
) {
2611 switch(((DefinedTerm
)entity
).getTermType()) {
2613 element
= new ScopeElement(this,
2615 (DefinedTerm
) entity
,
2620 element
= new ModifierElement(this,
2622 (DefinedTerm
) entity
,
2630 } else if (entity
instanceof Reference
) {
2631 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2632 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2635 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2637 } else if (entity
instanceof NameTypeDesignation
) {
2638 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2640 } else if (entity
instanceof NameRelationship
) {
2641 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2643 } else if (entity
instanceof SpecimenTypeDesignation
) {
2644 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
2645 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2646 removeListener
, style
);
2649 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2650 removeListener
, style
);
2652 } else if (entity
instanceof StateData
) {
2653 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2654 } else if (entity
instanceof StatisticalMeasurementValue
) {
2655 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2656 removeListener
, style
);
2657 } else if (entity
instanceof DerivedUnit
) {
2658 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2659 case LivingSpecimen
:
2660 case PreservedSpecimen
:
2662 element
= new SpecimenCollectionDetailElement(this,
2664 (DerivedUnit
) entity
,
2669 element
= new DerivedUnitElement(this,
2671 (DerivedUnit
) entity
,
2676 } else if (entity
instanceof NamedArea
) {
2677 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2678 } else if (entity
instanceof DeterminationEvent
) {
2679 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2680 } else if (entity
instanceof User
) {
2681 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2682 } else if (entity
instanceof GrantedAuthority
) {
2683 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
, ((Group
)parentElement
.getEntity()),
2684 removeListener
, style
);
2685 } else if (entity
instanceof Group
) {
2686 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2687 } else if (entity
instanceof Taxon
) {
2688 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2689 } else if (entity
instanceof DescriptionElementBase
) {
2690 // this is the special case for protologs, maybe we can do this
2691 // differently when API improves
2692 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2693 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2694 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2696 } else if (entity
instanceof Identifier
) {
2697 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2698 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2701 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2703 } else if (entity
instanceof TermVocabulary
) {
2704 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
2705 switch (termVocabulary
.getTermType()) {
2707 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2710 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
2715 } else if (entity
instanceof MeasurementUnit
) {
2716 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2717 } else if (entity
instanceof StatisticalMeasure
) {
2718 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
2721 //check for parent section when entity is null
2722 //this happens when AbstractUnboundEntityCollectionSection is used
2724 if(parentElement
instanceof ScopeSection
|| parentElement
instanceof ScopeRestrictionSection
){
2725 element
= new ScopeElement(this,
2727 (DefinedTerm
) entity
,
2731 else if(parentElement
instanceof ModifierSection
){
2732 element
= new ModifierElement(this,
2734 (DefinedTerm
) entity
,
2741 if (element
== null) {
2742 MessagingUtils
.messageDialog("No element for entity", this,
2743 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2748 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2749 element
.setPersistentBackground(backgroundColor
);
2752 parentElement
.addElement(element
);
2760 * Creates a selection element for the given type T.
2763 * <strong>Selection elements not handled by this method:</strong>
2765 * <li>{@link TaxonNodeSelectionElement} see
2766 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2768 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2769 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2775 * a {@link Class} object of the type that you want the selection
2777 * @param parentElement
2778 * a {@link ICdmFormElement} object.
2779 * @param labelString
2780 * a {@link String} object.
2781 * @param selectionType
2783 * a {@link ICdmBase} object.
2786 * @param conversation
2787 * a {@link ConversationHolder} object.
2788 * @return a {@link EntitySelectionElement} object.
2790 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2791 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2792 int style
, boolean filterElement
) {
2793 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2794 labelString
, selection
, mode
, style
, filterElement
);
2796 parentElement
.addElement(element
);
2800 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2801 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2803 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2804 labelString
, selection
, mode
, style
);
2806 parentElement
.addElement(element
);
2812 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
2815 * <strong>Selection elements not handled by this method:</strong>
2817 * <li>{@link TaxonNodeSelectionElement} see
2818 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2820 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2821 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2827 * a {@link Class} object of the type that you want the selection
2829 * @param parentElement
2830 * a {@link ICdmFormElement} object.
2831 * @param labelString
2832 * a {@link String} object.
2833 * @param selectionType
2835 * a {@link ICdmBase} object.
2838 * @param conversation
2839 * a {@link ConversationHolder} object.
2840 * @return a {@link EntitySelectionElement} object.
2842 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
2843 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
2844 T selection
, int mode
, int style
) {
2845 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, conversation
, parentElement
, clazz
,
2846 labelString
, selection
, mode
, style
);
2848 parentElement
.addElement(element
);
2852 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2853 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2854 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2855 labelString
, selection
, mode
, style
);
2857 parentElement
.addElement(element
);
2861 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
2862 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
2863 // int mode, int style) {
2864 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
2865 // conversation, parentElement, labelString, selection, mode, style);
2867 // parentElement.addElement(element);
2871 /** {@inheritDoc} */
2872 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2873 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2874 adapt(labelElement
);
2875 parentElement
.addElement(labelElement
);
2876 return labelElement
;
2879 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2880 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2881 label
.setText(labelText
+" (yyyy-MM-dd)");
2882 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2883 dateElement
.initController(this, formElement
);
2889 * Getter for the field <code>selectionProvider</code>.
2892 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2894 public ISelectionProvider
getSelectionProvider() {
2895 return selectionProvider
;
2900 * createDetailedDescriptionDetailElement
2903 * @param parentElement
2904 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2908 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2913 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2916 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2917 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2918 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2920 if (entity
instanceof CategoricalData
) {
2921 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2922 (CategoricalData
) entity
, style
);
2923 } else if (entity
instanceof CommonTaxonName
) {
2924 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2926 } else if (entity
instanceof Distribution
) {
2927 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2929 } else if (entity
instanceof IndividualsAssociation
) {
2930 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2931 (IndividualsAssociation
) entity
, style
);
2932 } else if (entity
instanceof QuantitativeData
) {
2933 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2934 (QuantitativeData
) entity
, style
);
2935 } else if (entity
instanceof TaxonInteraction
) {
2936 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2937 (TaxonInteraction
) entity
, style
);
2938 } else if (entity
instanceof TextData
) {
2939 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2941 throw new IllegalStateException("There is no interface for the given description element");
2943 adapt(detailedDescriptionElement
);
2944 parentElement
.addElement(detailedDescriptionElement
);
2945 return detailedDescriptionElement
;
2950 * Creates a styled text as a part of the form.
2955 * the text initial value
2958 * @return the text widget
2960 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2961 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2962 if (value
!= null) {
2963 text
.setText(value
);
2965 text
.setForeground(getColors().getForeground());
2966 text
.setBackground(getColors().getBackground());
2967 // text.addFocusListener(visibilityHandler);
2971 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2972 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2973 addAndAdaptSection(parentElement
, section
);
2978 * @param formElement
2979 * @param conversationHolder
2983 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
2984 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
2985 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
2986 addAndAdaptSection(formElement
, section
);