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
.MeasurementUnit
;
78 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
79 import eu
.etaxonomy
.cdm
.model
.description
.State
;
80 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
81 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
82 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
83 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
84 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
85 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
86 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
87 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
88 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
89 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
90 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
91 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
92 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
93 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
94 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
95 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
96 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
97 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
98 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
99 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
100 import eu
.etaxonomy
.cdm
.model
.taxon
.SynonymRelationship
;
101 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
102 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
103 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
104 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
105 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
106 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
107 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
108 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
109 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
110 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
111 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
116 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailSection
;
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
.GeoScopeDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
318 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
319 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
320 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
324 * CdmFormFactory class.
328 * @created Feb 24, 2010
331 public class CdmFormFactory
extends FormToolkit
{
333 private BoldFontHolder2 boldFontHolder2
;
334 private MouseListener selectionMouseHandler
;
335 private FocusListener selectionFocusHandler
;
337 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
339 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
341 private final int orientation
= Window
.getDefaultOrientation();
342 private ISelectionProvider selectionProvider
;
344 /** Constant <code>EMPTY_SELECTION</code> */
345 public static ISelection EMPTY_SELECTION
= new ISelection() {
347 public boolean isEmpty() {
358 private class SelectionMouseHandler
extends MouseAdapter
{
360 public void mouseDown(MouseEvent e
) {
361 notifySelectionListeners(e
);
371 private class SelectionFocusHandler
extends FocusAdapter
{
373 public void focusGained(FocusEvent e
) {
374 notifySelectionListeners(e
);
378 private void notifySelectionListeners(TypedEvent e
) {
379 Event event
= new Event();
380 event
.widget
= e
.widget
;
381 SelectionEvent selectionEvent
= new SelectionEvent(event
);
383 for (SelectionListener listener
: selectionListenerList
) {
384 listener
.widgetSelected(selectionEvent
);
390 * Constructor for CdmFormFactory.
394 * a {@link org.eclipse.swt.widgets.Display} object.
395 * @param selectionProvider
396 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
398 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
400 this.selectionProvider
= selectionProvider
;
406 * Constructor for CdmFormFactory.
410 * a {@link org.eclipse.swt.widgets.Display} object.
412 public CdmFormFactory(Display display
) {
420 private void init() {
421 boldFontHolder2
= new BoldFontHolder2();
422 selectionMouseHandler
= new SelectionMouseHandler();
423 selectionFocusHandler
= new SelectionFocusHandler();
427 * Creates an instance initialized with the correct selectionProvider
429 * Make sure to remove the instance when the entityComposite disposes via
430 * destroySelectionArbitrator(..)
432 * @param entityElement
433 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
435 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
438 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
439 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
440 selectionArbitrator
.addSelectionProvider(selectionProvider
);
441 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
442 addSelectionListener(selectionArbitrator
);
443 return selectionArbitrator
;
448 * destroySelectionArbitrator
451 * @param selectionArbitrator
453 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
456 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
457 removeSelectionListener(selectionArbitrator
);
458 if (selectionProvider
!= null) {
459 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
461 MessagingUtils
.error(this.getClass(),
462 "Tried to destroy a selection listener from this factories listeners but was null", null);
468 * Adapts the {@link AbstractCdmFormElement}:<br>
469 * - sets the {@link IPropertyChangeListener}s handled by this class
474 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
477 public void adapt(ICdmFormElement formElement
) {
478 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
483 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
485 control
.addFocusListener(selectionFocusHandler
);
487 super.adapt(control
, trackFocus
, trackKeyboard
);
492 public void adapt(Composite composite
) {
493 composite
.addMouseListener(selectionMouseHandler
);
494 super.adapt(composite
);
503 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
506 public void destroyElement(ICdmFormElement formElement
) {
507 // return if element was not initialized
508 if (formElement
== null) {
511 // destroy selection arbitrator, if any
512 if (formElement
instanceof ISelectableElement
) {
513 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
515 // remove this element form its parents list of elements
516 // ICdmFormElement parentElement = formElement.getParentElement();
517 // if(parentElement != null){
518 // parentElement.removeElement(formElement);
520 // call destroy on child elements recursively
521 for (ICdmFormElement childElement
: formElement
.getElements()) {
522 destroyElement(childElement
);
524 // dispose of the controls
525 for (Control control
: formElement
.getControls()) {
526 // we added the layoutComposite of the parental element as the
527 // layout composite to this formElement
528 // but we do not want to destroy it.
529 if (control
.equals(formElement
.getLayoutComposite())) {
544 * a {@link org.eclipse.swt.widgets.Composite} object.
545 * @return a {@link org.eclipse.swt.widgets.Label} object.
547 public Label
createEmptyCell(Composite parent
) {
548 return this.createLabel(parent
, null);
553 * createMultiLanguageTextElement
556 * @param parentElement
557 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
560 * a {@link java.lang.String} object.
561 * @param multilanguageText
562 * a {@link java.util.Map} object.
568 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
571 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
572 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
573 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
574 multilanguageText
, textHeight
, style
);
576 parentElement
.addElement(element
);
580 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
581 KeyStatement keyStatement
, int textHeight
, int style
) {
582 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
585 parentElement
.addElement(element
);
590 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
592 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
593 * @param parentElement the parent container
594 * @param labelString the label name
595 * @param initialObject the object from which the <code>toString()</code> method is called
596 * @param style {@link SWT} style constant
597 * @return the created textfield with label
599 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
600 Object initialObject
, int style
) {
601 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
606 * createTextWithLabelElement
609 * @param parentElement
610 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
613 * a {@link java.lang.String} object.
615 * a {@link java.lang.String} object.
618 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
621 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
622 String initialText
, int style
) {
623 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
627 * createTextWithLabelElement
630 * @param parentElement
631 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
634 * a {@link java.lang.String} object.
636 * a {@link java.lang.String} object.
637 * @param textLimit maximal number of characters allowed
640 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
643 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
644 String initialText
, Integer textLimit
, int style
) {
645 if(initialText
==null){
649 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
652 parentElement
.addElement(element
);
656 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
657 int textHeight
, int style
) {
658 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
660 parentElement
.addElement(element
);
664 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
665 URI initialUri
, int style
) {
666 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
668 parentElement
.addElement(element
);
679 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
680 IOpenUrlEnabled openUrlEnabled
, int style
) {
681 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
684 parentElement
.addElement(element
);
690 * @param parentElement
692 * @param conversationEnabled
697 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
698 ConversationHolder conversation
, User user
, int style
) {
699 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
701 parentElement
.addElement(element
);
707 * createIntegerTextWithLabelElement
710 * @param parentElement
711 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
714 * a {@link java.lang.String} object.
715 * @param initialInteger
716 * a {@link java.lang.Integer} object.
720 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
723 public NumberWithLabelElement
createNumberTextWithLabelElement(
724 ICdmFormElement parentElement
, String labelString
,
725 Number initialNumber
, int style
) {
726 NumberWithLabelElement element
= new NumberWithLabelElement(this,
727 parentElement
, labelString
, initialNumber
, style
);
729 parentElement
.addElement(element
);
733 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
734 String labelString
, LanguageString languageString
, int style
) {
735 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
738 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
739 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
740 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
741 languageString
, height
, isMultiLine
, style
);
743 parentElement
.addElement(element
);
749 * createKeyValueViewerElement
752 * @param parentElement
753 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
756 * a {@link java.lang.String} object.
757 * @param valueHeading
758 * a {@link java.lang.String} object.
760 * a {@link java.util.Map} object.
761 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
764 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
765 String valueHeading
, Map
<Object
, Object
> map
) {
766 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
768 parentElement
.addElement(element
);
774 * createTermComboElement
777 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
778 * @param termComboType
780 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
782 * @param parentElement
783 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
786 * a {@link java.lang.String} object.
788 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
792 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
796 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
797 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
798 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
801 parentElement
.addElement(element
);
807 * createTermComboElement
810 * @param termComboType
812 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
814 * @param parentElement
815 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
818 * a {@link java.lang.String} object.
820 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
824 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
828 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
830 ICdmFormElement parentElement
,
834 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
836 parentElement
.addElement(element
);
842 * createTermComboElement
845 * @param termComboType
847 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
849 * @param parentElement
850 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
853 * a {@link java.lang.String} object.
855 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
859 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
863 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
864 TermVocabulary
<?
> termVocabulary
,
865 ICdmFormElement parentElement
,
869 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, style
);
871 parentElement
.addElement(element
);
877 * createEnumComboElement
880 * @param enumComboType
882 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
884 * @param parentElement
885 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
889 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
892 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
893 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
895 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
897 parentElement
.addElement(element
);
901 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
902 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
903 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
905 parentElement
.addElement(element
);
911 * createBrowserElement
915 * a {@link java.net.URI} object.
918 * @param parentElement
919 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
921 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
924 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
925 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
927 parentElement
.addElement(element
);
936 * @param parentElement
937 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
940 * a {@link java.net.URI} object.
943 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
945 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
946 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
948 parentElement
.addElement(element
);
954 * createTextActionElement
958 * a {@link java.lang.String} object.
960 * a {@link java.lang.String} object.
963 * @param parentElement
964 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
967 * a {@link java.lang.String} object.
968 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
971 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
972 String buttonLabel
, String initialText
, int style
) {
973 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
976 parentElement
.addElement(element
);
985 * @param parentElement
986 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
989 * a {@link java.lang.String} object.
990 * @param initialState
994 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
997 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
998 if(initialState
==null){
999 initialState
= Boolean
.FALSE
;
1001 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1003 parentElement
.addElement(element
);
1008 * Creates a section as a part of the form.
1010 * @return the section widget
1013 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1016 public Section
adapt(AbstractFormSection section
) {
1017 section
.setMenu(section
.getLayoutComposite().getMenu());
1018 adapt(section
, true, true);
1020 // handle focus and property change events for cdm use
1021 section
.addFocusListener(selectionFocusHandler
);
1022 section
.setPropertyChangeListeners(propertyChangeListeners
);
1024 if (section
.getToggle() != null) {
1025 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1026 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1029 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1031 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1032 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1033 getColors().initializeSectionToolBarColors();
1034 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1035 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1037 // call setTitleBarForeground regardless as it also sets the label color
1038 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1042 private class BoldFontHolder2
{
1043 private Font normalFont
;
1045 private Font boldFont
;
1047 public BoldFontHolder2() {
1050 public Font
getBoldFont(Font font
) {
1051 createBoldFont(font
);
1055 private void createBoldFont(Font font
) {
1056 if (normalFont
== null || !normalFont
.equals(font
)) {
1060 if (boldFont
== null) {
1061 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1065 public void dispose() {
1066 if (boldFont
!= null) {
1067 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1075 * createToggleableTextField
1078 * @param parentElement
1079 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1081 * @param labelString
1082 * a {@link java.lang.String} object.
1083 * @param initialText
1084 * a {@link java.lang.String} object.
1085 * @param initialState
1089 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1092 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1093 String initialText
, boolean initialState
, int style
) {
1094 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1095 initialState
, style
| orientation
);
1097 parentElement
.addElement(element
);
1103 * createTimePeriodElement
1106 * @param parentElement
1107 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1109 * @param labelString
1110 * a {@link java.lang.String} object.
1112 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1115 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1118 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1119 TimePeriod timePeriod
, int style
) {
1120 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1122 parentElement
.addElement(element
);
1128 * createGatheringEventUnitElement
1131 * @param parentElement
1132 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1134 * @param labelString
1135 * a {@link java.lang.String} object.
1137 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1140 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1143 public GatheringEventUnitElement
createGatheringEventUnitElement(
1144 ICdmFormElement parentElement
,
1146 DerivedUnitFacade gatheringEvent
,
1147 MinMaxTextSection
.UnitType unitType
,
1149 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1156 parentElement
.addElement(element
);
1162 * createPointElement
1167 * @param parentElement
1168 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1171 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1172 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1174 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1175 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1177 parentElement
.addElement(element
);
1184 * @param conversationHolder
1186 * @param detailsViewer
1190 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1191 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1192 parentElement
.addElement(section
);
1199 * createDateDetailSection
1202 * @param parentElement
1203 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1207 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1210 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1211 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1212 parentElement
.addElement(section
);
1219 * createDateDetailSection
1222 * @param parentElement
1223 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1227 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1230 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1231 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1232 parentElement
.addElement(section
);
1239 * createPartialElement
1242 * @param parentElement
1243 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1245 * @param labelString
1246 * a {@link java.lang.String} object.
1248 * a {@link org.joda.time.Partial} object.
1251 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1254 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1256 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1258 parentElement
.addElement(element
);
1264 * addSelectionListener
1268 * a {@link org.eclipse.swt.events.SelectionListener} object.
1270 public void addSelectionListener(SelectionListener listener
) {
1271 selectionListenerList
.add(listener
);
1276 * removeSelectionListener
1280 * a {@link org.eclipse.swt.events.SelectionListener} object.
1282 public void removeSelectionListener(SelectionListener listener
) {
1283 if (listener
== null) {
1284 MessagingUtils
.error(this.getClass(),
1285 "Tried to remove a selection listener from this factories listeners but was null", null);
1287 selectionListenerList
.remove(listener
);
1293 * addPropertyChangeListener
1297 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1300 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1301 if (propertyChangeListeners
.contains(listener
)) {
1304 propertyChangeListeners
.add(0, listener
);
1309 * removePropertyChangeListener
1313 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1316 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1317 propertyChangeListeners
.remove(listener
);
1321 * @return the propertyChangeListeners
1323 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1324 return propertyChangeListeners
;
1329 * createHorizontalSeparator
1332 * @param parentElement
1333 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1337 * @return a {@link org.eclipse.swt.widgets.Label} object.
1339 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1340 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1341 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1347 * createVersionElement
1350 * @param parentElement
1351 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1354 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1359 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1362 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1363 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1365 parentElement
.addElement(element
);
1370 * @param cdmBaseSection
1375 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1376 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1378 parentElement
.addElement(element
);
1384 * createVersionSection
1387 * @param parentElement
1388 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1393 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1396 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1397 VersionSection section
= new VersionSection(this, parentElement
, style
);
1398 parentElement
.addElement(section
);
1408 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1409 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1410 parentElement
.addElement(section
);
1417 * createEmptyElement
1420 * @param parentElement
1421 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1423 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1425 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1426 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1428 parentElement
.addElement(element
);
1434 * createHeadlineSection
1437 * @param parentElement
1438 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1441 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1444 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1445 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1446 parentElement
.addElement(section
);
1453 * createParsingMessageElement
1456 * @param parentElement
1457 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1459 * @param parserProblem
1460 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1465 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1468 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1469 ParserProblem parserProblem
, int style
) {
1470 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1472 parentElement
.addElement(element
);
1476 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1477 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1479 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1480 selectionProvider
, style
);
1482 parentElement
.addElement(section
);
1489 * @param definedTermClass
1490 * @param formElement
1494 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1495 AbstractCdmDetailSection parentElement
, int style
) {
1496 AbstractCdmDetailElement element
= null;
1498 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1499 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1500 } else if (definedTermClass
.equals(Feature
.class)) {
1501 element
= new FeatureDetailElement(this, parentElement
);
1503 element
= new DefinedTermDetailElement(this, parentElement
);
1507 parentElement
.addElement(element
);
1512 //--------DetailSections---------
1513 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1514 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1515 addAndAdaptSection(parentElement
, section
);
1519 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1520 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1521 addAndAdaptSection(parentElement
, section
);
1525 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1526 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1527 addAndAdaptSection(parentElement
, section
);
1531 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1532 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1533 addAndAdaptSection(parentElement
, section
);
1537 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1538 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1539 addAndAdaptSection(parentElement
, section
);
1543 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1544 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1545 addAndAdaptSection(parentElement
, section
);
1549 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1550 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1551 addAndAdaptSection(parentElement
, section
);
1555 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1556 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1557 addAndAdaptSection(parentElement
, section
);
1561 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1562 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1563 addAndAdaptSection(parentElement
, section
);
1567 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1568 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1569 addAndAdaptSection(parentElement
, section
);
1573 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1574 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1575 addAndAdaptSection(parentElement
, section
);
1579 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1580 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1581 addAndAdaptSection(parentElement
, section
);
1585 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1586 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1587 addAndAdaptSection(parentElement
, section
);
1591 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1592 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1593 addAndAdaptSection(parentElement
, section
);
1597 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1598 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1599 addAndAdaptSection(parentElement
, section
);
1603 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1604 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1605 addAndAdaptSection(parentElement
, section
);
1609 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1610 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1611 addAndAdaptSection(parentElement
, section
);
1615 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1616 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1617 addAndAdaptSection(parentElement
, section
);
1621 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1622 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1623 addAndAdaptSection(parentElement
, section
);
1627 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1628 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1629 addAndAdaptSection(parentElement
, section
);
1633 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1634 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1635 addAndAdaptSection(parentElement
, section
);
1639 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1640 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1641 addAndAdaptSection(parentElement
, section
);
1645 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1646 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1647 addAndAdaptSection(parentElement
, section
);
1651 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1652 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1653 addAndAdaptSection(parentElement
, section
);
1657 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1658 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1659 addAndAdaptSection(parentElement
, section
);
1663 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1664 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1665 addAndAdaptSection(parentElement
, section
);
1669 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1670 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1671 addAndAdaptSection(parentElement
, section
);
1675 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1676 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1677 addAndAdaptSection(parentElement
, section
);
1681 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1682 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1683 addAndAdaptSection(parentElement
, section
);
1687 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1688 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1689 addAndAdaptSection(parentElement
, section
);
1693 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1694 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1695 addAndAdaptSection(parentElement
, section
);
1699 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1700 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1701 addAndAdaptSection(parentElement
, section
);
1705 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1706 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1707 addAndAdaptSection(parentElement
, section
);
1711 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1712 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1713 addAndAdaptSection(parentElement
, section
);
1717 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1718 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1719 addAndAdaptSection(parentElement
, section
);
1723 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1724 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1725 addAndAdaptSection(parentElement
, section
);
1729 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1730 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1731 addAndAdaptSection(parentElement
, section
);
1735 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1736 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1737 addAndAdaptSection(parentElement
, section
);
1741 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1742 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1743 addAndAdaptSection(parentElement
, section
);
1747 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1748 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1749 addAndAdaptSection(parentElement
, section
);
1753 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1754 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1755 addAndAdaptSection(parentElement
, section
);
1759 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1760 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1761 addAndAdaptSection(parentElement
, section
);
1765 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1766 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1767 addAndAdaptSection(parentElement
, section
);
1771 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1772 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1773 addAndAdaptSection(parentElement
, section
);
1777 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1778 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1779 addAndAdaptSection(parentElement
, section
);
1783 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1784 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1785 addAndAdaptSection(parentElement
, section
);
1789 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1790 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1791 addAndAdaptSection(parentElement
, section
);
1795 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1796 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1797 addAndAdaptSection(parentElement
, section
);
1801 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1802 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1803 addAndAdaptSection(parentElement
, section
);
1807 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1808 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1809 addAndAdaptSection(parentElement
, section
);
1813 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1814 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1815 addAndAdaptSection(parentElement
, section
);
1819 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1820 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1821 addAndAdaptSection(parentElement
, section
);
1825 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1826 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1827 addAndAdaptSection(parentElement
, section
);
1831 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1832 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1833 addAndAdaptSection(parentElement
, section
);
1837 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1838 parentElement
.addElement(section
);
1842 //--------DetailElements------------
1844 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1845 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1846 addAndAdaptElement(parentElement
, element
);
1850 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1851 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1852 addAndAdaptElement(parentElement
, element
);
1856 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1857 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1858 addAndAdaptElement(parentElement
, element
);
1862 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1863 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1864 addAndAdaptElement(parentElement
, element
);
1868 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1869 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1870 addAndAdaptElement(parentElement
, element
);
1874 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1875 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1876 addAndAdaptElement(parentElement
, element
);
1880 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1881 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1882 addAndAdaptElement(parentElement
, element
);
1886 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1887 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1888 addAndAdaptElement(parentElement
, element
);
1892 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1893 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1894 addAndAdaptElement(parentElement
, element
);
1898 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1899 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1900 addAndAdaptElement(parentElement
, element
);
1904 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1905 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1906 addAndAdaptElement(parentElement
, element
);
1910 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1911 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1912 addAndAdaptElement(parentElement
, element
);
1916 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1917 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1918 addAndAdaptElement(parentElement
, element
);
1922 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1923 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1924 addAndAdaptElement(parentElement
, element
);
1928 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1929 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1930 addAndAdaptElement(parentElement
, element
);
1934 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1935 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1936 addAndAdaptElement(parentElement
, element
);
1940 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1941 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1942 addAndAdaptElement(parentElement
, element
);
1946 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1947 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1948 addAndAdaptElement(parentElement
, element
);
1952 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1953 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1954 addAndAdaptElement(parentElement
, element
);
1958 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1959 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1960 addAndAdaptElement(parentElement
, element
);
1964 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1965 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1966 addAndAdaptElement(parentElement
, element
);
1970 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1971 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1972 addAndAdaptElement(parentElement
, element
);
1976 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1977 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1978 addAndAdaptElement(parentElement
, element
);
1982 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1983 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1984 addAndAdaptElement(parentElement
, element
);
1988 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1989 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1990 addAndAdaptElement(parentElement
, element
);
1994 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1995 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1996 addAndAdaptElement(parentElement
, element
);
2000 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2001 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
2002 addAndAdaptElement(parentElement
, element
);
2006 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2007 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2008 addAndAdaptElement(parentElement
, element
);
2013 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2014 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2015 addAndAdaptElement(parentElement
, element
);
2019 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2020 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2021 addAndAdaptElement(parentElement
, element
);
2025 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2026 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2027 addAndAdaptElement(parentElement
, element
);
2031 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2032 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2033 addAndAdaptElement(parentElement
, element
);
2037 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2038 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2039 addAndAdaptElement(parentElement
, element
);
2043 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2044 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2045 addAndAdaptElement(parentElement
, element
);
2049 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2050 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2051 addAndAdaptElement(parentElement
, element
);
2055 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2056 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2057 addAndAdaptElement(parentElement
, element
);
2061 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2062 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2063 addAndAdaptElement(parentElement
, element
);
2067 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2068 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2069 addAndAdaptElement(parentElement
, element
);
2073 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2074 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2075 addAndAdaptElement(parentElement
, element
);
2079 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2080 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2081 addAndAdaptElement(parentElement
, element
);
2085 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2086 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2087 addAndAdaptElement(parentElement
, element
);
2091 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2092 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2093 addAndAdaptElement(parentElement
, element
);
2097 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2098 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2099 addAndAdaptElement(parentElement
, element
);
2103 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2104 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2105 addAndAdaptElement(parentElement
, mediaDetailElement
);
2106 return mediaDetailElement
;
2109 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2110 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2111 addAndAdaptElement(parentElement
, element
);
2115 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2116 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2117 addAndAdaptElement(parentElement
, element
);
2121 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2122 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2123 addAndAdaptElement(parentElement
, element
);
2127 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2128 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2129 addAndAdaptElement(parentElement
, element
);
2133 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2134 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2135 addAndAdaptElement(parentElement
, element
);
2139 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2140 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2141 addAndAdaptElement(parentElement
, element
);
2145 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2146 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2147 addAndAdaptElement(parentElement
, element
);
2151 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2152 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2153 addAndAdaptElement(parentElement
, element
);
2157 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2158 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2159 addAndAdaptElement(parentElement
, element
);
2164 * @param parentElement
2167 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2169 parentElement
.addElement(element
);
2172 //--------EntityCollectionSection----------
2173 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2174 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2175 addAndAdaptSection(parentElement
, section
);
2179 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2180 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2181 addAndAdaptSection(parentElement
, section
);
2185 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2186 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2187 addAndAdaptSection(parentElement
, section
);
2191 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2192 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2193 addAndAdaptSection(parentElement
, section
);
2197 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2198 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2199 addAndAdaptSection(parentElement
, section
);
2203 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2204 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2205 addAndAdaptSection(parentElement
, section
);
2209 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2210 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2211 addAndAdaptSection(parentElement
, section
);
2215 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2216 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2217 addAndAdaptSection(parentElement
, section
);
2221 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2222 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2223 addAndAdaptSection(parentElement
, section
);
2227 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2228 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2229 addAndAdaptSection(parentElement
, section
);
2233 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2234 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2235 addAndAdaptSection(parentElement
, section
);
2239 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2240 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2241 addAndAdaptSection(parentElement
, section
);
2245 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2246 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2247 addAndAdaptSection(parentElement
, section
);
2251 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2252 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2253 addAndAdaptSection(parentElement
, section
);
2257 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2258 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2259 addAndAdaptSection(parentElement
, section
);
2263 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2264 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2265 addAndAdaptSection(parentElement
, section
);
2269 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2270 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2271 addAndAdaptSection(parentElement
, section
);
2275 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2276 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2277 addAndAdaptSection(parentElement
, section
);
2281 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2282 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2283 addAndAdaptSection(parentElement
, section
);
2287 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2288 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2289 addAndAdaptSection(parentElement
, section
);
2293 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2294 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2295 addAndAdaptSection(parentElement
, section
);
2299 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2300 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2301 addAndAdaptSection(parentElement
, section
);
2305 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2306 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2307 addAndAdaptSection(parentElement
, section
);
2311 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2312 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2313 addAndAdaptSection(parentElement
, section
);
2317 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2318 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2319 addAndAdaptSection(parentElement
, section
);
2323 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2324 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2325 addAndAdaptSection(parentElement
, section
);
2329 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2330 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2331 addAndAdaptSection(parentElement
, section
);
2335 public IdentifierDetailSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2336 IdentifierDetailSection section
= new IdentifierDetailSection(this, conversation
, parentElement
, style
);
2337 addAndAdaptSection(parentElement
, section
);
2341 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2342 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2343 addAndAdaptSection(parentElement
, section
);
2347 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2348 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2349 addAndAdaptSection(parentElement
, section
);
2353 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2354 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2355 addAndAdaptSection(parentElement
, section
);
2359 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2360 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2361 addAndAdaptSection(parentElement
, section
);
2365 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2366 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2367 addAndAdaptSection(parentElement
, section
);
2371 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2372 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2373 addAndAdaptSection(parentElement
, section
);
2377 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2378 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2379 addAndAdaptSection(parentElement
, section
);
2383 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2384 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2385 addAndAdaptSection(parentElement
, section
);
2389 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2390 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2391 addAndAdaptSection(parentElement
, section
);
2395 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2396 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2397 addAndAdaptSection(parentElement
, section
);
2401 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2402 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2403 addAndAdaptSection(parentElement
, section
);
2407 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2408 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2409 addAndAdaptSection(parentElement
, section
);
2413 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2414 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2415 addAndAdaptSection(parentElement
, section
);
2419 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2420 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2421 addAndAdaptSection(parentElement
, section
);
2425 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2426 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2427 AbstractEntityCollectionElement element
= null;
2429 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2431 if (entity
instanceof Annotation
) {
2432 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2433 } else if (entity
instanceof Person
) {
2434 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2435 } else if (entity
instanceof Credit
) {
2436 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2437 } else if (entity
instanceof Extension
) {
2438 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2439 } else if (entity
instanceof Marker
) {
2440 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2441 } else if (entity
instanceof Media
) {
2442 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, true, style
);
2443 } else if (entity
instanceof MediaRepresentation
) {
2444 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2446 } else if (entity
instanceof ImageFile
) {
2447 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2448 } else if (entity
instanceof MediaRepresentationPart
) {
2449 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2450 removeListener
, style
);
2451 } else if (entity
instanceof NomenclaturalStatus
) {
2452 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2454 } else if (entity
instanceof Rights
) {
2455 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2456 } else if (entity
instanceof DescriptionElementSource
) {
2457 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2458 removeListener
, style
);
2459 } else if (entity
instanceof IdentifiableSource
) {
2460 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2462 } else if (entity
instanceof DefinedTerm
) {
2463 switch(((DefinedTerm
)entity
).getTermType()) {
2465 element
= new ScopeElement(this,
2467 (DefinedTerm
) entity
,
2472 element
= new ModifierElement(this,
2474 (DefinedTerm
) entity
,
2479 //FIXME : Actually we should through an exception here
2484 } else if (entity
instanceof Reference
) {
2485 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2486 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2489 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2491 } else if (entity
instanceof NameTypeDesignation
) {
2492 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2494 } else if (entity
instanceof NameRelationship
) {
2495 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2497 } else if (entity
instanceof SynonymRelationship
) {
2498 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2500 } else if (entity
instanceof SpecimenTypeDesignation
) {
2501 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2502 removeListener
, style
);
2503 } else if (entity
instanceof StateData
) {
2504 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2505 } else if (entity
instanceof StatisticalMeasurementValue
) {
2506 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2507 removeListener
, style
);
2508 } else if (entity
instanceof DerivedUnit
) {
2509 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2510 case LivingSpecimen
:
2511 case PreservedSpecimen
:
2513 element
= new SpecimenCollectionDetailElement(this,
2515 (DerivedUnit
) entity
,
2520 element
= new DerivedUnitElement(this,
2522 (DerivedUnit
) entity
,
2527 } else if (entity
instanceof NamedArea
) {
2528 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2529 } else if (entity
instanceof DeterminationEvent
) {
2530 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2531 } else if (entity
instanceof User
) {
2532 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2533 } else if (entity
instanceof GrantedAuthority
) {
2534 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2535 removeListener
, style
);
2536 } else if (entity
instanceof Group
) {
2537 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2538 } else if (entity
instanceof Taxon
) {
2539 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2540 } else if (entity
instanceof DescriptionElementBase
) {
2541 // this is the special case for protologs, maybe we can do this
2542 // differently when API improves
2543 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2544 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2545 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2547 } else if (entity
instanceof Identifier
) {
2548 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2549 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2552 element
= new IdentifierDetailElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2554 } else if (entity
instanceof TermVocabulary
) {
2555 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2556 } else if (entity
instanceof MeasurementUnit
) {
2557 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2560 if (element
== null) {
2561 MessagingUtils
.messageDialog("No element for entity", this,
2562 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2567 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2568 element
.setPersistentBackground(backgroundColor
);
2571 parentElement
.addElement(element
);
2579 * Creates a selection element for the given type T.
2582 * <strong>Selection elements not handled by this method:</strong>
2584 * <li>{@link TaxonNodeSelectionElement} see
2585 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2587 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2588 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2594 * a {@link Class} object of the type that you want the selection
2596 * @param parentElement
2597 * a {@link ICdmFormElement} object.
2598 * @param labelString
2599 * a {@link String} object.
2600 * @param selectionType
2602 * a {@link ICdmBase} object.
2605 * @param conversation
2606 * a {@link ConversationHolder} object.
2607 * @return a {@link EntitySelectionElement} object.
2609 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2610 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2612 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2613 labelString
, selection
, mode
, style
);
2615 parentElement
.addElement(element
);
2619 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2620 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2621 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2622 labelString
, selection
, mode
, style
);
2624 parentElement
.addElement(element
);
2628 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2629 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2630 int mode
, int style
) {
2631 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2632 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2634 parentElement
.addElement(element
);
2638 /** {@inheritDoc} */
2639 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2640 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2641 adapt(labelElement
);
2642 parentElement
.addElement(labelElement
);
2643 return labelElement
;
2646 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2647 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2648 label
.setText(labelText
+" (yyyy-MM-dd)");
2649 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2650 dateElement
.initController(this, formElement
);
2656 * Getter for the field <code>selectionProvider</code>.
2659 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2661 public ISelectionProvider
getSelectionProvider() {
2662 return selectionProvider
;
2667 * createDetailedDescriptionDetailElement
2670 * @param parentElement
2671 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2675 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2680 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2683 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2684 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2685 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2687 if (entity
instanceof CategoricalData
) {
2688 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2689 (CategoricalData
) entity
, style
);
2690 } else if (entity
instanceof CommonTaxonName
) {
2691 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2693 } else if (entity
instanceof Distribution
) {
2694 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2696 } else if (entity
instanceof IndividualsAssociation
) {
2697 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2698 (IndividualsAssociation
) entity
, style
);
2699 } else if (entity
instanceof QuantitativeData
) {
2700 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2701 (QuantitativeData
) entity
, style
);
2702 } else if (entity
instanceof TaxonInteraction
) {
2703 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2704 (TaxonInteraction
) entity
, style
);
2705 } else if (entity
instanceof TextData
) {
2706 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2708 throw new IllegalStateException("There is no interface for the given description element");
2710 adapt(detailedDescriptionElement
);
2711 parentElement
.addElement(detailedDescriptionElement
);
2712 return detailedDescriptionElement
;
2717 * Creates a styled text as a part of the form.
2722 * the text initial value
2725 * @return the text widget
2727 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2728 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2729 if (value
!= null) {
2730 text
.setText(value
);
2732 text
.setForeground(getColors().getForeground());
2733 text
.setBackground(getColors().getBackground());
2734 // text.addFocusListener(visibilityHandler);
2738 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2739 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2740 addAndAdaptSection(parentElement
, section
);