4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
7 import java
.util
.ArrayList
;
8 import java
.util
.HashSet
;
13 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
14 import org
.eclipse
.jface
.viewers
.ISelection
;
15 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
16 import org
.eclipse
.jface
.window
.Window
;
17 import org
.eclipse
.swt
.SWT
;
18 import org
.eclipse
.swt
.custom
.StyledText
;
19 import org
.eclipse
.swt
.events
.FocusAdapter
;
20 import org
.eclipse
.swt
.events
.FocusEvent
;
21 import org
.eclipse
.swt
.events
.FocusListener
;
22 import org
.eclipse
.swt
.events
.MouseAdapter
;
23 import org
.eclipse
.swt
.events
.MouseEvent
;
24 import org
.eclipse
.swt
.events
.MouseListener
;
25 import org
.eclipse
.swt
.events
.SelectionEvent
;
26 import org
.eclipse
.swt
.events
.SelectionListener
;
27 import org
.eclipse
.swt
.events
.TypedEvent
;
28 import org
.eclipse
.swt
.graphics
.Color
;
29 import org
.eclipse
.swt
.graphics
.Font
;
30 import org
.eclipse
.swt
.widgets
.Composite
;
31 import org
.eclipse
.swt
.widgets
.Control
;
32 import org
.eclipse
.swt
.widgets
.Display
;
33 import org
.eclipse
.swt
.widgets
.Event
;
34 import org
.eclipse
.swt
.widgets
.Label
;
35 import org
.eclipse
.ui
.forms
.IFormColors
;
36 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
37 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
38 import org
.eclipse
.ui
.forms
.widgets
.Section
;
39 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
40 import org
.joda
.time
.DateTime
;
41 import org
.joda
.time
.Partial
;
42 import org
.springframework
.security
.core
.GrantedAuthority
;
44 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
45 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
46 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
47 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
48 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
49 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
50 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
51 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
52 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
53 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
54 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
55 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
56 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
57 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
58 import eu
.etaxonomy
.cdm
.model
.common
.IEnumTerm
;
59 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
60 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
61 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
62 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
63 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
64 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
65 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
66 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
67 import eu
.etaxonomy
.cdm
.model
.common
.User
;
68 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
69 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
70 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
71 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
72 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
73 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
74 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
75 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
76 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
77 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
78 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
79 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
80 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
81 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
82 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
83 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
84 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
85 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
86 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
87 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
88 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
89 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
90 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
91 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
92 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
93 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
94 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
95 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
96 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
97 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
98 import eu
.etaxonomy
.cdm
.model
.taxon
.SynonymRelationship
;
99 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
100 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
101 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
102 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
103 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
104 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
105 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
106 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
107 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
108 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
109 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
110 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
111 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
112 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
116 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailSection
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
311 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
312 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
317 * CdmFormFactory class.
321 * @created Feb 24, 2010
324 public class CdmFormFactory
extends FormToolkit
{
326 private BoldFontHolder2 boldFontHolder2
;
327 private MouseListener selectionMouseHandler
;
328 private FocusListener selectionFocusHandler
;
330 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
332 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
334 private final int orientation
= Window
.getDefaultOrientation();
335 private ISelectionProvider selectionProvider
;
337 /** Constant <code>EMPTY_SELECTION</code> */
338 public static ISelection EMPTY_SELECTION
= new ISelection() {
340 public boolean isEmpty() {
351 private class SelectionMouseHandler
extends MouseAdapter
{
353 public void mouseDown(MouseEvent e
) {
354 notifySelectionListeners(e
);
364 private class SelectionFocusHandler
extends FocusAdapter
{
366 public void focusGained(FocusEvent e
) {
367 notifySelectionListeners(e
);
371 private void notifySelectionListeners(TypedEvent e
) {
372 Event event
= new Event();
373 event
.widget
= e
.widget
;
374 SelectionEvent selectionEvent
= new SelectionEvent(event
);
376 for (SelectionListener listener
: selectionListenerList
) {
377 listener
.widgetSelected(selectionEvent
);
383 * Constructor for CdmFormFactory.
387 * a {@link org.eclipse.swt.widgets.Display} object.
388 * @param selectionProvider
389 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
391 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
393 this.selectionProvider
= selectionProvider
;
399 * Constructor for CdmFormFactory.
403 * a {@link org.eclipse.swt.widgets.Display} object.
405 public CdmFormFactory(Display display
) {
413 private void init() {
414 boldFontHolder2
= new BoldFontHolder2();
415 selectionMouseHandler
= new SelectionMouseHandler();
416 selectionFocusHandler
= new SelectionFocusHandler();
420 * Creates an instance initialized with the correct selectionProvider
422 * Make sure to remove the instance when the entityComposite disposes via
423 * destroySelectionArbitrator(..)
425 * @param entityElement
426 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
428 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
431 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
432 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
433 selectionArbitrator
.addSelectionProvider(selectionProvider
);
434 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
435 addSelectionListener(selectionArbitrator
);
436 return selectionArbitrator
;
441 * destroySelectionArbitrator
444 * @param selectionArbitrator
446 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
449 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
450 removeSelectionListener(selectionArbitrator
);
451 if (selectionProvider
!= null) {
452 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
454 MessagingUtils
.error(this.getClass(),
455 "Tried to destroy a selection listener from this factories listeners but was null", null);
461 * Adapts the {@link AbstractCdmFormElement}:<br>
462 * - sets the {@link IPropertyChangeListener}s handled by this class
467 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
470 public void adapt(ICdmFormElement formElement
) {
471 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
476 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
478 control
.addFocusListener(selectionFocusHandler
);
480 super.adapt(control
, trackFocus
, trackKeyboard
);
485 public void adapt(Composite composite
) {
486 composite
.addMouseListener(selectionMouseHandler
);
487 super.adapt(composite
);
496 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
499 public void destroyElement(ICdmFormElement formElement
) {
500 // return if element was not initialized
501 if (formElement
== null) {
504 // destroy selection arbitrator, if any
505 if (formElement
instanceof ISelectableElement
) {
506 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
508 // remove this element form its parents list of elements
509 // ICdmFormElement parentElement = formElement.getParentElement();
510 // if(parentElement != null){
511 // parentElement.removeElement(formElement);
513 // call destroy on child elements recursively
514 for (ICdmFormElement childElement
: formElement
.getElements()) {
515 destroyElement(childElement
);
517 // dispose of the controls
518 for (Control control
: formElement
.getControls()) {
519 // we added the layoutComposite of the parental element as the
520 // layout composite to this formElement
521 // but we do not want to destroy it.
522 if (control
.equals(formElement
.getLayoutComposite())) {
537 * a {@link org.eclipse.swt.widgets.Composite} object.
538 * @return a {@link org.eclipse.swt.widgets.Label} object.
540 public Label
createEmptyCell(Composite parent
) {
541 return this.createLabel(parent
, null);
546 * createMultiLanguageTextElement
549 * @param parentElement
550 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
553 * a {@link java.lang.String} object.
554 * @param multilanguageText
555 * a {@link java.util.Map} object.
561 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
564 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
565 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
566 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
567 multilanguageText
, textHeight
, style
);
569 parentElement
.addElement(element
);
573 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
574 KeyStatement keyStatement
, int textHeight
, int style
) {
575 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
578 parentElement
.addElement(element
);
583 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
585 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
586 * @param parentElement the parent container
587 * @param labelString the label name
588 * @param initialObject the object from which the <code>toString()</code> method is called
589 * @param style {@link SWT} style constant
590 * @return the created textfield with label
592 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
593 Object initialObject
, int style
) {
594 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
599 * createTextWithLabelElement
602 * @param parentElement
603 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
606 * a {@link java.lang.String} object.
608 * a {@link java.lang.String} object.
611 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
614 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
615 String initialText
, int style
) {
616 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
620 * createTextWithLabelElement
623 * @param parentElement
624 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
627 * a {@link java.lang.String} object.
629 * a {@link java.lang.String} object.
630 * @param textLimit maximal number of characters allowed
633 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
636 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
637 String initialText
, Integer textLimit
, int style
) {
638 if(initialText
==null){
642 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
645 parentElement
.addElement(element
);
649 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
650 int textHeight
, int style
) {
651 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
653 parentElement
.addElement(element
);
657 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
658 URI initialUri
, int style
) {
659 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
661 parentElement
.addElement(element
);
672 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
673 IOpenUrlEnabled openUrlEnabled
, int style
) {
674 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
677 parentElement
.addElement(element
);
683 * @param parentElement
685 * @param conversationEnabled
690 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
691 ConversationHolder conversation
, User user
, int style
) {
692 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
694 parentElement
.addElement(element
);
700 * createIntegerTextWithLabelElement
703 * @param parentElement
704 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
707 * a {@link java.lang.String} object.
708 * @param initialInteger
709 * a {@link java.lang.Integer} object.
713 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
716 public NumberWithLabelElement
createNumberTextWithLabelElement(
717 ICdmFormElement parentElement
, String labelString
,
718 Number initialNumber
, int style
) {
719 NumberWithLabelElement element
= new NumberWithLabelElement(this,
720 parentElement
, labelString
, initialNumber
, style
);
722 parentElement
.addElement(element
);
726 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
727 String labelString
, LanguageString languageString
, int style
) {
728 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
731 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
732 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
733 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
734 languageString
, height
, isMultiLine
, style
);
736 parentElement
.addElement(element
);
742 * createKeyValueViewerElement
745 * @param parentElement
746 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
749 * a {@link java.lang.String} object.
750 * @param valueHeading
751 * a {@link java.lang.String} object.
753 * a {@link java.util.Map} object.
754 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
757 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
758 String valueHeading
, Map
<Object
, Object
> map
) {
759 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
761 parentElement
.addElement(element
);
767 * createTermComboElement
770 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
771 * @param termComboType
773 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
775 * @param parentElement
776 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
779 * a {@link java.lang.String} object.
781 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
785 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
789 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
790 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
791 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
794 parentElement
.addElement(element
);
800 * createTermComboElement
803 * @param termComboType
805 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
807 * @param parentElement
808 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
811 * a {@link java.lang.String} object.
813 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
817 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
821 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
823 ICdmFormElement parentElement
,
827 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
829 parentElement
.addElement(element
);
835 * createTermComboElement
838 * @param termComboType
840 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
842 * @param parentElement
843 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
846 * a {@link java.lang.String} object.
848 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
852 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
856 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
857 TermVocabulary
<?
> termVocabulary
,
858 ICdmFormElement parentElement
,
862 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, style
);
864 parentElement
.addElement(element
);
870 * createEnumComboElement
873 * @param enumComboType
875 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
877 * @param parentElement
878 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
882 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
885 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
886 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
888 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
890 parentElement
.addElement(element
);
896 * createBrowserElement
900 * a {@link java.net.URI} object.
903 * @param parentElement
904 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
906 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
909 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
910 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
912 parentElement
.addElement(element
);
921 * @param parentElement
922 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
925 * a {@link java.net.URI} object.
928 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
930 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
931 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
933 parentElement
.addElement(element
);
939 * createTextActionElement
943 * a {@link java.lang.String} object.
945 * a {@link java.lang.String} object.
948 * @param parentElement
949 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
952 * a {@link java.lang.String} object.
953 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
956 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
957 String buttonLabel
, String initialText
, int style
) {
958 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
961 parentElement
.addElement(element
);
970 * @param parentElement
971 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
974 * a {@link java.lang.String} object.
975 * @param initialState
979 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
982 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
983 if(initialState
==null){
984 initialState
= Boolean
.FALSE
;
986 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
988 parentElement
.addElement(element
);
993 * Creates a section as a part of the form.
995 * @return the section widget
998 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1001 public Section
adapt(AbstractFormSection section
) {
1002 section
.setMenu(section
.getLayoutComposite().getMenu());
1003 adapt(section
, true, true);
1005 // handle focus and property change events for cdm use
1006 section
.addFocusListener(selectionFocusHandler
);
1007 section
.setPropertyChangeListeners(propertyChangeListeners
);
1009 if (section
.getToggle() != null) {
1010 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1011 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1014 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1016 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1017 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1018 getColors().initializeSectionToolBarColors();
1019 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1020 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1022 // call setTitleBarForeground regardless as it also sets the label color
1023 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1027 private class BoldFontHolder2
{
1028 private Font normalFont
;
1030 private Font boldFont
;
1032 public BoldFontHolder2() {
1035 public Font
getBoldFont(Font font
) {
1036 createBoldFont(font
);
1040 private void createBoldFont(Font font
) {
1041 if (normalFont
== null || !normalFont
.equals(font
)) {
1045 if (boldFont
== null) {
1046 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1050 public void dispose() {
1051 if (boldFont
!= null) {
1052 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1060 * createToggleableTextField
1063 * @param parentElement
1064 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1066 * @param labelString
1067 * a {@link java.lang.String} object.
1068 * @param initialText
1069 * a {@link java.lang.String} object.
1070 * @param initialState
1074 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1077 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1078 String initialText
, boolean initialState
, int style
) {
1079 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1080 initialState
, style
| orientation
);
1082 parentElement
.addElement(element
);
1088 * createTimePeriodElement
1091 * @param parentElement
1092 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1094 * @param labelString
1095 * a {@link java.lang.String} object.
1097 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1100 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1103 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1104 TimePeriod timePeriod
, int style
) {
1105 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1107 parentElement
.addElement(element
);
1113 * createGatheringEventUnitElement
1116 * @param parentElement
1117 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1119 * @param labelString
1120 * a {@link java.lang.String} object.
1122 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1125 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1128 public GatheringEventUnitElement
createGatheringEventUnitElement(
1129 ICdmFormElement parentElement
,
1131 DerivedUnitFacade gatheringEvent
,
1132 MinMaxTextSection
.UnitType unitType
,
1134 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1141 parentElement
.addElement(element
);
1147 * createPointElement
1152 * @param parentElement
1153 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1156 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1157 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1159 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1160 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1162 parentElement
.addElement(element
);
1169 * @param conversationHolder
1171 * @param detailsViewer
1175 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1176 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1177 parentElement
.addElement(section
);
1184 * createDateDetailSection
1187 * @param parentElement
1188 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1192 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1195 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1196 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1197 parentElement
.addElement(section
);
1204 * createDateDetailSection
1207 * @param parentElement
1208 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1212 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1215 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1216 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1217 parentElement
.addElement(section
);
1224 * createPartialElement
1227 * @param parentElement
1228 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1230 * @param labelString
1231 * a {@link java.lang.String} object.
1233 * a {@link org.joda.time.Partial} object.
1236 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1239 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1241 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1243 parentElement
.addElement(element
);
1249 * addSelectionListener
1253 * a {@link org.eclipse.swt.events.SelectionListener} object.
1255 public void addSelectionListener(SelectionListener listener
) {
1256 selectionListenerList
.add(listener
);
1261 * removeSelectionListener
1265 * a {@link org.eclipse.swt.events.SelectionListener} object.
1267 public void removeSelectionListener(SelectionListener listener
) {
1268 if (listener
== null) {
1269 MessagingUtils
.error(this.getClass(),
1270 "Tried to remove a selection listener from this factories listeners but was null", null);
1272 selectionListenerList
.remove(listener
);
1278 * addPropertyChangeListener
1282 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1285 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1286 if (propertyChangeListeners
.contains(listener
)) {
1289 propertyChangeListeners
.add(0, listener
);
1294 * removePropertyChangeListener
1298 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1301 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1302 propertyChangeListeners
.remove(listener
);
1306 * @return the propertyChangeListeners
1308 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1309 return propertyChangeListeners
;
1314 * createHorizontalSeparator
1317 * @param parentElement
1318 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1322 * @return a {@link org.eclipse.swt.widgets.Label} object.
1324 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1325 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1326 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1332 * createVersionElement
1335 * @param parentElement
1336 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1339 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1344 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1347 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1348 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1350 parentElement
.addElement(element
);
1355 * @param cdmBaseSection
1360 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1361 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1363 parentElement
.addElement(element
);
1369 * createVersionSection
1372 * @param parentElement
1373 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1378 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1381 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1382 VersionSection section
= new VersionSection(this, parentElement
, style
);
1383 parentElement
.addElement(section
);
1393 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1394 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1395 parentElement
.addElement(section
);
1402 * createEmptyElement
1405 * @param parentElement
1406 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1408 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1410 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1411 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1413 parentElement
.addElement(element
);
1419 * createHeadlineSection
1422 * @param parentElement
1423 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1426 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1429 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1430 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1431 parentElement
.addElement(section
);
1438 * createParsingMessageElement
1441 * @param parentElement
1442 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1444 * @param parserProblem
1445 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1450 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1453 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1454 ParserProblem parserProblem
, int style
) {
1455 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1457 parentElement
.addElement(element
);
1461 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1462 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1464 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1465 selectionProvider
, style
);
1467 parentElement
.addElement(section
);
1474 * @param definedTermClass
1475 * @param formElement
1479 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1480 AbstractCdmDetailSection parentElement
, int style
) {
1481 AbstractCdmDetailElement element
= null;
1483 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1484 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1485 } else if (definedTermClass
.equals(Feature
.class)) {
1486 element
= new FeatureDetailElement(this, parentElement
);
1488 element
= new DefinedTermDetailElement(this, parentElement
);
1492 parentElement
.addElement(element
);
1497 //--------DetailSections---------
1498 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1499 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1500 addAndAdaptSection(parentElement
, section
);
1504 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1505 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1506 addAndAdaptSection(parentElement
, section
);
1510 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1511 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1512 addAndAdaptSection(parentElement
, section
);
1516 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1517 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1518 addAndAdaptSection(parentElement
, section
);
1522 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1523 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1524 addAndAdaptSection(parentElement
, section
);
1528 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1529 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1530 addAndAdaptSection(parentElement
, section
);
1534 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1535 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1536 addAndAdaptSection(parentElement
, section
);
1540 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1541 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1542 addAndAdaptSection(parentElement
, section
);
1546 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1547 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1548 addAndAdaptSection(parentElement
, section
);
1552 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1553 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1554 addAndAdaptSection(parentElement
, section
);
1558 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1559 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1560 addAndAdaptSection(parentElement
, section
);
1564 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1565 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1566 addAndAdaptSection(parentElement
, section
);
1570 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1571 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1572 addAndAdaptSection(parentElement
, section
);
1576 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1577 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1578 addAndAdaptSection(parentElement
, section
);
1582 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1583 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1584 addAndAdaptSection(parentElement
, section
);
1588 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1589 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1590 addAndAdaptSection(parentElement
, section
);
1594 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1595 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1596 addAndAdaptSection(parentElement
, section
);
1600 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1601 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1602 addAndAdaptSection(parentElement
, section
);
1606 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1607 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1608 addAndAdaptSection(parentElement
, section
);
1612 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1613 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1614 addAndAdaptSection(parentElement
, section
);
1618 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1619 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1620 addAndAdaptSection(parentElement
, section
);
1624 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1625 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1626 addAndAdaptSection(parentElement
, section
);
1630 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1631 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1632 addAndAdaptSection(parentElement
, section
);
1636 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1637 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1638 addAndAdaptSection(parentElement
, section
);
1642 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1643 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1644 addAndAdaptSection(parentElement
, section
);
1648 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1649 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1650 addAndAdaptSection(parentElement
, section
);
1654 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1655 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1656 addAndAdaptSection(parentElement
, section
);
1660 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1661 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1662 addAndAdaptSection(parentElement
, section
);
1666 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1667 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1668 addAndAdaptSection(parentElement
, section
);
1672 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1673 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1674 addAndAdaptSection(parentElement
, section
);
1678 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1679 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1680 addAndAdaptSection(parentElement
, section
);
1684 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1685 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1686 addAndAdaptSection(parentElement
, section
);
1690 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1691 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1692 addAndAdaptSection(parentElement
, section
);
1696 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1697 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1698 addAndAdaptSection(parentElement
, section
);
1702 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1703 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1704 addAndAdaptSection(parentElement
, section
);
1708 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1709 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1710 addAndAdaptSection(parentElement
, section
);
1714 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1715 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1716 addAndAdaptSection(parentElement
, section
);
1720 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1721 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1722 addAndAdaptSection(parentElement
, section
);
1726 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1727 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1728 addAndAdaptSection(parentElement
, section
);
1732 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1733 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1734 addAndAdaptSection(parentElement
, section
);
1738 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1739 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1740 addAndAdaptSection(parentElement
, section
);
1744 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1745 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1746 addAndAdaptSection(parentElement
, section
);
1750 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1751 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1752 addAndAdaptSection(parentElement
, section
);
1756 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1757 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1758 addAndAdaptSection(parentElement
, section
);
1762 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1763 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1764 addAndAdaptSection(parentElement
, section
);
1768 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1769 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1770 addAndAdaptSection(parentElement
, section
);
1774 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1775 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1776 addAndAdaptSection(parentElement
, section
);
1780 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1781 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1782 addAndAdaptSection(parentElement
, section
);
1786 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1787 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1788 addAndAdaptSection(parentElement
, section
);
1792 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1793 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1794 addAndAdaptSection(parentElement
, section
);
1798 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1799 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1800 addAndAdaptSection(parentElement
, section
);
1804 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1805 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1806 addAndAdaptSection(parentElement
, section
);
1810 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1811 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1812 addAndAdaptSection(parentElement
, section
);
1816 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1817 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1818 addAndAdaptSection(parentElement
, section
);
1822 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1823 parentElement
.addElement(section
);
1827 //--------DetailElements------------
1829 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1830 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1831 addAndAdaptElement(parentElement
, element
);
1835 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1836 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1837 addAndAdaptElement(parentElement
, element
);
1841 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1842 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1843 addAndAdaptElement(parentElement
, element
);
1847 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1848 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1849 addAndAdaptElement(parentElement
, element
);
1853 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1854 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1855 addAndAdaptElement(parentElement
, element
);
1859 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1860 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1861 addAndAdaptElement(parentElement
, element
);
1865 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1866 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1867 addAndAdaptElement(parentElement
, element
);
1871 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1872 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1873 addAndAdaptElement(parentElement
, element
);
1877 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1878 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1879 addAndAdaptElement(parentElement
, element
);
1883 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1884 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1885 addAndAdaptElement(parentElement
, element
);
1889 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1890 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1891 addAndAdaptElement(parentElement
, element
);
1895 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1896 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1897 addAndAdaptElement(parentElement
, element
);
1901 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1902 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1903 addAndAdaptElement(parentElement
, element
);
1907 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1908 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1909 addAndAdaptElement(parentElement
, element
);
1913 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1914 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1915 addAndAdaptElement(parentElement
, element
);
1919 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1920 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1921 addAndAdaptElement(parentElement
, element
);
1925 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1926 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1927 addAndAdaptElement(parentElement
, element
);
1931 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1932 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1933 addAndAdaptElement(parentElement
, element
);
1937 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1938 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1939 addAndAdaptElement(parentElement
, element
);
1943 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1944 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1945 addAndAdaptElement(parentElement
, element
);
1949 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1950 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1951 addAndAdaptElement(parentElement
, element
);
1955 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1956 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1957 addAndAdaptElement(parentElement
, element
);
1961 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1962 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1963 addAndAdaptElement(parentElement
, element
);
1967 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1968 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1969 addAndAdaptElement(parentElement
, element
);
1973 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1974 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1975 addAndAdaptElement(parentElement
, element
);
1979 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1980 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1981 addAndAdaptElement(parentElement
, element
);
1985 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1986 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
1987 addAndAdaptElement(parentElement
, element
);
1991 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1992 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
1993 addAndAdaptElement(parentElement
, element
);
1998 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
1999 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2000 addAndAdaptElement(parentElement
, element
);
2004 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2005 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2006 addAndAdaptElement(parentElement
, element
);
2010 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2011 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2012 addAndAdaptElement(parentElement
, element
);
2016 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2017 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2018 addAndAdaptElement(parentElement
, element
);
2022 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2023 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2024 addAndAdaptElement(parentElement
, element
);
2028 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2029 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2030 addAndAdaptElement(parentElement
, element
);
2034 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2035 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2036 addAndAdaptElement(parentElement
, element
);
2040 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2041 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2042 addAndAdaptElement(parentElement
, element
);
2046 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2047 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2048 addAndAdaptElement(parentElement
, element
);
2052 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2053 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2054 addAndAdaptElement(parentElement
, element
);
2058 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2059 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2060 addAndAdaptElement(parentElement
, element
);
2064 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2065 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2066 addAndAdaptElement(parentElement
, element
);
2070 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2071 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2072 addAndAdaptElement(parentElement
, element
);
2076 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2077 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2078 addAndAdaptElement(parentElement
, element
);
2082 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2083 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2084 addAndAdaptElement(parentElement
, element
);
2088 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2089 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2090 addAndAdaptElement(parentElement
, mediaDetailElement
);
2091 return mediaDetailElement
;
2094 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2095 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2096 addAndAdaptElement(parentElement
, element
);
2100 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2101 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2102 addAndAdaptElement(parentElement
, element
);
2106 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2107 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2108 addAndAdaptElement(parentElement
, element
);
2112 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2113 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2114 addAndAdaptElement(parentElement
, element
);
2118 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2119 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2120 addAndAdaptElement(parentElement
, element
);
2124 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2125 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2126 addAndAdaptElement(parentElement
, element
);
2130 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2131 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2132 addAndAdaptElement(parentElement
, element
);
2136 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2137 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2138 addAndAdaptElement(parentElement
, element
);
2142 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2143 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2144 addAndAdaptElement(parentElement
, element
);
2149 * @param parentElement
2152 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2154 parentElement
.addElement(element
);
2157 //--------EntityCollectionSection----------
2158 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2159 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2160 addAndAdaptSection(parentElement
, section
);
2164 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2165 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2166 addAndAdaptSection(parentElement
, section
);
2170 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2171 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2172 addAndAdaptSection(parentElement
, section
);
2176 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2177 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2178 addAndAdaptSection(parentElement
, section
);
2182 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2183 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2184 addAndAdaptSection(parentElement
, section
);
2188 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2189 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2190 addAndAdaptSection(parentElement
, section
);
2194 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2195 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2196 addAndAdaptSection(parentElement
, section
);
2200 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2201 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2202 addAndAdaptSection(parentElement
, section
);
2206 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2207 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2208 addAndAdaptSection(parentElement
, section
);
2212 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2213 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2214 addAndAdaptSection(parentElement
, section
);
2218 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2219 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2220 addAndAdaptSection(parentElement
, section
);
2224 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2225 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2226 addAndAdaptSection(parentElement
, section
);
2230 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2231 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2232 addAndAdaptSection(parentElement
, section
);
2236 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2237 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2238 addAndAdaptSection(parentElement
, section
);
2242 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2243 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2244 addAndAdaptSection(parentElement
, section
);
2248 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2249 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2250 addAndAdaptSection(parentElement
, section
);
2254 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2255 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2256 addAndAdaptSection(parentElement
, section
);
2260 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2261 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2262 addAndAdaptSection(parentElement
, section
);
2266 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2267 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2268 addAndAdaptSection(parentElement
, section
);
2272 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2273 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2274 addAndAdaptSection(parentElement
, section
);
2278 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2279 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2280 addAndAdaptSection(parentElement
, section
);
2284 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2285 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2286 addAndAdaptSection(parentElement
, section
);
2290 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2291 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2292 addAndAdaptSection(parentElement
, section
);
2296 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2297 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2298 addAndAdaptSection(parentElement
, section
);
2302 public IdentifierDetailSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2303 IdentifierDetailSection section
= new IdentifierDetailSection(this, conversation
, parentElement
, style
);
2304 addAndAdaptSection(parentElement
, section
);
2308 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2309 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2310 addAndAdaptSection(parentElement
, section
);
2314 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2315 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2316 addAndAdaptSection(parentElement
, section
);
2320 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2321 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2322 addAndAdaptSection(parentElement
, section
);
2326 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2327 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2328 addAndAdaptSection(parentElement
, section
);
2332 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2333 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2334 addAndAdaptSection(parentElement
, section
);
2338 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2339 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2340 addAndAdaptSection(parentElement
, section
);
2344 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2345 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2346 addAndAdaptSection(parentElement
, section
);
2350 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2351 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2352 addAndAdaptSection(parentElement
, section
);
2356 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2357 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2358 addAndAdaptSection(parentElement
, section
);
2362 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2363 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
2364 addAndAdaptSection(parentElement
, section
);
2368 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2369 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2370 addAndAdaptSection(parentElement
, section
);
2374 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2375 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2376 addAndAdaptSection(parentElement
, section
);
2380 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2381 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2382 addAndAdaptSection(parentElement
, section
);
2386 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2387 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2388 addAndAdaptSection(parentElement
, section
);
2392 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2393 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2394 addAndAdaptSection(parentElement
, section
);
2398 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2399 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2400 AbstractEntityCollectionElement element
= null;
2402 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2404 if (entity
instanceof Annotation
) {
2405 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2406 } else if (entity
instanceof Person
) {
2407 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2408 } else if (entity
instanceof Credit
) {
2409 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2410 } else if (entity
instanceof Extension
) {
2411 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2412 } else if (entity
instanceof Marker
) {
2413 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2414 } else if (entity
instanceof Media
) {
2415 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, true, style
);
2416 } else if (entity
instanceof MediaRepresentation
) {
2417 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2419 } else if (entity
instanceof ImageFile
) {
2420 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2421 } else if (entity
instanceof MediaRepresentationPart
) {
2422 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2423 removeListener
, style
);
2424 } else if (entity
instanceof NomenclaturalStatus
) {
2425 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2427 } else if (entity
instanceof Rights
) {
2428 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2429 } else if (entity
instanceof DescriptionElementSource
) {
2430 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2431 removeListener
, style
);
2432 } else if (entity
instanceof IdentifiableSource
) {
2433 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2435 } else if (entity
instanceof DefinedTerm
) {
2436 switch(((DefinedTerm
)entity
).getTermType()) {
2438 element
= new ScopeElement(this,
2440 (DefinedTerm
) entity
,
2445 element
= new ModifierElement(this,
2447 (DefinedTerm
) entity
,
2452 //FIXME : Actually we should through an exception here
2457 } else if (entity
instanceof Reference
) {
2458 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2459 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2462 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2464 } else if (entity
instanceof NameTypeDesignation
) {
2465 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2467 } else if (entity
instanceof NameRelationship
) {
2468 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2470 } else if (entity
instanceof SynonymRelationship
) {
2471 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2473 } else if (entity
instanceof SpecimenTypeDesignation
) {
2474 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2475 removeListener
, style
);
2476 } else if (entity
instanceof StateData
) {
2477 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2478 } else if (entity
instanceof StatisticalMeasurementValue
) {
2479 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2480 removeListener
, style
);
2481 } else if (entity
instanceof DerivedUnit
) {
2482 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2483 case LivingSpecimen
:
2484 case PreservedSpecimen
:
2486 element
= new SpecimenCollectionDetailElement(this,
2488 (DerivedUnit
) entity
,
2493 element
= new DerivedUnitElement(this,
2495 (DerivedUnit
) entity
,
2500 } else if (entity
instanceof NamedArea
) {
2501 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2502 } else if (entity
instanceof DeterminationEvent
) {
2503 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2504 } else if (entity
instanceof User
) {
2505 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2506 } else if (entity
instanceof GrantedAuthority
) {
2507 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2508 removeListener
, style
);
2509 } else if (entity
instanceof Group
) {
2510 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2511 } else if (entity
instanceof Taxon
) {
2512 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2513 } else if (entity
instanceof DescriptionElementBase
) {
2514 // this is the special case for protologs, maybe we can do this
2515 // differently when API improves
2516 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2517 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2518 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2520 } else if (entity
instanceof Identifier
) {
2521 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2522 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2525 element
= new IdentifierDetailElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2529 if (element
== null) {
2530 MessagingUtils
.messageDialog("No element for entity", this,
2531 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2536 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2537 element
.setPersistentBackground(backgroundColor
);
2540 parentElement
.addElement(element
);
2548 * Creates a selection element for the given type T.
2551 * <strong>Selection elements not handled by this method:</strong>
2553 * <li>{@link TaxonNodeSelectionElement} see
2554 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2556 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2557 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2563 * a {@link Class} object of the type that you want the selection
2565 * @param parentElement
2566 * a {@link ICdmFormElement} object.
2567 * @param labelString
2568 * a {@link String} object.
2569 * @param selectionType
2571 * a {@link ICdmBase} object.
2574 * @param conversation
2575 * a {@link ConversationHolder} object.
2576 * @return a {@link EntitySelectionElement} object.
2578 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2579 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2581 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2582 labelString
, selection
, mode
, style
);
2584 parentElement
.addElement(element
);
2588 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2589 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2590 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2591 labelString
, selection
, mode
, style
);
2593 parentElement
.addElement(element
);
2597 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2598 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2599 int mode
, int style
) {
2600 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2601 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2603 parentElement
.addElement(element
);
2607 /** {@inheritDoc} */
2608 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2609 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2610 adapt(labelElement
);
2611 parentElement
.addElement(labelElement
);
2612 return labelElement
;
2615 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2616 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2617 label
.setText(labelText
+" (yyyy-MM-dd)");
2618 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2619 dateElement
.initController(this, formElement
);
2625 * Getter for the field <code>selectionProvider</code>.
2628 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2630 public ISelectionProvider
getSelectionProvider() {
2631 return selectionProvider
;
2636 * createDetailedDescriptionDetailElement
2639 * @param parentElement
2640 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2644 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2649 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2652 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2653 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2654 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2656 if (entity
instanceof CategoricalData
) {
2657 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2658 (CategoricalData
) entity
, style
);
2659 } else if (entity
instanceof CommonTaxonName
) {
2660 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2662 } else if (entity
instanceof Distribution
) {
2663 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2665 } else if (entity
instanceof IndividualsAssociation
) {
2666 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2667 (IndividualsAssociation
) entity
, style
);
2668 } else if (entity
instanceof QuantitativeData
) {
2669 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2670 (QuantitativeData
) entity
, style
);
2671 } else if (entity
instanceof TaxonInteraction
) {
2672 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2673 (TaxonInteraction
) entity
, style
);
2674 } else if (entity
instanceof TextData
) {
2675 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2677 throw new IllegalStateException("There is no interface for the given description element");
2679 adapt(detailedDescriptionElement
);
2680 parentElement
.addElement(detailedDescriptionElement
);
2681 return detailedDescriptionElement
;
2686 * Creates a styled text as a part of the form.
2691 * the text initial value
2694 * @return the text widget
2696 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2697 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2698 if (value
!= null) {
2699 text
.setText(value
);
2701 text
.setForeground(getColors().getForeground());
2702 text
.setBackground(getColors().getBackground());
2703 // text.addFocusListener(visibilityHandler);
2707 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2708 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2709 addAndAdaptSection(parentElement
, section
);