4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
7 import java
.util
.ArrayList
;
8 import java
.util
.Comparator
;
9 import java
.util
.HashSet
;
10 import java
.util
.List
;
14 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
15 import org
.eclipse
.jface
.viewers
.ISelection
;
16 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
17 import org
.eclipse
.jface
.window
.Window
;
18 import org
.eclipse
.swt
.SWT
;
19 import org
.eclipse
.swt
.custom
.StyledText
;
20 import org
.eclipse
.swt
.events
.FocusAdapter
;
21 import org
.eclipse
.swt
.events
.FocusEvent
;
22 import org
.eclipse
.swt
.events
.FocusListener
;
23 import org
.eclipse
.swt
.events
.MouseAdapter
;
24 import org
.eclipse
.swt
.events
.MouseEvent
;
25 import org
.eclipse
.swt
.events
.MouseListener
;
26 import org
.eclipse
.swt
.events
.SelectionEvent
;
27 import org
.eclipse
.swt
.events
.SelectionListener
;
28 import org
.eclipse
.swt
.events
.TypedEvent
;
29 import org
.eclipse
.swt
.graphics
.Color
;
30 import org
.eclipse
.swt
.graphics
.Font
;
31 import org
.eclipse
.swt
.widgets
.Composite
;
32 import org
.eclipse
.swt
.widgets
.Control
;
33 import org
.eclipse
.swt
.widgets
.Display
;
34 import org
.eclipse
.swt
.widgets
.Event
;
35 import org
.eclipse
.swt
.widgets
.Label
;
36 import org
.eclipse
.ui
.forms
.IFormColors
;
37 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
38 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
39 import org
.eclipse
.ui
.forms
.widgets
.Section
;
40 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
41 import org
.joda
.time
.DateTime
;
42 import org
.joda
.time
.Partial
;
43 import org
.springframework
.security
.core
.GrantedAuthority
;
45 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
46 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
47 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
48 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
49 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
50 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
51 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
52 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
53 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
54 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
55 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
56 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
57 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
58 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
59 import eu
.etaxonomy
.cdm
.model
.common
.IEnumTerm
;
60 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
61 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
62 import eu
.etaxonomy
.cdm
.model
.common
.LSID
;
63 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
64 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
65 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
66 import eu
.etaxonomy
.cdm
.model
.common
.Representation
;
67 import eu
.etaxonomy
.cdm
.model
.common
.TermBase
;
68 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
69 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
70 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
71 import eu
.etaxonomy
.cdm
.model
.common
.User
;
72 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
73 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
74 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
75 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
76 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
77 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
78 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
79 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
80 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
81 import eu
.etaxonomy
.cdm
.model
.description
.MeasurementUnit
;
82 import eu
.etaxonomy
.cdm
.model
.description
.PresenceAbsenceTerm
;
83 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
84 import eu
.etaxonomy
.cdm
.model
.description
.State
;
85 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
86 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasure
;
87 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
88 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
89 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
90 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
91 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
92 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
93 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
94 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
95 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
96 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
97 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
98 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
99 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
100 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
101 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
102 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
103 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
104 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
105 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
106 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
107 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
108 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNodeAgentRelation
;
109 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
110 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
111 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.CloneClassificationDetailElement
;
115 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
116 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
118 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionElement
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionSection
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopePolyKeyDetailSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
323 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
324 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.PresenceAbsenceTermDetailElement
;
325 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
326 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
327 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
328 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
329 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
330 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
331 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
332 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
333 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
334 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithAbbreviatedTitle
;
335 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
336 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
340 * CdmFormFactory class.
344 * @created Feb 24, 2010
347 public class CdmFormFactory
extends FormToolkit
{
349 private BoldFontHolder2 boldFontHolder2
;
350 private MouseListener selectionMouseHandler
;
351 private FocusListener selectionFocusHandler
;
353 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
355 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
357 private final int orientation
= Window
.getDefaultOrientation();
358 private ISelectionProvider selectionProvider
;
360 /** Constant <code>EMPTY_SELECTION</code> */
361 public static ISelection EMPTY_SELECTION
= new ISelection() {
363 public boolean isEmpty() {
374 private class SelectionMouseHandler
extends MouseAdapter
{
376 public void mouseDown(MouseEvent e
) {
377 notifySelectionListeners(e
);
387 private class SelectionFocusHandler
extends FocusAdapter
{
389 public void focusGained(FocusEvent e
) {
390 notifySelectionListeners(e
);
394 private void notifySelectionListeners(TypedEvent e
) {
395 Event event
= new Event();
396 event
.widget
= e
.widget
;
397 SelectionEvent selectionEvent
= new SelectionEvent(event
);
399 for (SelectionListener listener
: selectionListenerList
) {
400 listener
.widgetSelected(selectionEvent
);
406 * Constructor for CdmFormFactory.
410 * a {@link org.eclipse.swt.widgets.Display} object.
411 * @param selectionProvider
412 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
414 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
416 this.selectionProvider
= selectionProvider
;
422 * Constructor for CdmFormFactory.
426 * a {@link org.eclipse.swt.widgets.Display} object.
428 public CdmFormFactory(Display display
) {
436 private void init() {
437 boldFontHolder2
= new BoldFontHolder2();
438 selectionMouseHandler
= new SelectionMouseHandler();
439 selectionFocusHandler
= new SelectionFocusHandler();
443 * Creates an instance initialized with the correct selectionProvider
445 * Make sure to remove the instance when the entityComposite disposes via
446 * destroySelectionArbitrator(..)
448 * @param entityElement
449 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
451 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
454 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
455 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
456 selectionArbitrator
.addSelectionProvider(selectionProvider
);
457 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
458 addSelectionListener(selectionArbitrator
);
459 return selectionArbitrator
;
464 * destroySelectionArbitrator
467 * @param selectionArbitrator
469 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
472 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
473 removeSelectionListener(selectionArbitrator
);
474 if (selectionProvider
!= null) {
475 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
477 MessagingUtils
.error(this.getClass(),
478 "Tried to destroy a selection listener from this factories listeners but was null", null);
484 * Adapts the {@link AbstractCdmFormElement}:<br>
485 * - sets the {@link IPropertyChangeListener}s handled by this class
490 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
493 public void adapt(ICdmFormElement formElement
) {
494 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
499 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
501 control
.addFocusListener(selectionFocusHandler
);
503 super.adapt(control
, trackFocus
, trackKeyboard
);
508 public void adapt(Composite composite
) {
509 composite
.addMouseListener(selectionMouseHandler
);
510 super.adapt(composite
);
519 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
522 public void destroyElement(ICdmFormElement formElement
) {
523 // return if element was not initialized
524 if (formElement
== null) {
527 // destroy selection arbitrator, if any
528 if (formElement
instanceof ISelectableElement
) {
529 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
531 // remove this element form its parents list of elements
532 // ICdmFormElement parentElement = formElement.getParentElement();
533 // if(parentElement != null){
534 // parentElement.removeElement(formElement);
536 // call destroy on child elements recursively
537 for (ICdmFormElement childElement
: formElement
.getElements()) {
538 destroyElement(childElement
);
540 // dispose of the controls
541 for (Control control
: formElement
.getControls()) {
542 // we added the layoutComposite of the parental element as the
543 // layout composite to this formElement
544 // but we do not want to destroy it.
545 if (control
.equals(formElement
.getLayoutComposite())) {
560 * a {@link org.eclipse.swt.widgets.Composite} object.
561 * @return a {@link org.eclipse.swt.widgets.Label} object.
563 public Label
createEmptyCell(Composite parent
) {
564 return this.createLabel(parent
, null);
569 * createMultiLanguageTextElement
572 * @param parentElement
573 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
576 * a {@link java.lang.String} object.
577 * @param multilanguageText
578 * a {@link java.util.Map} object.
584 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
587 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
588 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
589 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
590 multilanguageText
, textHeight
, style
);
592 parentElement
.addElement(element
);
598 * createMultiLanguageTextElement
601 * @param parentElement
602 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
605 * @param Representation
606 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
612 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
615 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
616 RepresentationElement element
= new RepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
618 parentElement
.addElement(element
);
624 * createMultiLanguageTextElement
627 * @param parentElement
628 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
631 * @param Representation
632 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
638 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
641 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
642 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
644 parentElement
.addElement(element
);
650 * createMultiLanguageTextElement
653 * @param parentElement
654 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
658 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
664 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
667 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, TermBase term
, int textHeight
, int style
, boolean fillDetails
) {
668 RepresentationElement element
= new RepresentationElement(this, parentElement
, term
, textHeight
, style
, fillDetails
);
670 parentElement
.addElement(element
);
676 * createMultiLanguageTextElement
679 * @param parentElement
680 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
684 * a {@link eu.etaxonomy.cdm.model.common.Representation} object.
690 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
693 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, TermBase term
, int textHeight
, int style
, boolean fillDetails
) {
694 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, term
, textHeight
, style
, fillDetails
);
696 parentElement
.addElement(element
);
700 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
701 KeyStatement keyStatement
, int textHeight
, int style
) {
702 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
705 parentElement
.addElement(element
);
710 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
712 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
713 * @param parentElement the parent container
714 * @param labelString the label name
715 * @param initialObject the object from which the <code>toString()</code> method is called
716 * @param style {@link SWT} style constant
717 * @return the created textfield with label
719 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
720 Object initialObject
, int style
) {
721 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
726 * createTextWithLabelElement
729 * @param parentElement
730 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
733 * a {@link java.lang.String} object.
735 * a {@link java.lang.String} object.
738 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
741 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
742 String initialText
, int style
) {
743 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
747 * createTextWithLabelElement
750 * @param parentElement
751 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
754 * a {@link java.lang.String} object.
756 * a {@link java.lang.String} object.
757 * @param textLimit maximal number of characters allowed
760 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
763 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
764 String initialText
, Integer textLimit
, int style
) {
765 if(initialText
==null){
769 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
772 parentElement
.addElement(element
);
776 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
777 int textHeight
, int style
) {
778 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
780 parentElement
.addElement(element
);
784 public LsidWithExceptionLabelElement
createLsidWithExceptionLabelElement(ICdmFormElement parentElement
, String labelString
,
785 LSID initialLsid
, int style
) {
786 LsidWithExceptionLabelElement element
= new LsidWithExceptionLabelElement(this, parentElement
, labelString
, initialLsid
, null, style
);
788 parentElement
.addElement(element
);
792 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
793 URI initialUri
, int style
) {
794 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
796 parentElement
.addElement(element
);
807 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
808 IOpenUrlEnabled openUrlEnabled
, int style
) {
809 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
812 parentElement
.addElement(element
);
818 * @param parentElement
820 * @param conversationEnabled
825 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
826 ConversationHolder conversation
, User user
, int style
) {
827 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
829 parentElement
.addElement(element
);
835 * createIntegerTextWithLabelElement
838 * @param parentElement
839 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
842 * a {@link java.lang.String} object.
843 * @param initialInteger
844 * a {@link java.lang.Integer} object.
848 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
851 public NumberWithLabelElement
createNumberTextWithLabelElement(
852 ICdmFormElement parentElement
, String labelString
,
853 Number initialNumber
, int style
) {
854 NumberWithLabelElement element
= new NumberWithLabelElement(this,
855 parentElement
, labelString
, initialNumber
, style
);
857 parentElement
.addElement(element
);
861 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
862 String labelString
, LanguageString languageString
, int style
) {
863 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
866 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
867 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
868 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
869 languageString
, height
, isMultiLine
, style
);
871 parentElement
.addElement(element
);
877 * createKeyValueViewerElement
880 * @param parentElement
881 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
884 * a {@link java.lang.String} object.
885 * @param valueHeading
886 * a {@link java.lang.String} object.
888 * a {@link java.util.Map} object.
889 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
892 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
893 String valueHeading
, Map
<Object
, Object
> map
) {
894 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
896 parentElement
.addElement(element
);
900 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
903 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
904 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
905 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
906 selection
, true, style
);
908 parentElement
.addElement(element
);
912 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
914 ICdmFormElement parentElement
,
918 return this.createDefinedTermComboElement(termType
, null, parentElement
, labelString
, selection
, false, style
, true);
921 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
923 ICdmFormElement parentElement
,
926 boolean addEmptyElement
,
928 return this.createDefinedTermComboElement(termType
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, true);
930 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
932 ICdmFormElement parentElement
,
935 boolean addEmptyElement
,
937 boolean useAbbrevLabel
) {
938 return createDefinedTermComboElement(termType
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
942 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
943 TermVocabulary
<?
> termVocabulary
,
944 ICdmFormElement parentElement
,
948 return this.createDefinedTermComboElement(null, termVocabulary
, parentElement
, labelString
, selection
, false, style
, true);
951 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
952 TermVocabulary
<?
> termVocabulary
,
953 ICdmFormElement parentElement
,
956 boolean addEmptyElement
,
958 boolean useAbbrevLabel
) {
959 return createDefinedTermComboElement(null, termVocabulary
, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
962 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
964 TermVocabulary
<?
> termVocabulary
,
965 ICdmFormElement parentElement
,
968 boolean addEmptyElement
,
970 boolean useAbbrevLabel
) {
972 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
974 parentElement
.addElement(element
);
977 else if(termVocabulary
!=null){
978 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
980 parentElement
.addElement(element
);
984 //this should never happen
989 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
990 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
992 return createEnumComboElement(enumComboType
, parentElement
, null, style
);
995 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
996 Class
<T
> enumComboType
, ICdmFormElement parentElement
, Comparator
<T
> comparator
,
998 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, comparator
, style
);
1000 parentElement
.addElement(element
);
1004 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
1005 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1006 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1008 parentElement
.addElement(element
);
1014 * createBrowserElement
1018 * a {@link java.net.URI} object.
1021 * @param parentElement
1022 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1024 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1027 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1028 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1030 parentElement
.addElement(element
);
1036 * createImageElement
1039 * @param parentElement
1040 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1043 * a {@link java.net.URI} object.
1046 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1048 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1049 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1051 parentElement
.addElement(element
);
1057 * createTextActionElement
1060 * @param labelString
1061 * a {@link java.lang.String} object.
1062 * @param initialText
1063 * a {@link java.lang.String} object.
1066 * @param parentElement
1067 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1069 * @param buttonLabel
1070 * a {@link java.lang.String} object.
1071 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1074 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1075 String buttonLabel
, String initialText
, int style
) {
1076 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1079 parentElement
.addElement(element
);
1088 * @param parentElement
1089 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1092 * a {@link java.lang.String} object.
1093 * @param initialState
1097 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1100 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1101 if(initialState
==null){
1102 initialState
= Boolean
.FALSE
;
1104 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1106 parentElement
.addElement(element
);
1111 * Creates a section as a part of the form.
1113 * @return the section widget
1116 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1119 public Section
adapt(AbstractFormSection section
) {
1120 section
.setMenu(section
.getLayoutComposite().getMenu());
1121 adapt(section
, true, true);
1123 // handle focus and property change events for cdm use
1124 section
.addFocusListener(selectionFocusHandler
);
1125 section
.setPropertyChangeListeners(propertyChangeListeners
);
1127 if (section
.getToggle() != null) {
1128 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1129 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1132 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1134 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1135 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1136 getColors().initializeSectionToolBarColors();
1137 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1138 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1140 // call setTitleBarForeground regardless as it also sets the label color
1141 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1145 private class BoldFontHolder2
{
1146 private Font normalFont
;
1148 private Font boldFont
;
1150 public BoldFontHolder2() {
1153 public Font
getBoldFont(Font font
) {
1154 createBoldFont(font
);
1158 private void createBoldFont(Font font
) {
1159 if (normalFont
== null || !normalFont
.equals(font
)) {
1163 if (boldFont
== null) {
1164 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1168 public void dispose() {
1169 if (boldFont
!= null) {
1170 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1178 * createToggleableTextField
1181 * @param parentElement
1182 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1184 * @param labelString
1185 * a {@link java.lang.String} object.
1186 * @param initialText
1187 * a {@link java.lang.String} object.
1188 * @param initialState
1192 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1195 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1196 String initialText
, boolean initialState
, int style
) {
1197 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1198 initialState
, style
| orientation
);
1200 parentElement
.addElement(element
);
1206 * createTimePeriodElement
1209 * @param parentElement
1210 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1212 * @param labelString
1213 * a {@link java.lang.String} object.
1215 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1218 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1221 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1222 TimePeriod timePeriod
, int style
) {
1223 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1225 parentElement
.addElement(element
);
1231 * createGatheringEventUnitElement
1234 * @param parentElement
1235 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1237 * @param labelString
1238 * a {@link java.lang.String} object.
1240 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1243 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1246 public GatheringEventUnitElement
createGatheringEventUnitElement(
1247 ICdmFormElement parentElement
,
1249 DerivedUnitFacade gatheringEvent
,
1250 MinMaxTextSection
.UnitType unitType
,
1252 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1259 parentElement
.addElement(element
);
1265 * createPointElement
1270 * @param parentElement
1271 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1274 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1275 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1277 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1278 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1280 parentElement
.addElement(element
);
1287 * @param conversationHolder
1289 * @param detailsViewer
1293 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1294 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1295 parentElement
.addElement(section
);
1302 * createDateDetailSection
1305 * @param parentElement
1306 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1310 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1313 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1314 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1315 parentElement
.addElement(section
);
1322 * createDateDetailSection
1325 * @param parentElement
1326 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1330 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1333 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1334 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1335 parentElement
.addElement(section
);
1342 * createPartialElement
1345 * @param parentElement
1346 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1348 * @param labelString
1349 * a {@link java.lang.String} object.
1351 * a {@link org.joda.time.Partial} object.
1354 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1357 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1359 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1361 parentElement
.addElement(element
);
1367 * addSelectionListener
1371 * a {@link org.eclipse.swt.events.SelectionListener} object.
1373 public void addSelectionListener(SelectionListener listener
) {
1374 selectionListenerList
.add(listener
);
1379 * removeSelectionListener
1383 * a {@link org.eclipse.swt.events.SelectionListener} object.
1385 public void removeSelectionListener(SelectionListener listener
) {
1386 if (listener
== null) {
1387 MessagingUtils
.error(this.getClass(),
1388 "Tried to remove a selection listener from this factories listeners but was null", null);
1390 selectionListenerList
.remove(listener
);
1396 * addPropertyChangeListener
1400 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1403 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1404 if (propertyChangeListeners
.contains(listener
)) {
1407 propertyChangeListeners
.add(0, listener
);
1412 * removePropertyChangeListener
1416 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1419 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1420 propertyChangeListeners
.remove(listener
);
1424 * @return the propertyChangeListeners
1426 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1427 return propertyChangeListeners
;
1432 * createHorizontalSeparator
1435 * @param parentElement
1436 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1440 * @return a {@link org.eclipse.swt.widgets.Label} object.
1442 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1443 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1444 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1450 * createVersionElement
1453 * @param parentElement
1454 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1457 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1462 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1465 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1466 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1468 parentElement
.addElement(element
);
1473 * @param cdmBaseSection
1478 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1479 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1481 parentElement
.addElement(element
);
1487 * createVersionSection
1490 * @param parentElement
1491 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1496 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1499 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1500 VersionSection section
= new VersionSection(this, parentElement
, style
);
1501 parentElement
.addElement(section
);
1511 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1512 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1513 parentElement
.addElement(section
);
1520 * createEmptyElement
1523 * @param parentElement
1524 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1526 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1528 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1529 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1531 parentElement
.addElement(element
);
1537 * createHeadlineSection
1540 * @param parentElement
1541 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1544 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1547 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1548 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1549 parentElement
.addElement(section
);
1556 * createParsingMessageElement
1559 * @param parentElement
1560 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1562 * @param parserProblem
1563 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1568 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1571 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1572 ParserProblem parserProblem
, int style
) {
1573 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1575 parentElement
.addElement(element
);
1579 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1580 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1582 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1583 selectionProvider
, style
);
1585 parentElement
.addElement(section
);
1592 * @param definedTermClass
1593 * @param formElement
1597 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1598 AbstractCdmDetailSection parentElement
, int style
) {
1599 AbstractCdmDetailElement element
= null;
1601 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1602 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1603 } else if (definedTermClass
.equals(Feature
.class)) {
1604 element
= new FeatureDetailElement(this, parentElement
);
1605 } else if(definedTermClass
.equals(PresenceAbsenceTerm
.class)){
1606 element
= new PresenceAbsenceTermDetailElement(this, parentElement
);
1608 element
= new DefinedTermDetailElement(this, parentElement
);
1613 parentElement
.addElement(element
);
1618 //--------DetailSections---------
1619 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1620 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1621 addAndAdaptSection(parentElement
, section
);
1625 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1626 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1627 addAndAdaptSection(parentElement
, section
);
1631 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1632 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1633 addAndAdaptSection(parentElement
, section
);
1637 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1638 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1639 addAndAdaptSection(parentElement
, section
);
1643 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1644 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1645 addAndAdaptSection(parentElement
, section
);
1649 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1650 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1651 addAndAdaptSection(parentElement
, section
);
1655 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1656 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1657 addAndAdaptSection(parentElement
, section
);
1661 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1662 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1663 addAndAdaptSection(parentElement
, section
);
1667 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1668 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1669 addAndAdaptSection(parentElement
, section
);
1673 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1674 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1675 addAndAdaptSection(parentElement
, section
);
1679 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1680 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1681 addAndAdaptSection(parentElement
, section
);
1685 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
1686 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
1687 addAndAdaptSection(parentElement
, section
);
1691 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1692 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1693 addAndAdaptSection(parentElement
, section
);
1697 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1698 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1699 addAndAdaptSection(parentElement
, section
);
1703 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1704 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1705 addAndAdaptSection(parentElement
, section
);
1709 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1710 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1711 addAndAdaptSection(parentElement
, section
);
1715 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1716 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1717 addAndAdaptSection(parentElement
, section
);
1721 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1722 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
1723 addAndAdaptSection(parentElement
, section
);
1727 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1728 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1729 addAndAdaptSection(parentElement
, section
);
1733 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1734 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1735 addAndAdaptSection(parentElement
, section
);
1739 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1740 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1741 addAndAdaptSection(parentElement
, section
);
1745 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1746 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1747 addAndAdaptSection(parentElement
, section
);
1751 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1752 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1753 addAndAdaptSection(parentElement
, section
);
1757 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1758 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1759 addAndAdaptSection(parentElement
, section
);
1763 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1764 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1765 addAndAdaptSection(parentElement
, section
);
1769 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1770 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1771 addAndAdaptSection(parentElement
, section
);
1775 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1776 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1777 addAndAdaptSection(parentElement
, section
);
1781 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1782 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1783 addAndAdaptSection(parentElement
, section
);
1787 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1788 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1789 addAndAdaptSection(parentElement
, section
);
1793 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1794 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1795 addAndAdaptSection(parentElement
, section
);
1799 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1800 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1801 addAndAdaptSection(parentElement
, section
);
1805 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1806 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1807 addAndAdaptSection(parentElement
, section
);
1811 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1812 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
1813 addAndAdaptSection(parentElement
, section
);
1817 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1818 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1819 addAndAdaptSection(parentElement
, section
);
1823 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1824 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1825 addAndAdaptSection(parentElement
, section
);
1829 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1830 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1831 addAndAdaptSection(parentElement
, section
);
1835 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1836 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1837 addAndAdaptSection(parentElement
, section
);
1841 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1842 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1843 addAndAdaptSection(parentElement
, section
);
1847 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1848 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1849 addAndAdaptSection(parentElement
, section
);
1853 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1854 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1855 addAndAdaptSection(parentElement
, section
);
1859 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1860 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1861 addAndAdaptSection(parentElement
, section
);
1865 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1866 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1867 addAndAdaptSection(parentElement
, section
);
1871 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1872 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1873 addAndAdaptSection(parentElement
, section
);
1877 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1878 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1879 addAndAdaptSection(parentElement
, section
);
1883 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1884 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1885 addAndAdaptSection(parentElement
, section
);
1889 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1890 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1891 addAndAdaptSection(parentElement
, section
);
1895 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1896 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1897 addAndAdaptSection(parentElement
, section
);
1901 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1902 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1903 addAndAdaptSection(parentElement
, section
);
1907 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1908 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1909 addAndAdaptSection(parentElement
, section
);
1913 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1914 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1915 addAndAdaptSection(parentElement
, section
);
1919 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1920 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1921 addAndAdaptSection(parentElement
, section
);
1925 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1926 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1927 addAndAdaptSection(parentElement
, section
);
1931 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1932 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1933 addAndAdaptSection(parentElement
, section
);
1937 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1938 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1939 addAndAdaptSection(parentElement
, section
);
1943 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1944 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1945 addAndAdaptSection(parentElement
, section
);
1949 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1950 parentElement
.addElement(section
);
1954 //--------DetailElements------------
1956 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1957 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1958 addAndAdaptElement(parentElement
, element
);
1962 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1963 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1964 addAndAdaptElement(parentElement
, element
);
1968 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1969 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1970 addAndAdaptElement(parentElement
, element
);
1974 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1975 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1976 addAndAdaptElement(parentElement
, element
);
1980 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1981 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1982 addAndAdaptElement(parentElement
, element
);
1986 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1987 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1988 addAndAdaptElement(parentElement
, element
);
1992 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1993 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1994 addAndAdaptElement(parentElement
, element
);
1998 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1999 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
2000 addAndAdaptElement(parentElement
, element
);
2004 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
2005 UserDetailElement element
= new UserDetailElement(this, parentElement
);
2006 addAndAdaptElement(parentElement
, element
);
2010 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2011 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2012 addAndAdaptElement(parentElement
, element
);
2016 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2017 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2018 addAndAdaptElement(parentElement
, element
);
2022 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2023 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2024 addAndAdaptElement(parentElement
, element
);
2028 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2029 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2030 addAndAdaptElement(parentElement
, element
);
2034 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2035 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2036 addAndAdaptElement(parentElement
, element
);
2040 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2041 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2043 parentElement
.addElement(element
);
2048 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2049 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2050 addAndAdaptElement(parentElement
, element
);
2054 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2055 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2056 addAndAdaptElement(parentElement
, element
);
2060 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2061 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2062 addAndAdaptElement(parentElement
, element
);
2066 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2067 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2068 addAndAdaptElement(parentElement
, element
);
2072 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2073 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2074 addAndAdaptElement(parentElement
, element
);
2078 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2079 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2080 addAndAdaptElement(parentElement
, element
);
2084 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2085 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2086 addAndAdaptElement(parentElement
, element
);
2090 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2091 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2092 addAndAdaptElement(parentElement
, element
);
2096 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2097 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2098 addAndAdaptElement(parentElement
, element
);
2102 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2103 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2104 addAndAdaptElement(parentElement
, element
);
2108 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2109 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2110 addAndAdaptElement(parentElement
, element
);
2114 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2115 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2116 addAndAdaptElement(parentElement
, element
);
2120 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2121 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2122 addAndAdaptElement(parentElement
, element
);
2126 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
, boolean isWizard
){
2127 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
, isWizard
);
2128 addAndAdaptElement(parentElement
, element
);
2132 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2133 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2134 addAndAdaptElement(parentElement
, element
);
2139 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2140 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2141 addAndAdaptElement(parentElement
, element
);
2145 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2146 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2147 addAndAdaptElement(parentElement
, element
);
2151 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2152 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2153 addAndAdaptElement(parentElement
, element
);
2157 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2158 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2159 addAndAdaptElement(parentElement
, element
);
2163 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2164 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2165 addAndAdaptElement(parentElement
, element
);
2169 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2170 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2171 addAndAdaptElement(parentElement
, element
);
2175 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2176 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2177 addAndAdaptElement(parentElement
, element
);
2181 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2182 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2183 addAndAdaptElement(parentElement
, element
);
2187 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2188 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2189 addAndAdaptElement(parentElement
, element
);
2193 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2194 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2195 addAndAdaptElement(parentElement
, element
);
2199 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2200 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2201 addAndAdaptElement(parentElement
, element
);
2205 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2206 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2207 addAndAdaptElement(parentElement
, element
);
2211 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2212 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2213 addAndAdaptElement(parentElement
, element
);
2217 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2218 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2219 addAndAdaptElement(parentElement
, element
);
2223 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2224 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2225 addAndAdaptElement(parentElement
, element
);
2229 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2230 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2231 addAndAdaptElement(parentElement
, element
);
2235 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2236 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2237 addAndAdaptElement(parentElement
, mediaDetailElement
);
2238 return mediaDetailElement
;
2241 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2242 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2243 addAndAdaptElement(parentElement
, element
);
2247 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2248 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2249 addAndAdaptElement(parentElement
, element
);
2253 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2254 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2255 addAndAdaptElement(parentElement
, element
);
2259 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2260 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2261 addAndAdaptElement(parentElement
, element
);
2265 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2266 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2267 addAndAdaptElement(parentElement
, element
);
2271 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2272 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2273 addAndAdaptElement(parentElement
, element
);
2277 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2278 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2279 addAndAdaptElement(parentElement
, element
);
2283 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2284 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2285 addAndAdaptElement(parentElement
, element
);
2290 * @param parentElement
2293 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2295 parentElement
.addElement(element
);
2298 //--------EntityCollectionSection----------
2299 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2300 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2301 addAndAdaptSection(parentElement
, section
);
2305 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2306 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2307 addAndAdaptSection(parentElement
, section
);
2311 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2312 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2313 addAndAdaptSection(parentElement
, section
);
2317 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2318 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2319 addAndAdaptSection(parentElement
, section
);
2323 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2324 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2325 addAndAdaptSection(parentElement
, section
);
2329 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2330 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2331 addAndAdaptSection(parentElement
, section
);
2335 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2336 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2337 addAndAdaptSection(parentElement
, section
);
2341 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2342 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2343 addAndAdaptSection(parentElement
, section
);
2347 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2348 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2349 addAndAdaptSection(parentElement
, section
);
2353 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2354 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2355 addAndAdaptSection(parentElement
, section
);
2359 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2360 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2361 addAndAdaptSection(parentElement
, section
);
2365 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2366 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2367 addAndAdaptSection(parentElement
, section
);
2371 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2372 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2373 addAndAdaptSection(parentElement
, section
);
2377 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2378 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2379 addAndAdaptSection(parentElement
, section
);
2383 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2384 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2385 addAndAdaptSection(parentElement
, section
);
2389 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2390 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2391 addAndAdaptSection(parentElement
, section
);
2395 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2396 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2397 addAndAdaptSection(parentElement
, section
);
2401 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2402 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2403 addAndAdaptSection(parentElement
, section
);
2407 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2408 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2409 addAndAdaptSection(parentElement
, section
);
2413 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2414 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2415 addAndAdaptSection(parentElement
, section
);
2419 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2420 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2421 addAndAdaptSection(parentElement
, section
);
2425 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2426 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2427 addAndAdaptSection(parentElement
, section
);
2431 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2432 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2433 addAndAdaptSection(parentElement
, section
);
2437 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2438 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2439 addAndAdaptSection(parentElement
, section
);
2443 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2444 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2445 addAndAdaptSection(parentElement
, section
);
2449 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2450 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2451 addAndAdaptSection(parentElement
, section
);
2455 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2456 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2457 addAndAdaptSection(parentElement
, section
);
2461 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2462 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2463 addAndAdaptSection(parentElement
, section
);
2467 public GeoScopePolyKeyDetailSection
createGeoScopePolyKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2468 GeoScopePolyKeyDetailSection section
= new GeoScopePolyKeyDetailSection(this, conversation
, parentElement
, style
);
2469 addAndAdaptSection(parentElement
, section
);
2473 public IdentifierSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2474 IdentifierSection section
= new IdentifierSection(this, conversation
, parentElement
, style
);
2475 addAndAdaptSection(parentElement
, section
);
2479 public DerivedUnitFacadeIdentifierSection
createDerivedUnitFacadeIdentifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2480 DerivedUnitFacadeIdentifierSection section
= new DerivedUnitFacadeIdentifierSection(this, conversation
, parentElement
, style
);
2481 addAndAdaptSection(parentElement
, section
);
2485 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2486 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2487 addAndAdaptSection(parentElement
, section
);
2491 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2492 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2493 addAndAdaptSection(parentElement
, section
);
2497 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2498 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2499 addAndAdaptSection(parentElement
, section
);
2503 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2504 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2505 addAndAdaptSection(parentElement
, section
);
2509 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2510 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2511 addAndAdaptSection(parentElement
, section
);
2515 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2516 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2517 addAndAdaptSection(parentElement
, section
);
2521 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2522 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2523 addAndAdaptSection(parentElement
, section
);
2527 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2528 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2529 addAndAdaptSection(parentElement
, section
);
2533 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2534 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2535 addAndAdaptSection(parentElement
, section
);
2539 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2540 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2541 addAndAdaptSection(parentElement
, section
);
2545 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2546 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2547 addAndAdaptSection(parentElement
, section
);
2551 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2552 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2553 addAndAdaptSection(parentElement
, section
);
2557 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2558 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2559 addAndAdaptSection(parentElement
, section
);
2564 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2565 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2566 AbstractEntityCollectionElement element
= null;
2568 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2570 if (entity
instanceof Annotation
) {
2571 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2572 }else if (entity
instanceof Person
) {
2573 boolean isNomenclatural
= false;
2574 if (parentElement
instanceof TeamMemberSection
){
2575 isNomenclatural
= ((TeamMemberSection
) parentElement
).isNomenclaturalTeam();
2577 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
, isNomenclatural
);
2578 } else if (entity
instanceof Credit
) {
2579 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2580 } else if (entity
instanceof Extension
) {
2581 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2582 } else if (entity
instanceof Marker
) {
2583 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2584 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2585 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
, removeListener
, backgroundColor
, style
);
2586 }else if (entity
instanceof Media
) {
2587 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, true, style
);
2588 } else if (entity
instanceof MediaRepresentation
) {
2589 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2591 } else if (entity
instanceof ImageFile
) {
2592 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2593 } else if (entity
instanceof MediaRepresentationPart
) {
2594 element
= new MediaRepresentationPartElement
<>(this, parentElement
, (MediaRepresentationPart
) entity
,
2595 removeListener
, style
);
2596 } else if (entity
instanceof NomenclaturalStatus
) {
2597 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2599 } else if (entity
instanceof Rights
) {
2600 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2601 } else if (entity
instanceof DescriptionElementSource
) {
2602 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2603 removeListener
, style
);
2604 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2605 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
,
2606 removeListener
,backgroundColor
, style
);
2608 else if (entity
instanceof IdentifiableSource
) {
2609 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2611 } else if (entity
instanceof DefinedTerm
) {
2612 switch(((DefinedTerm
)entity
).getTermType()) {
2614 element
= new ScopeElement(this,
2616 (DefinedTerm
) entity
,
2621 element
= new ModifierElement(this,
2623 (DefinedTerm
) entity
,
2631 } else if (entity
instanceof Reference
) {
2632 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2633 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2636 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2638 } else if (entity
instanceof NameTypeDesignation
) {
2639 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2641 } else if (entity
instanceof NameRelationship
) {
2642 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2644 } else if (entity
instanceof SpecimenTypeDesignation
) {
2645 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
2646 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2647 removeListener
, style
);
2650 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2651 removeListener
, style
);
2653 } else if (entity
instanceof StateData
) {
2654 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2655 } else if (entity
instanceof StatisticalMeasurementValue
) {
2656 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2657 removeListener
, style
);
2658 } else if (entity
instanceof DerivedUnit
) {
2659 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2660 case LivingSpecimen
:
2661 case PreservedSpecimen
:
2663 element
= new SpecimenCollectionDetailElement(this,
2665 (DerivedUnit
) entity
,
2670 element
= new DerivedUnitElement(this,
2672 (DerivedUnit
) entity
,
2677 } else if (entity
instanceof NamedArea
) {
2678 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2679 } else if (entity
instanceof DeterminationEvent
) {
2680 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2681 } else if (entity
instanceof User
) {
2682 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2683 } else if (entity
instanceof GrantedAuthority
) {
2684 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2685 removeListener
, style
);
2686 } else if (entity
instanceof Group
) {
2687 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2688 } else if (entity
instanceof Taxon
) {
2689 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2690 } else if (entity
instanceof DescriptionElementBase
) {
2691 // this is the special case for protologs, maybe we can do this
2692 // differently when API improves
2693 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2694 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2695 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2697 } else if (entity
instanceof Identifier
) {
2698 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2699 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2702 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2704 } else if (entity
instanceof TermVocabulary
) {
2705 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
2706 switch (termVocabulary
.getTermType()) {
2708 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2711 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
2716 } else if (entity
instanceof MeasurementUnit
) {
2717 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2718 } else if (entity
instanceof StatisticalMeasure
) {
2719 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
2723 if (element
== null) {
2724 MessagingUtils
.messageDialog("No element for entity", this,
2725 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2730 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2731 element
.setPersistentBackground(backgroundColor
);
2734 parentElement
.addElement(element
);
2742 * Creates a selection element for the given type T.
2745 * <strong>Selection elements not handled by this method:</strong>
2747 * <li>{@link TaxonNodeSelectionElement} see
2748 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2750 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2751 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2757 * a {@link Class} object of the type that you want the selection
2759 * @param parentElement
2760 * a {@link ICdmFormElement} object.
2761 * @param labelString
2762 * a {@link String} object.
2763 * @param selectionType
2765 * a {@link ICdmBase} object.
2768 * @param conversation
2769 * a {@link ConversationHolder} object.
2770 * @return a {@link EntitySelectionElement} object.
2772 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2773 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2774 int style
, boolean filterElement
) {
2775 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2776 labelString
, selection
, mode
, style
, filterElement
);
2778 parentElement
.addElement(element
);
2782 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2783 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2785 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2786 labelString
, selection
, mode
, style
);
2788 parentElement
.addElement(element
);
2794 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
2797 * <strong>Selection elements not handled by this method:</strong>
2799 * <li>{@link TaxonNodeSelectionElement} see
2800 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2802 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2803 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2809 * a {@link Class} object of the type that you want the selection
2811 * @param parentElement
2812 * a {@link ICdmFormElement} object.
2813 * @param labelString
2814 * a {@link String} object.
2815 * @param selectionType
2817 * a {@link ICdmBase} object.
2820 * @param conversation
2821 * a {@link ConversationHolder} object.
2822 * @return a {@link EntitySelectionElement} object.
2824 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
2825 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
2826 T selection
, int mode
, int style
) {
2827 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, conversation
, parentElement
, clazz
,
2828 labelString
, selection
, mode
, style
);
2830 parentElement
.addElement(element
);
2834 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2835 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2836 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2837 labelString
, selection
, mode
, style
);
2839 parentElement
.addElement(element
);
2843 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
2844 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
2845 // int mode, int style) {
2846 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
2847 // conversation, parentElement, labelString, selection, mode, style);
2849 // parentElement.addElement(element);
2853 /** {@inheritDoc} */
2854 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2855 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2856 adapt(labelElement
);
2857 parentElement
.addElement(labelElement
);
2858 return labelElement
;
2861 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2862 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2863 label
.setText(labelText
+" (yyyy-MM-dd)");
2864 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2865 dateElement
.initController(this, formElement
);
2871 * Getter for the field <code>selectionProvider</code>.
2874 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2876 public ISelectionProvider
getSelectionProvider() {
2877 return selectionProvider
;
2882 * createDetailedDescriptionDetailElement
2885 * @param parentElement
2886 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2890 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2895 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2898 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2899 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2900 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2902 if (entity
instanceof CategoricalData
) {
2903 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2904 (CategoricalData
) entity
, style
);
2905 } else if (entity
instanceof CommonTaxonName
) {
2906 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2908 } else if (entity
instanceof Distribution
) {
2909 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2911 } else if (entity
instanceof IndividualsAssociation
) {
2912 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2913 (IndividualsAssociation
) entity
, style
);
2914 } else if (entity
instanceof QuantitativeData
) {
2915 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2916 (QuantitativeData
) entity
, style
);
2917 } else if (entity
instanceof TaxonInteraction
) {
2918 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2919 (TaxonInteraction
) entity
, style
);
2920 } else if (entity
instanceof TextData
) {
2921 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2923 throw new IllegalStateException("There is no interface for the given description element");
2925 adapt(detailedDescriptionElement
);
2926 parentElement
.addElement(detailedDescriptionElement
);
2927 return detailedDescriptionElement
;
2932 * Creates a styled text as a part of the form.
2937 * the text initial value
2940 * @return the text widget
2942 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2943 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2944 if (value
!= null) {
2945 text
.setText(value
);
2947 text
.setForeground(getColors().getForeground());
2948 text
.setBackground(getColors().getBackground());
2949 // text.addFocusListener(visibilityHandler);
2953 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2954 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2955 addAndAdaptSection(parentElement
, section
);
2960 * @param formElement
2961 * @param conversationHolder
2965 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
2966 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
2967 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
2968 addAndAdaptSection(formElement
, section
);