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
.StatisticalMeasurementValueElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.identifier
.IdentifierDetailSection
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailElement
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailSection
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
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
);
777 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
780 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
781 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
782 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
783 selection
, true, style
);
785 parentElement
.addElement(element
);
789 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
791 ICdmFormElement parentElement
,
795 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, true, style
);
797 parentElement
.addElement(element
);
801 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
803 ICdmFormElement parentElement
,
806 boolean addEmptyElement
,
808 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
);
810 parentElement
.addElement(element
);
814 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
815 TermVocabulary
<?
> termVocabulary
,
816 ICdmFormElement parentElement
,
820 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, true, style
);
822 parentElement
.addElement(element
);
826 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
827 TermVocabulary
<?
> termVocabulary
,
828 ICdmFormElement parentElement
,
831 boolean addEmptyElement
,
833 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
);
835 parentElement
.addElement(element
);
841 * createEnumComboElement
844 * @param enumComboType
846 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
848 * @param parentElement
849 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
853 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
856 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
857 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
859 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
861 parentElement
.addElement(element
);
865 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
866 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
867 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
869 parentElement
.addElement(element
);
875 * createBrowserElement
879 * a {@link java.net.URI} object.
882 * @param parentElement
883 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
885 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
888 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
889 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
891 parentElement
.addElement(element
);
900 * @param parentElement
901 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
904 * a {@link java.net.URI} object.
907 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
909 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
910 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
912 parentElement
.addElement(element
);
918 * createTextActionElement
922 * a {@link java.lang.String} object.
924 * a {@link java.lang.String} object.
927 * @param parentElement
928 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
931 * a {@link java.lang.String} object.
932 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
935 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
936 String buttonLabel
, String initialText
, int style
) {
937 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
940 parentElement
.addElement(element
);
949 * @param parentElement
950 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
953 * a {@link java.lang.String} object.
954 * @param initialState
958 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
961 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
962 if(initialState
==null){
963 initialState
= Boolean
.FALSE
;
965 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
967 parentElement
.addElement(element
);
972 * Creates a section as a part of the form.
974 * @return the section widget
977 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
980 public Section
adapt(AbstractFormSection section
) {
981 section
.setMenu(section
.getLayoutComposite().getMenu());
982 adapt(section
, true, true);
984 // handle focus and property change events for cdm use
985 section
.addFocusListener(selectionFocusHandler
);
986 section
.setPropertyChangeListeners(propertyChangeListeners
);
988 if (section
.getToggle() != null) {
989 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
990 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
993 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
995 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
996 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
997 getColors().initializeSectionToolBarColors();
998 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
999 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1001 // call setTitleBarForeground regardless as it also sets the label color
1002 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1006 private class BoldFontHolder2
{
1007 private Font normalFont
;
1009 private Font boldFont
;
1011 public BoldFontHolder2() {
1014 public Font
getBoldFont(Font font
) {
1015 createBoldFont(font
);
1019 private void createBoldFont(Font font
) {
1020 if (normalFont
== null || !normalFont
.equals(font
)) {
1024 if (boldFont
== null) {
1025 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1029 public void dispose() {
1030 if (boldFont
!= null) {
1031 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1039 * createToggleableTextField
1042 * @param parentElement
1043 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1045 * @param labelString
1046 * a {@link java.lang.String} object.
1047 * @param initialText
1048 * a {@link java.lang.String} object.
1049 * @param initialState
1053 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1056 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1057 String initialText
, boolean initialState
, int style
) {
1058 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1059 initialState
, style
| orientation
);
1061 parentElement
.addElement(element
);
1067 * createTimePeriodElement
1070 * @param parentElement
1071 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1073 * @param labelString
1074 * a {@link java.lang.String} object.
1076 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1079 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1082 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1083 TimePeriod timePeriod
, int style
) {
1084 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1086 parentElement
.addElement(element
);
1092 * createGatheringEventUnitElement
1095 * @param parentElement
1096 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1098 * @param labelString
1099 * a {@link java.lang.String} object.
1101 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1104 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1107 public GatheringEventUnitElement
createGatheringEventUnitElement(
1108 ICdmFormElement parentElement
,
1110 DerivedUnitFacade gatheringEvent
,
1111 MinMaxTextSection
.UnitType unitType
,
1113 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1120 parentElement
.addElement(element
);
1126 * createPointElement
1131 * @param parentElement
1132 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1135 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1136 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1138 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1139 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1141 parentElement
.addElement(element
);
1148 * @param conversationHolder
1150 * @param detailsViewer
1154 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1155 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1156 parentElement
.addElement(section
);
1163 * createDateDetailSection
1166 * @param parentElement
1167 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1171 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1174 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1175 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1176 parentElement
.addElement(section
);
1183 * createDateDetailSection
1186 * @param parentElement
1187 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1191 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1194 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1195 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1196 parentElement
.addElement(section
);
1203 * createPartialElement
1206 * @param parentElement
1207 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1209 * @param labelString
1210 * a {@link java.lang.String} object.
1212 * a {@link org.joda.time.Partial} object.
1215 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1218 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1220 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1222 parentElement
.addElement(element
);
1228 * addSelectionListener
1232 * a {@link org.eclipse.swt.events.SelectionListener} object.
1234 public void addSelectionListener(SelectionListener listener
) {
1235 selectionListenerList
.add(listener
);
1240 * removeSelectionListener
1244 * a {@link org.eclipse.swt.events.SelectionListener} object.
1246 public void removeSelectionListener(SelectionListener listener
) {
1247 if (listener
== null) {
1248 MessagingUtils
.error(this.getClass(),
1249 "Tried to remove a selection listener from this factories listeners but was null", null);
1251 selectionListenerList
.remove(listener
);
1257 * addPropertyChangeListener
1261 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1264 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1265 if (propertyChangeListeners
.contains(listener
)) {
1268 propertyChangeListeners
.add(0, listener
);
1273 * removePropertyChangeListener
1277 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1280 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1281 propertyChangeListeners
.remove(listener
);
1285 * @return the propertyChangeListeners
1287 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1288 return propertyChangeListeners
;
1293 * createHorizontalSeparator
1296 * @param parentElement
1297 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1301 * @return a {@link org.eclipse.swt.widgets.Label} object.
1303 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1304 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1305 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1311 * createVersionElement
1314 * @param parentElement
1315 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1318 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1323 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1326 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1327 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1329 parentElement
.addElement(element
);
1334 * @param cdmBaseSection
1339 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1340 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1342 parentElement
.addElement(element
);
1348 * createVersionSection
1351 * @param parentElement
1352 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1357 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1360 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1361 VersionSection section
= new VersionSection(this, parentElement
, style
);
1362 parentElement
.addElement(section
);
1372 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1373 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1374 parentElement
.addElement(section
);
1381 * createEmptyElement
1384 * @param parentElement
1385 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1387 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1389 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1390 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1392 parentElement
.addElement(element
);
1398 * createHeadlineSection
1401 * @param parentElement
1402 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1405 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1408 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1409 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1410 parentElement
.addElement(section
);
1417 * createParsingMessageElement
1420 * @param parentElement
1421 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1423 * @param parserProblem
1424 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1429 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1432 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1433 ParserProblem parserProblem
, int style
) {
1434 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1436 parentElement
.addElement(element
);
1440 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1441 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1443 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1444 selectionProvider
, style
);
1446 parentElement
.addElement(section
);
1453 * @param definedTermClass
1454 * @param formElement
1458 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1459 AbstractCdmDetailSection parentElement
, int style
) {
1460 AbstractCdmDetailElement element
= null;
1462 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1463 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1464 } else if (definedTermClass
.equals(Feature
.class)) {
1465 element
= new FeatureDetailElement(this, parentElement
);
1467 element
= new DefinedTermDetailElement(this, parentElement
);
1471 parentElement
.addElement(element
);
1476 //--------DetailSections---------
1477 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1478 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1479 addAndAdaptSection(parentElement
, section
);
1483 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1484 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1485 addAndAdaptSection(parentElement
, section
);
1489 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1490 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1491 addAndAdaptSection(parentElement
, section
);
1495 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1496 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1497 addAndAdaptSection(parentElement
, section
);
1501 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1502 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1503 addAndAdaptSection(parentElement
, section
);
1507 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1508 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1509 addAndAdaptSection(parentElement
, section
);
1513 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1514 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1515 addAndAdaptSection(parentElement
, section
);
1519 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1520 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1521 addAndAdaptSection(parentElement
, section
);
1525 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1526 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1527 addAndAdaptSection(parentElement
, section
);
1531 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1532 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1533 addAndAdaptSection(parentElement
, section
);
1537 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1538 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1539 addAndAdaptSection(parentElement
, section
);
1543 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1544 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1545 addAndAdaptSection(parentElement
, section
);
1549 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1550 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1551 addAndAdaptSection(parentElement
, section
);
1555 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1556 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1557 addAndAdaptSection(parentElement
, section
);
1561 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1562 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1563 addAndAdaptSection(parentElement
, section
);
1567 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1568 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1569 addAndAdaptSection(parentElement
, section
);
1573 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1574 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1575 addAndAdaptSection(parentElement
, section
);
1579 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1580 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1581 addAndAdaptSection(parentElement
, section
);
1585 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1586 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1587 addAndAdaptSection(parentElement
, section
);
1591 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1592 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1593 addAndAdaptSection(parentElement
, section
);
1597 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1598 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1599 addAndAdaptSection(parentElement
, section
);
1603 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1604 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1605 addAndAdaptSection(parentElement
, section
);
1609 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1610 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1611 addAndAdaptSection(parentElement
, section
);
1615 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1616 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1617 addAndAdaptSection(parentElement
, section
);
1621 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1622 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1623 addAndAdaptSection(parentElement
, section
);
1627 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1628 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1629 addAndAdaptSection(parentElement
, section
);
1633 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1634 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1635 addAndAdaptSection(parentElement
, section
);
1639 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1640 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1641 addAndAdaptSection(parentElement
, section
);
1645 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1646 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1647 addAndAdaptSection(parentElement
, section
);
1651 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1652 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1653 addAndAdaptSection(parentElement
, section
);
1657 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1658 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1659 addAndAdaptSection(parentElement
, section
);
1663 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1664 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1665 addAndAdaptSection(parentElement
, section
);
1669 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1670 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1671 addAndAdaptSection(parentElement
, section
);
1675 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1676 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1677 addAndAdaptSection(parentElement
, section
);
1681 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1682 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1683 addAndAdaptSection(parentElement
, section
);
1687 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1688 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1689 addAndAdaptSection(parentElement
, section
);
1693 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1694 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1695 addAndAdaptSection(parentElement
, section
);
1699 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1700 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1701 addAndAdaptSection(parentElement
, section
);
1705 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1706 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1707 addAndAdaptSection(parentElement
, section
);
1711 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1712 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1713 addAndAdaptSection(parentElement
, section
);
1717 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1718 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1719 addAndAdaptSection(parentElement
, section
);
1723 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1724 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1725 addAndAdaptSection(parentElement
, section
);
1729 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1730 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1731 addAndAdaptSection(parentElement
, section
);
1735 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1736 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1737 addAndAdaptSection(parentElement
, section
);
1741 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1742 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1743 addAndAdaptSection(parentElement
, section
);
1747 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1748 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1749 addAndAdaptSection(parentElement
, section
);
1753 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1754 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1755 addAndAdaptSection(parentElement
, section
);
1759 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1760 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1761 addAndAdaptSection(parentElement
, section
);
1765 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1766 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1767 addAndAdaptSection(parentElement
, section
);
1771 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1772 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1773 addAndAdaptSection(parentElement
, section
);
1777 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1778 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1779 addAndAdaptSection(parentElement
, section
);
1783 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1784 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1785 addAndAdaptSection(parentElement
, section
);
1789 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1790 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1791 addAndAdaptSection(parentElement
, section
);
1795 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1796 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1797 addAndAdaptSection(parentElement
, section
);
1801 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1802 parentElement
.addElement(section
);
1806 //--------DetailElements------------
1808 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1809 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1810 addAndAdaptElement(parentElement
, element
);
1814 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1815 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1816 addAndAdaptElement(parentElement
, element
);
1820 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1821 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1822 addAndAdaptElement(parentElement
, element
);
1826 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1827 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1828 addAndAdaptElement(parentElement
, element
);
1832 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1833 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1834 addAndAdaptElement(parentElement
, element
);
1838 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1839 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1840 addAndAdaptElement(parentElement
, element
);
1844 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1845 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1846 addAndAdaptElement(parentElement
, element
);
1850 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1851 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1852 addAndAdaptElement(parentElement
, element
);
1856 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1857 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1858 addAndAdaptElement(parentElement
, element
);
1862 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1863 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1864 addAndAdaptElement(parentElement
, element
);
1868 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1869 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1870 addAndAdaptElement(parentElement
, element
);
1874 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1875 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1876 addAndAdaptElement(parentElement
, element
);
1880 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1881 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1882 addAndAdaptElement(parentElement
, element
);
1886 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1887 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1888 addAndAdaptElement(parentElement
, element
);
1892 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1893 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1894 addAndAdaptElement(parentElement
, element
);
1898 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1899 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1900 addAndAdaptElement(parentElement
, element
);
1904 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1905 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1906 addAndAdaptElement(parentElement
, element
);
1910 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1911 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1912 addAndAdaptElement(parentElement
, element
);
1916 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1917 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1918 addAndAdaptElement(parentElement
, element
);
1922 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1923 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1924 addAndAdaptElement(parentElement
, element
);
1928 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1929 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1930 addAndAdaptElement(parentElement
, element
);
1934 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1935 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1936 addAndAdaptElement(parentElement
, element
);
1940 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1941 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1942 addAndAdaptElement(parentElement
, element
);
1946 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1947 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1948 addAndAdaptElement(parentElement
, element
);
1952 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1953 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1954 addAndAdaptElement(parentElement
, element
);
1958 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1959 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1960 addAndAdaptElement(parentElement
, element
);
1964 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1965 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
1966 addAndAdaptElement(parentElement
, element
);
1970 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1971 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
1972 addAndAdaptElement(parentElement
, element
);
1977 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
1978 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
1979 addAndAdaptElement(parentElement
, element
);
1983 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
1984 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
1985 addAndAdaptElement(parentElement
, element
);
1989 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
1990 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
1991 addAndAdaptElement(parentElement
, element
);
1995 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
1996 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
1997 addAndAdaptElement(parentElement
, element
);
2001 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2002 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2003 addAndAdaptElement(parentElement
, element
);
2007 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2008 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2009 addAndAdaptElement(parentElement
, element
);
2013 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2014 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2015 addAndAdaptElement(parentElement
, element
);
2019 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2020 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2021 addAndAdaptElement(parentElement
, element
);
2025 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2026 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2027 addAndAdaptElement(parentElement
, element
);
2031 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2032 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2033 addAndAdaptElement(parentElement
, element
);
2037 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2038 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2039 addAndAdaptElement(parentElement
, element
);
2043 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2044 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2045 addAndAdaptElement(parentElement
, element
);
2049 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2050 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2051 addAndAdaptElement(parentElement
, element
);
2055 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2056 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2057 addAndAdaptElement(parentElement
, element
);
2061 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2062 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2063 addAndAdaptElement(parentElement
, element
);
2067 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2068 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2069 addAndAdaptElement(parentElement
, mediaDetailElement
);
2070 return mediaDetailElement
;
2073 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2074 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2075 addAndAdaptElement(parentElement
, element
);
2079 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2080 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2081 addAndAdaptElement(parentElement
, element
);
2085 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2086 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2087 addAndAdaptElement(parentElement
, element
);
2091 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2092 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2093 addAndAdaptElement(parentElement
, element
);
2097 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2098 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2099 addAndAdaptElement(parentElement
, element
);
2103 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2104 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2105 addAndAdaptElement(parentElement
, element
);
2109 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2110 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2111 addAndAdaptElement(parentElement
, element
);
2115 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2116 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2117 addAndAdaptElement(parentElement
, element
);
2121 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2122 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2123 addAndAdaptElement(parentElement
, element
);
2128 * @param parentElement
2131 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2133 parentElement
.addElement(element
);
2136 //--------EntityCollectionSection----------
2137 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2138 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2139 addAndAdaptSection(parentElement
, section
);
2143 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2144 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2145 addAndAdaptSection(parentElement
, section
);
2149 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2150 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2151 addAndAdaptSection(parentElement
, section
);
2155 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2156 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2157 addAndAdaptSection(parentElement
, section
);
2161 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2162 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2163 addAndAdaptSection(parentElement
, section
);
2167 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2168 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2169 addAndAdaptSection(parentElement
, section
);
2173 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2174 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2175 addAndAdaptSection(parentElement
, section
);
2179 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2180 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2181 addAndAdaptSection(parentElement
, section
);
2185 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2186 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2187 addAndAdaptSection(parentElement
, section
);
2191 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2192 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2193 addAndAdaptSection(parentElement
, section
);
2197 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2198 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2199 addAndAdaptSection(parentElement
, section
);
2203 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2204 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2205 addAndAdaptSection(parentElement
, section
);
2209 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2210 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2211 addAndAdaptSection(parentElement
, section
);
2215 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2216 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2217 addAndAdaptSection(parentElement
, section
);
2221 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2222 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2223 addAndAdaptSection(parentElement
, section
);
2227 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2228 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2229 addAndAdaptSection(parentElement
, section
);
2233 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2234 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2235 addAndAdaptSection(parentElement
, section
);
2239 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2240 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2241 addAndAdaptSection(parentElement
, section
);
2245 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2246 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2247 addAndAdaptSection(parentElement
, section
);
2251 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2252 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2253 addAndAdaptSection(parentElement
, section
);
2257 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2258 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2259 addAndAdaptSection(parentElement
, section
);
2263 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2264 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2265 addAndAdaptSection(parentElement
, section
);
2269 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2270 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2271 addAndAdaptSection(parentElement
, section
);
2275 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2276 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2277 addAndAdaptSection(parentElement
, section
);
2281 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2282 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2283 addAndAdaptSection(parentElement
, section
);
2287 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2288 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2289 addAndAdaptSection(parentElement
, section
);
2293 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2294 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2295 addAndAdaptSection(parentElement
, section
);
2299 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2300 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2301 addAndAdaptSection(parentElement
, section
);
2305 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2306 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2307 addAndAdaptSection(parentElement
, section
);
2311 public IdentifierDetailSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2312 IdentifierDetailSection section
= new IdentifierDetailSection(this, conversation
, parentElement
, style
);
2313 addAndAdaptSection(parentElement
, section
);
2317 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2318 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2319 addAndAdaptSection(parentElement
, section
);
2323 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2324 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2325 addAndAdaptSection(parentElement
, section
);
2329 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2330 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2331 addAndAdaptSection(parentElement
, section
);
2335 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2336 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2337 addAndAdaptSection(parentElement
, section
);
2341 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2342 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2343 addAndAdaptSection(parentElement
, section
);
2347 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2348 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2349 addAndAdaptSection(parentElement
, section
);
2353 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2354 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2355 addAndAdaptSection(parentElement
, section
);
2359 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2360 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2361 addAndAdaptSection(parentElement
, section
);
2365 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2366 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2367 addAndAdaptSection(parentElement
, section
);
2371 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2372 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2373 addAndAdaptSection(parentElement
, section
);
2377 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2378 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2379 addAndAdaptSection(parentElement
, section
);
2383 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2384 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2385 addAndAdaptSection(parentElement
, section
);
2389 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2390 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2391 addAndAdaptSection(parentElement
, section
);
2395 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2396 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2397 addAndAdaptSection(parentElement
, section
);
2401 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2402 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2403 AbstractEntityCollectionElement element
= null;
2405 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2407 if (entity
instanceof Annotation
) {
2408 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2409 } else if (entity
instanceof Person
) {
2410 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2411 } else if (entity
instanceof Credit
) {
2412 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2413 } else if (entity
instanceof Extension
) {
2414 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2415 } else if (entity
instanceof Marker
) {
2416 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2417 } else if (entity
instanceof Media
) {
2418 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, true, style
);
2419 } else if (entity
instanceof MediaRepresentation
) {
2420 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2422 } else if (entity
instanceof ImageFile
) {
2423 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2424 } else if (entity
instanceof MediaRepresentationPart
) {
2425 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2426 removeListener
, style
);
2427 } else if (entity
instanceof NomenclaturalStatus
) {
2428 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2430 } else if (entity
instanceof Rights
) {
2431 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2432 } else if (entity
instanceof DescriptionElementSource
) {
2433 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2434 removeListener
, style
);
2435 } else if (entity
instanceof IdentifiableSource
) {
2436 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2438 } else if (entity
instanceof DefinedTerm
) {
2439 switch(((DefinedTerm
)entity
).getTermType()) {
2441 element
= new ScopeElement(this,
2443 (DefinedTerm
) entity
,
2448 element
= new ModifierElement(this,
2450 (DefinedTerm
) entity
,
2458 } else if (entity
instanceof Reference
) {
2459 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2460 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2463 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2465 } else if (entity
instanceof NameTypeDesignation
) {
2466 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2468 } else if (entity
instanceof NameRelationship
) {
2469 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2471 } else if (entity
instanceof SynonymRelationship
) {
2472 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2474 } else if (entity
instanceof SpecimenTypeDesignation
) {
2475 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2476 removeListener
, style
);
2477 } else if (entity
instanceof StateData
) {
2478 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2479 } else if (entity
instanceof StatisticalMeasurementValue
) {
2480 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2481 removeListener
, style
);
2482 } else if (entity
instanceof DerivedUnit
) {
2483 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2484 case LivingSpecimen
:
2485 case PreservedSpecimen
:
2487 element
= new SpecimenCollectionDetailElement(this,
2489 (DerivedUnit
) entity
,
2494 element
= new DerivedUnitElement(this,
2496 (DerivedUnit
) entity
,
2501 } else if (entity
instanceof NamedArea
) {
2502 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2503 } else if (entity
instanceof DeterminationEvent
) {
2504 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2505 } else if (entity
instanceof User
) {
2506 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2507 } else if (entity
instanceof GrantedAuthority
) {
2508 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2509 removeListener
, style
);
2510 } else if (entity
instanceof Group
) {
2511 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2512 } else if (entity
instanceof Taxon
) {
2513 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2514 } else if (entity
instanceof DescriptionElementBase
) {
2515 // this is the special case for protologs, maybe we can do this
2516 // differently when API improves
2517 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2518 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2519 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2521 } else if (entity
instanceof Identifier
) {
2522 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2523 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2526 element
= new IdentifierDetailElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2528 } else if (entity
instanceof TermVocabulary
) {
2529 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
2530 switch (termVocabulary
.getTermType()) {
2532 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2535 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
2540 } else if (entity
instanceof MeasurementUnit
) {
2541 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2542 } else if (entity
instanceof StatisticalMeasure
) {
2543 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
2546 if (element
== null) {
2547 MessagingUtils
.messageDialog("No element for entity", this,
2548 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2553 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2554 element
.setPersistentBackground(backgroundColor
);
2557 parentElement
.addElement(element
);
2565 * Creates a selection element for the given type T.
2568 * <strong>Selection elements not handled by this method:</strong>
2570 * <li>{@link TaxonNodeSelectionElement} see
2571 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2573 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2574 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2580 * a {@link Class} object of the type that you want the selection
2582 * @param parentElement
2583 * a {@link ICdmFormElement} object.
2584 * @param labelString
2585 * a {@link String} object.
2586 * @param selectionType
2588 * a {@link ICdmBase} object.
2591 * @param conversation
2592 * a {@link ConversationHolder} object.
2593 * @return a {@link EntitySelectionElement} object.
2595 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2596 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2598 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2599 labelString
, selection
, mode
, style
);
2601 parentElement
.addElement(element
);
2605 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2606 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2607 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2608 labelString
, selection
, mode
, style
);
2610 parentElement
.addElement(element
);
2614 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2615 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2616 int mode
, int style
) {
2617 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2618 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2620 parentElement
.addElement(element
);
2624 /** {@inheritDoc} */
2625 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2626 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2627 adapt(labelElement
);
2628 parentElement
.addElement(labelElement
);
2629 return labelElement
;
2632 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2633 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2634 label
.setText(labelText
+" (yyyy-MM-dd)");
2635 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2636 dateElement
.initController(this, formElement
);
2642 * Getter for the field <code>selectionProvider</code>.
2645 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2647 public ISelectionProvider
getSelectionProvider() {
2648 return selectionProvider
;
2653 * createDetailedDescriptionDetailElement
2656 * @param parentElement
2657 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2661 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2666 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2669 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2670 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2671 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2673 if (entity
instanceof CategoricalData
) {
2674 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2675 (CategoricalData
) entity
, style
);
2676 } else if (entity
instanceof CommonTaxonName
) {
2677 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2679 } else if (entity
instanceof Distribution
) {
2680 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2682 } else if (entity
instanceof IndividualsAssociation
) {
2683 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2684 (IndividualsAssociation
) entity
, style
);
2685 } else if (entity
instanceof QuantitativeData
) {
2686 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2687 (QuantitativeData
) entity
, style
);
2688 } else if (entity
instanceof TaxonInteraction
) {
2689 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2690 (TaxonInteraction
) entity
, style
);
2691 } else if (entity
instanceof TextData
) {
2692 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2694 throw new IllegalStateException("There is no interface for the given description element");
2696 adapt(detailedDescriptionElement
);
2697 parentElement
.addElement(detailedDescriptionElement
);
2698 return detailedDescriptionElement
;
2703 * Creates a styled text as a part of the form.
2708 * the text initial value
2711 * @return the text widget
2713 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2714 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2715 if (value
!= null) {
2716 text
.setText(value
);
2718 text
.setForeground(getColors().getForeground());
2719 text
.setBackground(getColors().getBackground());
2720 // text.addFocusListener(visibilityHandler);
2724 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2725 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2726 addAndAdaptSection(parentElement
, section
);