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
.LSID
;
62 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
63 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
64 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
65 import eu
.etaxonomy
.cdm
.model
.common
.Representation
;
66 import eu
.etaxonomy
.cdm
.model
.common
.TermBase
;
67 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
68 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
69 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
70 import eu
.etaxonomy
.cdm
.model
.common
.User
;
71 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
72 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
73 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
74 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
75 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
76 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
77 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
78 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
79 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
80 import eu
.etaxonomy
.cdm
.model
.description
.MeasurementUnit
;
81 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
82 import eu
.etaxonomy
.cdm
.model
.description
.State
;
83 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
84 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasure
;
85 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
86 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
87 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
88 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
89 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
90 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
91 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
92 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
93 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
94 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
95 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
96 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
97 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
98 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
99 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
100 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
101 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
102 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
103 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
104 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
105 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
106 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNodeAgentRelation
;
107 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
108 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
109 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
110 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
111 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.CloneClassificationDetailElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
114 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
115 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
116 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopePolyKeyDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationDetailElement
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
323 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
324 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
325 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
326 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
327 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
328 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
329 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
330 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
331 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithAbbreviatedTitle
;
332 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
333 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
337 * CdmFormFactory class.
341 * @created Feb 24, 2010
344 public class CdmFormFactory
extends FormToolkit
{
346 private BoldFontHolder2 boldFontHolder2
;
347 private MouseListener selectionMouseHandler
;
348 private FocusListener selectionFocusHandler
;
350 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
352 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
354 private final int orientation
= Window
.getDefaultOrientation();
355 private ISelectionProvider selectionProvider
;
357 /** Constant <code>EMPTY_SELECTION</code> */
358 public static ISelection EMPTY_SELECTION
= new ISelection() {
360 public boolean isEmpty() {
371 private class SelectionMouseHandler
extends MouseAdapter
{
373 public void mouseDown(MouseEvent e
) {
374 notifySelectionListeners(e
);
384 private class SelectionFocusHandler
extends FocusAdapter
{
386 public void focusGained(FocusEvent e
) {
387 notifySelectionListeners(e
);
391 private void notifySelectionListeners(TypedEvent e
) {
392 Event event
= new Event();
393 event
.widget
= e
.widget
;
394 SelectionEvent selectionEvent
= new SelectionEvent(event
);
396 for (SelectionListener listener
: selectionListenerList
) {
397 listener
.widgetSelected(selectionEvent
);
403 * Constructor for CdmFormFactory.
407 * a {@link org.eclipse.swt.widgets.Display} object.
408 * @param selectionProvider
409 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
411 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
413 this.selectionProvider
= selectionProvider
;
419 * Constructor for CdmFormFactory.
423 * a {@link org.eclipse.swt.widgets.Display} object.
425 public CdmFormFactory(Display display
) {
433 private void init() {
434 boldFontHolder2
= new BoldFontHolder2();
435 selectionMouseHandler
= new SelectionMouseHandler();
436 selectionFocusHandler
= new SelectionFocusHandler();
440 * Creates an instance initialized with the correct selectionProvider
442 * Make sure to remove the instance when the entityComposite disposes via
443 * destroySelectionArbitrator(..)
445 * @param entityElement
446 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
448 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
451 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
452 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
453 selectionArbitrator
.addSelectionProvider(selectionProvider
);
454 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
455 addSelectionListener(selectionArbitrator
);
456 return selectionArbitrator
;
461 * destroySelectionArbitrator
464 * @param selectionArbitrator
466 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
469 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
470 removeSelectionListener(selectionArbitrator
);
471 if (selectionProvider
!= null) {
472 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
474 MessagingUtils
.error(this.getClass(),
475 "Tried to destroy a selection listener from this factories listeners but was null", null);
481 * Adapts the {@link AbstractCdmFormElement}:<br>
482 * - sets the {@link IPropertyChangeListener}s handled by this class
487 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
490 public void adapt(ICdmFormElement formElement
) {
491 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
496 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
498 control
.addFocusListener(selectionFocusHandler
);
500 super.adapt(control
, trackFocus
, trackKeyboard
);
505 public void adapt(Composite composite
) {
506 composite
.addMouseListener(selectionMouseHandler
);
507 super.adapt(composite
);
516 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
519 public void destroyElement(ICdmFormElement formElement
) {
520 // return if element was not initialized
521 if (formElement
== null) {
524 // destroy selection arbitrator, if any
525 if (formElement
instanceof ISelectableElement
) {
526 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
528 // remove this element form its parents list of elements
529 // ICdmFormElement parentElement = formElement.getParentElement();
530 // if(parentElement != null){
531 // parentElement.removeElement(formElement);
533 // call destroy on child elements recursively
534 for (ICdmFormElement childElement
: formElement
.getElements()) {
535 destroyElement(childElement
);
537 // dispose of the controls
538 for (Control control
: formElement
.getControls()) {
539 // we added the layoutComposite of the parental element as the
540 // layout composite to this formElement
541 // but we do not want to destroy it.
542 if (control
.equals(formElement
.getLayoutComposite())) {
557 * a {@link org.eclipse.swt.widgets.Composite} object.
558 * @return a {@link org.eclipse.swt.widgets.Label} object.
560 public Label
createEmptyCell(Composite parent
) {
561 return this.createLabel(parent
, null);
566 * createMultiLanguageTextElement
569 * @param parentElement
570 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
573 * a {@link java.lang.String} object.
574 * @param multilanguageText
575 * a {@link java.util.Map} object.
581 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
584 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
585 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
586 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
587 multilanguageText
, textHeight
, style
);
589 parentElement
.addElement(element
);
595 * createMultiLanguageTextElement
598 * @param parentElement
599 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
602 * @param Representation
603 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
609 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
612 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
613 RepresentationElement element
= new RepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
615 parentElement
.addElement(element
);
621 * createMultiLanguageTextElement
624 * @param parentElement
625 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
628 * @param Representation
629 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
635 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
638 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
639 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
641 parentElement
.addElement(element
);
647 * createMultiLanguageTextElement
650 * @param parentElement
651 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
655 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
661 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
664 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, TermBase term
, int textHeight
, int style
, boolean fillDetails
) {
665 RepresentationElement element
= new RepresentationElement(this, parentElement
, term
, textHeight
, style
, fillDetails
);
667 parentElement
.addElement(element
);
673 * createMultiLanguageTextElement
676 * @param parentElement
677 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
681 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
687 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
690 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, TermBase term
, int textHeight
, int style
, boolean fillDetails
) {
691 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, term
, textHeight
, style
, fillDetails
);
693 parentElement
.addElement(element
);
697 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
698 KeyStatement keyStatement
, int textHeight
, int style
) {
699 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
702 parentElement
.addElement(element
);
707 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
709 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
710 * @param parentElement the parent container
711 * @param labelString the label name
712 * @param initialObject the object from which the <code>toString()</code> method is called
713 * @param style {@link SWT} style constant
714 * @return the created textfield with label
716 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
717 Object initialObject
, int style
) {
718 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
723 * createTextWithLabelElement
726 * @param parentElement
727 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
730 * a {@link java.lang.String} object.
732 * a {@link java.lang.String} object.
735 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
738 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
739 String initialText
, int style
) {
740 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
744 * createTextWithLabelElement
747 * @param parentElement
748 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
751 * a {@link java.lang.String} object.
753 * a {@link java.lang.String} object.
754 * @param textLimit maximal number of characters allowed
757 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
760 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
761 String initialText
, Integer textLimit
, int style
) {
762 if(initialText
==null){
766 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
769 parentElement
.addElement(element
);
773 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
774 int textHeight
, int style
) {
775 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
777 parentElement
.addElement(element
);
781 public LsidWithExceptionLabelElement
createLsidWithExceptionLabelElement(ICdmFormElement parentElement
, String labelString
,
782 LSID initialLsid
, int style
) {
783 LsidWithExceptionLabelElement element
= new LsidWithExceptionLabelElement(this, parentElement
, labelString
, initialLsid
, null, style
);
785 parentElement
.addElement(element
);
789 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
790 URI initialUri
, int style
) {
791 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
793 parentElement
.addElement(element
);
804 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
805 IOpenUrlEnabled openUrlEnabled
, int style
) {
806 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
809 parentElement
.addElement(element
);
815 * @param parentElement
817 * @param conversationEnabled
822 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
823 ConversationHolder conversation
, User user
, int style
) {
824 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
826 parentElement
.addElement(element
);
832 * createIntegerTextWithLabelElement
835 * @param parentElement
836 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
839 * a {@link java.lang.String} object.
840 * @param initialInteger
841 * a {@link java.lang.Integer} object.
845 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
848 public NumberWithLabelElement
createNumberTextWithLabelElement(
849 ICdmFormElement parentElement
, String labelString
,
850 Number initialNumber
, int style
) {
851 NumberWithLabelElement element
= new NumberWithLabelElement(this,
852 parentElement
, labelString
, initialNumber
, style
);
854 parentElement
.addElement(element
);
858 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
859 String labelString
, LanguageString languageString
, int style
) {
860 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
863 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
864 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
865 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
866 languageString
, height
, isMultiLine
, style
);
868 parentElement
.addElement(element
);
874 * createKeyValueViewerElement
877 * @param parentElement
878 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
881 * a {@link java.lang.String} object.
882 * @param valueHeading
883 * a {@link java.lang.String} object.
885 * a {@link java.util.Map} object.
886 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
889 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
890 String valueHeading
, Map
<Object
, Object
> map
) {
891 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
893 parentElement
.addElement(element
);
897 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
900 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
901 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
902 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
903 selection
, true, style
);
905 parentElement
.addElement(element
);
909 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
911 ICdmFormElement parentElement
,
915 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, true, style
, false);
917 parentElement
.addElement(element
);
921 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
923 ICdmFormElement parentElement
,
926 boolean addEmptyElement
,
928 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, false);
930 parentElement
.addElement(element
);
933 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
935 ICdmFormElement parentElement
,
938 boolean addEmptyElement
,
939 int style
, boolean useAbbrevLabel
) {
940 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
942 parentElement
.addElement(element
);
947 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
948 TermVocabulary
<?
> termVocabulary
,
949 ICdmFormElement parentElement
,
953 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, true, style
);
955 parentElement
.addElement(element
);
959 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
960 TermVocabulary
<?
> termVocabulary
,
961 ICdmFormElement parentElement
,
964 boolean addEmptyElement
,
966 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
);
968 parentElement
.addElement(element
);
974 * createEnumComboElement
977 * @param enumComboType
979 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
981 * @param parentElement
982 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
986 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
989 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
990 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
992 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
994 parentElement
.addElement(element
);
998 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
999 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1000 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1002 parentElement
.addElement(element
);
1008 * createBrowserElement
1012 * a {@link java.net.URI} object.
1015 * @param parentElement
1016 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1018 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1021 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1022 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1024 parentElement
.addElement(element
);
1030 * createImageElement
1033 * @param parentElement
1034 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1037 * a {@link java.net.URI} object.
1040 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1042 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1043 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1045 parentElement
.addElement(element
);
1051 * createTextActionElement
1054 * @param labelString
1055 * a {@link java.lang.String} object.
1056 * @param initialText
1057 * a {@link java.lang.String} object.
1060 * @param parentElement
1061 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1063 * @param buttonLabel
1064 * a {@link java.lang.String} object.
1065 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1068 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1069 String buttonLabel
, String initialText
, int style
) {
1070 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1073 parentElement
.addElement(element
);
1082 * @param parentElement
1083 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1086 * a {@link java.lang.String} object.
1087 * @param initialState
1091 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1094 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1095 if(initialState
==null){
1096 initialState
= Boolean
.FALSE
;
1098 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1100 parentElement
.addElement(element
);
1105 * Creates a section as a part of the form.
1107 * @return the section widget
1110 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1113 public Section
adapt(AbstractFormSection section
) {
1114 section
.setMenu(section
.getLayoutComposite().getMenu());
1115 adapt(section
, true, true);
1117 // handle focus and property change events for cdm use
1118 section
.addFocusListener(selectionFocusHandler
);
1119 section
.setPropertyChangeListeners(propertyChangeListeners
);
1121 if (section
.getToggle() != null) {
1122 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1123 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1126 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1128 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1129 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1130 getColors().initializeSectionToolBarColors();
1131 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1132 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1134 // call setTitleBarForeground regardless as it also sets the label color
1135 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1139 private class BoldFontHolder2
{
1140 private Font normalFont
;
1142 private Font boldFont
;
1144 public BoldFontHolder2() {
1147 public Font
getBoldFont(Font font
) {
1148 createBoldFont(font
);
1152 private void createBoldFont(Font font
) {
1153 if (normalFont
== null || !normalFont
.equals(font
)) {
1157 if (boldFont
== null) {
1158 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1162 public void dispose() {
1163 if (boldFont
!= null) {
1164 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1172 * createToggleableTextField
1175 * @param parentElement
1176 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1178 * @param labelString
1179 * a {@link java.lang.String} object.
1180 * @param initialText
1181 * a {@link java.lang.String} object.
1182 * @param initialState
1186 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1189 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1190 String initialText
, boolean initialState
, int style
) {
1191 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1192 initialState
, style
| orientation
);
1194 parentElement
.addElement(element
);
1200 * createTimePeriodElement
1203 * @param parentElement
1204 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1206 * @param labelString
1207 * a {@link java.lang.String} object.
1209 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1212 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1215 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1216 TimePeriod timePeriod
, int style
) {
1217 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1219 parentElement
.addElement(element
);
1225 * createGatheringEventUnitElement
1228 * @param parentElement
1229 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1231 * @param labelString
1232 * a {@link java.lang.String} object.
1234 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1237 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1240 public GatheringEventUnitElement
createGatheringEventUnitElement(
1241 ICdmFormElement parentElement
,
1243 DerivedUnitFacade gatheringEvent
,
1244 MinMaxTextSection
.UnitType unitType
,
1246 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1253 parentElement
.addElement(element
);
1259 * createPointElement
1264 * @param parentElement
1265 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1268 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1269 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1271 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1272 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1274 parentElement
.addElement(element
);
1281 * @param conversationHolder
1283 * @param detailsViewer
1287 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1288 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1289 parentElement
.addElement(section
);
1296 * createDateDetailSection
1299 * @param parentElement
1300 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1304 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1307 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1308 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1309 parentElement
.addElement(section
);
1316 * createDateDetailSection
1319 * @param parentElement
1320 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1324 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1327 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1328 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1329 parentElement
.addElement(section
);
1336 * createPartialElement
1339 * @param parentElement
1340 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1342 * @param labelString
1343 * a {@link java.lang.String} object.
1345 * a {@link org.joda.time.Partial} object.
1348 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1351 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1353 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1355 parentElement
.addElement(element
);
1361 * addSelectionListener
1365 * a {@link org.eclipse.swt.events.SelectionListener} object.
1367 public void addSelectionListener(SelectionListener listener
) {
1368 selectionListenerList
.add(listener
);
1373 * removeSelectionListener
1377 * a {@link org.eclipse.swt.events.SelectionListener} object.
1379 public void removeSelectionListener(SelectionListener listener
) {
1380 if (listener
== null) {
1381 MessagingUtils
.error(this.getClass(),
1382 "Tried to remove a selection listener from this factories listeners but was null", null);
1384 selectionListenerList
.remove(listener
);
1390 * addPropertyChangeListener
1394 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1397 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1398 if (propertyChangeListeners
.contains(listener
)) {
1401 propertyChangeListeners
.add(0, listener
);
1406 * removePropertyChangeListener
1410 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1413 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1414 propertyChangeListeners
.remove(listener
);
1418 * @return the propertyChangeListeners
1420 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1421 return propertyChangeListeners
;
1426 * createHorizontalSeparator
1429 * @param parentElement
1430 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1434 * @return a {@link org.eclipse.swt.widgets.Label} object.
1436 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1437 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1438 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1444 * createVersionElement
1447 * @param parentElement
1448 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1451 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1456 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1459 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1460 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1462 parentElement
.addElement(element
);
1467 * @param cdmBaseSection
1472 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1473 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1475 parentElement
.addElement(element
);
1481 * createVersionSection
1484 * @param parentElement
1485 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1490 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1493 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1494 VersionSection section
= new VersionSection(this, parentElement
, style
);
1495 parentElement
.addElement(section
);
1505 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1506 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1507 parentElement
.addElement(section
);
1514 * createEmptyElement
1517 * @param parentElement
1518 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1520 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1522 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1523 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1525 parentElement
.addElement(element
);
1531 * createHeadlineSection
1534 * @param parentElement
1535 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1538 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1541 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1542 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1543 parentElement
.addElement(section
);
1550 * createParsingMessageElement
1553 * @param parentElement
1554 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1556 * @param parserProblem
1557 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1562 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1565 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1566 ParserProblem parserProblem
, int style
) {
1567 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1569 parentElement
.addElement(element
);
1573 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1574 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1576 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1577 selectionProvider
, style
);
1579 parentElement
.addElement(section
);
1586 * @param definedTermClass
1587 * @param formElement
1591 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1592 AbstractCdmDetailSection parentElement
, int style
) {
1593 AbstractCdmDetailElement element
= null;
1595 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1596 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1597 } else if (definedTermClass
.equals(Feature
.class)) {
1598 element
= new FeatureDetailElement(this, parentElement
);
1600 element
= new DefinedTermDetailElement(this, parentElement
);
1604 parentElement
.addElement(element
);
1609 //--------DetailSections---------
1610 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1611 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1612 addAndAdaptSection(parentElement
, section
);
1616 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1617 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1618 addAndAdaptSection(parentElement
, section
);
1622 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1623 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1624 addAndAdaptSection(parentElement
, section
);
1628 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1629 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1630 addAndAdaptSection(parentElement
, section
);
1634 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1635 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1636 addAndAdaptSection(parentElement
, section
);
1640 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1641 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1642 addAndAdaptSection(parentElement
, section
);
1646 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1647 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1648 addAndAdaptSection(parentElement
, section
);
1652 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1653 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1654 addAndAdaptSection(parentElement
, section
);
1658 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1659 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1660 addAndAdaptSection(parentElement
, section
);
1664 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1665 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1666 addAndAdaptSection(parentElement
, section
);
1670 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1671 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1672 addAndAdaptSection(parentElement
, section
);
1676 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
1677 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
1678 addAndAdaptSection(parentElement
, section
);
1682 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1683 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1684 addAndAdaptSection(parentElement
, section
);
1688 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1689 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1690 addAndAdaptSection(parentElement
, section
);
1694 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1695 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1696 addAndAdaptSection(parentElement
, section
);
1700 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1701 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1702 addAndAdaptSection(parentElement
, section
);
1706 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1707 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1708 addAndAdaptSection(parentElement
, section
);
1712 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1713 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
1714 addAndAdaptSection(parentElement
, section
);
1718 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1719 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1720 addAndAdaptSection(parentElement
, section
);
1724 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1725 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1726 addAndAdaptSection(parentElement
, section
);
1730 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1731 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1732 addAndAdaptSection(parentElement
, section
);
1736 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1737 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1738 addAndAdaptSection(parentElement
, section
);
1742 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1743 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1744 addAndAdaptSection(parentElement
, section
);
1748 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1749 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1750 addAndAdaptSection(parentElement
, section
);
1754 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1755 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1756 addAndAdaptSection(parentElement
, section
);
1760 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1761 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1762 addAndAdaptSection(parentElement
, section
);
1766 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1767 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1768 addAndAdaptSection(parentElement
, section
);
1772 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1773 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1774 addAndAdaptSection(parentElement
, section
);
1778 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1779 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1780 addAndAdaptSection(parentElement
, section
);
1784 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1785 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1786 addAndAdaptSection(parentElement
, section
);
1790 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1791 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1792 addAndAdaptSection(parentElement
, section
);
1796 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1797 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1798 addAndAdaptSection(parentElement
, section
);
1802 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1803 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
1804 addAndAdaptSection(parentElement
, section
);
1808 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1809 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1810 addAndAdaptSection(parentElement
, section
);
1814 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1815 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1816 addAndAdaptSection(parentElement
, section
);
1820 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1821 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1822 addAndAdaptSection(parentElement
, section
);
1826 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1827 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1828 addAndAdaptSection(parentElement
, section
);
1832 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1833 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1834 addAndAdaptSection(parentElement
, section
);
1838 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1839 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1840 addAndAdaptSection(parentElement
, section
);
1844 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1845 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1846 addAndAdaptSection(parentElement
, section
);
1850 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1851 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1852 addAndAdaptSection(parentElement
, section
);
1856 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1857 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1858 addAndAdaptSection(parentElement
, section
);
1862 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1863 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1864 addAndAdaptSection(parentElement
, section
);
1868 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1869 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1870 addAndAdaptSection(parentElement
, section
);
1874 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1875 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1876 addAndAdaptSection(parentElement
, section
);
1880 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1881 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1882 addAndAdaptSection(parentElement
, section
);
1886 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1887 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1888 addAndAdaptSection(parentElement
, section
);
1892 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1893 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1894 addAndAdaptSection(parentElement
, section
);
1898 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1899 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1900 addAndAdaptSection(parentElement
, section
);
1904 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1905 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1906 addAndAdaptSection(parentElement
, section
);
1910 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1911 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1912 addAndAdaptSection(parentElement
, section
);
1916 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1917 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1918 addAndAdaptSection(parentElement
, section
);
1922 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1923 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1924 addAndAdaptSection(parentElement
, section
);
1928 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1929 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1930 addAndAdaptSection(parentElement
, section
);
1934 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1935 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1936 addAndAdaptSection(parentElement
, section
);
1940 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1941 parentElement
.addElement(section
);
1945 //--------DetailElements------------
1947 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1948 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1949 addAndAdaptElement(parentElement
, element
);
1953 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1954 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1955 addAndAdaptElement(parentElement
, element
);
1959 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1960 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1961 addAndAdaptElement(parentElement
, element
);
1965 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1966 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1967 addAndAdaptElement(parentElement
, element
);
1971 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1972 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1973 addAndAdaptElement(parentElement
, element
);
1977 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1978 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1979 addAndAdaptElement(parentElement
, element
);
1983 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1984 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1985 addAndAdaptElement(parentElement
, element
);
1989 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1990 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1991 addAndAdaptElement(parentElement
, element
);
1995 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1996 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1997 addAndAdaptElement(parentElement
, element
);
2001 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2002 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2003 addAndAdaptElement(parentElement
, element
);
2007 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2008 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2009 addAndAdaptElement(parentElement
, element
);
2013 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2014 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2015 addAndAdaptElement(parentElement
, element
);
2019 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2020 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2021 addAndAdaptElement(parentElement
, element
);
2025 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2026 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2027 addAndAdaptElement(parentElement
, element
);
2031 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2032 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2034 parentElement
.addElement(element
);
2039 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2040 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2041 addAndAdaptElement(parentElement
, element
);
2045 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2046 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2047 addAndAdaptElement(parentElement
, element
);
2051 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2052 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2053 addAndAdaptElement(parentElement
, element
);
2057 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2058 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2059 addAndAdaptElement(parentElement
, element
);
2063 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2064 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2065 addAndAdaptElement(parentElement
, element
);
2069 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2070 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2071 addAndAdaptElement(parentElement
, element
);
2075 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2076 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2077 addAndAdaptElement(parentElement
, element
);
2081 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2082 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2083 addAndAdaptElement(parentElement
, element
);
2087 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2088 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2089 addAndAdaptElement(parentElement
, element
);
2093 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2094 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2095 addAndAdaptElement(parentElement
, element
);
2099 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2100 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2101 addAndAdaptElement(parentElement
, element
);
2105 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2106 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2107 addAndAdaptElement(parentElement
, element
);
2111 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2112 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2113 addAndAdaptElement(parentElement
, element
);
2117 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
, boolean isWizard
){
2118 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
, isWizard
);
2119 addAndAdaptElement(parentElement
, element
);
2123 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2124 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2125 addAndAdaptElement(parentElement
, element
);
2130 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2131 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2132 addAndAdaptElement(parentElement
, element
);
2136 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2137 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2138 addAndAdaptElement(parentElement
, element
);
2142 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2143 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2144 addAndAdaptElement(parentElement
, element
);
2148 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2149 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2150 addAndAdaptElement(parentElement
, element
);
2154 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2155 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2156 addAndAdaptElement(parentElement
, element
);
2160 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2161 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2162 addAndAdaptElement(parentElement
, element
);
2166 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2167 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2168 addAndAdaptElement(parentElement
, element
);
2172 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2173 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2174 addAndAdaptElement(parentElement
, element
);
2178 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2179 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2180 addAndAdaptElement(parentElement
, element
);
2184 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2185 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2186 addAndAdaptElement(parentElement
, element
);
2190 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2191 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2192 addAndAdaptElement(parentElement
, element
);
2196 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2197 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2198 addAndAdaptElement(parentElement
, element
);
2202 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2203 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2204 addAndAdaptElement(parentElement
, element
);
2208 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2209 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2210 addAndAdaptElement(parentElement
, element
);
2214 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2215 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2216 addAndAdaptElement(parentElement
, element
);
2220 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2221 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2222 addAndAdaptElement(parentElement
, element
);
2226 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2227 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2228 addAndAdaptElement(parentElement
, mediaDetailElement
);
2229 return mediaDetailElement
;
2232 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2233 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2234 addAndAdaptElement(parentElement
, element
);
2238 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2239 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2240 addAndAdaptElement(parentElement
, element
);
2244 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2245 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2246 addAndAdaptElement(parentElement
, element
);
2250 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2251 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2252 addAndAdaptElement(parentElement
, element
);
2256 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2257 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2258 addAndAdaptElement(parentElement
, element
);
2262 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2263 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2264 addAndAdaptElement(parentElement
, element
);
2268 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2269 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2270 addAndAdaptElement(parentElement
, element
);
2274 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2275 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2276 addAndAdaptElement(parentElement
, element
);
2281 * @param parentElement
2284 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2286 parentElement
.addElement(element
);
2289 //--------EntityCollectionSection----------
2290 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2291 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2292 addAndAdaptSection(parentElement
, section
);
2296 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2297 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2298 addAndAdaptSection(parentElement
, section
);
2302 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2303 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2304 addAndAdaptSection(parentElement
, section
);
2308 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2309 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2310 addAndAdaptSection(parentElement
, section
);
2314 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2315 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2316 addAndAdaptSection(parentElement
, section
);
2320 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2321 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2322 addAndAdaptSection(parentElement
, section
);
2326 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2327 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2328 addAndAdaptSection(parentElement
, section
);
2332 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2333 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2334 addAndAdaptSection(parentElement
, section
);
2338 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2339 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2340 addAndAdaptSection(parentElement
, section
);
2344 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2345 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2346 addAndAdaptSection(parentElement
, section
);
2350 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2351 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2352 addAndAdaptSection(parentElement
, section
);
2356 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2357 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2358 addAndAdaptSection(parentElement
, section
);
2362 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2363 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2364 addAndAdaptSection(parentElement
, section
);
2368 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2369 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2370 addAndAdaptSection(parentElement
, section
);
2374 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2375 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2376 addAndAdaptSection(parentElement
, section
);
2380 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2381 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2382 addAndAdaptSection(parentElement
, section
);
2386 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2387 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2388 addAndAdaptSection(parentElement
, section
);
2392 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2393 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2394 addAndAdaptSection(parentElement
, section
);
2398 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2399 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2400 addAndAdaptSection(parentElement
, section
);
2404 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2405 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2406 addAndAdaptSection(parentElement
, section
);
2410 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2411 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2412 addAndAdaptSection(parentElement
, section
);
2416 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2417 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2418 addAndAdaptSection(parentElement
, section
);
2422 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2423 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2424 addAndAdaptSection(parentElement
, section
);
2428 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2429 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2430 addAndAdaptSection(parentElement
, section
);
2434 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2435 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2436 addAndAdaptSection(parentElement
, section
);
2440 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2441 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2442 addAndAdaptSection(parentElement
, section
);
2446 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2447 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2448 addAndAdaptSection(parentElement
, section
);
2452 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2453 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2454 addAndAdaptSection(parentElement
, section
);
2458 public GeoScopePolyKeyDetailSection
createGeoScopePolyKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2459 GeoScopePolyKeyDetailSection section
= new GeoScopePolyKeyDetailSection(this, conversation
, parentElement
, style
);
2460 addAndAdaptSection(parentElement
, section
);
2464 public IdentifierSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2465 IdentifierSection section
= new IdentifierSection(this, conversation
, parentElement
, style
);
2466 addAndAdaptSection(parentElement
, section
);
2470 public DerivedUnitFacadeIdentifierSection
createDerivedUnitFacadeIdentifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2471 DerivedUnitFacadeIdentifierSection section
= new DerivedUnitFacadeIdentifierSection(this, conversation
, parentElement
, style
);
2472 addAndAdaptSection(parentElement
, section
);
2476 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2477 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2478 addAndAdaptSection(parentElement
, section
);
2482 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2483 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2484 addAndAdaptSection(parentElement
, section
);
2488 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2489 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2490 addAndAdaptSection(parentElement
, section
);
2494 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2495 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2496 addAndAdaptSection(parentElement
, section
);
2500 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2501 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2502 addAndAdaptSection(parentElement
, section
);
2506 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2507 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2508 addAndAdaptSection(parentElement
, section
);
2512 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2513 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2514 addAndAdaptSection(parentElement
, section
);
2518 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2519 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2520 addAndAdaptSection(parentElement
, section
);
2524 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2525 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2526 addAndAdaptSection(parentElement
, section
);
2530 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2531 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2532 addAndAdaptSection(parentElement
, section
);
2536 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2537 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2538 addAndAdaptSection(parentElement
, section
);
2542 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2543 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2544 addAndAdaptSection(parentElement
, section
);
2548 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2549 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2550 addAndAdaptSection(parentElement
, section
);
2555 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2556 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2557 AbstractEntityCollectionElement element
= null;
2559 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2561 if (entity
instanceof Annotation
) {
2562 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2563 }else if (entity
instanceof Person
) {
2564 boolean isNomenclatural
= false;
2565 if (parentElement
instanceof TeamMemberSection
){
2566 isNomenclatural
= ((TeamMemberSection
) parentElement
).isNomenclaturalTeam();
2568 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
, isNomenclatural
);
2569 } else if (entity
instanceof Credit
) {
2570 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2571 } else if (entity
instanceof Extension
) {
2572 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2573 } else if (entity
instanceof Marker
) {
2574 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2575 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2576 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
, removeListener
, backgroundColor
, style
);
2577 }else if (entity
instanceof Media
) {
2578 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, true, style
);
2579 } else if (entity
instanceof MediaRepresentation
) {
2580 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2582 } else if (entity
instanceof ImageFile
) {
2583 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2584 } else if (entity
instanceof MediaRepresentationPart
) {
2585 element
= new MediaRepresentationPartElement
<>(this, parentElement
, (MediaRepresentationPart
) entity
,
2586 removeListener
, style
);
2587 } else if (entity
instanceof NomenclaturalStatus
) {
2588 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2590 } else if (entity
instanceof Rights
) {
2591 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2592 } else if (entity
instanceof DescriptionElementSource
) {
2593 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2594 removeListener
, style
);
2595 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2596 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
,
2597 removeListener
,backgroundColor
, style
);
2599 else if (entity
instanceof IdentifiableSource
) {
2600 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2602 } else if (entity
instanceof DefinedTerm
) {
2603 switch(((DefinedTerm
)entity
).getTermType()) {
2605 element
= new ScopeElement(this,
2607 (DefinedTerm
) entity
,
2612 element
= new ModifierElement(this,
2614 (DefinedTerm
) entity
,
2622 } else if (entity
instanceof Reference
) {
2623 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2624 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2627 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2629 } else if (entity
instanceof NameTypeDesignation
) {
2630 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2632 } else if (entity
instanceof NameRelationship
) {
2633 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2635 } else if (entity
instanceof SpecimenTypeDesignation
) {
2636 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
2637 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2638 removeListener
, style
);
2641 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2642 removeListener
, style
);
2644 } else if (entity
instanceof StateData
) {
2645 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2646 } else if (entity
instanceof StatisticalMeasurementValue
) {
2647 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2648 removeListener
, style
);
2649 } else if (entity
instanceof DerivedUnit
) {
2650 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2651 case LivingSpecimen
:
2652 case PreservedSpecimen
:
2654 element
= new SpecimenCollectionDetailElement(this,
2656 (DerivedUnit
) entity
,
2661 element
= new DerivedUnitElement(this,
2663 (DerivedUnit
) entity
,
2668 } else if (entity
instanceof NamedArea
) {
2669 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2670 } else if (entity
instanceof DeterminationEvent
) {
2671 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2672 } else if (entity
instanceof User
) {
2673 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2674 } else if (entity
instanceof GrantedAuthority
) {
2675 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2676 removeListener
, style
);
2677 } else if (entity
instanceof Group
) {
2678 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2679 } else if (entity
instanceof Taxon
) {
2680 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2681 } else if (entity
instanceof DescriptionElementBase
) {
2682 // this is the special case for protologs, maybe we can do this
2683 // differently when API improves
2684 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2685 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2686 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2688 } else if (entity
instanceof Identifier
) {
2689 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2690 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2693 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2695 } else if (entity
instanceof TermVocabulary
) {
2696 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
2697 switch (termVocabulary
.getTermType()) {
2699 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2702 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
2707 } else if (entity
instanceof MeasurementUnit
) {
2708 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2709 } else if (entity
instanceof StatisticalMeasure
) {
2710 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
2714 if (element
== null) {
2715 MessagingUtils
.messageDialog("No element for entity", this,
2716 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2721 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2722 element
.setPersistentBackground(backgroundColor
);
2725 parentElement
.addElement(element
);
2733 * Creates a selection element for the given type T.
2736 * <strong>Selection elements not handled by this method:</strong>
2738 * <li>{@link TaxonNodeSelectionElement} see
2739 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2741 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2742 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2748 * a {@link Class} object of the type that you want the selection
2750 * @param parentElement
2751 * a {@link ICdmFormElement} object.
2752 * @param labelString
2753 * a {@link String} object.
2754 * @param selectionType
2756 * a {@link ICdmBase} object.
2759 * @param conversation
2760 * a {@link ConversationHolder} object.
2761 * @return a {@link EntitySelectionElement} object.
2763 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2764 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2766 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2767 labelString
, selection
, mode
, style
);
2769 parentElement
.addElement(element
);
2775 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
2778 * <strong>Selection elements not handled by this method:</strong>
2780 * <li>{@link TaxonNodeSelectionElement} see
2781 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2783 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2784 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2790 * a {@link Class} object of the type that you want the selection
2792 * @param parentElement
2793 * a {@link ICdmFormElement} object.
2794 * @param labelString
2795 * a {@link String} object.
2796 * @param selectionType
2798 * a {@link ICdmBase} object.
2801 * @param conversation
2802 * a {@link ConversationHolder} object.
2803 * @return a {@link EntitySelectionElement} object.
2805 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
2806 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
2807 T selection
, int mode
, int style
) {
2808 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, conversation
, parentElement
, clazz
,
2809 labelString
, selection
, mode
, style
);
2811 parentElement
.addElement(element
);
2815 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2816 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2817 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2818 labelString
, selection
, mode
, style
);
2820 parentElement
.addElement(element
);
2824 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
2825 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
2826 // int mode, int style) {
2827 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
2828 // conversation, parentElement, labelString, selection, mode, style);
2830 // parentElement.addElement(element);
2834 /** {@inheritDoc} */
2835 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2836 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2837 adapt(labelElement
);
2838 parentElement
.addElement(labelElement
);
2839 return labelElement
;
2842 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2843 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2844 label
.setText(labelText
+" (yyyy-MM-dd)");
2845 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2846 dateElement
.initController(this, formElement
);
2852 * Getter for the field <code>selectionProvider</code>.
2855 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2857 public ISelectionProvider
getSelectionProvider() {
2858 return selectionProvider
;
2863 * createDetailedDescriptionDetailElement
2866 * @param parentElement
2867 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2871 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2876 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2879 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2880 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2881 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2883 if (entity
instanceof CategoricalData
) {
2884 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2885 (CategoricalData
) entity
, style
);
2886 } else if (entity
instanceof CommonTaxonName
) {
2887 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2889 } else if (entity
instanceof Distribution
) {
2890 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2892 } else if (entity
instanceof IndividualsAssociation
) {
2893 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2894 (IndividualsAssociation
) entity
, style
);
2895 } else if (entity
instanceof QuantitativeData
) {
2896 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2897 (QuantitativeData
) entity
, style
);
2898 } else if (entity
instanceof TaxonInteraction
) {
2899 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2900 (TaxonInteraction
) entity
, style
);
2901 } else if (entity
instanceof TextData
) {
2902 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2904 throw new IllegalStateException("There is no interface for the given description element");
2906 adapt(detailedDescriptionElement
);
2907 parentElement
.addElement(detailedDescriptionElement
);
2908 return detailedDescriptionElement
;
2913 * Creates a styled text as a part of the form.
2918 * the text initial value
2921 * @return the text widget
2923 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2924 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2925 if (value
!= null) {
2926 text
.setText(value
);
2928 text
.setForeground(getColors().getForeground());
2929 text
.setBackground(getColors().getBackground());
2930 // text.addFocusListener(visibilityHandler);
2934 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2935 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2936 addAndAdaptSection(parentElement
, section
);
2941 * @param formElement
2942 * @param conversationHolder
2946 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
2947 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
2948 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
2949 addAndAdaptSection(formElement
, section
);
2954 * @param conversationHolder
2955 * @param formElement
2959 public TeamMemberSection
createNomenclaturalTeamMemberSection(ConversationHolder conversationHolder
,
2960 ICdmFormElement formElement
, int expanded
) {
2961 // TODO Auto-generated method stub