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
.State
;
79 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
80 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
81 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
82 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
83 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
84 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
85 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
86 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
87 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
88 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
89 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
90 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
91 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
92 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
93 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
94 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
95 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
96 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
97 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
98 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
99 import eu
.etaxonomy
.cdm
.model
.taxon
.SynonymRelationship
;
100 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
101 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
102 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
103 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
104 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
105 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
106 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
107 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
108 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
109 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
110 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
111 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
116 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailSection
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
315 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
316 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
317 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
321 * CdmFormFactory class.
325 * @created Feb 24, 2010
328 public class CdmFormFactory
extends FormToolkit
{
330 private BoldFontHolder2 boldFontHolder2
;
331 private MouseListener selectionMouseHandler
;
332 private FocusListener selectionFocusHandler
;
334 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
336 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
338 private final int orientation
= Window
.getDefaultOrientation();
339 private ISelectionProvider selectionProvider
;
341 /** Constant <code>EMPTY_SELECTION</code> */
342 public static ISelection EMPTY_SELECTION
= new ISelection() {
344 public boolean isEmpty() {
355 private class SelectionMouseHandler
extends MouseAdapter
{
357 public void mouseDown(MouseEvent e
) {
358 notifySelectionListeners(e
);
368 private class SelectionFocusHandler
extends FocusAdapter
{
370 public void focusGained(FocusEvent e
) {
371 notifySelectionListeners(e
);
375 private void notifySelectionListeners(TypedEvent e
) {
376 Event event
= new Event();
377 event
.widget
= e
.widget
;
378 SelectionEvent selectionEvent
= new SelectionEvent(event
);
380 for (SelectionListener listener
: selectionListenerList
) {
381 listener
.widgetSelected(selectionEvent
);
387 * Constructor for CdmFormFactory.
391 * a {@link org.eclipse.swt.widgets.Display} object.
392 * @param selectionProvider
393 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
395 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
397 this.selectionProvider
= selectionProvider
;
403 * Constructor for CdmFormFactory.
407 * a {@link org.eclipse.swt.widgets.Display} object.
409 public CdmFormFactory(Display display
) {
417 private void init() {
418 boldFontHolder2
= new BoldFontHolder2();
419 selectionMouseHandler
= new SelectionMouseHandler();
420 selectionFocusHandler
= new SelectionFocusHandler();
424 * Creates an instance initialized with the correct selectionProvider
426 * Make sure to remove the instance when the entityComposite disposes via
427 * destroySelectionArbitrator(..)
429 * @param entityElement
430 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
432 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
435 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
436 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
437 selectionArbitrator
.addSelectionProvider(selectionProvider
);
438 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
439 addSelectionListener(selectionArbitrator
);
440 return selectionArbitrator
;
445 * destroySelectionArbitrator
448 * @param selectionArbitrator
450 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
453 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
454 removeSelectionListener(selectionArbitrator
);
455 if (selectionProvider
!= null) {
456 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
458 MessagingUtils
.error(this.getClass(),
459 "Tried to destroy a selection listener from this factories listeners but was null", null);
465 * Adapts the {@link AbstractCdmFormElement}:<br>
466 * - sets the {@link IPropertyChangeListener}s handled by this class
471 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
474 public void adapt(ICdmFormElement formElement
) {
475 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
480 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
482 control
.addFocusListener(selectionFocusHandler
);
484 super.adapt(control
, trackFocus
, trackKeyboard
);
489 public void adapt(Composite composite
) {
490 composite
.addMouseListener(selectionMouseHandler
);
491 super.adapt(composite
);
500 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
503 public void destroyElement(ICdmFormElement formElement
) {
504 // return if element was not initialized
505 if (formElement
== null) {
508 // destroy selection arbitrator, if any
509 if (formElement
instanceof ISelectableElement
) {
510 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
512 // remove this element form its parents list of elements
513 // ICdmFormElement parentElement = formElement.getParentElement();
514 // if(parentElement != null){
515 // parentElement.removeElement(formElement);
517 // call destroy on child elements recursively
518 for (ICdmFormElement childElement
: formElement
.getElements()) {
519 destroyElement(childElement
);
521 // dispose of the controls
522 for (Control control
: formElement
.getControls()) {
523 // we added the layoutComposite of the parental element as the
524 // layout composite to this formElement
525 // but we do not want to destroy it.
526 if (control
.equals(formElement
.getLayoutComposite())) {
541 * a {@link org.eclipse.swt.widgets.Composite} object.
542 * @return a {@link org.eclipse.swt.widgets.Label} object.
544 public Label
createEmptyCell(Composite parent
) {
545 return this.createLabel(parent
, null);
550 * createMultiLanguageTextElement
553 * @param parentElement
554 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
557 * a {@link java.lang.String} object.
558 * @param multilanguageText
559 * a {@link java.util.Map} object.
565 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
568 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
569 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
570 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
571 multilanguageText
, textHeight
, style
);
573 parentElement
.addElement(element
);
577 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
578 KeyStatement keyStatement
, int textHeight
, int style
) {
579 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
582 parentElement
.addElement(element
);
587 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
589 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
590 * @param parentElement the parent container
591 * @param labelString the label name
592 * @param initialObject the object from which the <code>toString()</code> method is called
593 * @param style {@link SWT} style constant
594 * @return the created textfield with label
596 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
597 Object initialObject
, int style
) {
598 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
603 * createTextWithLabelElement
606 * @param parentElement
607 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
610 * a {@link java.lang.String} object.
612 * a {@link java.lang.String} object.
615 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
618 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
619 String initialText
, int style
) {
620 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
624 * createTextWithLabelElement
627 * @param parentElement
628 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
631 * a {@link java.lang.String} object.
633 * a {@link java.lang.String} object.
634 * @param textLimit maximal number of characters allowed
637 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
640 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
641 String initialText
, Integer textLimit
, int style
) {
642 if(initialText
==null){
646 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
649 parentElement
.addElement(element
);
653 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
654 int textHeight
, int style
) {
655 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
657 parentElement
.addElement(element
);
661 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
662 URI initialUri
, int style
) {
663 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
665 parentElement
.addElement(element
);
676 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
677 IOpenUrlEnabled openUrlEnabled
, int style
) {
678 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
681 parentElement
.addElement(element
);
687 * @param parentElement
689 * @param conversationEnabled
694 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
695 ConversationHolder conversation
, User user
, int style
) {
696 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
698 parentElement
.addElement(element
);
704 * createIntegerTextWithLabelElement
707 * @param parentElement
708 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
711 * a {@link java.lang.String} object.
712 * @param initialInteger
713 * a {@link java.lang.Integer} object.
717 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
720 public NumberWithLabelElement
createNumberTextWithLabelElement(
721 ICdmFormElement parentElement
, String labelString
,
722 Number initialNumber
, int style
) {
723 NumberWithLabelElement element
= new NumberWithLabelElement(this,
724 parentElement
, labelString
, initialNumber
, style
);
726 parentElement
.addElement(element
);
730 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
731 String labelString
, LanguageString languageString
, int style
) {
732 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
735 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
736 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
737 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
738 languageString
, height
, isMultiLine
, style
);
740 parentElement
.addElement(element
);
746 * createKeyValueViewerElement
749 * @param parentElement
750 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
753 * a {@link java.lang.String} object.
754 * @param valueHeading
755 * a {@link java.lang.String} object.
757 * a {@link java.util.Map} object.
758 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
761 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
762 String valueHeading
, Map
<Object
, Object
> map
) {
763 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
765 parentElement
.addElement(element
);
771 * createTermComboElement
774 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
775 * @param termComboType
777 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
779 * @param parentElement
780 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
783 * a {@link java.lang.String} object.
785 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
789 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
793 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
794 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
795 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
798 parentElement
.addElement(element
);
804 * createTermComboElement
807 * @param termComboType
809 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
811 * @param parentElement
812 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
815 * a {@link java.lang.String} object.
817 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
821 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
825 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
827 ICdmFormElement parentElement
,
831 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
833 parentElement
.addElement(element
);
839 * createTermComboElement
842 * @param termComboType
844 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
846 * @param parentElement
847 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
850 * a {@link java.lang.String} object.
852 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
856 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
860 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
861 TermVocabulary
<?
> termVocabulary
,
862 ICdmFormElement parentElement
,
866 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, style
);
868 parentElement
.addElement(element
);
874 * createEnumComboElement
877 * @param enumComboType
879 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
881 * @param parentElement
882 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
886 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
889 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
890 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
892 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
894 parentElement
.addElement(element
);
898 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
899 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
900 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
902 parentElement
.addElement(element
);
908 * createBrowserElement
912 * a {@link java.net.URI} object.
915 * @param parentElement
916 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
918 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
921 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
922 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
924 parentElement
.addElement(element
);
933 * @param parentElement
934 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
937 * a {@link java.net.URI} object.
940 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
942 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
943 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
945 parentElement
.addElement(element
);
951 * createTextActionElement
955 * a {@link java.lang.String} object.
957 * a {@link java.lang.String} object.
960 * @param parentElement
961 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
964 * a {@link java.lang.String} object.
965 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
968 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
969 String buttonLabel
, String initialText
, int style
) {
970 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
973 parentElement
.addElement(element
);
982 * @param parentElement
983 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
986 * a {@link java.lang.String} object.
987 * @param initialState
991 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
994 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
995 if(initialState
==null){
996 initialState
= Boolean
.FALSE
;
998 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1000 parentElement
.addElement(element
);
1005 * Creates a section as a part of the form.
1007 * @return the section widget
1010 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1013 public Section
adapt(AbstractFormSection section
) {
1014 section
.setMenu(section
.getLayoutComposite().getMenu());
1015 adapt(section
, true, true);
1017 // handle focus and property change events for cdm use
1018 section
.addFocusListener(selectionFocusHandler
);
1019 section
.setPropertyChangeListeners(propertyChangeListeners
);
1021 if (section
.getToggle() != null) {
1022 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1023 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1026 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1028 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1029 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1030 getColors().initializeSectionToolBarColors();
1031 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1032 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1034 // call setTitleBarForeground regardless as it also sets the label color
1035 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1039 private class BoldFontHolder2
{
1040 private Font normalFont
;
1042 private Font boldFont
;
1044 public BoldFontHolder2() {
1047 public Font
getBoldFont(Font font
) {
1048 createBoldFont(font
);
1052 private void createBoldFont(Font font
) {
1053 if (normalFont
== null || !normalFont
.equals(font
)) {
1057 if (boldFont
== null) {
1058 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1062 public void dispose() {
1063 if (boldFont
!= null) {
1064 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1072 * createToggleableTextField
1075 * @param parentElement
1076 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1078 * @param labelString
1079 * a {@link java.lang.String} object.
1080 * @param initialText
1081 * a {@link java.lang.String} object.
1082 * @param initialState
1086 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1089 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1090 String initialText
, boolean initialState
, int style
) {
1091 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1092 initialState
, style
| orientation
);
1094 parentElement
.addElement(element
);
1100 * createTimePeriodElement
1103 * @param parentElement
1104 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1106 * @param labelString
1107 * a {@link java.lang.String} object.
1109 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1112 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1115 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1116 TimePeriod timePeriod
, int style
) {
1117 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1119 parentElement
.addElement(element
);
1125 * createGatheringEventUnitElement
1128 * @param parentElement
1129 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1131 * @param labelString
1132 * a {@link java.lang.String} object.
1134 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1137 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1140 public GatheringEventUnitElement
createGatheringEventUnitElement(
1141 ICdmFormElement parentElement
,
1143 DerivedUnitFacade gatheringEvent
,
1144 MinMaxTextSection
.UnitType unitType
,
1146 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1153 parentElement
.addElement(element
);
1159 * createPointElement
1164 * @param parentElement
1165 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1168 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1169 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1171 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1172 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1174 parentElement
.addElement(element
);
1181 * @param conversationHolder
1183 * @param detailsViewer
1187 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1188 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1189 parentElement
.addElement(section
);
1196 * createDateDetailSection
1199 * @param parentElement
1200 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1204 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1207 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1208 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1209 parentElement
.addElement(section
);
1216 * createDateDetailSection
1219 * @param parentElement
1220 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1224 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1227 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1228 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1229 parentElement
.addElement(section
);
1236 * createPartialElement
1239 * @param parentElement
1240 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1242 * @param labelString
1243 * a {@link java.lang.String} object.
1245 * a {@link org.joda.time.Partial} object.
1248 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1251 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1253 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1255 parentElement
.addElement(element
);
1261 * addSelectionListener
1265 * a {@link org.eclipse.swt.events.SelectionListener} object.
1267 public void addSelectionListener(SelectionListener listener
) {
1268 selectionListenerList
.add(listener
);
1273 * removeSelectionListener
1277 * a {@link org.eclipse.swt.events.SelectionListener} object.
1279 public void removeSelectionListener(SelectionListener listener
) {
1280 if (listener
== null) {
1281 MessagingUtils
.error(this.getClass(),
1282 "Tried to remove a selection listener from this factories listeners but was null", null);
1284 selectionListenerList
.remove(listener
);
1290 * addPropertyChangeListener
1294 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1297 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1298 if (propertyChangeListeners
.contains(listener
)) {
1301 propertyChangeListeners
.add(0, listener
);
1306 * removePropertyChangeListener
1310 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1313 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1314 propertyChangeListeners
.remove(listener
);
1318 * @return the propertyChangeListeners
1320 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1321 return propertyChangeListeners
;
1326 * createHorizontalSeparator
1329 * @param parentElement
1330 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1334 * @return a {@link org.eclipse.swt.widgets.Label} object.
1336 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1337 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1338 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1344 * createVersionElement
1347 * @param parentElement
1348 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1351 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1356 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1359 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1360 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1362 parentElement
.addElement(element
);
1367 * @param cdmBaseSection
1372 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1373 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1375 parentElement
.addElement(element
);
1381 * createVersionSection
1384 * @param parentElement
1385 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1390 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1393 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1394 VersionSection section
= new VersionSection(this, parentElement
, style
);
1395 parentElement
.addElement(section
);
1405 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1406 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1407 parentElement
.addElement(section
);
1414 * createEmptyElement
1417 * @param parentElement
1418 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1420 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1422 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1423 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1425 parentElement
.addElement(element
);
1431 * createHeadlineSection
1434 * @param parentElement
1435 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1438 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1441 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1442 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1443 parentElement
.addElement(section
);
1450 * createParsingMessageElement
1453 * @param parentElement
1454 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1456 * @param parserProblem
1457 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1462 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1465 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1466 ParserProblem parserProblem
, int style
) {
1467 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1469 parentElement
.addElement(element
);
1473 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1474 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1476 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1477 selectionProvider
, style
);
1479 parentElement
.addElement(section
);
1486 * @param definedTermClass
1487 * @param formElement
1491 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1492 AbstractCdmDetailSection parentElement
, int style
) {
1493 AbstractCdmDetailElement element
= null;
1495 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1496 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1497 } else if (definedTermClass
.equals(Feature
.class)) {
1498 element
= new FeatureDetailElement(this, parentElement
);
1500 element
= new DefinedTermDetailElement(this, parentElement
);
1504 parentElement
.addElement(element
);
1509 //--------DetailSections---------
1510 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1511 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1512 addAndAdaptSection(parentElement
, section
);
1516 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1517 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1518 addAndAdaptSection(parentElement
, section
);
1522 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1523 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1524 addAndAdaptSection(parentElement
, section
);
1528 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1529 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1530 addAndAdaptSection(parentElement
, section
);
1534 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1535 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1536 addAndAdaptSection(parentElement
, section
);
1540 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1541 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1542 addAndAdaptSection(parentElement
, section
);
1546 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1547 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1548 addAndAdaptSection(parentElement
, section
);
1552 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1553 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1554 addAndAdaptSection(parentElement
, section
);
1558 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1559 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1560 addAndAdaptSection(parentElement
, section
);
1564 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1565 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1566 addAndAdaptSection(parentElement
, section
);
1570 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1571 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1572 addAndAdaptSection(parentElement
, section
);
1576 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1577 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1578 addAndAdaptSection(parentElement
, section
);
1582 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1583 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1584 addAndAdaptSection(parentElement
, section
);
1588 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1589 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1590 addAndAdaptSection(parentElement
, section
);
1594 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1595 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1596 addAndAdaptSection(parentElement
, section
);
1600 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1601 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1602 addAndAdaptSection(parentElement
, section
);
1606 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1607 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1608 addAndAdaptSection(parentElement
, section
);
1612 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1613 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1614 addAndAdaptSection(parentElement
, section
);
1618 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1619 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1620 addAndAdaptSection(parentElement
, section
);
1624 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1625 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1626 addAndAdaptSection(parentElement
, section
);
1630 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1631 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1632 addAndAdaptSection(parentElement
, section
);
1636 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1637 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1638 addAndAdaptSection(parentElement
, section
);
1642 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1643 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1644 addAndAdaptSection(parentElement
, section
);
1648 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1649 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1650 addAndAdaptSection(parentElement
, section
);
1654 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1655 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1656 addAndAdaptSection(parentElement
, section
);
1660 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1661 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1662 addAndAdaptSection(parentElement
, section
);
1666 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1667 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1668 addAndAdaptSection(parentElement
, section
);
1672 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1673 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1674 addAndAdaptSection(parentElement
, section
);
1678 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1679 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1680 addAndAdaptSection(parentElement
, section
);
1684 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1685 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1686 addAndAdaptSection(parentElement
, section
);
1690 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1691 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1692 addAndAdaptSection(parentElement
, section
);
1696 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1697 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1698 addAndAdaptSection(parentElement
, section
);
1702 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1703 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1704 addAndAdaptSection(parentElement
, section
);
1708 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1709 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1710 addAndAdaptSection(parentElement
, section
);
1714 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1715 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1716 addAndAdaptSection(parentElement
, section
);
1720 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1721 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1722 addAndAdaptSection(parentElement
, section
);
1726 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1727 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1728 addAndAdaptSection(parentElement
, section
);
1732 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1733 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1734 addAndAdaptSection(parentElement
, section
);
1738 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1739 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1740 addAndAdaptSection(parentElement
, section
);
1744 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1745 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1746 addAndAdaptSection(parentElement
, section
);
1750 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1751 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1752 addAndAdaptSection(parentElement
, section
);
1756 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1757 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1758 addAndAdaptSection(parentElement
, section
);
1762 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1763 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1764 addAndAdaptSection(parentElement
, section
);
1768 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1769 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1770 addAndAdaptSection(parentElement
, section
);
1774 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1775 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1776 addAndAdaptSection(parentElement
, section
);
1780 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1781 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1782 addAndAdaptSection(parentElement
, section
);
1786 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1787 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1788 addAndAdaptSection(parentElement
, section
);
1792 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1793 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1794 addAndAdaptSection(parentElement
, section
);
1798 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1799 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1800 addAndAdaptSection(parentElement
, section
);
1804 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1805 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1806 addAndAdaptSection(parentElement
, section
);
1810 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1811 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1812 addAndAdaptSection(parentElement
, section
);
1816 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1817 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1818 addAndAdaptSection(parentElement
, section
);
1822 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1823 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1824 addAndAdaptSection(parentElement
, section
);
1828 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1829 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1830 addAndAdaptSection(parentElement
, section
);
1834 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1835 parentElement
.addElement(section
);
1839 //--------DetailElements------------
1841 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1842 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1843 addAndAdaptElement(parentElement
, element
);
1847 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1848 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1849 addAndAdaptElement(parentElement
, element
);
1853 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1854 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1855 addAndAdaptElement(parentElement
, element
);
1859 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1860 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1861 addAndAdaptElement(parentElement
, element
);
1865 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1866 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1867 addAndAdaptElement(parentElement
, element
);
1871 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1872 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1873 addAndAdaptElement(parentElement
, element
);
1877 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1878 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1879 addAndAdaptElement(parentElement
, element
);
1883 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1884 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1885 addAndAdaptElement(parentElement
, element
);
1889 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1890 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1891 addAndAdaptElement(parentElement
, element
);
1895 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1896 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1897 addAndAdaptElement(parentElement
, element
);
1901 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1902 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1903 addAndAdaptElement(parentElement
, element
);
1907 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1908 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1909 addAndAdaptElement(parentElement
, element
);
1913 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1914 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1915 addAndAdaptElement(parentElement
, element
);
1919 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1920 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1921 addAndAdaptElement(parentElement
, element
);
1925 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1926 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1927 addAndAdaptElement(parentElement
, element
);
1931 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1932 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1933 addAndAdaptElement(parentElement
, element
);
1937 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1938 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1939 addAndAdaptElement(parentElement
, element
);
1943 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1944 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1945 addAndAdaptElement(parentElement
, element
);
1949 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1950 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1951 addAndAdaptElement(parentElement
, element
);
1955 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1956 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1957 addAndAdaptElement(parentElement
, element
);
1961 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1962 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1963 addAndAdaptElement(parentElement
, element
);
1967 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1968 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1969 addAndAdaptElement(parentElement
, element
);
1973 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1974 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1975 addAndAdaptElement(parentElement
, element
);
1979 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1980 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1981 addAndAdaptElement(parentElement
, element
);
1985 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1986 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1987 addAndAdaptElement(parentElement
, element
);
1991 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1992 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1993 addAndAdaptElement(parentElement
, element
);
1997 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1998 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
1999 addAndAdaptElement(parentElement
, element
);
2003 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2004 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2005 addAndAdaptElement(parentElement
, element
);
2010 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2011 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2012 addAndAdaptElement(parentElement
, element
);
2016 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2017 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2018 addAndAdaptElement(parentElement
, element
);
2022 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2023 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2024 addAndAdaptElement(parentElement
, element
);
2028 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2029 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2030 addAndAdaptElement(parentElement
, element
);
2034 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2035 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2036 addAndAdaptElement(parentElement
, element
);
2040 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2041 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2042 addAndAdaptElement(parentElement
, element
);
2046 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2047 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2048 addAndAdaptElement(parentElement
, element
);
2052 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2053 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2054 addAndAdaptElement(parentElement
, element
);
2058 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2059 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2060 addAndAdaptElement(parentElement
, element
);
2064 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2065 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2066 addAndAdaptElement(parentElement
, element
);
2070 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2071 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2072 addAndAdaptElement(parentElement
, element
);
2076 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2077 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2078 addAndAdaptElement(parentElement
, element
);
2082 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2083 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2084 addAndAdaptElement(parentElement
, element
);
2088 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2089 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2090 addAndAdaptElement(parentElement
, element
);
2094 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2095 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2096 addAndAdaptElement(parentElement
, element
);
2100 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2101 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2102 addAndAdaptElement(parentElement
, mediaDetailElement
);
2103 return mediaDetailElement
;
2106 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2107 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2108 addAndAdaptElement(parentElement
, element
);
2112 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2113 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2114 addAndAdaptElement(parentElement
, element
);
2118 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2119 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2120 addAndAdaptElement(parentElement
, element
);
2124 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2125 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2126 addAndAdaptElement(parentElement
, element
);
2130 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2131 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2132 addAndAdaptElement(parentElement
, element
);
2136 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2137 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2138 addAndAdaptElement(parentElement
, element
);
2142 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2143 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2144 addAndAdaptElement(parentElement
, element
);
2148 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2149 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2150 addAndAdaptElement(parentElement
, element
);
2154 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2155 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2156 addAndAdaptElement(parentElement
, element
);
2161 * @param parentElement
2164 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2166 parentElement
.addElement(element
);
2169 //--------EntityCollectionSection----------
2170 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2171 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2172 addAndAdaptSection(parentElement
, section
);
2176 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2177 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2178 addAndAdaptSection(parentElement
, section
);
2182 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2183 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2184 addAndAdaptSection(parentElement
, section
);
2188 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2189 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2190 addAndAdaptSection(parentElement
, section
);
2194 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2195 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2196 addAndAdaptSection(parentElement
, section
);
2200 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2201 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2202 addAndAdaptSection(parentElement
, section
);
2206 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2207 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2208 addAndAdaptSection(parentElement
, section
);
2212 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2213 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2214 addAndAdaptSection(parentElement
, section
);
2218 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2219 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2220 addAndAdaptSection(parentElement
, section
);
2224 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2225 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2226 addAndAdaptSection(parentElement
, section
);
2230 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2231 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2232 addAndAdaptSection(parentElement
, section
);
2236 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2237 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2238 addAndAdaptSection(parentElement
, section
);
2242 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2243 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2244 addAndAdaptSection(parentElement
, section
);
2248 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2249 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2250 addAndAdaptSection(parentElement
, section
);
2254 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2255 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2256 addAndAdaptSection(parentElement
, section
);
2260 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2261 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2262 addAndAdaptSection(parentElement
, section
);
2266 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2267 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2268 addAndAdaptSection(parentElement
, section
);
2272 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2273 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2274 addAndAdaptSection(parentElement
, section
);
2278 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2279 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2280 addAndAdaptSection(parentElement
, section
);
2284 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2285 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2286 addAndAdaptSection(parentElement
, section
);
2290 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2291 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2292 addAndAdaptSection(parentElement
, section
);
2296 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2297 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2298 addAndAdaptSection(parentElement
, section
);
2302 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2303 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2304 addAndAdaptSection(parentElement
, section
);
2308 public StateVocabularyCollectionSection
createSectionStateVocabularies(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2309 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2310 addAndAdaptSection(parentElement
, section
);
2314 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2315 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2316 addAndAdaptSection(parentElement
, section
);
2320 public IdentifierDetailSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2321 IdentifierDetailSection section
= new IdentifierDetailSection(this, conversation
, parentElement
, style
);
2322 addAndAdaptSection(parentElement
, section
);
2326 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2327 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2328 addAndAdaptSection(parentElement
, section
);
2332 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2333 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2334 addAndAdaptSection(parentElement
, section
);
2338 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2339 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2340 addAndAdaptSection(parentElement
, section
);
2344 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2345 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2346 addAndAdaptSection(parentElement
, section
);
2350 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2351 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2352 addAndAdaptSection(parentElement
, section
);
2356 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2357 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2358 addAndAdaptSection(parentElement
, section
);
2362 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2363 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2364 addAndAdaptSection(parentElement
, section
);
2368 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2369 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2370 addAndAdaptSection(parentElement
, section
);
2374 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2375 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2376 addAndAdaptSection(parentElement
, section
);
2380 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2381 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
2382 addAndAdaptSection(parentElement
, section
);
2386 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2387 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2388 addAndAdaptSection(parentElement
, section
);
2392 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2393 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2394 addAndAdaptSection(parentElement
, section
);
2398 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2399 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2400 addAndAdaptSection(parentElement
, section
);
2404 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2405 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2406 addAndAdaptSection(parentElement
, section
);
2410 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2411 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2412 addAndAdaptSection(parentElement
, section
);
2416 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2417 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2418 AbstractEntityCollectionElement element
= null;
2420 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2422 if (entity
instanceof Annotation
) {
2423 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2424 } else if (entity
instanceof Person
) {
2425 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2426 } else if (entity
instanceof Credit
) {
2427 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2428 } else if (entity
instanceof Extension
) {
2429 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2430 } else if (entity
instanceof Marker
) {
2431 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2432 } else if (entity
instanceof Media
) {
2433 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, true, style
);
2434 } else if (entity
instanceof MediaRepresentation
) {
2435 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2437 } else if (entity
instanceof ImageFile
) {
2438 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2439 } else if (entity
instanceof MediaRepresentationPart
) {
2440 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2441 removeListener
, style
);
2442 } else if (entity
instanceof NomenclaturalStatus
) {
2443 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2445 } else if (entity
instanceof Rights
) {
2446 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2447 } else if (entity
instanceof DescriptionElementSource
) {
2448 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2449 removeListener
, style
);
2450 } else if (entity
instanceof IdentifiableSource
) {
2451 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2453 } else if (entity
instanceof DefinedTerm
) {
2454 switch(((DefinedTerm
)entity
).getTermType()) {
2456 element
= new ScopeElement(this,
2458 (DefinedTerm
) entity
,
2463 element
= new ModifierElement(this,
2465 (DefinedTerm
) entity
,
2470 //FIXME : Actually we should through an exception here
2475 } else if (entity
instanceof Reference
) {
2476 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2477 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2480 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2482 } else if (entity
instanceof NameTypeDesignation
) {
2483 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2485 } else if (entity
instanceof NameRelationship
) {
2486 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2488 } else if (entity
instanceof SynonymRelationship
) {
2489 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2491 } else if (entity
instanceof SpecimenTypeDesignation
) {
2492 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2493 removeListener
, style
);
2494 } else if (entity
instanceof StateData
) {
2495 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2496 } else if (entity
instanceof StatisticalMeasurementValue
) {
2497 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2498 removeListener
, style
);
2499 } else if (entity
instanceof DerivedUnit
) {
2500 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2501 case LivingSpecimen
:
2502 case PreservedSpecimen
:
2504 element
= new SpecimenCollectionDetailElement(this,
2506 (DerivedUnit
) entity
,
2511 element
= new DerivedUnitElement(this,
2513 (DerivedUnit
) entity
,
2518 } else if (entity
instanceof NamedArea
) {
2519 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2520 } else if (entity
instanceof DeterminationEvent
) {
2521 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2522 } else if (entity
instanceof User
) {
2523 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2524 } else if (entity
instanceof GrantedAuthority
) {
2525 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2526 removeListener
, style
);
2527 } else if (entity
instanceof Group
) {
2528 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2529 } else if (entity
instanceof Taxon
) {
2530 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2531 } else if (entity
instanceof DescriptionElementBase
) {
2532 // this is the special case for protologs, maybe we can do this
2533 // differently when API improves
2534 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2535 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2536 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2538 } else if (entity
instanceof Identifier
) {
2539 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2540 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2543 element
= new IdentifierDetailElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2545 } else if (entity
instanceof TermVocabulary
) {
2546 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2549 if (element
== null) {
2550 MessagingUtils
.messageDialog("No element for entity", this,
2551 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2556 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2557 element
.setPersistentBackground(backgroundColor
);
2560 parentElement
.addElement(element
);
2568 * Creates a selection element for the given type T.
2571 * <strong>Selection elements not handled by this method:</strong>
2573 * <li>{@link TaxonNodeSelectionElement} see
2574 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2576 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2577 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2583 * a {@link Class} object of the type that you want the selection
2585 * @param parentElement
2586 * a {@link ICdmFormElement} object.
2587 * @param labelString
2588 * a {@link String} object.
2589 * @param selectionType
2591 * a {@link ICdmBase} object.
2594 * @param conversation
2595 * a {@link ConversationHolder} object.
2596 * @return a {@link EntitySelectionElement} object.
2598 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2599 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2601 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2602 labelString
, selection
, mode
, style
);
2604 parentElement
.addElement(element
);
2608 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2609 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2610 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2611 labelString
, selection
, mode
, style
);
2613 parentElement
.addElement(element
);
2617 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2618 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2619 int mode
, int style
) {
2620 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2621 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2623 parentElement
.addElement(element
);
2627 /** {@inheritDoc} */
2628 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2629 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2630 adapt(labelElement
);
2631 parentElement
.addElement(labelElement
);
2632 return labelElement
;
2635 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2636 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2637 label
.setText(labelText
+" (yyyy-MM-dd)");
2638 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2639 dateElement
.initController(this, formElement
);
2645 * Getter for the field <code>selectionProvider</code>.
2648 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2650 public ISelectionProvider
getSelectionProvider() {
2651 return selectionProvider
;
2656 * createDetailedDescriptionDetailElement
2659 * @param parentElement
2660 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2664 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2669 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2672 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2673 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2674 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2676 if (entity
instanceof CategoricalData
) {
2677 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2678 (CategoricalData
) entity
, style
);
2679 } else if (entity
instanceof CommonTaxonName
) {
2680 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2682 } else if (entity
instanceof Distribution
) {
2683 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2685 } else if (entity
instanceof IndividualsAssociation
) {
2686 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2687 (IndividualsAssociation
) entity
, style
);
2688 } else if (entity
instanceof QuantitativeData
) {
2689 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2690 (QuantitativeData
) entity
, style
);
2691 } else if (entity
instanceof TaxonInteraction
) {
2692 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2693 (TaxonInteraction
) entity
, style
);
2694 } else if (entity
instanceof TextData
) {
2695 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2697 throw new IllegalStateException("There is no interface for the given description element");
2699 adapt(detailedDescriptionElement
);
2700 parentElement
.addElement(detailedDescriptionElement
);
2701 return detailedDescriptionElement
;
2706 * Creates a styled text as a part of the form.
2711 * the text initial value
2714 * @return the text widget
2716 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2717 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2718 if (value
!= null) {
2719 text
.setText(value
);
2721 text
.setForeground(getColors().getForeground());
2722 text
.setBackground(getColors().getBackground());
2723 // text.addFocusListener(visibilityHandler);
2727 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2728 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2729 addAndAdaptSection(parentElement
, section
);