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
.combo
.VocabularyComboElement
;
106 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
107 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
108 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
109 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
110 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
111 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
113 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
116 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailSection
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailElement
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailSection
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
312 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
314 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
318 * CdmFormFactory class.
322 * @created Feb 24, 2010
325 public class CdmFormFactory
extends FormToolkit
{
327 private BoldFontHolder2 boldFontHolder2
;
328 private MouseListener selectionMouseHandler
;
329 private FocusListener selectionFocusHandler
;
331 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
333 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
335 private final int orientation
= Window
.getDefaultOrientation();
336 private ISelectionProvider selectionProvider
;
338 /** Constant <code>EMPTY_SELECTION</code> */
339 public static ISelection EMPTY_SELECTION
= new ISelection() {
341 public boolean isEmpty() {
352 private class SelectionMouseHandler
extends MouseAdapter
{
354 public void mouseDown(MouseEvent e
) {
355 notifySelectionListeners(e
);
365 private class SelectionFocusHandler
extends FocusAdapter
{
367 public void focusGained(FocusEvent e
) {
368 notifySelectionListeners(e
);
372 private void notifySelectionListeners(TypedEvent e
) {
373 Event event
= new Event();
374 event
.widget
= e
.widget
;
375 SelectionEvent selectionEvent
= new SelectionEvent(event
);
377 for (SelectionListener listener
: selectionListenerList
) {
378 listener
.widgetSelected(selectionEvent
);
384 * Constructor for CdmFormFactory.
388 * a {@link org.eclipse.swt.widgets.Display} object.
389 * @param selectionProvider
390 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
392 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
394 this.selectionProvider
= selectionProvider
;
400 * Constructor for CdmFormFactory.
404 * a {@link org.eclipse.swt.widgets.Display} object.
406 public CdmFormFactory(Display display
) {
414 private void init() {
415 boldFontHolder2
= new BoldFontHolder2();
416 selectionMouseHandler
= new SelectionMouseHandler();
417 selectionFocusHandler
= new SelectionFocusHandler();
421 * Creates an instance initialized with the correct selectionProvider
423 * Make sure to remove the instance when the entityComposite disposes via
424 * destroySelectionArbitrator(..)
426 * @param entityElement
427 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
429 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
432 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
433 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
434 selectionArbitrator
.addSelectionProvider(selectionProvider
);
435 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
436 addSelectionListener(selectionArbitrator
);
437 return selectionArbitrator
;
442 * destroySelectionArbitrator
445 * @param selectionArbitrator
447 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
450 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
451 removeSelectionListener(selectionArbitrator
);
452 if (selectionProvider
!= null) {
453 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
455 MessagingUtils
.error(this.getClass(),
456 "Tried to destroy a selection listener from this factories listeners but was null", null);
462 * Adapts the {@link AbstractCdmFormElement}:<br>
463 * - sets the {@link IPropertyChangeListener}s handled by this class
468 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
471 public void adapt(ICdmFormElement formElement
) {
472 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
477 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
479 control
.addFocusListener(selectionFocusHandler
);
481 super.adapt(control
, trackFocus
, trackKeyboard
);
486 public void adapt(Composite composite
) {
487 composite
.addMouseListener(selectionMouseHandler
);
488 super.adapt(composite
);
497 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
500 public void destroyElement(ICdmFormElement formElement
) {
501 // return if element was not initialized
502 if (formElement
== null) {
505 // destroy selection arbitrator, if any
506 if (formElement
instanceof ISelectableElement
) {
507 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
509 // remove this element form its parents list of elements
510 // ICdmFormElement parentElement = formElement.getParentElement();
511 // if(parentElement != null){
512 // parentElement.removeElement(formElement);
514 // call destroy on child elements recursively
515 for (ICdmFormElement childElement
: formElement
.getElements()) {
516 destroyElement(childElement
);
518 // dispose of the controls
519 for (Control control
: formElement
.getControls()) {
520 // we added the layoutComposite of the parental element as the
521 // layout composite to this formElement
522 // but we do not want to destroy it.
523 if (control
.equals(formElement
.getLayoutComposite())) {
538 * a {@link org.eclipse.swt.widgets.Composite} object.
539 * @return a {@link org.eclipse.swt.widgets.Label} object.
541 public Label
createEmptyCell(Composite parent
) {
542 return this.createLabel(parent
, null);
547 * createMultiLanguageTextElement
550 * @param parentElement
551 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
554 * a {@link java.lang.String} object.
555 * @param multilanguageText
556 * a {@link java.util.Map} object.
562 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
565 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
566 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
567 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
568 multilanguageText
, textHeight
, style
);
570 parentElement
.addElement(element
);
574 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
575 KeyStatement keyStatement
, int textHeight
, int style
) {
576 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
579 parentElement
.addElement(element
);
584 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
586 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
587 * @param parentElement the parent container
588 * @param labelString the label name
589 * @param initialObject the object from which the <code>toString()</code> method is called
590 * @param style {@link SWT} style constant
591 * @return the created textfield with label
593 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
594 Object initialObject
, int style
) {
595 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
600 * createTextWithLabelElement
603 * @param parentElement
604 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
607 * a {@link java.lang.String} object.
609 * a {@link java.lang.String} object.
612 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
615 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
616 String initialText
, int style
) {
617 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
621 * createTextWithLabelElement
624 * @param parentElement
625 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
628 * a {@link java.lang.String} object.
630 * a {@link java.lang.String} object.
631 * @param textLimit maximal number of characters allowed
634 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
637 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
638 String initialText
, Integer textLimit
, int style
) {
639 if(initialText
==null){
643 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
646 parentElement
.addElement(element
);
650 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
651 int textHeight
, int style
) {
652 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
654 parentElement
.addElement(element
);
658 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
659 URI initialUri
, int style
) {
660 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
662 parentElement
.addElement(element
);
673 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
674 IOpenUrlEnabled openUrlEnabled
, int style
) {
675 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
678 parentElement
.addElement(element
);
684 * @param parentElement
686 * @param conversationEnabled
691 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
692 ConversationHolder conversation
, User user
, int style
) {
693 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
695 parentElement
.addElement(element
);
701 * createIntegerTextWithLabelElement
704 * @param parentElement
705 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
708 * a {@link java.lang.String} object.
709 * @param initialInteger
710 * a {@link java.lang.Integer} object.
714 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
717 public NumberWithLabelElement
createNumberTextWithLabelElement(
718 ICdmFormElement parentElement
, String labelString
,
719 Number initialNumber
, int style
) {
720 NumberWithLabelElement element
= new NumberWithLabelElement(this,
721 parentElement
, labelString
, initialNumber
, style
);
723 parentElement
.addElement(element
);
727 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
728 String labelString
, LanguageString languageString
, int style
) {
729 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
732 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
733 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
734 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
735 languageString
, height
, isMultiLine
, style
);
737 parentElement
.addElement(element
);
743 * createKeyValueViewerElement
746 * @param parentElement
747 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
750 * a {@link java.lang.String} object.
751 * @param valueHeading
752 * a {@link java.lang.String} object.
754 * a {@link java.util.Map} object.
755 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
758 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
759 String valueHeading
, Map
<Object
, Object
> map
) {
760 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
762 parentElement
.addElement(element
);
768 * createTermComboElement
771 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
772 * @param termComboType
774 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
776 * @param parentElement
777 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
780 * a {@link java.lang.String} object.
782 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
786 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
790 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
791 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
792 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
795 parentElement
.addElement(element
);
801 * createTermComboElement
804 * @param termComboType
806 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
808 * @param parentElement
809 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
812 * a {@link java.lang.String} object.
814 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
818 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
822 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
824 ICdmFormElement parentElement
,
828 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
830 parentElement
.addElement(element
);
836 * createTermComboElement
839 * @param termComboType
841 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
843 * @param parentElement
844 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
847 * a {@link java.lang.String} object.
849 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
853 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
857 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
858 TermVocabulary
<?
> termVocabulary
,
859 ICdmFormElement parentElement
,
863 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, style
);
865 parentElement
.addElement(element
);
871 * createEnumComboElement
874 * @param enumComboType
876 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
878 * @param parentElement
879 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
883 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
886 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
887 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
889 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
891 parentElement
.addElement(element
);
895 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
896 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
897 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
899 parentElement
.addElement(element
);
905 * createBrowserElement
909 * a {@link java.net.URI} object.
912 * @param parentElement
913 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
915 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
918 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
919 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
921 parentElement
.addElement(element
);
930 * @param parentElement
931 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
934 * a {@link java.net.URI} object.
937 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
939 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
940 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
942 parentElement
.addElement(element
);
948 * createTextActionElement
952 * a {@link java.lang.String} object.
954 * a {@link java.lang.String} object.
957 * @param parentElement
958 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
961 * a {@link java.lang.String} object.
962 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
965 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
966 String buttonLabel
, String initialText
, int style
) {
967 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
970 parentElement
.addElement(element
);
979 * @param parentElement
980 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
983 * a {@link java.lang.String} object.
984 * @param initialState
988 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
991 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
992 if(initialState
==null){
993 initialState
= Boolean
.FALSE
;
995 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
997 parentElement
.addElement(element
);
1002 * Creates a section as a part of the form.
1004 * @return the section widget
1007 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1010 public Section
adapt(AbstractFormSection section
) {
1011 section
.setMenu(section
.getLayoutComposite().getMenu());
1012 adapt(section
, true, true);
1014 // handle focus and property change events for cdm use
1015 section
.addFocusListener(selectionFocusHandler
);
1016 section
.setPropertyChangeListeners(propertyChangeListeners
);
1018 if (section
.getToggle() != null) {
1019 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1020 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1023 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1025 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1026 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1027 getColors().initializeSectionToolBarColors();
1028 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1029 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1031 // call setTitleBarForeground regardless as it also sets the label color
1032 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1036 private class BoldFontHolder2
{
1037 private Font normalFont
;
1039 private Font boldFont
;
1041 public BoldFontHolder2() {
1044 public Font
getBoldFont(Font font
) {
1045 createBoldFont(font
);
1049 private void createBoldFont(Font font
) {
1050 if (normalFont
== null || !normalFont
.equals(font
)) {
1054 if (boldFont
== null) {
1055 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1059 public void dispose() {
1060 if (boldFont
!= null) {
1061 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1069 * createToggleableTextField
1072 * @param parentElement
1073 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1075 * @param labelString
1076 * a {@link java.lang.String} object.
1077 * @param initialText
1078 * a {@link java.lang.String} object.
1079 * @param initialState
1083 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1086 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1087 String initialText
, boolean initialState
, int style
) {
1088 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1089 initialState
, style
| orientation
);
1091 parentElement
.addElement(element
);
1097 * createTimePeriodElement
1100 * @param parentElement
1101 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1103 * @param labelString
1104 * a {@link java.lang.String} object.
1106 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1109 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1112 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1113 TimePeriod timePeriod
, int style
) {
1114 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1116 parentElement
.addElement(element
);
1122 * createGatheringEventUnitElement
1125 * @param parentElement
1126 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1128 * @param labelString
1129 * a {@link java.lang.String} object.
1131 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1134 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1137 public GatheringEventUnitElement
createGatheringEventUnitElement(
1138 ICdmFormElement parentElement
,
1140 DerivedUnitFacade gatheringEvent
,
1141 MinMaxTextSection
.UnitType unitType
,
1143 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1150 parentElement
.addElement(element
);
1156 * createPointElement
1161 * @param parentElement
1162 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1165 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1166 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1168 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1169 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1171 parentElement
.addElement(element
);
1178 * @param conversationHolder
1180 * @param detailsViewer
1184 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1185 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1186 parentElement
.addElement(section
);
1193 * createDateDetailSection
1196 * @param parentElement
1197 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1201 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1204 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1205 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1206 parentElement
.addElement(section
);
1213 * createDateDetailSection
1216 * @param parentElement
1217 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1221 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1224 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1225 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1226 parentElement
.addElement(section
);
1233 * createPartialElement
1236 * @param parentElement
1237 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1239 * @param labelString
1240 * a {@link java.lang.String} object.
1242 * a {@link org.joda.time.Partial} object.
1245 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1248 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1250 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1252 parentElement
.addElement(element
);
1258 * addSelectionListener
1262 * a {@link org.eclipse.swt.events.SelectionListener} object.
1264 public void addSelectionListener(SelectionListener listener
) {
1265 selectionListenerList
.add(listener
);
1270 * removeSelectionListener
1274 * a {@link org.eclipse.swt.events.SelectionListener} object.
1276 public void removeSelectionListener(SelectionListener listener
) {
1277 if (listener
== null) {
1278 MessagingUtils
.error(this.getClass(),
1279 "Tried to remove a selection listener from this factories listeners but was null", null);
1281 selectionListenerList
.remove(listener
);
1287 * addPropertyChangeListener
1291 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1294 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1295 if (propertyChangeListeners
.contains(listener
)) {
1298 propertyChangeListeners
.add(0, listener
);
1303 * removePropertyChangeListener
1307 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1310 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1311 propertyChangeListeners
.remove(listener
);
1315 * @return the propertyChangeListeners
1317 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1318 return propertyChangeListeners
;
1323 * createHorizontalSeparator
1326 * @param parentElement
1327 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1331 * @return a {@link org.eclipse.swt.widgets.Label} object.
1333 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1334 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1335 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1341 * createVersionElement
1344 * @param parentElement
1345 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1348 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1353 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1356 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1357 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1359 parentElement
.addElement(element
);
1364 * @param cdmBaseSection
1369 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1370 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1372 parentElement
.addElement(element
);
1378 * createVersionSection
1381 * @param parentElement
1382 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1387 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1390 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1391 VersionSection section
= new VersionSection(this, parentElement
, style
);
1392 parentElement
.addElement(section
);
1402 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1403 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1404 parentElement
.addElement(section
);
1411 * createEmptyElement
1414 * @param parentElement
1415 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1417 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1419 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1420 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1422 parentElement
.addElement(element
);
1428 * createHeadlineSection
1431 * @param parentElement
1432 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1435 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1438 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1439 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1440 parentElement
.addElement(section
);
1447 * createParsingMessageElement
1450 * @param parentElement
1451 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1453 * @param parserProblem
1454 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1459 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1462 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1463 ParserProblem parserProblem
, int style
) {
1464 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1466 parentElement
.addElement(element
);
1470 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1471 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1473 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1474 selectionProvider
, style
);
1476 parentElement
.addElement(section
);
1483 * @param definedTermClass
1484 * @param formElement
1488 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1489 AbstractCdmDetailSection parentElement
, int style
) {
1490 AbstractCdmDetailElement element
= null;
1492 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1493 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1494 } else if (definedTermClass
.equals(Feature
.class)) {
1495 element
= new FeatureDetailElement(this, parentElement
);
1497 element
= new DefinedTermDetailElement(this, parentElement
);
1501 parentElement
.addElement(element
);
1506 //--------DetailSections---------
1507 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1508 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1509 addAndAdaptSection(parentElement
, section
);
1513 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1514 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1515 addAndAdaptSection(parentElement
, section
);
1519 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1520 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1521 addAndAdaptSection(parentElement
, section
);
1525 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1526 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1527 addAndAdaptSection(parentElement
, section
);
1531 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1532 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1533 addAndAdaptSection(parentElement
, section
);
1537 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1538 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1539 addAndAdaptSection(parentElement
, section
);
1543 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1544 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1545 addAndAdaptSection(parentElement
, section
);
1549 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1550 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1551 addAndAdaptSection(parentElement
, section
);
1555 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1556 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1557 addAndAdaptSection(parentElement
, section
);
1561 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1562 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1563 addAndAdaptSection(parentElement
, section
);
1567 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1568 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1569 addAndAdaptSection(parentElement
, section
);
1573 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1574 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1575 addAndAdaptSection(parentElement
, section
);
1579 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1580 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1581 addAndAdaptSection(parentElement
, section
);
1585 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1586 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1587 addAndAdaptSection(parentElement
, section
);
1591 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1592 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1593 addAndAdaptSection(parentElement
, section
);
1597 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1598 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1599 addAndAdaptSection(parentElement
, section
);
1603 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1604 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1605 addAndAdaptSection(parentElement
, section
);
1609 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1610 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1611 addAndAdaptSection(parentElement
, section
);
1615 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1616 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1617 addAndAdaptSection(parentElement
, section
);
1621 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1622 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1623 addAndAdaptSection(parentElement
, section
);
1627 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1628 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1629 addAndAdaptSection(parentElement
, section
);
1633 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1634 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1635 addAndAdaptSection(parentElement
, section
);
1639 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1640 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1641 addAndAdaptSection(parentElement
, section
);
1645 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1646 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1647 addAndAdaptSection(parentElement
, section
);
1651 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1652 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1653 addAndAdaptSection(parentElement
, section
);
1657 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1658 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1659 addAndAdaptSection(parentElement
, section
);
1663 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1664 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1665 addAndAdaptSection(parentElement
, section
);
1669 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1670 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1671 addAndAdaptSection(parentElement
, section
);
1675 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1676 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1677 addAndAdaptSection(parentElement
, section
);
1681 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1682 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1683 addAndAdaptSection(parentElement
, section
);
1687 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1688 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1689 addAndAdaptSection(parentElement
, section
);
1693 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1694 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1695 addAndAdaptSection(parentElement
, section
);
1699 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1700 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1701 addAndAdaptSection(parentElement
, section
);
1705 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1706 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1707 addAndAdaptSection(parentElement
, section
);
1711 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1712 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1713 addAndAdaptSection(parentElement
, section
);
1717 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1718 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1719 addAndAdaptSection(parentElement
, section
);
1723 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1724 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1725 addAndAdaptSection(parentElement
, section
);
1729 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1730 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1731 addAndAdaptSection(parentElement
, section
);
1735 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1736 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1737 addAndAdaptSection(parentElement
, section
);
1741 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1742 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1743 addAndAdaptSection(parentElement
, section
);
1747 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1748 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1749 addAndAdaptSection(parentElement
, section
);
1753 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1754 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1755 addAndAdaptSection(parentElement
, section
);
1759 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1760 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1761 addAndAdaptSection(parentElement
, section
);
1765 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1766 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1767 addAndAdaptSection(parentElement
, section
);
1771 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1772 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1773 addAndAdaptSection(parentElement
, section
);
1777 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1778 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1779 addAndAdaptSection(parentElement
, section
);
1783 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1784 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1785 addAndAdaptSection(parentElement
, section
);
1789 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1790 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1791 addAndAdaptSection(parentElement
, section
);
1795 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1796 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1797 addAndAdaptSection(parentElement
, section
);
1801 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1802 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1803 addAndAdaptSection(parentElement
, section
);
1807 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1808 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1809 addAndAdaptSection(parentElement
, section
);
1813 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1814 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1815 addAndAdaptSection(parentElement
, section
);
1819 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1820 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1821 addAndAdaptSection(parentElement
, section
);
1825 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1826 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1827 addAndAdaptSection(parentElement
, section
);
1831 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1832 parentElement
.addElement(section
);
1836 //--------DetailElements------------
1838 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1839 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1840 addAndAdaptElement(parentElement
, element
);
1844 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1845 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1846 addAndAdaptElement(parentElement
, element
);
1850 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1851 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1852 addAndAdaptElement(parentElement
, element
);
1856 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1857 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1858 addAndAdaptElement(parentElement
, element
);
1862 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1863 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1864 addAndAdaptElement(parentElement
, element
);
1868 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1869 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1870 addAndAdaptElement(parentElement
, element
);
1874 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1875 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1876 addAndAdaptElement(parentElement
, element
);
1880 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1881 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1882 addAndAdaptElement(parentElement
, element
);
1886 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1887 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1888 addAndAdaptElement(parentElement
, element
);
1892 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1893 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1894 addAndAdaptElement(parentElement
, element
);
1898 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1899 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1900 addAndAdaptElement(parentElement
, element
);
1904 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1905 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1906 addAndAdaptElement(parentElement
, element
);
1910 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1911 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1912 addAndAdaptElement(parentElement
, element
);
1916 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1917 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1918 addAndAdaptElement(parentElement
, element
);
1922 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1923 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1924 addAndAdaptElement(parentElement
, element
);
1928 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1929 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1930 addAndAdaptElement(parentElement
, element
);
1934 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1935 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1936 addAndAdaptElement(parentElement
, element
);
1940 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1941 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1942 addAndAdaptElement(parentElement
, element
);
1946 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1947 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1948 addAndAdaptElement(parentElement
, element
);
1952 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1953 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1954 addAndAdaptElement(parentElement
, element
);
1958 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1959 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1960 addAndAdaptElement(parentElement
, element
);
1964 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1965 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1966 addAndAdaptElement(parentElement
, element
);
1970 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1971 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1972 addAndAdaptElement(parentElement
, element
);
1976 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1977 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1978 addAndAdaptElement(parentElement
, element
);
1982 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1983 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1984 addAndAdaptElement(parentElement
, element
);
1988 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1989 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1990 addAndAdaptElement(parentElement
, element
);
1994 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1995 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
1996 addAndAdaptElement(parentElement
, element
);
2000 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2001 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2002 addAndAdaptElement(parentElement
, element
);
2007 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2008 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2009 addAndAdaptElement(parentElement
, element
);
2013 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2014 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2015 addAndAdaptElement(parentElement
, element
);
2019 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2020 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2021 addAndAdaptElement(parentElement
, element
);
2025 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2026 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2027 addAndAdaptElement(parentElement
, element
);
2031 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2032 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2033 addAndAdaptElement(parentElement
, element
);
2037 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2038 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2039 addAndAdaptElement(parentElement
, element
);
2043 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2044 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2045 addAndAdaptElement(parentElement
, element
);
2049 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2050 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2051 addAndAdaptElement(parentElement
, element
);
2055 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2056 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2057 addAndAdaptElement(parentElement
, element
);
2061 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2062 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2063 addAndAdaptElement(parentElement
, element
);
2067 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2068 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2069 addAndAdaptElement(parentElement
, element
);
2073 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2074 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2075 addAndAdaptElement(parentElement
, element
);
2079 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2080 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2081 addAndAdaptElement(parentElement
, element
);
2085 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2086 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2087 addAndAdaptElement(parentElement
, element
);
2091 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2092 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2093 addAndAdaptElement(parentElement
, element
);
2097 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2098 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2099 addAndAdaptElement(parentElement
, mediaDetailElement
);
2100 return mediaDetailElement
;
2103 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2104 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2105 addAndAdaptElement(parentElement
, element
);
2109 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2110 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2111 addAndAdaptElement(parentElement
, element
);
2115 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2116 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2117 addAndAdaptElement(parentElement
, element
);
2121 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2122 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2123 addAndAdaptElement(parentElement
, element
);
2127 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2128 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2129 addAndAdaptElement(parentElement
, element
);
2133 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2134 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2135 addAndAdaptElement(parentElement
, element
);
2139 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2140 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2141 addAndAdaptElement(parentElement
, element
);
2145 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2146 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2147 addAndAdaptElement(parentElement
, element
);
2151 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2152 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2153 addAndAdaptElement(parentElement
, element
);
2158 * @param parentElement
2161 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2163 parentElement
.addElement(element
);
2166 //--------EntityCollectionSection----------
2167 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2168 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2169 addAndAdaptSection(parentElement
, section
);
2173 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2174 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2175 addAndAdaptSection(parentElement
, section
);
2179 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2180 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2181 addAndAdaptSection(parentElement
, section
);
2185 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2186 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2187 addAndAdaptSection(parentElement
, section
);
2191 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2192 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2193 addAndAdaptSection(parentElement
, section
);
2197 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2198 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2199 addAndAdaptSection(parentElement
, section
);
2203 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2204 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2205 addAndAdaptSection(parentElement
, section
);
2209 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2210 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2211 addAndAdaptSection(parentElement
, section
);
2215 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2216 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2217 addAndAdaptSection(parentElement
, section
);
2221 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2222 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2223 addAndAdaptSection(parentElement
, section
);
2227 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2228 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2229 addAndAdaptSection(parentElement
, section
);
2233 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2234 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2235 addAndAdaptSection(parentElement
, section
);
2239 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2240 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2241 addAndAdaptSection(parentElement
, section
);
2245 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2246 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2247 addAndAdaptSection(parentElement
, section
);
2251 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2252 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2253 addAndAdaptSection(parentElement
, section
);
2257 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2258 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2259 addAndAdaptSection(parentElement
, section
);
2263 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2264 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2265 addAndAdaptSection(parentElement
, section
);
2269 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2270 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2271 addAndAdaptSection(parentElement
, section
);
2275 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2276 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2277 addAndAdaptSection(parentElement
, section
);
2281 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2282 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2283 addAndAdaptSection(parentElement
, section
);
2287 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2288 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2289 addAndAdaptSection(parentElement
, section
);
2293 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2294 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2295 addAndAdaptSection(parentElement
, section
);
2299 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2300 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2301 addAndAdaptSection(parentElement
, section
);
2305 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2306 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2307 addAndAdaptSection(parentElement
, section
);
2311 public IdentifierDetailSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2312 IdentifierDetailSection section
= new IdentifierDetailSection(this, conversation
, parentElement
, style
);
2313 addAndAdaptSection(parentElement
, section
);
2317 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2318 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2319 addAndAdaptSection(parentElement
, section
);
2323 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2324 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2325 addAndAdaptSection(parentElement
, section
);
2329 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2330 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2331 addAndAdaptSection(parentElement
, section
);
2335 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2336 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2337 addAndAdaptSection(parentElement
, section
);
2341 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2342 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2343 addAndAdaptSection(parentElement
, section
);
2347 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2348 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2349 addAndAdaptSection(parentElement
, section
);
2353 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2354 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2355 addAndAdaptSection(parentElement
, section
);
2359 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2360 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2361 addAndAdaptSection(parentElement
, section
);
2365 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2366 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2367 addAndAdaptSection(parentElement
, section
);
2371 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2372 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
2373 addAndAdaptSection(parentElement
, section
);
2377 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2378 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2379 addAndAdaptSection(parentElement
, section
);
2383 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2384 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2385 addAndAdaptSection(parentElement
, section
);
2389 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2390 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2391 addAndAdaptSection(parentElement
, section
);
2395 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2396 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2397 addAndAdaptSection(parentElement
, section
);
2401 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2402 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2403 addAndAdaptSection(parentElement
, section
);
2407 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2408 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2409 AbstractEntityCollectionElement element
= null;
2411 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2413 if (entity
instanceof Annotation
) {
2414 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2415 } else if (entity
instanceof Person
) {
2416 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2417 } else if (entity
instanceof Credit
) {
2418 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2419 } else if (entity
instanceof Extension
) {
2420 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2421 } else if (entity
instanceof Marker
) {
2422 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2423 } else if (entity
instanceof Media
) {
2424 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, true, style
);
2425 } else if (entity
instanceof MediaRepresentation
) {
2426 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2428 } else if (entity
instanceof ImageFile
) {
2429 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2430 } else if (entity
instanceof MediaRepresentationPart
) {
2431 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2432 removeListener
, style
);
2433 } else if (entity
instanceof NomenclaturalStatus
) {
2434 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2436 } else if (entity
instanceof Rights
) {
2437 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2438 } else if (entity
instanceof DescriptionElementSource
) {
2439 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2440 removeListener
, style
);
2441 } else if (entity
instanceof IdentifiableSource
) {
2442 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2444 } else if (entity
instanceof DefinedTerm
) {
2445 switch(((DefinedTerm
)entity
).getTermType()) {
2447 element
= new ScopeElement(this,
2449 (DefinedTerm
) entity
,
2454 element
= new ModifierElement(this,
2456 (DefinedTerm
) entity
,
2461 //FIXME : Actually we should through an exception here
2466 } else if (entity
instanceof Reference
) {
2467 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2468 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2471 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2473 } else if (entity
instanceof NameTypeDesignation
) {
2474 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2476 } else if (entity
instanceof NameRelationship
) {
2477 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2479 } else if (entity
instanceof SynonymRelationship
) {
2480 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2482 } else if (entity
instanceof SpecimenTypeDesignation
) {
2483 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2484 removeListener
, style
);
2485 } else if (entity
instanceof StateData
) {
2486 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2487 } else if (entity
instanceof StatisticalMeasurementValue
) {
2488 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2489 removeListener
, style
);
2490 } else if (entity
instanceof DerivedUnit
) {
2491 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2492 case LivingSpecimen
:
2493 case PreservedSpecimen
:
2495 element
= new SpecimenCollectionDetailElement(this,
2497 (DerivedUnit
) entity
,
2502 element
= new DerivedUnitElement(this,
2504 (DerivedUnit
) entity
,
2509 } else if (entity
instanceof NamedArea
) {
2510 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2511 } else if (entity
instanceof DeterminationEvent
) {
2512 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2513 } else if (entity
instanceof User
) {
2514 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2515 } else if (entity
instanceof GrantedAuthority
) {
2516 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2517 removeListener
, style
);
2518 } else if (entity
instanceof Group
) {
2519 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2520 } else if (entity
instanceof Taxon
) {
2521 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2522 } else if (entity
instanceof DescriptionElementBase
) {
2523 // this is the special case for protologs, maybe we can do this
2524 // differently when API improves
2525 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2526 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2527 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2529 } else if (entity
instanceof Identifier
) {
2530 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2531 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2534 element
= new IdentifierDetailElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2538 if (element
== null) {
2539 MessagingUtils
.messageDialog("No element for entity", this,
2540 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2545 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2546 element
.setPersistentBackground(backgroundColor
);
2549 parentElement
.addElement(element
);
2557 * Creates a selection element for the given type T.
2560 * <strong>Selection elements not handled by this method:</strong>
2562 * <li>{@link TaxonNodeSelectionElement} see
2563 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2565 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2566 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2572 * a {@link Class} object of the type that you want the selection
2574 * @param parentElement
2575 * a {@link ICdmFormElement} object.
2576 * @param labelString
2577 * a {@link String} object.
2578 * @param selectionType
2580 * a {@link ICdmBase} object.
2583 * @param conversation
2584 * a {@link ConversationHolder} object.
2585 * @return a {@link EntitySelectionElement} object.
2587 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2588 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2590 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2591 labelString
, selection
, mode
, style
);
2593 parentElement
.addElement(element
);
2597 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2598 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2599 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2600 labelString
, selection
, mode
, style
);
2602 parentElement
.addElement(element
);
2606 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2607 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2608 int mode
, int style
) {
2609 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2610 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2612 parentElement
.addElement(element
);
2616 /** {@inheritDoc} */
2617 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2618 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2619 adapt(labelElement
);
2620 parentElement
.addElement(labelElement
);
2621 return labelElement
;
2624 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2625 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2626 label
.setText(labelText
+" (yyyy-MM-dd)");
2627 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2628 dateElement
.initController(this, formElement
);
2634 * Getter for the field <code>selectionProvider</code>.
2637 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2639 public ISelectionProvider
getSelectionProvider() {
2640 return selectionProvider
;
2645 * createDetailedDescriptionDetailElement
2648 * @param parentElement
2649 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2653 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2658 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2661 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2662 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2663 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2665 if (entity
instanceof CategoricalData
) {
2666 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2667 (CategoricalData
) entity
, style
);
2668 } else if (entity
instanceof CommonTaxonName
) {
2669 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2671 } else if (entity
instanceof Distribution
) {
2672 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2674 } else if (entity
instanceof IndividualsAssociation
) {
2675 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2676 (IndividualsAssociation
) entity
, style
);
2677 } else if (entity
instanceof QuantitativeData
) {
2678 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2679 (QuantitativeData
) entity
, style
);
2680 } else if (entity
instanceof TaxonInteraction
) {
2681 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2682 (TaxonInteraction
) entity
, style
);
2683 } else if (entity
instanceof TextData
) {
2684 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2686 throw new IllegalStateException("There is no interface for the given description element");
2688 adapt(detailedDescriptionElement
);
2689 parentElement
.addElement(detailedDescriptionElement
);
2690 return detailedDescriptionElement
;
2695 * Creates a styled text as a part of the form.
2700 * the text initial value
2703 * @return the text widget
2705 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2706 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2707 if (value
!= null) {
2708 text
.setText(value
);
2710 text
.setForeground(getColors().getForeground());
2711 text
.setBackground(getColors().getBackground());
2712 // text.addFocusListener(visibilityHandler);
2716 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2717 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2718 addAndAdaptSection(parentElement
, section
);