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
.GeographicalScopeDetailSection
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailElement
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailSection
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
319 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
320 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
321 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
325 * CdmFormFactory class.
329 * @created Feb 24, 2010
332 public class CdmFormFactory
extends FormToolkit
{
334 private BoldFontHolder2 boldFontHolder2
;
335 private MouseListener selectionMouseHandler
;
336 private FocusListener selectionFocusHandler
;
338 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
340 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
342 private final int orientation
= Window
.getDefaultOrientation();
343 private ISelectionProvider selectionProvider
;
345 /** Constant <code>EMPTY_SELECTION</code> */
346 public static ISelection EMPTY_SELECTION
= new ISelection() {
348 public boolean isEmpty() {
359 private class SelectionMouseHandler
extends MouseAdapter
{
361 public void mouseDown(MouseEvent e
) {
362 notifySelectionListeners(e
);
372 private class SelectionFocusHandler
extends FocusAdapter
{
374 public void focusGained(FocusEvent e
) {
375 notifySelectionListeners(e
);
379 private void notifySelectionListeners(TypedEvent e
) {
380 Event event
= new Event();
381 event
.widget
= e
.widget
;
382 SelectionEvent selectionEvent
= new SelectionEvent(event
);
384 for (SelectionListener listener
: selectionListenerList
) {
385 listener
.widgetSelected(selectionEvent
);
391 * Constructor for CdmFormFactory.
395 * a {@link org.eclipse.swt.widgets.Display} object.
396 * @param selectionProvider
397 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
399 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
401 this.selectionProvider
= selectionProvider
;
407 * Constructor for CdmFormFactory.
411 * a {@link org.eclipse.swt.widgets.Display} object.
413 public CdmFormFactory(Display display
) {
421 private void init() {
422 boldFontHolder2
= new BoldFontHolder2();
423 selectionMouseHandler
= new SelectionMouseHandler();
424 selectionFocusHandler
= new SelectionFocusHandler();
428 * Creates an instance initialized with the correct selectionProvider
430 * Make sure to remove the instance when the entityComposite disposes via
431 * destroySelectionArbitrator(..)
433 * @param entityElement
434 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
436 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
439 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
440 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
441 selectionArbitrator
.addSelectionProvider(selectionProvider
);
442 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
443 addSelectionListener(selectionArbitrator
);
444 return selectionArbitrator
;
449 * destroySelectionArbitrator
452 * @param selectionArbitrator
454 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
457 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
458 removeSelectionListener(selectionArbitrator
);
459 if (selectionProvider
!= null) {
460 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
462 MessagingUtils
.error(this.getClass(),
463 "Tried to destroy a selection listener from this factories listeners but was null", null);
469 * Adapts the {@link AbstractCdmFormElement}:<br>
470 * - sets the {@link IPropertyChangeListener}s handled by this class
475 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
478 public void adapt(ICdmFormElement formElement
) {
479 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
484 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
486 control
.addFocusListener(selectionFocusHandler
);
488 super.adapt(control
, trackFocus
, trackKeyboard
);
493 public void adapt(Composite composite
) {
494 composite
.addMouseListener(selectionMouseHandler
);
495 super.adapt(composite
);
504 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
507 public void destroyElement(ICdmFormElement formElement
) {
508 // return if element was not initialized
509 if (formElement
== null) {
512 // destroy selection arbitrator, if any
513 if (formElement
instanceof ISelectableElement
) {
514 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
516 // remove this element form its parents list of elements
517 // ICdmFormElement parentElement = formElement.getParentElement();
518 // if(parentElement != null){
519 // parentElement.removeElement(formElement);
521 // call destroy on child elements recursively
522 for (ICdmFormElement childElement
: formElement
.getElements()) {
523 destroyElement(childElement
);
525 // dispose of the controls
526 for (Control control
: formElement
.getControls()) {
527 // we added the layoutComposite of the parental element as the
528 // layout composite to this formElement
529 // but we do not want to destroy it.
530 if (control
.equals(formElement
.getLayoutComposite())) {
545 * a {@link org.eclipse.swt.widgets.Composite} object.
546 * @return a {@link org.eclipse.swt.widgets.Label} object.
548 public Label
createEmptyCell(Composite parent
) {
549 return this.createLabel(parent
, null);
554 * createMultiLanguageTextElement
557 * @param parentElement
558 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
561 * a {@link java.lang.String} object.
562 * @param multilanguageText
563 * a {@link java.util.Map} object.
569 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
572 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
573 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
574 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
575 multilanguageText
, textHeight
, style
);
577 parentElement
.addElement(element
);
581 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
582 KeyStatement keyStatement
, int textHeight
, int style
) {
583 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
586 parentElement
.addElement(element
);
591 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
593 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
594 * @param parentElement the parent container
595 * @param labelString the label name
596 * @param initialObject the object from which the <code>toString()</code> method is called
597 * @param style {@link SWT} style constant
598 * @return the created textfield with label
600 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
601 Object initialObject
, int style
) {
602 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
607 * createTextWithLabelElement
610 * @param parentElement
611 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
614 * a {@link java.lang.String} object.
616 * a {@link java.lang.String} object.
619 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
622 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
623 String initialText
, int style
) {
624 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
628 * createTextWithLabelElement
631 * @param parentElement
632 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
635 * a {@link java.lang.String} object.
637 * a {@link java.lang.String} object.
638 * @param textLimit maximal number of characters allowed
641 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
644 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
645 String initialText
, Integer textLimit
, int style
) {
646 if(initialText
==null){
650 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
653 parentElement
.addElement(element
);
657 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
658 int textHeight
, int style
) {
659 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
661 parentElement
.addElement(element
);
665 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
666 URI initialUri
, int style
) {
667 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
669 parentElement
.addElement(element
);
680 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
681 IOpenUrlEnabled openUrlEnabled
, int style
) {
682 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
685 parentElement
.addElement(element
);
691 * @param parentElement
693 * @param conversationEnabled
698 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
699 ConversationHolder conversation
, User user
, int style
) {
700 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
702 parentElement
.addElement(element
);
708 * createIntegerTextWithLabelElement
711 * @param parentElement
712 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
715 * a {@link java.lang.String} object.
716 * @param initialInteger
717 * a {@link java.lang.Integer} object.
721 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
724 public NumberWithLabelElement
createNumberTextWithLabelElement(
725 ICdmFormElement parentElement
, String labelString
,
726 Number initialNumber
, int style
) {
727 NumberWithLabelElement element
= new NumberWithLabelElement(this,
728 parentElement
, labelString
, initialNumber
, style
);
730 parentElement
.addElement(element
);
734 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
735 String labelString
, LanguageString languageString
, int style
) {
736 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
739 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
740 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
741 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
742 languageString
, height
, isMultiLine
, style
);
744 parentElement
.addElement(element
);
750 * createKeyValueViewerElement
753 * @param parentElement
754 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
757 * a {@link java.lang.String} object.
758 * @param valueHeading
759 * a {@link java.lang.String} object.
761 * a {@link java.util.Map} object.
762 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
765 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
766 String valueHeading
, Map
<Object
, Object
> map
) {
767 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
769 parentElement
.addElement(element
);
775 * createTermComboElement
778 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
779 * @param termComboType
781 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
783 * @param parentElement
784 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
787 * a {@link java.lang.String} object.
789 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
793 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
797 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
798 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
799 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
802 parentElement
.addElement(element
);
808 * createTermComboElement
811 * @param termComboType
813 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
815 * @param parentElement
816 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
819 * a {@link java.lang.String} object.
821 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
825 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
829 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
831 ICdmFormElement parentElement
,
835 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
837 parentElement
.addElement(element
);
843 * createTermComboElement
846 * @param termComboType
848 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
850 * @param parentElement
851 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
854 * a {@link java.lang.String} object.
856 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
860 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
864 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
865 TermVocabulary
<?
> termVocabulary
,
866 ICdmFormElement parentElement
,
870 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, style
);
872 parentElement
.addElement(element
);
878 * createEnumComboElement
881 * @param enumComboType
883 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
885 * @param parentElement
886 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
890 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
893 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
894 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
896 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
898 parentElement
.addElement(element
);
902 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
903 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
904 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
906 parentElement
.addElement(element
);
912 * createBrowserElement
916 * a {@link java.net.URI} object.
919 * @param parentElement
920 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
922 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
925 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
926 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
928 parentElement
.addElement(element
);
937 * @param parentElement
938 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
941 * a {@link java.net.URI} object.
944 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
946 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
947 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
949 parentElement
.addElement(element
);
955 * createTextActionElement
959 * a {@link java.lang.String} object.
961 * a {@link java.lang.String} object.
964 * @param parentElement
965 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
968 * a {@link java.lang.String} object.
969 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
972 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
973 String buttonLabel
, String initialText
, int style
) {
974 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
977 parentElement
.addElement(element
);
986 * @param parentElement
987 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
990 * a {@link java.lang.String} object.
991 * @param initialState
995 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
998 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
999 if(initialState
==null){
1000 initialState
= Boolean
.FALSE
;
1002 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1004 parentElement
.addElement(element
);
1009 * Creates a section as a part of the form.
1011 * @return the section widget
1014 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1017 public Section
adapt(AbstractFormSection section
) {
1018 section
.setMenu(section
.getLayoutComposite().getMenu());
1019 adapt(section
, true, true);
1021 // handle focus and property change events for cdm use
1022 section
.addFocusListener(selectionFocusHandler
);
1023 section
.setPropertyChangeListeners(propertyChangeListeners
);
1025 if (section
.getToggle() != null) {
1026 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1027 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1030 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1032 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1033 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1034 getColors().initializeSectionToolBarColors();
1035 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1036 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1038 // call setTitleBarForeground regardless as it also sets the label color
1039 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1043 private class BoldFontHolder2
{
1044 private Font normalFont
;
1046 private Font boldFont
;
1048 public BoldFontHolder2() {
1051 public Font
getBoldFont(Font font
) {
1052 createBoldFont(font
);
1056 private void createBoldFont(Font font
) {
1057 if (normalFont
== null || !normalFont
.equals(font
)) {
1061 if (boldFont
== null) {
1062 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1066 public void dispose() {
1067 if (boldFont
!= null) {
1068 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1076 * createToggleableTextField
1079 * @param parentElement
1080 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1082 * @param labelString
1083 * a {@link java.lang.String} object.
1084 * @param initialText
1085 * a {@link java.lang.String} object.
1086 * @param initialState
1090 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1093 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1094 String initialText
, boolean initialState
, int style
) {
1095 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1096 initialState
, style
| orientation
);
1098 parentElement
.addElement(element
);
1104 * createTimePeriodElement
1107 * @param parentElement
1108 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1110 * @param labelString
1111 * a {@link java.lang.String} object.
1113 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1116 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1119 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1120 TimePeriod timePeriod
, int style
) {
1121 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1123 parentElement
.addElement(element
);
1129 * createGatheringEventUnitElement
1132 * @param parentElement
1133 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1135 * @param labelString
1136 * a {@link java.lang.String} object.
1138 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1141 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1144 public GatheringEventUnitElement
createGatheringEventUnitElement(
1145 ICdmFormElement parentElement
,
1147 DerivedUnitFacade gatheringEvent
,
1148 MinMaxTextSection
.UnitType unitType
,
1150 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1157 parentElement
.addElement(element
);
1163 * createPointElement
1168 * @param parentElement
1169 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1172 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1173 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1175 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1176 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1178 parentElement
.addElement(element
);
1185 * @param conversationHolder
1187 * @param detailsViewer
1191 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1192 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1193 parentElement
.addElement(section
);
1200 * createDateDetailSection
1203 * @param parentElement
1204 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1208 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1211 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1212 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1213 parentElement
.addElement(section
);
1220 * createDateDetailSection
1223 * @param parentElement
1224 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1228 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1231 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1232 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1233 parentElement
.addElement(section
);
1240 * createPartialElement
1243 * @param parentElement
1244 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1246 * @param labelString
1247 * a {@link java.lang.String} object.
1249 * a {@link org.joda.time.Partial} object.
1252 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1255 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1257 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1259 parentElement
.addElement(element
);
1265 * addSelectionListener
1269 * a {@link org.eclipse.swt.events.SelectionListener} object.
1271 public void addSelectionListener(SelectionListener listener
) {
1272 selectionListenerList
.add(listener
);
1277 * removeSelectionListener
1281 * a {@link org.eclipse.swt.events.SelectionListener} object.
1283 public void removeSelectionListener(SelectionListener listener
) {
1284 if (listener
== null) {
1285 MessagingUtils
.error(this.getClass(),
1286 "Tried to remove a selection listener from this factories listeners but was null", null);
1288 selectionListenerList
.remove(listener
);
1294 * addPropertyChangeListener
1298 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1301 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1302 if (propertyChangeListeners
.contains(listener
)) {
1305 propertyChangeListeners
.add(0, listener
);
1310 * removePropertyChangeListener
1314 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1317 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1318 propertyChangeListeners
.remove(listener
);
1322 * @return the propertyChangeListeners
1324 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1325 return propertyChangeListeners
;
1330 * createHorizontalSeparator
1333 * @param parentElement
1334 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1338 * @return a {@link org.eclipse.swt.widgets.Label} object.
1340 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1341 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1342 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1348 * createVersionElement
1351 * @param parentElement
1352 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1355 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1360 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1363 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1364 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1366 parentElement
.addElement(element
);
1371 * @param cdmBaseSection
1376 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1377 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1379 parentElement
.addElement(element
);
1385 * createVersionSection
1388 * @param parentElement
1389 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1394 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1397 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1398 VersionSection section
= new VersionSection(this, parentElement
, style
);
1399 parentElement
.addElement(section
);
1409 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1410 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1411 parentElement
.addElement(section
);
1418 * createEmptyElement
1421 * @param parentElement
1422 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1424 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1426 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1427 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1429 parentElement
.addElement(element
);
1435 * createHeadlineSection
1438 * @param parentElement
1439 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1442 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1445 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1446 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1447 parentElement
.addElement(section
);
1454 * createParsingMessageElement
1457 * @param parentElement
1458 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1460 * @param parserProblem
1461 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1466 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1469 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1470 ParserProblem parserProblem
, int style
) {
1471 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1473 parentElement
.addElement(element
);
1477 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1478 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1480 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1481 selectionProvider
, style
);
1483 parentElement
.addElement(section
);
1490 * @param definedTermClass
1491 * @param formElement
1495 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1496 AbstractCdmDetailSection parentElement
, int style
) {
1497 AbstractCdmDetailElement element
= null;
1499 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1500 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1501 } else if (definedTermClass
.equals(Feature
.class)) {
1502 element
= new FeatureDetailElement(this, parentElement
);
1504 element
= new DefinedTermDetailElement(this, parentElement
);
1508 parentElement
.addElement(element
);
1513 //--------DetailSections---------
1514 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1515 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1516 addAndAdaptSection(parentElement
, section
);
1520 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1521 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1522 addAndAdaptSection(parentElement
, section
);
1526 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1527 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1528 addAndAdaptSection(parentElement
, section
);
1532 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1533 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1534 addAndAdaptSection(parentElement
, section
);
1538 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1539 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1540 addAndAdaptSection(parentElement
, section
);
1544 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1545 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1546 addAndAdaptSection(parentElement
, section
);
1550 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1551 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1552 addAndAdaptSection(parentElement
, section
);
1556 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1557 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1558 addAndAdaptSection(parentElement
, section
);
1562 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1563 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1564 addAndAdaptSection(parentElement
, section
);
1568 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1569 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1570 addAndAdaptSection(parentElement
, section
);
1574 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1575 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1576 addAndAdaptSection(parentElement
, section
);
1580 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1581 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1582 addAndAdaptSection(parentElement
, section
);
1586 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1587 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1588 addAndAdaptSection(parentElement
, section
);
1592 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1593 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1594 addAndAdaptSection(parentElement
, section
);
1598 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1599 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1600 addAndAdaptSection(parentElement
, section
);
1604 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1605 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1606 addAndAdaptSection(parentElement
, section
);
1610 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1611 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1612 addAndAdaptSection(parentElement
, section
);
1616 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1617 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1618 addAndAdaptSection(parentElement
, section
);
1622 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1623 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1624 addAndAdaptSection(parentElement
, section
);
1628 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1629 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1630 addAndAdaptSection(parentElement
, section
);
1634 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1635 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1636 addAndAdaptSection(parentElement
, section
);
1640 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1641 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1642 addAndAdaptSection(parentElement
, section
);
1646 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1647 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1648 addAndAdaptSection(parentElement
, section
);
1652 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1653 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1654 addAndAdaptSection(parentElement
, section
);
1658 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1659 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1660 addAndAdaptSection(parentElement
, section
);
1664 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1665 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1666 addAndAdaptSection(parentElement
, section
);
1670 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1671 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1672 addAndAdaptSection(parentElement
, section
);
1676 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1677 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1678 addAndAdaptSection(parentElement
, section
);
1682 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1683 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1684 addAndAdaptSection(parentElement
, section
);
1688 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1689 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1690 addAndAdaptSection(parentElement
, section
);
1694 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1695 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1696 addAndAdaptSection(parentElement
, section
);
1700 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1701 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1702 addAndAdaptSection(parentElement
, section
);
1706 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1707 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1708 addAndAdaptSection(parentElement
, section
);
1712 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1713 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1714 addAndAdaptSection(parentElement
, section
);
1718 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1719 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1720 addAndAdaptSection(parentElement
, section
);
1724 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1725 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1726 addAndAdaptSection(parentElement
, section
);
1730 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1731 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1732 addAndAdaptSection(parentElement
, section
);
1736 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1737 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1738 addAndAdaptSection(parentElement
, section
);
1742 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1743 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1744 addAndAdaptSection(parentElement
, section
);
1748 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1749 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1750 addAndAdaptSection(parentElement
, section
);
1754 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1755 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1756 addAndAdaptSection(parentElement
, section
);
1760 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1761 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1762 addAndAdaptSection(parentElement
, section
);
1766 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1767 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1768 addAndAdaptSection(parentElement
, section
);
1772 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1773 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1774 addAndAdaptSection(parentElement
, section
);
1778 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1779 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1780 addAndAdaptSection(parentElement
, section
);
1784 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1785 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1786 addAndAdaptSection(parentElement
, section
);
1790 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1791 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1792 addAndAdaptSection(parentElement
, section
);
1796 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1797 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1798 addAndAdaptSection(parentElement
, section
);
1802 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1803 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1804 addAndAdaptSection(parentElement
, section
);
1808 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1809 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1810 addAndAdaptSection(parentElement
, section
);
1814 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1815 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1816 addAndAdaptSection(parentElement
, section
);
1820 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1821 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1822 addAndAdaptSection(parentElement
, section
);
1826 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1827 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1828 addAndAdaptSection(parentElement
, section
);
1832 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1833 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1834 addAndAdaptSection(parentElement
, section
);
1838 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1839 parentElement
.addElement(section
);
1843 //--------DetailElements------------
1845 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1846 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1847 addAndAdaptElement(parentElement
, element
);
1851 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1852 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1853 addAndAdaptElement(parentElement
, element
);
1857 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1858 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1859 addAndAdaptElement(parentElement
, element
);
1863 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1864 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1865 addAndAdaptElement(parentElement
, element
);
1869 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1870 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1871 addAndAdaptElement(parentElement
, element
);
1875 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1876 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1877 addAndAdaptElement(parentElement
, element
);
1881 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1882 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1883 addAndAdaptElement(parentElement
, element
);
1887 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1888 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1889 addAndAdaptElement(parentElement
, element
);
1893 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1894 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1895 addAndAdaptElement(parentElement
, element
);
1899 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1900 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1901 addAndAdaptElement(parentElement
, element
);
1905 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1906 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1907 addAndAdaptElement(parentElement
, element
);
1911 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1912 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1913 addAndAdaptElement(parentElement
, element
);
1917 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1918 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1919 addAndAdaptElement(parentElement
, element
);
1923 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1924 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1925 addAndAdaptElement(parentElement
, element
);
1929 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1930 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1931 addAndAdaptElement(parentElement
, element
);
1935 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1936 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1937 addAndAdaptElement(parentElement
, element
);
1941 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1942 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1943 addAndAdaptElement(parentElement
, element
);
1947 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1948 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1949 addAndAdaptElement(parentElement
, element
);
1953 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1954 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1955 addAndAdaptElement(parentElement
, element
);
1959 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1960 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1961 addAndAdaptElement(parentElement
, element
);
1965 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1966 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1967 addAndAdaptElement(parentElement
, element
);
1971 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1972 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1973 addAndAdaptElement(parentElement
, element
);
1977 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1978 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1979 addAndAdaptElement(parentElement
, element
);
1983 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1984 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1985 addAndAdaptElement(parentElement
, element
);
1989 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1990 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1991 addAndAdaptElement(parentElement
, element
);
1995 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1996 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1997 addAndAdaptElement(parentElement
, element
);
2001 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2002 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
2003 addAndAdaptElement(parentElement
, element
);
2007 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2008 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2009 addAndAdaptElement(parentElement
, element
);
2014 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2015 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2016 addAndAdaptElement(parentElement
, element
);
2020 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2021 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2022 addAndAdaptElement(parentElement
, element
);
2026 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2027 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2028 addAndAdaptElement(parentElement
, element
);
2032 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2033 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2034 addAndAdaptElement(parentElement
, element
);
2038 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2039 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2040 addAndAdaptElement(parentElement
, element
);
2044 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2045 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2046 addAndAdaptElement(parentElement
, element
);
2050 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2051 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2052 addAndAdaptElement(parentElement
, element
);
2056 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2057 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2058 addAndAdaptElement(parentElement
, element
);
2062 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2063 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2064 addAndAdaptElement(parentElement
, element
);
2068 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2069 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2070 addAndAdaptElement(parentElement
, element
);
2074 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2075 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2076 addAndAdaptElement(parentElement
, element
);
2080 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2081 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2082 addAndAdaptElement(parentElement
, element
);
2086 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2087 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2088 addAndAdaptElement(parentElement
, element
);
2092 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2093 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2094 addAndAdaptElement(parentElement
, element
);
2098 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2099 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2100 addAndAdaptElement(parentElement
, element
);
2104 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2105 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2106 addAndAdaptElement(parentElement
, mediaDetailElement
);
2107 return mediaDetailElement
;
2110 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2111 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2112 addAndAdaptElement(parentElement
, element
);
2116 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2117 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2118 addAndAdaptElement(parentElement
, element
);
2122 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2123 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2124 addAndAdaptElement(parentElement
, element
);
2128 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2129 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2130 addAndAdaptElement(parentElement
, element
);
2134 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2135 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2136 addAndAdaptElement(parentElement
, element
);
2140 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2141 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2142 addAndAdaptElement(parentElement
, element
);
2146 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2147 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2148 addAndAdaptElement(parentElement
, element
);
2152 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2153 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2154 addAndAdaptElement(parentElement
, element
);
2158 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2159 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2160 addAndAdaptElement(parentElement
, element
);
2165 * @param parentElement
2168 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2170 parentElement
.addElement(element
);
2173 //--------EntityCollectionSection----------
2174 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2175 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2176 addAndAdaptSection(parentElement
, section
);
2180 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2181 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2182 addAndAdaptSection(parentElement
, section
);
2186 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2187 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2188 addAndAdaptSection(parentElement
, section
);
2192 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2193 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2194 addAndAdaptSection(parentElement
, section
);
2198 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2199 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2200 addAndAdaptSection(parentElement
, section
);
2204 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2205 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2206 addAndAdaptSection(parentElement
, section
);
2210 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2211 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2212 addAndAdaptSection(parentElement
, section
);
2216 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2217 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2218 addAndAdaptSection(parentElement
, section
);
2222 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2223 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2224 addAndAdaptSection(parentElement
, section
);
2228 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2229 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2230 addAndAdaptSection(parentElement
, section
);
2234 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2235 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2236 addAndAdaptSection(parentElement
, section
);
2240 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2241 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2242 addAndAdaptSection(parentElement
, section
);
2246 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2247 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2248 addAndAdaptSection(parentElement
, section
);
2252 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2253 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2254 addAndAdaptSection(parentElement
, section
);
2258 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2259 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2260 addAndAdaptSection(parentElement
, section
);
2264 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2265 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2266 addAndAdaptSection(parentElement
, section
);
2270 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2271 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2272 addAndAdaptSection(parentElement
, section
);
2276 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2277 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2278 addAndAdaptSection(parentElement
, section
);
2282 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2283 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2284 addAndAdaptSection(parentElement
, section
);
2288 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2289 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2290 addAndAdaptSection(parentElement
, section
);
2294 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2295 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2296 addAndAdaptSection(parentElement
, section
);
2300 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2301 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2302 addAndAdaptSection(parentElement
, section
);
2306 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2307 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2308 addAndAdaptSection(parentElement
, section
);
2312 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2313 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2314 addAndAdaptSection(parentElement
, section
);
2318 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2319 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2320 addAndAdaptSection(parentElement
, section
);
2324 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2325 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2326 addAndAdaptSection(parentElement
, section
);
2330 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2331 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2332 addAndAdaptSection(parentElement
, section
);
2336 public IdentifierDetailSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2337 IdentifierDetailSection section
= new IdentifierDetailSection(this, conversation
, parentElement
, style
);
2338 addAndAdaptSection(parentElement
, section
);
2342 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2343 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2344 addAndAdaptSection(parentElement
, section
);
2348 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2349 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2350 addAndAdaptSection(parentElement
, section
);
2354 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2355 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2356 addAndAdaptSection(parentElement
, section
);
2360 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2361 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2362 addAndAdaptSection(parentElement
, section
);
2366 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2367 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2368 addAndAdaptSection(parentElement
, section
);
2372 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2373 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2374 addAndAdaptSection(parentElement
, section
);
2378 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2379 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2380 addAndAdaptSection(parentElement
, section
);
2384 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2385 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2386 addAndAdaptSection(parentElement
, section
);
2390 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2391 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2392 addAndAdaptSection(parentElement
, section
);
2396 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2397 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
2398 addAndAdaptSection(parentElement
, section
);
2402 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2403 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2404 addAndAdaptSection(parentElement
, section
);
2408 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2409 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2410 addAndAdaptSection(parentElement
, section
);
2414 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2415 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2416 addAndAdaptSection(parentElement
, section
);
2420 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2421 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2422 addAndAdaptSection(parentElement
, section
);
2426 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2427 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2428 addAndAdaptSection(parentElement
, section
);
2432 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2433 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2434 AbstractEntityCollectionElement element
= null;
2436 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2438 if (entity
instanceof Annotation
) {
2439 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2440 } else if (entity
instanceof Person
) {
2441 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2442 } else if (entity
instanceof Credit
) {
2443 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2444 } else if (entity
instanceof Extension
) {
2445 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2446 } else if (entity
instanceof Marker
) {
2447 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2448 } else if (entity
instanceof Media
) {
2449 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, true, style
);
2450 } else if (entity
instanceof MediaRepresentation
) {
2451 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2453 } else if (entity
instanceof ImageFile
) {
2454 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2455 } else if (entity
instanceof MediaRepresentationPart
) {
2456 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2457 removeListener
, style
);
2458 } else if (entity
instanceof NomenclaturalStatus
) {
2459 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2461 } else if (entity
instanceof Rights
) {
2462 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2463 } else if (entity
instanceof DescriptionElementSource
) {
2464 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2465 removeListener
, style
);
2466 } else if (entity
instanceof IdentifiableSource
) {
2467 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2469 } else if (entity
instanceof DefinedTerm
) {
2470 switch(((DefinedTerm
)entity
).getTermType()) {
2472 element
= new ScopeElement(this,
2474 (DefinedTerm
) entity
,
2479 element
= new ModifierElement(this,
2481 (DefinedTerm
) entity
,
2486 //FIXME : Actually we should through an exception here
2491 } else if (entity
instanceof Reference
) {
2492 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2493 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2496 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2498 } else if (entity
instanceof NameTypeDesignation
) {
2499 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2501 } else if (entity
instanceof NameRelationship
) {
2502 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2504 } else if (entity
instanceof SynonymRelationship
) {
2505 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2507 } else if (entity
instanceof SpecimenTypeDesignation
) {
2508 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2509 removeListener
, style
);
2510 } else if (entity
instanceof StateData
) {
2511 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2512 } else if (entity
instanceof StatisticalMeasurementValue
) {
2513 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2514 removeListener
, style
);
2515 } else if (entity
instanceof DerivedUnit
) {
2516 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2517 case LivingSpecimen
:
2518 case PreservedSpecimen
:
2520 element
= new SpecimenCollectionDetailElement(this,
2522 (DerivedUnit
) entity
,
2527 element
= new DerivedUnitElement(this,
2529 (DerivedUnit
) entity
,
2534 } else if (entity
instanceof NamedArea
) {
2535 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2536 } else if (entity
instanceof DeterminationEvent
) {
2537 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2538 } else if (entity
instanceof User
) {
2539 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2540 } else if (entity
instanceof GrantedAuthority
) {
2541 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2542 removeListener
, style
);
2543 } else if (entity
instanceof Group
) {
2544 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2545 } else if (entity
instanceof Taxon
) {
2546 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2547 } else if (entity
instanceof DescriptionElementBase
) {
2548 // this is the special case for protologs, maybe we can do this
2549 // differently when API improves
2550 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2551 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2552 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2554 } else if (entity
instanceof Identifier
) {
2555 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2556 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2559 element
= new IdentifierDetailElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2561 } else if (entity
instanceof TermVocabulary
) {
2562 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2563 } else if (entity
instanceof MeasurementUnit
) {
2564 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2567 if (element
== null) {
2568 MessagingUtils
.messageDialog("No element for entity", this,
2569 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2574 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2575 element
.setPersistentBackground(backgroundColor
);
2578 parentElement
.addElement(element
);
2586 * Creates a selection element for the given type T.
2589 * <strong>Selection elements not handled by this method:</strong>
2591 * <li>{@link TaxonNodeSelectionElement} see
2592 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2594 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2595 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2601 * a {@link Class} object of the type that you want the selection
2603 * @param parentElement
2604 * a {@link ICdmFormElement} object.
2605 * @param labelString
2606 * a {@link String} object.
2607 * @param selectionType
2609 * a {@link ICdmBase} object.
2612 * @param conversation
2613 * a {@link ConversationHolder} object.
2614 * @return a {@link EntitySelectionElement} object.
2616 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2617 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2619 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2620 labelString
, selection
, mode
, style
);
2622 parentElement
.addElement(element
);
2626 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2627 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2628 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2629 labelString
, selection
, mode
, style
);
2631 parentElement
.addElement(element
);
2635 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2636 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2637 int mode
, int style
) {
2638 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2639 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2641 parentElement
.addElement(element
);
2645 /** {@inheritDoc} */
2646 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2647 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2648 adapt(labelElement
);
2649 parentElement
.addElement(labelElement
);
2650 return labelElement
;
2653 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2654 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2655 label
.setText(labelText
+" (yyyy-MM-dd)");
2656 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2657 dateElement
.initController(this, formElement
);
2663 * Getter for the field <code>selectionProvider</code>.
2666 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2668 public ISelectionProvider
getSelectionProvider() {
2669 return selectionProvider
;
2674 * createDetailedDescriptionDetailElement
2677 * @param parentElement
2678 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2682 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2687 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2690 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2691 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2692 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2694 if (entity
instanceof CategoricalData
) {
2695 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2696 (CategoricalData
) entity
, style
);
2697 } else if (entity
instanceof CommonTaxonName
) {
2698 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2700 } else if (entity
instanceof Distribution
) {
2701 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2703 } else if (entity
instanceof IndividualsAssociation
) {
2704 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2705 (IndividualsAssociation
) entity
, style
);
2706 } else if (entity
instanceof QuantitativeData
) {
2707 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2708 (QuantitativeData
) entity
, style
);
2709 } else if (entity
instanceof TaxonInteraction
) {
2710 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2711 (TaxonInteraction
) entity
, style
);
2712 } else if (entity
instanceof TextData
) {
2713 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2715 throw new IllegalStateException("There is no interface for the given description element");
2717 adapt(detailedDescriptionElement
);
2718 parentElement
.addElement(detailedDescriptionElement
);
2719 return detailedDescriptionElement
;
2724 * Creates a styled text as a part of the form.
2729 * the text initial value
2732 * @return the text widget
2734 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2735 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2736 if (value
!= null) {
2737 text
.setText(value
);
2739 text
.setForeground(getColors().getForeground());
2740 text
.setBackground(getColors().getBackground());
2741 // text.addFocusListener(visibilityHandler);
2745 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2746 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2747 addAndAdaptSection(parentElement
, section
);