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
.StatisticalMeasure
;
82 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
83 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
84 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
85 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
86 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
87 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
88 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
89 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
90 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
91 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
92 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
93 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
94 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
95 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
96 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
97 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
98 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
99 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
100 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
101 import eu
.etaxonomy
.cdm
.model
.taxon
.SynonymRelationship
;
102 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
103 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
104 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
105 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
106 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
107 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
108 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
109 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
110 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
111 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
112 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
116 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateModifierElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateModifierCollectionSection
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
323 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
324 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
325 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
329 * CdmFormFactory class.
333 * @created Feb 24, 2010
336 public class CdmFormFactory
extends FormToolkit
{
338 private BoldFontHolder2 boldFontHolder2
;
339 private MouseListener selectionMouseHandler
;
340 private FocusListener selectionFocusHandler
;
342 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
344 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
346 private final int orientation
= Window
.getDefaultOrientation();
347 private ISelectionProvider selectionProvider
;
349 /** Constant <code>EMPTY_SELECTION</code> */
350 public static ISelection EMPTY_SELECTION
= new ISelection() {
352 public boolean isEmpty() {
363 private class SelectionMouseHandler
extends MouseAdapter
{
365 public void mouseDown(MouseEvent e
) {
366 notifySelectionListeners(e
);
376 private class SelectionFocusHandler
extends FocusAdapter
{
378 public void focusGained(FocusEvent e
) {
379 notifySelectionListeners(e
);
383 private void notifySelectionListeners(TypedEvent e
) {
384 Event event
= new Event();
385 event
.widget
= e
.widget
;
386 SelectionEvent selectionEvent
= new SelectionEvent(event
);
388 for (SelectionListener listener
: selectionListenerList
) {
389 listener
.widgetSelected(selectionEvent
);
395 * Constructor for CdmFormFactory.
399 * a {@link org.eclipse.swt.widgets.Display} object.
400 * @param selectionProvider
401 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
403 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
405 this.selectionProvider
= selectionProvider
;
411 * Constructor for CdmFormFactory.
415 * a {@link org.eclipse.swt.widgets.Display} object.
417 public CdmFormFactory(Display display
) {
425 private void init() {
426 boldFontHolder2
= new BoldFontHolder2();
427 selectionMouseHandler
= new SelectionMouseHandler();
428 selectionFocusHandler
= new SelectionFocusHandler();
432 * Creates an instance initialized with the correct selectionProvider
434 * Make sure to remove the instance when the entityComposite disposes via
435 * destroySelectionArbitrator(..)
437 * @param entityElement
438 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
440 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
443 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
444 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
445 selectionArbitrator
.addSelectionProvider(selectionProvider
);
446 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
447 addSelectionListener(selectionArbitrator
);
448 return selectionArbitrator
;
453 * destroySelectionArbitrator
456 * @param selectionArbitrator
458 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
461 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
462 removeSelectionListener(selectionArbitrator
);
463 if (selectionProvider
!= null) {
464 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
466 MessagingUtils
.error(this.getClass(),
467 "Tried to destroy a selection listener from this factories listeners but was null", null);
473 * Adapts the {@link AbstractCdmFormElement}:<br>
474 * - sets the {@link IPropertyChangeListener}s handled by this class
479 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
482 public void adapt(ICdmFormElement formElement
) {
483 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
488 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
490 control
.addFocusListener(selectionFocusHandler
);
492 super.adapt(control
, trackFocus
, trackKeyboard
);
497 public void adapt(Composite composite
) {
498 composite
.addMouseListener(selectionMouseHandler
);
499 super.adapt(composite
);
508 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
511 public void destroyElement(ICdmFormElement formElement
) {
512 // return if element was not initialized
513 if (formElement
== null) {
516 // destroy selection arbitrator, if any
517 if (formElement
instanceof ISelectableElement
) {
518 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
520 // remove this element form its parents list of elements
521 // ICdmFormElement parentElement = formElement.getParentElement();
522 // if(parentElement != null){
523 // parentElement.removeElement(formElement);
525 // call destroy on child elements recursively
526 for (ICdmFormElement childElement
: formElement
.getElements()) {
527 destroyElement(childElement
);
529 // dispose of the controls
530 for (Control control
: formElement
.getControls()) {
531 // we added the layoutComposite of the parental element as the
532 // layout composite to this formElement
533 // but we do not want to destroy it.
534 if (control
.equals(formElement
.getLayoutComposite())) {
549 * a {@link org.eclipse.swt.widgets.Composite} object.
550 * @return a {@link org.eclipse.swt.widgets.Label} object.
552 public Label
createEmptyCell(Composite parent
) {
553 return this.createLabel(parent
, null);
558 * createMultiLanguageTextElement
561 * @param parentElement
562 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
565 * a {@link java.lang.String} object.
566 * @param multilanguageText
567 * a {@link java.util.Map} object.
573 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
576 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
577 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
578 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
579 multilanguageText
, textHeight
, style
);
581 parentElement
.addElement(element
);
585 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
586 KeyStatement keyStatement
, int textHeight
, int style
) {
587 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
590 parentElement
.addElement(element
);
595 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
597 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
598 * @param parentElement the parent container
599 * @param labelString the label name
600 * @param initialObject the object from which the <code>toString()</code> method is called
601 * @param style {@link SWT} style constant
602 * @return the created textfield with label
604 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
605 Object initialObject
, int style
) {
606 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
611 * createTextWithLabelElement
614 * @param parentElement
615 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
618 * a {@link java.lang.String} object.
620 * a {@link java.lang.String} object.
623 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
626 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
627 String initialText
, int style
) {
628 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
632 * createTextWithLabelElement
635 * @param parentElement
636 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
639 * a {@link java.lang.String} object.
641 * a {@link java.lang.String} object.
642 * @param textLimit maximal number of characters allowed
645 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
648 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
649 String initialText
, Integer textLimit
, int style
) {
650 if(initialText
==null){
654 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
657 parentElement
.addElement(element
);
661 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
662 int textHeight
, int style
) {
663 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
665 parentElement
.addElement(element
);
669 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
670 URI initialUri
, int style
) {
671 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
673 parentElement
.addElement(element
);
684 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
685 IOpenUrlEnabled openUrlEnabled
, int style
) {
686 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
689 parentElement
.addElement(element
);
695 * @param parentElement
697 * @param conversationEnabled
702 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
703 ConversationHolder conversation
, User user
, int style
) {
704 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
706 parentElement
.addElement(element
);
712 * createIntegerTextWithLabelElement
715 * @param parentElement
716 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
719 * a {@link java.lang.String} object.
720 * @param initialInteger
721 * a {@link java.lang.Integer} object.
725 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
728 public NumberWithLabelElement
createNumberTextWithLabelElement(
729 ICdmFormElement parentElement
, String labelString
,
730 Number initialNumber
, int style
) {
731 NumberWithLabelElement element
= new NumberWithLabelElement(this,
732 parentElement
, labelString
, initialNumber
, style
);
734 parentElement
.addElement(element
);
738 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
739 String labelString
, LanguageString languageString
, int style
) {
740 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
743 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
744 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
745 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
746 languageString
, height
, isMultiLine
, style
);
748 parentElement
.addElement(element
);
754 * createKeyValueViewerElement
757 * @param parentElement
758 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
761 * a {@link java.lang.String} object.
762 * @param valueHeading
763 * a {@link java.lang.String} object.
765 * a {@link java.util.Map} object.
766 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
769 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
770 String valueHeading
, Map
<Object
, Object
> map
) {
771 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
773 parentElement
.addElement(element
);
779 * createTermComboElement
782 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
783 * @param termComboType
785 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
787 * @param parentElement
788 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
791 * a {@link java.lang.String} object.
793 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
797 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
801 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
802 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
803 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
806 parentElement
.addElement(element
);
812 * createTermComboElement
815 * @param termComboType
817 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
819 * @param parentElement
820 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
823 * a {@link java.lang.String} object.
825 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
829 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
833 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
835 ICdmFormElement parentElement
,
839 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
841 parentElement
.addElement(element
);
847 * createTermComboElement
850 * @param termComboType
852 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
854 * @param parentElement
855 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
858 * a {@link java.lang.String} object.
860 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
864 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
868 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
869 TermVocabulary
<?
> termVocabulary
,
870 ICdmFormElement parentElement
,
874 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, style
);
876 parentElement
.addElement(element
);
882 * createEnumComboElement
885 * @param enumComboType
887 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
889 * @param parentElement
890 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
894 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
897 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
898 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
900 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
902 parentElement
.addElement(element
);
906 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
907 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
908 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
910 parentElement
.addElement(element
);
916 * createBrowserElement
920 * a {@link java.net.URI} object.
923 * @param parentElement
924 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
926 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
929 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
930 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
932 parentElement
.addElement(element
);
941 * @param parentElement
942 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
945 * a {@link java.net.URI} object.
948 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
950 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
951 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
953 parentElement
.addElement(element
);
959 * createTextActionElement
963 * a {@link java.lang.String} object.
965 * a {@link java.lang.String} object.
968 * @param parentElement
969 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
972 * a {@link java.lang.String} object.
973 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
976 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
977 String buttonLabel
, String initialText
, int style
) {
978 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
981 parentElement
.addElement(element
);
990 * @param parentElement
991 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
994 * a {@link java.lang.String} object.
995 * @param initialState
999 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1002 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1003 if(initialState
==null){
1004 initialState
= Boolean
.FALSE
;
1006 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1008 parentElement
.addElement(element
);
1013 * Creates a section as a part of the form.
1015 * @return the section widget
1018 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1021 public Section
adapt(AbstractFormSection section
) {
1022 section
.setMenu(section
.getLayoutComposite().getMenu());
1023 adapt(section
, true, true);
1025 // handle focus and property change events for cdm use
1026 section
.addFocusListener(selectionFocusHandler
);
1027 section
.setPropertyChangeListeners(propertyChangeListeners
);
1029 if (section
.getToggle() != null) {
1030 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1031 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1034 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1036 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1037 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1038 getColors().initializeSectionToolBarColors();
1039 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1040 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1042 // call setTitleBarForeground regardless as it also sets the label color
1043 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1047 private class BoldFontHolder2
{
1048 private Font normalFont
;
1050 private Font boldFont
;
1052 public BoldFontHolder2() {
1055 public Font
getBoldFont(Font font
) {
1056 createBoldFont(font
);
1060 private void createBoldFont(Font font
) {
1061 if (normalFont
== null || !normalFont
.equals(font
)) {
1065 if (boldFont
== null) {
1066 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1070 public void dispose() {
1071 if (boldFont
!= null) {
1072 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1080 * createToggleableTextField
1083 * @param parentElement
1084 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1086 * @param labelString
1087 * a {@link java.lang.String} object.
1088 * @param initialText
1089 * a {@link java.lang.String} object.
1090 * @param initialState
1094 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1097 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1098 String initialText
, boolean initialState
, int style
) {
1099 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1100 initialState
, style
| orientation
);
1102 parentElement
.addElement(element
);
1108 * createTimePeriodElement
1111 * @param parentElement
1112 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1114 * @param labelString
1115 * a {@link java.lang.String} object.
1117 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1120 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1123 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1124 TimePeriod timePeriod
, int style
) {
1125 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1127 parentElement
.addElement(element
);
1133 * createGatheringEventUnitElement
1136 * @param parentElement
1137 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1139 * @param labelString
1140 * a {@link java.lang.String} object.
1142 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1145 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1148 public GatheringEventUnitElement
createGatheringEventUnitElement(
1149 ICdmFormElement parentElement
,
1151 DerivedUnitFacade gatheringEvent
,
1152 MinMaxTextSection
.UnitType unitType
,
1154 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1161 parentElement
.addElement(element
);
1167 * createPointElement
1172 * @param parentElement
1173 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1176 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1177 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1179 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1180 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1182 parentElement
.addElement(element
);
1189 * @param conversationHolder
1191 * @param detailsViewer
1195 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1196 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1197 parentElement
.addElement(section
);
1204 * createDateDetailSection
1207 * @param parentElement
1208 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1212 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1215 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1216 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1217 parentElement
.addElement(section
);
1224 * createDateDetailSection
1227 * @param parentElement
1228 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1232 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1235 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1236 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1237 parentElement
.addElement(section
);
1244 * createPartialElement
1247 * @param parentElement
1248 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1250 * @param labelString
1251 * a {@link java.lang.String} object.
1253 * a {@link org.joda.time.Partial} object.
1256 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1259 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1261 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1263 parentElement
.addElement(element
);
1269 * addSelectionListener
1273 * a {@link org.eclipse.swt.events.SelectionListener} object.
1275 public void addSelectionListener(SelectionListener listener
) {
1276 selectionListenerList
.add(listener
);
1281 * removeSelectionListener
1285 * a {@link org.eclipse.swt.events.SelectionListener} object.
1287 public void removeSelectionListener(SelectionListener listener
) {
1288 if (listener
== null) {
1289 MessagingUtils
.error(this.getClass(),
1290 "Tried to remove a selection listener from this factories listeners but was null", null);
1292 selectionListenerList
.remove(listener
);
1298 * addPropertyChangeListener
1302 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1305 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1306 if (propertyChangeListeners
.contains(listener
)) {
1309 propertyChangeListeners
.add(0, listener
);
1314 * removePropertyChangeListener
1318 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1321 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1322 propertyChangeListeners
.remove(listener
);
1326 * @return the propertyChangeListeners
1328 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1329 return propertyChangeListeners
;
1334 * createHorizontalSeparator
1337 * @param parentElement
1338 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1342 * @return a {@link org.eclipse.swt.widgets.Label} object.
1344 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1345 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1346 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1352 * createVersionElement
1355 * @param parentElement
1356 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1359 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1364 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1367 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1368 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1370 parentElement
.addElement(element
);
1375 * @param cdmBaseSection
1380 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1381 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1383 parentElement
.addElement(element
);
1389 * createVersionSection
1392 * @param parentElement
1393 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1398 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1401 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1402 VersionSection section
= new VersionSection(this, parentElement
, style
);
1403 parentElement
.addElement(section
);
1413 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1414 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1415 parentElement
.addElement(section
);
1422 * createEmptyElement
1425 * @param parentElement
1426 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1428 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1430 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1431 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1433 parentElement
.addElement(element
);
1439 * createHeadlineSection
1442 * @param parentElement
1443 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1446 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1449 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1450 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1451 parentElement
.addElement(section
);
1458 * createParsingMessageElement
1461 * @param parentElement
1462 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1464 * @param parserProblem
1465 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1470 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1473 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1474 ParserProblem parserProblem
, int style
) {
1475 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1477 parentElement
.addElement(element
);
1481 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1482 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1484 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1485 selectionProvider
, style
);
1487 parentElement
.addElement(section
);
1494 * @param definedTermClass
1495 * @param formElement
1499 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1500 AbstractCdmDetailSection parentElement
, int style
) {
1501 AbstractCdmDetailElement element
= null;
1503 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1504 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1505 } else if (definedTermClass
.equals(Feature
.class)) {
1506 element
= new FeatureDetailElement(this, parentElement
);
1508 element
= new DefinedTermDetailElement(this, parentElement
);
1512 parentElement
.addElement(element
);
1517 //--------DetailSections---------
1518 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1519 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1520 addAndAdaptSection(parentElement
, section
);
1524 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1525 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1526 addAndAdaptSection(parentElement
, section
);
1530 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1531 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1532 addAndAdaptSection(parentElement
, section
);
1536 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1537 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1538 addAndAdaptSection(parentElement
, section
);
1542 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1543 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1544 addAndAdaptSection(parentElement
, section
);
1548 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1549 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1550 addAndAdaptSection(parentElement
, section
);
1554 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1555 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1556 addAndAdaptSection(parentElement
, section
);
1560 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1561 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1562 addAndAdaptSection(parentElement
, section
);
1566 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1567 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1568 addAndAdaptSection(parentElement
, section
);
1572 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1573 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1574 addAndAdaptSection(parentElement
, section
);
1578 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1579 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1580 addAndAdaptSection(parentElement
, section
);
1584 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1585 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1586 addAndAdaptSection(parentElement
, section
);
1590 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1591 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1592 addAndAdaptSection(parentElement
, section
);
1596 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1597 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1598 addAndAdaptSection(parentElement
, section
);
1602 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1603 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1604 addAndAdaptSection(parentElement
, section
);
1608 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1609 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1610 addAndAdaptSection(parentElement
, section
);
1614 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1615 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1616 addAndAdaptSection(parentElement
, section
);
1620 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1621 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1622 addAndAdaptSection(parentElement
, section
);
1626 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1627 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1628 addAndAdaptSection(parentElement
, section
);
1632 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1633 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1634 addAndAdaptSection(parentElement
, section
);
1638 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1639 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1640 addAndAdaptSection(parentElement
, section
);
1644 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1645 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1646 addAndAdaptSection(parentElement
, section
);
1650 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1651 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1652 addAndAdaptSection(parentElement
, section
);
1656 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1657 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1658 addAndAdaptSection(parentElement
, section
);
1662 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1663 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1664 addAndAdaptSection(parentElement
, section
);
1668 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1669 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1670 addAndAdaptSection(parentElement
, section
);
1674 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1675 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1676 addAndAdaptSection(parentElement
, section
);
1680 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1681 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1682 addAndAdaptSection(parentElement
, section
);
1686 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1687 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1688 addAndAdaptSection(parentElement
, section
);
1692 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1693 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1694 addAndAdaptSection(parentElement
, section
);
1698 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1699 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1700 addAndAdaptSection(parentElement
, section
);
1704 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1705 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1706 addAndAdaptSection(parentElement
, section
);
1710 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1711 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1712 addAndAdaptSection(parentElement
, section
);
1716 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1717 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1718 addAndAdaptSection(parentElement
, section
);
1722 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1723 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1724 addAndAdaptSection(parentElement
, section
);
1728 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1729 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1730 addAndAdaptSection(parentElement
, section
);
1734 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1735 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1736 addAndAdaptSection(parentElement
, section
);
1740 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1741 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1742 addAndAdaptSection(parentElement
, section
);
1746 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1747 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1748 addAndAdaptSection(parentElement
, section
);
1752 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1753 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1754 addAndAdaptSection(parentElement
, section
);
1758 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1759 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1760 addAndAdaptSection(parentElement
, section
);
1764 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1765 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1766 addAndAdaptSection(parentElement
, section
);
1770 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1771 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1772 addAndAdaptSection(parentElement
, section
);
1776 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1777 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1778 addAndAdaptSection(parentElement
, section
);
1782 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1783 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1784 addAndAdaptSection(parentElement
, section
);
1788 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1789 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1790 addAndAdaptSection(parentElement
, section
);
1794 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1795 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1796 addAndAdaptSection(parentElement
, section
);
1800 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1801 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1802 addAndAdaptSection(parentElement
, section
);
1806 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1807 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1808 addAndAdaptSection(parentElement
, section
);
1812 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1813 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1814 addAndAdaptSection(parentElement
, section
);
1818 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1819 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1820 addAndAdaptSection(parentElement
, section
);
1824 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1825 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1826 addAndAdaptSection(parentElement
, section
);
1830 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1831 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1832 addAndAdaptSection(parentElement
, section
);
1836 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1837 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1838 addAndAdaptSection(parentElement
, section
);
1842 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1843 parentElement
.addElement(section
);
1847 //--------DetailElements------------
1849 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1850 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1851 addAndAdaptElement(parentElement
, element
);
1855 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1856 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1857 addAndAdaptElement(parentElement
, element
);
1861 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1862 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1863 addAndAdaptElement(parentElement
, element
);
1867 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1868 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1869 addAndAdaptElement(parentElement
, element
);
1873 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1874 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1875 addAndAdaptElement(parentElement
, element
);
1879 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1880 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1881 addAndAdaptElement(parentElement
, element
);
1885 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1886 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1887 addAndAdaptElement(parentElement
, element
);
1891 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1892 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1893 addAndAdaptElement(parentElement
, element
);
1897 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1898 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1899 addAndAdaptElement(parentElement
, element
);
1903 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1904 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1905 addAndAdaptElement(parentElement
, element
);
1909 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1910 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1911 addAndAdaptElement(parentElement
, element
);
1915 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1916 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1917 addAndAdaptElement(parentElement
, element
);
1921 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1922 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1923 addAndAdaptElement(parentElement
, element
);
1927 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1928 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1929 addAndAdaptElement(parentElement
, element
);
1933 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1934 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1935 addAndAdaptElement(parentElement
, element
);
1939 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1940 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1941 addAndAdaptElement(parentElement
, element
);
1945 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1946 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1947 addAndAdaptElement(parentElement
, element
);
1951 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1952 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1953 addAndAdaptElement(parentElement
, element
);
1957 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1958 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1959 addAndAdaptElement(parentElement
, element
);
1963 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1964 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1965 addAndAdaptElement(parentElement
, element
);
1969 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1970 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1971 addAndAdaptElement(parentElement
, element
);
1975 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1976 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1977 addAndAdaptElement(parentElement
, element
);
1981 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1982 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1983 addAndAdaptElement(parentElement
, element
);
1987 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1988 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1989 addAndAdaptElement(parentElement
, element
);
1993 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1994 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1995 addAndAdaptElement(parentElement
, element
);
1999 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2000 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2001 addAndAdaptElement(parentElement
, element
);
2005 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2006 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
2007 addAndAdaptElement(parentElement
, element
);
2011 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2012 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2013 addAndAdaptElement(parentElement
, element
);
2018 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2019 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2020 addAndAdaptElement(parentElement
, element
);
2024 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2025 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2026 addAndAdaptElement(parentElement
, element
);
2030 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2031 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2032 addAndAdaptElement(parentElement
, element
);
2036 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2037 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2038 addAndAdaptElement(parentElement
, element
);
2042 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2043 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2044 addAndAdaptElement(parentElement
, element
);
2048 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2049 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2050 addAndAdaptElement(parentElement
, element
);
2054 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2055 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2056 addAndAdaptElement(parentElement
, element
);
2060 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2061 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2062 addAndAdaptElement(parentElement
, element
);
2066 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2067 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2068 addAndAdaptElement(parentElement
, element
);
2072 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2073 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2074 addAndAdaptElement(parentElement
, element
);
2078 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2079 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2080 addAndAdaptElement(parentElement
, element
);
2084 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2085 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2086 addAndAdaptElement(parentElement
, element
);
2090 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2091 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2092 addAndAdaptElement(parentElement
, element
);
2096 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2097 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2098 addAndAdaptElement(parentElement
, element
);
2102 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2103 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2104 addAndAdaptElement(parentElement
, element
);
2108 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2109 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2110 addAndAdaptElement(parentElement
, mediaDetailElement
);
2111 return mediaDetailElement
;
2114 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2115 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2116 addAndAdaptElement(parentElement
, element
);
2120 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2121 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2122 addAndAdaptElement(parentElement
, element
);
2126 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2127 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2128 addAndAdaptElement(parentElement
, element
);
2132 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2133 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2134 addAndAdaptElement(parentElement
, element
);
2138 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2139 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2140 addAndAdaptElement(parentElement
, element
);
2144 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2145 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2146 addAndAdaptElement(parentElement
, element
);
2150 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2151 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2152 addAndAdaptElement(parentElement
, element
);
2156 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2157 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2158 addAndAdaptElement(parentElement
, element
);
2162 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2163 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2164 addAndAdaptElement(parentElement
, element
);
2169 * @param parentElement
2172 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2174 parentElement
.addElement(element
);
2177 //--------EntityCollectionSection----------
2178 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2179 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2180 addAndAdaptSection(parentElement
, section
);
2184 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2185 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2186 addAndAdaptSection(parentElement
, section
);
2190 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2191 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2192 addAndAdaptSection(parentElement
, section
);
2196 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2197 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2198 addAndAdaptSection(parentElement
, section
);
2202 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2203 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2204 addAndAdaptSection(parentElement
, section
);
2208 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2209 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2210 addAndAdaptSection(parentElement
, section
);
2214 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2215 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2216 addAndAdaptSection(parentElement
, section
);
2220 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2221 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2222 addAndAdaptSection(parentElement
, section
);
2226 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2227 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2228 addAndAdaptSection(parentElement
, section
);
2232 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2233 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2234 addAndAdaptSection(parentElement
, section
);
2238 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2239 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2240 addAndAdaptSection(parentElement
, section
);
2244 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2245 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2246 addAndAdaptSection(parentElement
, section
);
2250 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2251 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2252 addAndAdaptSection(parentElement
, section
);
2256 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2257 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2258 addAndAdaptSection(parentElement
, section
);
2262 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2263 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2264 addAndAdaptSection(parentElement
, section
);
2268 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2269 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2270 addAndAdaptSection(parentElement
, section
);
2274 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2275 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2276 addAndAdaptSection(parentElement
, section
);
2280 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2281 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2282 addAndAdaptSection(parentElement
, section
);
2286 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2287 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2288 addAndAdaptSection(parentElement
, section
);
2292 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2293 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2294 addAndAdaptSection(parentElement
, section
);
2298 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2299 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2300 addAndAdaptSection(parentElement
, section
);
2304 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2305 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2306 addAndAdaptSection(parentElement
, section
);
2310 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2311 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2312 addAndAdaptSection(parentElement
, section
);
2316 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2317 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2318 addAndAdaptSection(parentElement
, section
);
2322 public StateModifierCollectionSection
createStateModifierCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2323 StateModifierCollectionSection section
= new StateModifierCollectionSection(this, conversation
, parentElement
, style
);
2324 addAndAdaptSection(parentElement
, section
);
2328 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2329 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2330 addAndAdaptSection(parentElement
, section
);
2334 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2335 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2336 addAndAdaptSection(parentElement
, section
);
2340 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2341 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2342 addAndAdaptSection(parentElement
, section
);
2346 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2347 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2348 addAndAdaptSection(parentElement
, section
);
2352 public IdentifierDetailSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2353 IdentifierDetailSection section
= new IdentifierDetailSection(this, conversation
, parentElement
, style
);
2354 addAndAdaptSection(parentElement
, section
);
2358 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2359 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2360 addAndAdaptSection(parentElement
, section
);
2364 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2365 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2366 addAndAdaptSection(parentElement
, section
);
2370 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2371 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2372 addAndAdaptSection(parentElement
, section
);
2376 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2377 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2378 addAndAdaptSection(parentElement
, section
);
2382 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2383 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2384 addAndAdaptSection(parentElement
, section
);
2388 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2389 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2390 addAndAdaptSection(parentElement
, section
);
2394 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2395 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2396 addAndAdaptSection(parentElement
, section
);
2400 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2401 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2402 addAndAdaptSection(parentElement
, section
);
2406 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2407 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2408 addAndAdaptSection(parentElement
, section
);
2412 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2413 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2414 addAndAdaptSection(parentElement
, section
);
2418 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2419 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2420 addAndAdaptSection(parentElement
, section
);
2424 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2425 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2426 addAndAdaptSection(parentElement
, section
);
2430 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2431 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2432 addAndAdaptSection(parentElement
, section
);
2436 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2437 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2438 addAndAdaptSection(parentElement
, section
);
2442 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2443 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2444 AbstractEntityCollectionElement element
= null;
2446 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2448 if (entity
instanceof Annotation
) {
2449 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2450 } else if (entity
instanceof Person
) {
2451 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2452 } else if (entity
instanceof Credit
) {
2453 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2454 } else if (entity
instanceof Extension
) {
2455 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2456 } else if (entity
instanceof Marker
) {
2457 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2458 } else if (entity
instanceof Media
) {
2459 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, true, style
);
2460 } else if (entity
instanceof MediaRepresentation
) {
2461 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2463 } else if (entity
instanceof ImageFile
) {
2464 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2465 } else if (entity
instanceof MediaRepresentationPart
) {
2466 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2467 removeListener
, style
);
2468 } else if (entity
instanceof NomenclaturalStatus
) {
2469 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2471 } else if (entity
instanceof Rights
) {
2472 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2473 } else if (entity
instanceof DescriptionElementSource
) {
2474 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2475 removeListener
, style
);
2476 } else if (entity
instanceof IdentifiableSource
) {
2477 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2479 } else if (entity
instanceof DefinedTerm
) {
2480 switch(((DefinedTerm
)entity
).getTermType()) {
2482 element
= new ScopeElement(this,
2484 (DefinedTerm
) entity
,
2489 element
= new ModifierElement(this,
2491 (DefinedTerm
) entity
,
2499 } else if (entity
instanceof Reference
) {
2500 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2501 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2504 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2506 } else if (entity
instanceof NameTypeDesignation
) {
2507 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2509 } else if (entity
instanceof NameRelationship
) {
2510 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2512 } else if (entity
instanceof SynonymRelationship
) {
2513 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2515 } else if (entity
instanceof SpecimenTypeDesignation
) {
2516 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2517 removeListener
, style
);
2518 } else if (entity
instanceof StateData
) {
2519 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2520 } else if (entity
instanceof StatisticalMeasurementValue
) {
2521 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2522 removeListener
, style
);
2523 } else if (entity
instanceof DerivedUnit
) {
2524 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2525 case LivingSpecimen
:
2526 case PreservedSpecimen
:
2528 element
= new SpecimenCollectionDetailElement(this,
2530 (DerivedUnit
) entity
,
2535 element
= new DerivedUnitElement(this,
2537 (DerivedUnit
) entity
,
2542 } else if (entity
instanceof NamedArea
) {
2543 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2544 } else if (entity
instanceof DeterminationEvent
) {
2545 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2546 } else if (entity
instanceof User
) {
2547 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2548 } else if (entity
instanceof GrantedAuthority
) {
2549 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2550 removeListener
, style
);
2551 } else if (entity
instanceof Group
) {
2552 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2553 } else if (entity
instanceof Taxon
) {
2554 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2555 } else if (entity
instanceof DescriptionElementBase
) {
2556 // this is the special case for protologs, maybe we can do this
2557 // differently when API improves
2558 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2559 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2560 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2562 } else if (entity
instanceof Identifier
) {
2563 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2564 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2567 element
= new IdentifierDetailElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2569 } else if (entity
instanceof TermVocabulary
) {
2570 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
2571 switch (termVocabulary
.getTermType()) {
2573 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2576 element
= new StateModifierElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
2581 } else if (entity
instanceof MeasurementUnit
) {
2582 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2583 } else if (entity
instanceof StatisticalMeasure
) {
2584 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
2587 if (element
== null) {
2588 MessagingUtils
.messageDialog("No element for entity", this,
2589 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2594 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2595 element
.setPersistentBackground(backgroundColor
);
2598 parentElement
.addElement(element
);
2606 * Creates a selection element for the given type T.
2609 * <strong>Selection elements not handled by this method:</strong>
2611 * <li>{@link TaxonNodeSelectionElement} see
2612 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2614 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2615 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2621 * a {@link Class} object of the type that you want the selection
2623 * @param parentElement
2624 * a {@link ICdmFormElement} object.
2625 * @param labelString
2626 * a {@link String} object.
2627 * @param selectionType
2629 * a {@link ICdmBase} object.
2632 * @param conversation
2633 * a {@link ConversationHolder} object.
2634 * @return a {@link EntitySelectionElement} object.
2636 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2637 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2639 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2640 labelString
, selection
, mode
, style
);
2642 parentElement
.addElement(element
);
2646 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2647 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2648 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2649 labelString
, selection
, mode
, style
);
2651 parentElement
.addElement(element
);
2655 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2656 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2657 int mode
, int style
) {
2658 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2659 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2661 parentElement
.addElement(element
);
2665 /** {@inheritDoc} */
2666 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2667 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2668 adapt(labelElement
);
2669 parentElement
.addElement(labelElement
);
2670 return labelElement
;
2673 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2674 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2675 label
.setText(labelText
+" (yyyy-MM-dd)");
2676 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2677 dateElement
.initController(this, formElement
);
2683 * Getter for the field <code>selectionProvider</code>.
2686 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2688 public ISelectionProvider
getSelectionProvider() {
2689 return selectionProvider
;
2694 * createDetailedDescriptionDetailElement
2697 * @param parentElement
2698 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2702 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2707 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2710 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2711 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2712 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2714 if (entity
instanceof CategoricalData
) {
2715 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2716 (CategoricalData
) entity
, style
);
2717 } else if (entity
instanceof CommonTaxonName
) {
2718 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2720 } else if (entity
instanceof Distribution
) {
2721 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2723 } else if (entity
instanceof IndividualsAssociation
) {
2724 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2725 (IndividualsAssociation
) entity
, style
);
2726 } else if (entity
instanceof QuantitativeData
) {
2727 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2728 (QuantitativeData
) entity
, style
);
2729 } else if (entity
instanceof TaxonInteraction
) {
2730 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2731 (TaxonInteraction
) entity
, style
);
2732 } else if (entity
instanceof TextData
) {
2733 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2735 throw new IllegalStateException("There is no interface for the given description element");
2737 adapt(detailedDescriptionElement
);
2738 parentElement
.addElement(detailedDescriptionElement
);
2739 return detailedDescriptionElement
;
2744 * Creates a styled text as a part of the form.
2749 * the text initial value
2752 * @return the text widget
2754 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2755 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2756 if (value
!= null) {
2757 text
.setText(value
);
2759 text
.setForeground(getColors().getForeground());
2760 text
.setBackground(getColors().getBackground());
2761 // text.addFocusListener(visibilityHandler);
2765 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2766 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2767 addAndAdaptSection(parentElement
, section
);