4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
7 import java
.util
.ArrayList
;
8 import java
.util
.HashSet
;
13 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
14 import org
.eclipse
.jface
.viewers
.ISelection
;
15 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
16 import org
.eclipse
.jface
.window
.Window
;
17 import org
.eclipse
.swt
.SWT
;
18 import org
.eclipse
.swt
.custom
.StyledText
;
19 import org
.eclipse
.swt
.events
.FocusAdapter
;
20 import org
.eclipse
.swt
.events
.FocusEvent
;
21 import org
.eclipse
.swt
.events
.FocusListener
;
22 import org
.eclipse
.swt
.events
.MouseAdapter
;
23 import org
.eclipse
.swt
.events
.MouseEvent
;
24 import org
.eclipse
.swt
.events
.MouseListener
;
25 import org
.eclipse
.swt
.events
.SelectionEvent
;
26 import org
.eclipse
.swt
.events
.SelectionListener
;
27 import org
.eclipse
.swt
.events
.TypedEvent
;
28 import org
.eclipse
.swt
.graphics
.Color
;
29 import org
.eclipse
.swt
.graphics
.Font
;
30 import org
.eclipse
.swt
.widgets
.Composite
;
31 import org
.eclipse
.swt
.widgets
.Control
;
32 import org
.eclipse
.swt
.widgets
.Display
;
33 import org
.eclipse
.swt
.widgets
.Event
;
34 import org
.eclipse
.swt
.widgets
.Label
;
35 import org
.eclipse
.ui
.forms
.IFormColors
;
36 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
37 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
38 import org
.eclipse
.ui
.forms
.widgets
.Section
;
39 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
40 import org
.joda
.time
.Partial
;
41 import org
.springframework
.security
.core
.GrantedAuthority
;
43 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
44 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
45 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
46 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
47 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
48 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
49 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
50 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
51 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
52 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
53 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
54 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
55 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
56 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
57 import eu
.etaxonomy
.cdm
.model
.common
.IEnumTerm
;
58 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
59 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
60 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
61 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
62 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
63 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
64 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
65 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
66 import eu
.etaxonomy
.cdm
.model
.common
.User
;
67 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
68 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
69 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
70 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
71 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
72 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
73 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
74 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
75 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
76 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
77 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
78 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
79 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
80 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
81 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
82 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
83 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
84 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
85 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
86 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
87 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
88 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
89 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
90 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
91 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
92 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
93 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
94 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
95 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
96 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
97 import eu
.etaxonomy
.cdm
.model
.taxon
.SynonymRelationship
;
98 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
99 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
100 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
101 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
102 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
103 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
104 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
105 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
106 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
107 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
108 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
109 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
110 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
111 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
116 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.LivingPlantPhotoGeneralDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.LivingPlantPhotoGeneralDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.SpecimenScanGeneralDetailElement
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.SpecimenScanGeneralDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
310 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
314 * CdmFormFactory class.
318 * @created Feb 24, 2010
321 public class CdmFormFactory
extends FormToolkit
{
323 private BoldFontHolder2 boldFontHolder2
;
324 private MouseListener selectionMouseHandler
;
325 private FocusListener selectionFocusHandler
;
327 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
329 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
331 private final int orientation
= Window
.getDefaultOrientation();
332 private ISelectionProvider selectionProvider
;
334 /** Constant <code>EMPTY_SELECTION</code> */
335 public static ISelection EMPTY_SELECTION
= new ISelection() {
337 public boolean isEmpty() {
348 private class SelectionMouseHandler
extends MouseAdapter
{
350 public void mouseDown(MouseEvent e
) {
351 notifySelectionListeners(e
);
361 private class SelectionFocusHandler
extends FocusAdapter
{
363 public void focusGained(FocusEvent e
) {
364 notifySelectionListeners(e
);
368 private void notifySelectionListeners(TypedEvent e
) {
369 Event event
= new Event();
370 event
.widget
= e
.widget
;
371 SelectionEvent selectionEvent
= new SelectionEvent(event
);
373 for (SelectionListener listener
: selectionListenerList
) {
374 listener
.widgetSelected(selectionEvent
);
380 * Constructor for CdmFormFactory.
384 * a {@link org.eclipse.swt.widgets.Display} object.
385 * @param selectionProvider
386 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
388 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
390 this.selectionProvider
= selectionProvider
;
396 * Constructor for CdmFormFactory.
400 * a {@link org.eclipse.swt.widgets.Display} object.
402 public CdmFormFactory(Display display
) {
410 private void init() {
411 boldFontHolder2
= new BoldFontHolder2();
412 selectionMouseHandler
= new SelectionMouseHandler();
413 selectionFocusHandler
= new SelectionFocusHandler();
417 * Creates an instance initialized with the correct selectionProvider
419 * Make sure to remove the instance when the entityComposite disposes via
420 * destroySelectionArbitrator(..)
422 * @param entityElement
423 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
425 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
428 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
429 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
430 selectionArbitrator
.addSelectionProvider(selectionProvider
);
431 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
432 addSelectionListener(selectionArbitrator
);
433 return selectionArbitrator
;
438 * destroySelectionArbitrator
441 * @param selectionArbitrator
443 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
446 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
447 removeSelectionListener(selectionArbitrator
);
448 if (selectionProvider
!= null) {
449 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
451 MessagingUtils
.error(this.getClass(),
452 "Tried to destroy a selection listener from this factories listeners but was null", null);
458 * Adapts the {@link AbstractCdmFormElement}:<br>
459 * - sets the {@link IPropertyChangeListener}s handled by this class
464 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
467 public void adapt(ICdmFormElement formElement
) {
468 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
473 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
475 control
.addFocusListener(selectionFocusHandler
);
477 super.adapt(control
, trackFocus
, trackKeyboard
);
482 public void adapt(Composite composite
) {
483 composite
.addMouseListener(selectionMouseHandler
);
484 super.adapt(composite
);
493 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
496 public void destroyElement(ICdmFormElement formElement
) {
497 // return if element was not initialized
498 if (formElement
== null) {
501 // destroy selection arbitrator, if any
502 if (formElement
instanceof ISelectableElement
) {
503 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
505 // remove this element form its parents list of elements
506 // ICdmFormElement parentElement = formElement.getParentElement();
507 // if(parentElement != null){
508 // parentElement.removeElement(formElement);
510 // call destroy on child elements recursively
511 for (ICdmFormElement childElement
: formElement
.getElements()) {
512 destroyElement(childElement
);
514 // dispose of the controls
515 for (Control control
: formElement
.getControls()) {
516 // we added the layoutComposite of the parental element as the
517 // layout composite to this formElement
518 // but we do not want to destroy it.
519 if (control
.equals(formElement
.getLayoutComposite())) {
534 * a {@link org.eclipse.swt.widgets.Composite} object.
535 * @return a {@link org.eclipse.swt.widgets.Label} object.
537 public Label
createEmptyCell(Composite parent
) {
538 return this.createLabel(parent
, null);
543 * createMultiLanguageTextElement
546 * @param parentElement
547 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
550 * a {@link java.lang.String} object.
551 * @param multilanguageText
552 * a {@link java.util.Map} object.
558 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
561 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
562 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
563 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
564 multilanguageText
, textHeight
, style
);
566 parentElement
.addElement(element
);
570 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
571 KeyStatement keyStatement
, int textHeight
, int style
) {
572 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
575 parentElement
.addElement(element
);
580 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
582 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
583 * @param parentElement the parent container
584 * @param labelString the label name
585 * @param initialObject the object from which the <code>toString()</code> method is called
586 * @param style {@link SWT} style constant
587 * @return the created textfield with label
589 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
590 Object initialObject
, int style
) {
591 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
596 * createTextWithLabelElement
599 * @param parentElement
600 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
603 * a {@link java.lang.String} object.
605 * a {@link java.lang.String} object.
608 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
611 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
612 String initialText
, int style
) {
613 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
617 * createTextWithLabelElement
620 * @param parentElement
621 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
624 * a {@link java.lang.String} object.
626 * a {@link java.lang.String} object.
627 * @param textLimit maximal number of characters allowed
630 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
633 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
634 String initialText
, Integer textLimit
, int style
) {
635 if(initialText
==null){
639 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
642 parentElement
.addElement(element
);
646 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
647 int textHeight
, int style
) {
648 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
650 parentElement
.addElement(element
);
654 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
655 URI initialUri
, int style
) {
656 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
658 parentElement
.addElement(element
);
669 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
670 IOpenUrlEnabled openUrlEnabled
, int style
) {
671 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
674 parentElement
.addElement(element
);
680 * @param parentElement
682 * @param conversationEnabled
687 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
688 ConversationHolder conversation
, User user
, int style
) {
689 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
691 parentElement
.addElement(element
);
697 * createIntegerTextWithLabelElement
700 * @param parentElement
701 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
704 * a {@link java.lang.String} object.
705 * @param initialInteger
706 * a {@link java.lang.Integer} object.
710 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
713 public NumberWithLabelElement
createNumberTextWithLabelElement(
714 ICdmFormElement parentElement
, String labelString
,
715 Number initialNumber
, int style
) {
716 NumberWithLabelElement element
= new NumberWithLabelElement(this,
717 parentElement
, labelString
, initialNumber
, style
);
719 parentElement
.addElement(element
);
725 * createLanguageStringWithLabelElement
728 * @param parentElement
729 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
732 * a {@link java.lang.String} object.
733 * @param languageString
734 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
738 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
741 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
742 String labelString
, LanguageString languageString
, int style
) {
743 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
744 languageString
, style
);
746 parentElement
.addElement(element
);
752 * createLanguageStringWithLabelElement
755 * @param parentElement
756 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
759 * a {@link java.lang.String} object.
760 * @param languageString
761 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
767 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
770 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
771 String labelString
, LanguageString languageString
, int height
, int style
) {
772 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
773 languageString
, height
, style
);
775 parentElement
.addElement(element
);
782 * createKeyValueViewerElement
785 * @param parentElement
786 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
789 * a {@link java.lang.String} object.
790 * @param valueHeading
791 * a {@link java.lang.String} object.
793 * a {@link java.util.Map} object.
794 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
797 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
798 String valueHeading
, Map
<Object
, Object
> map
) {
799 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
801 parentElement
.addElement(element
);
807 * createTermComboElement
810 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
811 * @param termComboType
813 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
815 * @param parentElement
816 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
819 * a {@link java.lang.String} object.
821 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
825 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
829 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
830 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
831 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
834 parentElement
.addElement(element
);
840 * createTermComboElement
843 * @param termComboType
845 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
847 * @param parentElement
848 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
851 * a {@link java.lang.String} object.
853 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
857 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
861 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
863 ICdmFormElement parentElement
,
867 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
869 parentElement
.addElement(element
);
875 * createTermComboElement
878 * @param termComboType
880 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
882 * @param parentElement
883 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
886 * a {@link java.lang.String} object.
888 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
892 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
896 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
897 TermVocabulary
<?
> termVocabulary
,
898 ICdmFormElement parentElement
,
902 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, style
);
904 parentElement
.addElement(element
);
910 * createEnumComboElement
913 * @param enumComboType
915 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
917 * @param parentElement
918 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
922 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
925 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
926 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
928 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
930 parentElement
.addElement(element
);
936 * createBrowserElement
940 * a {@link java.net.URI} object.
943 * @param parentElement
944 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
946 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
949 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
950 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
952 parentElement
.addElement(element
);
961 * @param parentElement
962 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
965 * a {@link java.net.URI} object.
968 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
970 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
971 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
973 parentElement
.addElement(element
);
979 * createTextActionElement
983 * a {@link java.lang.String} object.
985 * a {@link java.lang.String} object.
988 * @param parentElement
989 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
992 * a {@link java.lang.String} object.
993 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
996 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
997 String buttonLabel
, String initialText
, int style
) {
998 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1001 parentElement
.addElement(element
);
1010 * @param parentElement
1011 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1014 * a {@link java.lang.String} object.
1015 * @param initialState
1019 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1022 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1023 if(initialState
==null){
1024 initialState
= Boolean
.FALSE
;
1026 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1028 parentElement
.addElement(element
);
1033 * Creates a section as a part of the form.
1035 * @return the section widget
1038 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1041 public Section
adapt(AbstractFormSection section
) {
1042 section
.setMenu(section
.getLayoutComposite().getMenu());
1043 adapt(section
, true, true);
1045 // handle focus and property change events for cdm use
1046 section
.addFocusListener(selectionFocusHandler
);
1047 section
.setPropertyChangeListeners(propertyChangeListeners
);
1049 if (section
.getToggle() != null) {
1050 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1051 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1054 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1056 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1057 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1058 getColors().initializeSectionToolBarColors();
1059 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1060 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1062 // call setTitleBarForeground regardless as it also sets the label color
1063 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1067 private class BoldFontHolder2
{
1068 private Font normalFont
;
1070 private Font boldFont
;
1072 public BoldFontHolder2() {
1075 public Font
getBoldFont(Font font
) {
1076 createBoldFont(font
);
1080 private void createBoldFont(Font font
) {
1081 if (normalFont
== null || !normalFont
.equals(font
)) {
1085 if (boldFont
== null) {
1086 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1090 public void dispose() {
1091 if (boldFont
!= null) {
1092 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1100 * createToggleableTextField
1103 * @param parentElement
1104 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1106 * @param labelString
1107 * a {@link java.lang.String} object.
1108 * @param initialText
1109 * a {@link java.lang.String} object.
1110 * @param initialState
1114 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1117 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1118 String initialText
, boolean initialState
, int style
) {
1119 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1120 initialState
, style
| orientation
);
1122 parentElement
.addElement(element
);
1128 * createTimePeriodElement
1131 * @param parentElement
1132 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1134 * @param labelString
1135 * a {@link java.lang.String} object.
1137 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1140 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1143 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1144 TimePeriod timePeriod
, int style
) {
1145 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1147 parentElement
.addElement(element
);
1153 * createGatheringEventUnitElement
1156 * @param parentElement
1157 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1159 * @param labelString
1160 * a {@link java.lang.String} object.
1162 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1165 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1168 public GatheringEventUnitElement
createGatheringEventUnitElement(
1169 ICdmFormElement parentElement
,
1171 DerivedUnitFacade gatheringEvent
,
1172 MinMaxTextSection
.UnitType unitType
,
1174 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1181 parentElement
.addElement(element
);
1187 * createPointElement
1192 * @param parentElement
1193 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1196 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1197 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1199 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1200 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1202 parentElement
.addElement(element
);
1209 * @param conversationHolder
1211 * @param detailsViewer
1215 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1216 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1217 parentElement
.addElement(section
);
1224 * createDateDetailSection
1227 * @param parentElement
1228 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1232 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1235 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1236 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1237 parentElement
.addElement(section
);
1244 * createDateDetailSection
1247 * @param parentElement
1248 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1252 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1255 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1256 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1257 parentElement
.addElement(section
);
1264 * createPartialElement
1267 * @param parentElement
1268 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1270 * @param labelString
1271 * a {@link java.lang.String} object.
1273 * a {@link org.joda.time.Partial} object.
1276 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1279 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1281 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1283 parentElement
.addElement(element
);
1289 * addSelectionListener
1293 * a {@link org.eclipse.swt.events.SelectionListener} object.
1295 public void addSelectionListener(SelectionListener listener
) {
1296 selectionListenerList
.add(listener
);
1301 * removeSelectionListener
1305 * a {@link org.eclipse.swt.events.SelectionListener} object.
1307 public void removeSelectionListener(SelectionListener listener
) {
1308 if (listener
== null) {
1309 MessagingUtils
.error(this.getClass(),
1310 "Tried to remove a selection listener from this factories listeners but was null", null);
1312 selectionListenerList
.remove(listener
);
1318 * addPropertyChangeListener
1322 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1325 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1326 if (propertyChangeListeners
.contains(listener
)) {
1329 propertyChangeListeners
.add(0, listener
);
1334 * removePropertyChangeListener
1338 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1341 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1342 propertyChangeListeners
.remove(listener
);
1346 * @return the propertyChangeListeners
1348 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1349 return propertyChangeListeners
;
1354 * createHorizontalSeparator
1357 * @param parentElement
1358 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1362 * @return a {@link org.eclipse.swt.widgets.Label} object.
1364 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1365 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1366 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1372 * createVersionElement
1375 * @param parentElement
1376 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1379 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1384 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1387 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1388 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1390 parentElement
.addElement(element
);
1395 * @param cdmBaseSection
1400 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1401 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1403 parentElement
.addElement(element
);
1409 * createVersionSection
1412 * @param parentElement
1413 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1418 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1421 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1422 VersionSection section
= new VersionSection(this, parentElement
, style
);
1423 parentElement
.addElement(section
);
1433 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1434 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1435 parentElement
.addElement(section
);
1442 * createEmptyElement
1445 * @param parentElement
1446 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1448 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1450 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1451 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1453 parentElement
.addElement(element
);
1459 * createHeadlineSection
1462 * @param parentElement
1463 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1466 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1469 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1470 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1471 parentElement
.addElement(section
);
1478 * createParsingMessageElement
1481 * @param parentElement
1482 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1484 * @param parserProblem
1485 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1490 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1493 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1494 ParserProblem parserProblem
, int style
) {
1495 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1497 parentElement
.addElement(element
);
1501 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1502 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1504 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1505 selectionProvider
, style
);
1507 parentElement
.addElement(section
);
1514 * @param definedTermClass
1515 * @param formElement
1519 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1520 AbstractCdmDetailSection parentElement
, int style
) {
1521 AbstractCdmDetailElement element
= null;
1523 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1524 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1525 } else if (definedTermClass
.equals(Feature
.class)) {
1526 element
= new FeatureDetailElement(this, parentElement
);
1528 element
= new DefinedTermDetailElement(this, parentElement
);
1532 parentElement
.addElement(element
);
1537 //--------DetailSections---------
1538 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1539 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1540 addAndAdaptSection(parentElement
, section
);
1544 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1545 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1546 addAndAdaptSection(parentElement
, section
);
1550 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1551 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1552 addAndAdaptSection(parentElement
, section
);
1556 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1557 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1558 addAndAdaptSection(parentElement
, section
);
1562 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1563 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1564 addAndAdaptSection(parentElement
, section
);
1568 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1569 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1570 addAndAdaptSection(parentElement
, section
);
1574 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1575 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1576 addAndAdaptSection(parentElement
, section
);
1580 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1581 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1582 addAndAdaptSection(parentElement
, section
);
1586 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1587 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1588 addAndAdaptSection(parentElement
, section
);
1592 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1593 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1594 addAndAdaptSection(parentElement
, section
);
1598 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1599 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1600 addAndAdaptSection(parentElement
, section
);
1604 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1605 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1606 addAndAdaptSection(parentElement
, section
);
1610 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1611 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1612 addAndAdaptSection(parentElement
, section
);
1616 public DerivedUnitFacadeDetailSection
createDerivedUnitFacadeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1617 DerivedUnitFacadeDetailSection section
= new DerivedUnitFacadeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1618 addAndAdaptSection(parentElement
, section
);
1622 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1623 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1624 addAndAdaptSection(parentElement
, section
);
1628 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1629 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1630 addAndAdaptSection(parentElement
, section
);
1634 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1635 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1636 addAndAdaptSection(parentElement
, section
);
1640 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1641 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1642 addAndAdaptSection(parentElement
, section
);
1646 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1647 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1648 addAndAdaptSection(parentElement
, section
);
1652 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1653 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1654 addAndAdaptSection(parentElement
, section
);
1658 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1659 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1660 addAndAdaptSection(parentElement
, section
);
1664 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1665 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1666 addAndAdaptSection(parentElement
, section
);
1670 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1671 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1672 addAndAdaptSection(parentElement
, section
);
1676 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1677 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1678 addAndAdaptSection(parentElement
, section
);
1682 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1683 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1684 addAndAdaptSection(parentElement
, section
);
1688 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1689 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1690 addAndAdaptSection(parentElement
, section
);
1694 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1695 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1696 addAndAdaptSection(parentElement
, section
);
1700 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1701 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1702 addAndAdaptSection(parentElement
, section
);
1706 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1707 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1708 addAndAdaptSection(parentElement
, section
);
1712 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1713 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1714 addAndAdaptSection(parentElement
, section
);
1718 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1719 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1720 addAndAdaptSection(parentElement
, section
);
1724 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1725 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1726 addAndAdaptSection(parentElement
, section
);
1730 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1731 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1732 addAndAdaptSection(parentElement
, section
);
1736 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1737 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1738 addAndAdaptSection(parentElement
, section
);
1742 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1743 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1744 addAndAdaptSection(parentElement
, section
);
1748 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1749 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1750 addAndAdaptSection(parentElement
, section
);
1754 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1755 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1756 addAndAdaptSection(parentElement
, section
);
1760 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1761 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1762 addAndAdaptSection(parentElement
, section
);
1766 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1767 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1768 addAndAdaptSection(parentElement
, section
);
1772 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1773 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1774 addAndAdaptSection(parentElement
, section
);
1778 public SpecimenScanGeneralDetailSection
createSpecimenScanGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1779 SpecimenScanGeneralDetailSection section
= new SpecimenScanGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1780 addAndAdaptSection(parentElement
, section
);
1784 public LivingPlantPhotoGeneralDetailSection
createLivingPlantPhotoGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1785 LivingPlantPhotoGeneralDetailSection section
= new LivingPlantPhotoGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1786 addAndAdaptSection(parentElement
, section
);
1790 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1791 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1792 addAndAdaptSection(parentElement
, section
);
1796 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1797 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1798 addAndAdaptSection(parentElement
, section
);
1802 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1803 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1804 addAndAdaptSection(parentElement
, section
);
1808 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1809 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1810 addAndAdaptSection(parentElement
, section
);
1814 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1815 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1816 addAndAdaptSection(parentElement
, section
);
1820 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1821 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1822 addAndAdaptSection(parentElement
, section
);
1826 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1827 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1828 addAndAdaptSection(parentElement
, section
);
1832 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1833 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1834 addAndAdaptSection(parentElement
, section
);
1838 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1839 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1840 addAndAdaptSection(parentElement
, section
);
1844 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1845 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1846 addAndAdaptSection(parentElement
, section
);
1850 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1851 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1852 addAndAdaptSection(parentElement
, section
);
1856 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1857 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1858 addAndAdaptSection(parentElement
, section
);
1862 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1863 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1864 addAndAdaptSection(parentElement
, section
);
1868 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1869 parentElement
.addElement(section
);
1873 //--------DetailElements------------
1875 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1876 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1877 addAndAdaptElement(parentElement
, element
);
1881 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1882 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1883 addAndAdaptElement(parentElement
, element
);
1887 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1888 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1889 addAndAdaptElement(parentElement
, element
);
1893 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1894 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1895 addAndAdaptElement(parentElement
, element
);
1899 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1900 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1901 addAndAdaptElement(parentElement
, element
);
1905 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1906 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1907 addAndAdaptElement(parentElement
, element
);
1911 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1912 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1913 addAndAdaptElement(parentElement
, element
);
1917 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1918 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1919 addAndAdaptElement(parentElement
, element
);
1923 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1924 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1925 addAndAdaptElement(parentElement
, element
);
1929 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1930 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1931 addAndAdaptElement(parentElement
, element
);
1935 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1936 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1937 addAndAdaptElement(parentElement
, element
);
1941 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1942 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1943 addAndAdaptElement(parentElement
, element
);
1947 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1948 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1949 addAndAdaptElement(parentElement
, element
);
1953 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1954 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1955 addAndAdaptElement(parentElement
, element
);
1959 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1960 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1961 addAndAdaptElement(parentElement
, element
);
1965 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1966 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1967 addAndAdaptElement(parentElement
, element
);
1971 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1972 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1973 addAndAdaptElement(parentElement
, element
);
1977 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1978 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1979 addAndAdaptElement(parentElement
, element
);
1983 public DerivedUnitFacadeDetailElement
createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement
){
1984 DerivedUnitFacadeDetailElement element
= new DerivedUnitFacadeDetailElement(this, parentElement
);
1985 addAndAdaptElement(parentElement
, element
);
1989 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1990 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1991 addAndAdaptElement(parentElement
, element
);
1995 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1996 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1997 addAndAdaptElement(parentElement
, element
);
2001 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2002 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2003 addAndAdaptElement(parentElement
, element
);
2007 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2008 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2009 addAndAdaptElement(parentElement
, element
);
2013 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
2014 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
2015 addAndAdaptElement(parentElement
, element
);
2019 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2020 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2021 addAndAdaptElement(parentElement
, element
);
2025 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2026 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2027 addAndAdaptElement(parentElement
, element
);
2031 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2032 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2033 addAndAdaptElement(parentElement
, element
);
2037 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2038 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
2039 addAndAdaptElement(parentElement
, element
);
2043 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2044 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2045 addAndAdaptElement(parentElement
, element
);
2050 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2051 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2052 addAndAdaptElement(parentElement
, element
);
2056 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2057 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2058 addAndAdaptElement(parentElement
, element
);
2062 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2063 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2064 addAndAdaptElement(parentElement
, element
);
2068 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2069 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2070 addAndAdaptElement(parentElement
, element
);
2074 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2075 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2076 addAndAdaptElement(parentElement
, element
);
2080 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2081 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2082 addAndAdaptElement(parentElement
, element
);
2086 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2087 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2088 addAndAdaptElement(parentElement
, element
);
2092 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2093 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2094 addAndAdaptElement(parentElement
, element
);
2098 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2099 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2100 addAndAdaptElement(parentElement
, element
);
2104 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2105 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2106 addAndAdaptElement(parentElement
, element
);
2110 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2111 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2112 addAndAdaptElement(parentElement
, element
);
2116 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2117 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2118 addAndAdaptElement(parentElement
, element
);
2122 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2123 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2124 addAndAdaptElement(parentElement
, element
);
2128 public SpecimenScanGeneralDetailElement
createSpecimenScanGeneralDetailElement(ICdmFormElement parentElement
){
2129 SpecimenScanGeneralDetailElement element
= new SpecimenScanGeneralDetailElement(this, parentElement
);
2130 addAndAdaptElement(parentElement
, element
);
2134 public LivingPlantPhotoGeneralDetailElement
createLivingPlantPhotoGeneralDetailElement(ICdmFormElement parentElement
){
2135 LivingPlantPhotoGeneralDetailElement element
= new LivingPlantPhotoGeneralDetailElement(this, parentElement
);
2136 addAndAdaptElement(parentElement
, element
);
2140 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2141 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2142 addAndAdaptElement(parentElement
, element
);
2146 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2147 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2148 addAndAdaptElement(parentElement
, mediaDetailElement
);
2149 return mediaDetailElement
;
2152 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2153 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2154 addAndAdaptElement(parentElement
, element
);
2158 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2159 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2160 addAndAdaptElement(parentElement
, element
);
2165 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2166 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2167 addAndAdaptElement(parentElement
, element
);
2171 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2172 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2173 addAndAdaptElement(parentElement
, element
);
2177 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2178 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2179 addAndAdaptElement(parentElement
, element
);
2183 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2184 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2185 addAndAdaptElement(parentElement
, element
);
2189 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2190 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2191 addAndAdaptElement(parentElement
, element
);
2195 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2196 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2197 addAndAdaptElement(parentElement
, element
);
2202 * @param parentElement
2205 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2207 parentElement
.addElement(element
);
2210 //--------EntityCollectionSection----------
2211 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2212 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2213 addAndAdaptSection(parentElement
, section
);
2217 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2218 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2219 addAndAdaptSection(parentElement
, section
);
2223 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2224 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2225 addAndAdaptSection(parentElement
, section
);
2229 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2230 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2231 addAndAdaptSection(parentElement
, section
);
2235 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2236 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2237 addAndAdaptSection(parentElement
, section
);
2241 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2242 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2243 addAndAdaptSection(parentElement
, section
);
2247 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2248 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2249 addAndAdaptSection(parentElement
, section
);
2253 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2254 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2255 addAndAdaptSection(parentElement
, section
);
2259 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2260 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2261 addAndAdaptSection(parentElement
, section
);
2265 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2266 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2267 addAndAdaptSection(parentElement
, section
);
2271 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2272 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2273 addAndAdaptSection(parentElement
, section
);
2277 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2278 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2279 addAndAdaptSection(parentElement
, section
);
2283 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2284 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2285 addAndAdaptSection(parentElement
, section
);
2289 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2290 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2291 addAndAdaptSection(parentElement
, section
);
2295 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2296 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2297 addAndAdaptSection(parentElement
, section
);
2301 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2302 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2303 addAndAdaptSection(parentElement
, section
);
2307 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2308 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2309 addAndAdaptSection(parentElement
, section
);
2313 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2314 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2315 addAndAdaptSection(parentElement
, section
);
2319 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2320 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2321 addAndAdaptSection(parentElement
, section
);
2325 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2326 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2327 addAndAdaptSection(parentElement
, section
);
2331 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2332 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2333 addAndAdaptSection(parentElement
, section
);
2337 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2338 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2339 addAndAdaptSection(parentElement
, section
);
2343 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2344 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2345 addAndAdaptSection(parentElement
, section
);
2349 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2350 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2351 addAndAdaptSection(parentElement
, section
);
2355 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2356 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2357 addAndAdaptSection(parentElement
, section
);
2361 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2362 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2363 addAndAdaptSection(parentElement
, section
);
2367 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2368 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2369 addAndAdaptSection(parentElement
, section
);
2373 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2374 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2375 addAndAdaptSection(parentElement
, section
);
2379 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2380 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2381 addAndAdaptSection(parentElement
, section
);
2385 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2386 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2387 addAndAdaptSection(parentElement
, section
);
2391 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2392 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2393 addAndAdaptSection(parentElement
, section
);
2397 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2398 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2399 addAndAdaptSection(parentElement
, section
);
2403 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2404 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2405 addAndAdaptSection(parentElement
, section
);
2409 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2410 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
2411 addAndAdaptSection(parentElement
, section
);
2415 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2416 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2417 addAndAdaptSection(parentElement
, section
);
2421 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2422 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2423 addAndAdaptSection(parentElement
, section
);
2427 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2428 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2429 addAndAdaptSection(parentElement
, section
);
2433 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2434 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2435 addAndAdaptSection(parentElement
, section
);
2439 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2440 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2441 addAndAdaptSection(parentElement
, section
);
2447 * createEntityCollectionElement
2450 * @param removeListener
2451 * a {@link org.eclipse.swt.events.SelectionListener} object.
2454 * @param parentElement
2456 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
2458 * @param versionableEntity
2459 * a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
2461 * @param backgroundColor
2462 * a {@link org.eclipse.swt.graphics.Color} object.
2464 * {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
2467 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2468 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2469 AbstractEntityCollectionElement element
= null;
2471 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2473 if (entity
instanceof Annotation
) {
2474 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2475 } else if (entity
instanceof Person
) {
2476 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2477 } else if (entity
instanceof Credit
) {
2478 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2479 } else if (entity
instanceof Extension
) {
2480 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2481 } else if (entity
instanceof Marker
) {
2482 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2483 } else if (entity
instanceof Media
) {
2484 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2485 } else if (entity
instanceof MediaRepresentation
) {
2486 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2488 } else if (entity
instanceof ImageFile
) {
2489 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2490 } else if (entity
instanceof MediaRepresentationPart
) {
2491 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2492 removeListener
, style
);
2493 } else if (entity
instanceof NomenclaturalStatus
) {
2494 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2496 } else if (entity
instanceof Rights
) {
2497 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2498 } else if (entity
instanceof DescriptionElementSource
) {
2499 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2500 removeListener
, style
);
2501 } else if (entity
instanceof IdentifiableSource
) {
2502 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2504 } else if (entity
instanceof DefinedTerm
) {
2505 switch(((DefinedTerm
)entity
).getTermType()) {
2507 element
= new ScopeElement(this,
2509 (DefinedTerm
) entity
,
2514 element
= new ModifierElement(this,
2516 (DefinedTerm
) entity
,
2521 //FIXME : Actually we should through an exception here
2526 } else if (entity
instanceof Reference
) {
2527 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2528 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2531 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2533 } else if (entity
instanceof NameTypeDesignation
) {
2534 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2536 } else if (entity
instanceof NameRelationship
) {
2537 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2539 } else if (entity
instanceof SynonymRelationship
) {
2540 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2542 } else if (entity
instanceof SpecimenTypeDesignation
) {
2543 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2544 removeListener
, style
);
2545 } else if (entity
instanceof StateData
) {
2546 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2547 } else if (entity
instanceof StatisticalMeasurementValue
) {
2548 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2549 removeListener
, style
);
2550 } else if (entity
instanceof DerivedUnit
) {
2551 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2552 case LivingSpecimen
:
2553 case PreservedSpecimen
:
2555 element
= new SpecimenCollectionDetailElement(this,
2557 (DerivedUnit
) entity
,
2562 element
= new DerivedUnitElement(this,
2564 (DerivedUnit
) entity
,
2569 } else if (entity
instanceof NamedArea
) {
2570 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2571 } else if (entity
instanceof DeterminationEvent
) {
2572 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2573 } else if (entity
instanceof User
) {
2574 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2575 } else if (entity
instanceof GrantedAuthority
) {
2576 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2577 removeListener
, style
);
2578 } else if (entity
instanceof Group
) {
2579 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2580 } else if (entity
instanceof Taxon
) {
2581 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2582 } else if (entity
instanceof DescriptionElementBase
) {
2583 // this is the special case for protologs, maybe we can do this
2584 // differently when API improves
2585 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2586 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2587 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2589 } else if (entity
instanceof Identifier
) {
2590 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2593 if (element
== null) {
2594 MessagingUtils
.messageDialog("No element for entity", this,
2595 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2600 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2601 element
.setPersistentBackground(backgroundColor
);
2604 parentElement
.addElement(element
);
2612 * Creates a selection element for the given type T.
2615 * <strong>Selection elements not handled by this method:</strong>
2617 * <li>{@link TaxonNodeSelectionElement} see
2618 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2620 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2621 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2627 * a {@link Class} object of the type that you want the selection
2629 * @param parentElement
2630 * a {@link ICdmFormElement} object.
2631 * @param labelString
2632 * a {@link String} object.
2633 * @param selectionType
2635 * a {@link ICdmBase} object.
2638 * @param conversation
2639 * a {@link ConversationHolder} object.
2640 * @return a {@link EntitySelectionElement} object.
2642 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2643 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2645 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2646 labelString
, selection
, mode
, style
);
2648 parentElement
.addElement(element
);
2652 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2653 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2654 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2655 labelString
, selection
, mode
, style
);
2657 parentElement
.addElement(element
);
2661 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2662 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2663 int mode
, int style
) {
2664 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2665 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2667 parentElement
.addElement(element
);
2671 /** {@inheritDoc} */
2672 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2673 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2674 adapt(labelElement
);
2675 parentElement
.addElement(labelElement
);
2676 return labelElement
;
2681 * Getter for the field <code>selectionProvider</code>.
2684 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2686 public ISelectionProvider
getSelectionProvider() {
2687 return selectionProvider
;
2692 * createDetailedDescriptionDetailElement
2695 * @param parentElement
2696 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2700 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2705 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2708 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2709 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2710 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2712 if (entity
instanceof CategoricalData
) {
2713 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2714 (CategoricalData
) entity
, style
);
2715 } else if (entity
instanceof CommonTaxonName
) {
2716 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2718 } else if (entity
instanceof Distribution
) {
2719 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2721 } else if (entity
instanceof IndividualsAssociation
) {
2722 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2723 (IndividualsAssociation
) entity
, style
);
2724 } else if (entity
instanceof QuantitativeData
) {
2725 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2726 (QuantitativeData
) entity
, style
);
2727 } else if (entity
instanceof TaxonInteraction
) {
2728 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2729 (TaxonInteraction
) entity
, style
);
2730 } else if (entity
instanceof TextData
) {
2731 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2733 throw new IllegalStateException("There is no interface for the given description element");
2735 adapt(detailedDescriptionElement
);
2736 parentElement
.addElement(detailedDescriptionElement
);
2737 return detailedDescriptionElement
;
2742 * Creates a styled text as a part of the form.
2747 * the text initial value
2750 * @return the text widget
2752 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2753 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2754 if (value
!= null) {
2755 text
.setText(value
);
2757 text
.setForeground(getColors().getForeground());
2758 text
.setBackground(getColors().getBackground());
2759 // text.addFocusListener(visibilityHandler);
2763 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2764 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2765 addAndAdaptSection(parentElement
, section
);