4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
7 import java
.util
.ArrayList
;
8 import java
.util
.HashSet
;
13 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
14 import org
.eclipse
.jface
.viewers
.ISelection
;
15 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
16 import org
.eclipse
.jface
.window
.Window
;
17 import org
.eclipse
.swt
.SWT
;
18 import org
.eclipse
.swt
.custom
.StyledText
;
19 import org
.eclipse
.swt
.events
.FocusAdapter
;
20 import org
.eclipse
.swt
.events
.FocusEvent
;
21 import org
.eclipse
.swt
.events
.FocusListener
;
22 import org
.eclipse
.swt
.events
.MouseAdapter
;
23 import org
.eclipse
.swt
.events
.MouseEvent
;
24 import org
.eclipse
.swt
.events
.MouseListener
;
25 import org
.eclipse
.swt
.events
.SelectionEvent
;
26 import org
.eclipse
.swt
.events
.SelectionListener
;
27 import org
.eclipse
.swt
.events
.TypedEvent
;
28 import org
.eclipse
.swt
.graphics
.Color
;
29 import org
.eclipse
.swt
.graphics
.Font
;
30 import org
.eclipse
.swt
.widgets
.Composite
;
31 import org
.eclipse
.swt
.widgets
.Control
;
32 import org
.eclipse
.swt
.widgets
.Display
;
33 import org
.eclipse
.swt
.widgets
.Event
;
34 import org
.eclipse
.swt
.widgets
.Label
;
35 import org
.eclipse
.ui
.forms
.IFormColors
;
36 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
37 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
38 import org
.eclipse
.ui
.forms
.widgets
.Section
;
39 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
40 import org
.joda
.time
.DateTime
;
41 import org
.joda
.time
.Partial
;
42 import org
.springframework
.security
.core
.GrantedAuthority
;
44 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
45 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
46 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
47 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
48 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
49 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
50 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
51 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
52 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
53 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
54 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
55 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
56 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
57 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
58 import eu
.etaxonomy
.cdm
.model
.common
.IEnumTerm
;
59 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
60 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
61 import eu
.etaxonomy
.cdm
.model
.common
.LSID
;
62 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
63 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
64 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
65 import eu
.etaxonomy
.cdm
.model
.common
.Representation
;
66 import eu
.etaxonomy
.cdm
.model
.common
.TermBase
;
67 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
68 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
69 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
70 import eu
.etaxonomy
.cdm
.model
.common
.User
;
71 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
72 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
73 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
74 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
75 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
76 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
77 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
78 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
79 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
80 import eu
.etaxonomy
.cdm
.model
.description
.MeasurementUnit
;
81 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
82 import eu
.etaxonomy
.cdm
.model
.description
.State
;
83 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
84 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasure
;
85 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
86 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
87 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
88 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
89 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
90 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
91 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
92 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
93 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
94 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
95 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
96 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
97 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
98 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
99 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
100 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
101 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
102 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
103 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
104 import eu
.etaxonomy
.cdm
.model
.taxon
.SynonymRelationship
;
105 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
106 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
107 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNodeAgentRelation
;
108 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
109 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
110 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
111 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.CloneClassificationDetailElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
115 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
116 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
117 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
118 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionElement
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionSection
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopePolyKeyDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailElement
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenHierarchyDetailSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationElement
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationDetailElement
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
323 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
324 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
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 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, true, style
, false);
920 parentElement
.addElement(element
);
924 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
926 ICdmFormElement parentElement
,
929 boolean addEmptyElement
,
931 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, false);
933 parentElement
.addElement(element
);
936 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
938 ICdmFormElement parentElement
,
941 boolean addEmptyElement
,
942 int style
, boolean useAbbrevLabel
) {
943 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
945 parentElement
.addElement(element
);
950 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
951 TermVocabulary
<?
> termVocabulary
,
952 ICdmFormElement parentElement
,
956 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, true, style
);
958 parentElement
.addElement(element
);
962 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
963 TermVocabulary
<?
> termVocabulary
,
964 ICdmFormElement parentElement
,
967 boolean addEmptyElement
,
969 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
);
971 parentElement
.addElement(element
);
977 * createEnumComboElement
980 * @param enumComboType
982 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
984 * @param parentElement
985 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
989 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
992 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
993 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
995 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
997 parentElement
.addElement(element
);
1001 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
1002 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1003 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1005 parentElement
.addElement(element
);
1011 * createBrowserElement
1015 * a {@link java.net.URI} object.
1018 * @param parentElement
1019 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1021 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1024 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1025 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1027 parentElement
.addElement(element
);
1033 * createImageElement
1036 * @param parentElement
1037 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1040 * a {@link java.net.URI} object.
1043 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1045 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1046 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1048 parentElement
.addElement(element
);
1054 * createTextActionElement
1057 * @param labelString
1058 * a {@link java.lang.String} object.
1059 * @param initialText
1060 * a {@link java.lang.String} object.
1063 * @param parentElement
1064 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1066 * @param buttonLabel
1067 * a {@link java.lang.String} object.
1068 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1071 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1072 String buttonLabel
, String initialText
, int style
) {
1073 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1076 parentElement
.addElement(element
);
1085 * @param parentElement
1086 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1089 * a {@link java.lang.String} object.
1090 * @param initialState
1094 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1097 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1098 if(initialState
==null){
1099 initialState
= Boolean
.FALSE
;
1101 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1103 parentElement
.addElement(element
);
1108 * Creates a section as a part of the form.
1110 * @return the section widget
1113 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1116 public Section
adapt(AbstractFormSection section
) {
1117 section
.setMenu(section
.getLayoutComposite().getMenu());
1118 adapt(section
, true, true);
1120 // handle focus and property change events for cdm use
1121 section
.addFocusListener(selectionFocusHandler
);
1122 section
.setPropertyChangeListeners(propertyChangeListeners
);
1124 if (section
.getToggle() != null) {
1125 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1126 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1129 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1131 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1132 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1133 getColors().initializeSectionToolBarColors();
1134 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1135 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1137 // call setTitleBarForeground regardless as it also sets the label color
1138 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1142 private class BoldFontHolder2
{
1143 private Font normalFont
;
1145 private Font boldFont
;
1147 public BoldFontHolder2() {
1150 public Font
getBoldFont(Font font
) {
1151 createBoldFont(font
);
1155 private void createBoldFont(Font font
) {
1156 if (normalFont
== null || !normalFont
.equals(font
)) {
1160 if (boldFont
== null) {
1161 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1165 public void dispose() {
1166 if (boldFont
!= null) {
1167 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1175 * createToggleableTextField
1178 * @param parentElement
1179 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1181 * @param labelString
1182 * a {@link java.lang.String} object.
1183 * @param initialText
1184 * a {@link java.lang.String} object.
1185 * @param initialState
1189 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1192 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1193 String initialText
, boolean initialState
, int style
) {
1194 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1195 initialState
, style
| orientation
);
1197 parentElement
.addElement(element
);
1203 * createTimePeriodElement
1206 * @param parentElement
1207 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1209 * @param labelString
1210 * a {@link java.lang.String} object.
1212 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1215 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1218 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1219 TimePeriod timePeriod
, int style
) {
1220 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1222 parentElement
.addElement(element
);
1228 * createGatheringEventUnitElement
1231 * @param parentElement
1232 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1234 * @param labelString
1235 * a {@link java.lang.String} object.
1237 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1240 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1243 public GatheringEventUnitElement
createGatheringEventUnitElement(
1244 ICdmFormElement parentElement
,
1246 DerivedUnitFacade gatheringEvent
,
1247 MinMaxTextSection
.UnitType unitType
,
1249 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1256 parentElement
.addElement(element
);
1262 * createPointElement
1267 * @param parentElement
1268 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1271 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1272 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1274 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1275 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1277 parentElement
.addElement(element
);
1284 * @param conversationHolder
1286 * @param detailsViewer
1290 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1291 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1292 parentElement
.addElement(section
);
1299 * createDateDetailSection
1302 * @param parentElement
1303 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1307 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1310 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1311 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1312 parentElement
.addElement(section
);
1319 * createDateDetailSection
1322 * @param parentElement
1323 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1327 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1330 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1331 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1332 parentElement
.addElement(section
);
1339 * createPartialElement
1342 * @param parentElement
1343 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1345 * @param labelString
1346 * a {@link java.lang.String} object.
1348 * a {@link org.joda.time.Partial} object.
1351 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1354 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1356 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1358 parentElement
.addElement(element
);
1364 * addSelectionListener
1368 * a {@link org.eclipse.swt.events.SelectionListener} object.
1370 public void addSelectionListener(SelectionListener listener
) {
1371 selectionListenerList
.add(listener
);
1376 * removeSelectionListener
1380 * a {@link org.eclipse.swt.events.SelectionListener} object.
1382 public void removeSelectionListener(SelectionListener listener
) {
1383 if (listener
== null) {
1384 MessagingUtils
.error(this.getClass(),
1385 "Tried to remove a selection listener from this factories listeners but was null", null);
1387 selectionListenerList
.remove(listener
);
1393 * addPropertyChangeListener
1397 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1400 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1401 if (propertyChangeListeners
.contains(listener
)) {
1404 propertyChangeListeners
.add(0, listener
);
1409 * removePropertyChangeListener
1413 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1416 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1417 propertyChangeListeners
.remove(listener
);
1421 * @return the propertyChangeListeners
1423 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1424 return propertyChangeListeners
;
1429 * createHorizontalSeparator
1432 * @param parentElement
1433 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1437 * @return a {@link org.eclipse.swt.widgets.Label} object.
1439 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1440 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1441 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1447 * createVersionElement
1450 * @param parentElement
1451 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1454 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1459 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1462 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1463 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1465 parentElement
.addElement(element
);
1470 * @param cdmBaseSection
1475 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1476 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1478 parentElement
.addElement(element
);
1484 * createVersionSection
1487 * @param parentElement
1488 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1493 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1496 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1497 VersionSection section
= new VersionSection(this, parentElement
, style
);
1498 parentElement
.addElement(section
);
1508 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1509 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1510 parentElement
.addElement(section
);
1517 * createEmptyElement
1520 * @param parentElement
1521 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1523 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1525 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1526 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1528 parentElement
.addElement(element
);
1534 * createHeadlineSection
1537 * @param parentElement
1538 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1541 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1544 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1545 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1546 parentElement
.addElement(section
);
1553 * createParsingMessageElement
1556 * @param parentElement
1557 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1559 * @param parserProblem
1560 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1565 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1568 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1569 ParserProblem parserProblem
, int style
) {
1570 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1572 parentElement
.addElement(element
);
1576 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1577 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1579 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1580 selectionProvider
, style
);
1582 parentElement
.addElement(section
);
1589 * @param definedTermClass
1590 * @param formElement
1594 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1595 AbstractCdmDetailSection parentElement
, int style
) {
1596 AbstractCdmDetailElement element
= null;
1598 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1599 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1600 } else if (definedTermClass
.equals(Feature
.class)) {
1601 element
= new FeatureDetailElement(this, parentElement
);
1603 element
= new DefinedTermDetailElement(this, parentElement
);
1607 parentElement
.addElement(element
);
1612 //--------DetailSections---------
1613 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1614 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1615 addAndAdaptSection(parentElement
, section
);
1619 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1620 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1621 addAndAdaptSection(parentElement
, section
);
1625 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1626 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1627 addAndAdaptSection(parentElement
, section
);
1631 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1632 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1633 addAndAdaptSection(parentElement
, section
);
1637 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1638 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1639 addAndAdaptSection(parentElement
, section
);
1643 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1644 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1645 addAndAdaptSection(parentElement
, section
);
1649 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1650 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1651 addAndAdaptSection(parentElement
, section
);
1655 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1656 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1657 addAndAdaptSection(parentElement
, section
);
1661 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1662 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1663 addAndAdaptSection(parentElement
, section
);
1667 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1668 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1669 addAndAdaptSection(parentElement
, section
);
1673 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1674 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1675 addAndAdaptSection(parentElement
, section
);
1679 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
1680 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
1681 addAndAdaptSection(parentElement
, section
);
1685 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1686 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1687 addAndAdaptSection(parentElement
, section
);
1691 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1692 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1693 addAndAdaptSection(parentElement
, section
);
1697 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1698 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1699 addAndAdaptSection(parentElement
, section
);
1703 public SpecimenHierarchyDetailSection
createSpecimenHierarchyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1704 SpecimenHierarchyDetailSection section
= new SpecimenHierarchyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1705 addAndAdaptSection(parentElement
, section
);
1709 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1710 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1711 addAndAdaptSection(parentElement
, section
);
1715 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1716 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
1717 addAndAdaptSection(parentElement
, section
);
1721 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1722 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1723 addAndAdaptSection(parentElement
, section
);
1727 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1728 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1729 addAndAdaptSection(parentElement
, section
);
1733 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1734 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1735 addAndAdaptSection(parentElement
, section
);
1739 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1740 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1741 addAndAdaptSection(parentElement
, section
);
1745 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1746 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1747 addAndAdaptSection(parentElement
, section
);
1751 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1752 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1753 addAndAdaptSection(parentElement
, section
);
1757 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1758 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1759 addAndAdaptSection(parentElement
, section
);
1763 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1764 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1765 addAndAdaptSection(parentElement
, section
);
1769 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1770 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1771 addAndAdaptSection(parentElement
, section
);
1775 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1776 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1777 addAndAdaptSection(parentElement
, section
);
1781 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1782 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1783 addAndAdaptSection(parentElement
, section
);
1787 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1788 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1789 addAndAdaptSection(parentElement
, section
);
1793 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1794 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1795 addAndAdaptSection(parentElement
, section
);
1799 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1800 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1801 addAndAdaptSection(parentElement
, section
);
1805 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1806 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
1807 addAndAdaptSection(parentElement
, section
);
1811 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1812 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1813 addAndAdaptSection(parentElement
, section
);
1817 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1818 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1819 addAndAdaptSection(parentElement
, section
);
1823 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1824 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1825 addAndAdaptSection(parentElement
, section
);
1829 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1830 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1831 addAndAdaptSection(parentElement
, section
);
1835 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1836 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1837 addAndAdaptSection(parentElement
, section
);
1841 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1842 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1843 addAndAdaptSection(parentElement
, section
);
1847 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1848 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1849 addAndAdaptSection(parentElement
, section
);
1853 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1854 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1855 addAndAdaptSection(parentElement
, section
);
1859 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1860 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1861 addAndAdaptSection(parentElement
, section
);
1865 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1866 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1867 addAndAdaptSection(parentElement
, section
);
1871 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1872 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1873 addAndAdaptSection(parentElement
, section
);
1877 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1878 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1879 addAndAdaptSection(parentElement
, section
);
1883 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1884 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1885 addAndAdaptSection(parentElement
, section
);
1889 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1890 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1891 addAndAdaptSection(parentElement
, section
);
1895 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1896 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1897 addAndAdaptSection(parentElement
, section
);
1901 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1902 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1903 addAndAdaptSection(parentElement
, section
);
1907 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1908 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1909 addAndAdaptSection(parentElement
, section
);
1913 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1914 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1915 addAndAdaptSection(parentElement
, section
);
1919 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1920 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1921 addAndAdaptSection(parentElement
, section
);
1925 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1926 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1927 addAndAdaptSection(parentElement
, section
);
1931 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1932 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1933 addAndAdaptSection(parentElement
, section
);
1937 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1938 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1939 addAndAdaptSection(parentElement
, section
);
1943 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1944 parentElement
.addElement(section
);
1948 //--------DetailElements------------
1950 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1951 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1952 addAndAdaptElement(parentElement
, element
);
1956 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1957 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1958 addAndAdaptElement(parentElement
, element
);
1962 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1963 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1964 addAndAdaptElement(parentElement
, element
);
1968 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1969 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1970 addAndAdaptElement(parentElement
, element
);
1974 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1975 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1976 addAndAdaptElement(parentElement
, element
);
1980 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1981 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1982 addAndAdaptElement(parentElement
, element
);
1986 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1987 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1988 addAndAdaptElement(parentElement
, element
);
1992 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1993 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1994 addAndAdaptElement(parentElement
, element
);
1998 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1999 UserDetailElement element
= new UserDetailElement(this, parentElement
);
2000 addAndAdaptElement(parentElement
, element
);
2004 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2005 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2006 addAndAdaptElement(parentElement
, element
);
2010 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2011 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2012 addAndAdaptElement(parentElement
, element
);
2016 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2017 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2018 addAndAdaptElement(parentElement
, element
);
2022 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2023 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2024 addAndAdaptElement(parentElement
, element
);
2028 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2029 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2030 addAndAdaptElement(parentElement
, element
);
2034 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2035 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2037 parentElement
.addElement(element
);
2042 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2043 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2044 addAndAdaptElement(parentElement
, element
);
2048 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2049 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2050 addAndAdaptElement(parentElement
, element
);
2054 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2055 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2056 addAndAdaptElement(parentElement
, element
);
2060 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2061 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2062 addAndAdaptElement(parentElement
, element
);
2066 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2067 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2068 addAndAdaptElement(parentElement
, element
);
2072 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2073 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2074 addAndAdaptElement(parentElement
, element
);
2078 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2079 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2080 addAndAdaptElement(parentElement
, element
);
2084 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2085 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2086 addAndAdaptElement(parentElement
, element
);
2090 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2091 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2092 addAndAdaptElement(parentElement
, element
);
2096 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2097 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2098 addAndAdaptElement(parentElement
, element
);
2102 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2103 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2104 addAndAdaptElement(parentElement
, element
);
2108 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2109 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2110 addAndAdaptElement(parentElement
, element
);
2114 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2115 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2116 addAndAdaptElement(parentElement
, element
);
2120 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2121 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
2122 addAndAdaptElement(parentElement
, element
);
2126 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2127 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2128 addAndAdaptElement(parentElement
, element
);
2133 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2134 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2135 addAndAdaptElement(parentElement
, element
);
2139 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2140 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2141 addAndAdaptElement(parentElement
, element
);
2145 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2146 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2147 addAndAdaptElement(parentElement
, element
);
2151 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2152 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2153 addAndAdaptElement(parentElement
, element
);
2157 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2158 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2159 addAndAdaptElement(parentElement
, element
);
2163 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2164 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2165 addAndAdaptElement(parentElement
, element
);
2169 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2170 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2171 addAndAdaptElement(parentElement
, element
);
2175 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2176 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2177 addAndAdaptElement(parentElement
, element
);
2181 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2182 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2183 addAndAdaptElement(parentElement
, element
);
2187 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2188 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2189 addAndAdaptElement(parentElement
, element
);
2193 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2194 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2195 addAndAdaptElement(parentElement
, element
);
2199 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2200 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2201 addAndAdaptElement(parentElement
, element
);
2205 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2206 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2207 addAndAdaptElement(parentElement
, element
);
2211 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2212 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2213 addAndAdaptElement(parentElement
, element
);
2217 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2218 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2219 addAndAdaptElement(parentElement
, element
);
2223 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2224 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2225 addAndAdaptElement(parentElement
, element
);
2229 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2230 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2231 addAndAdaptElement(parentElement
, mediaDetailElement
);
2232 return mediaDetailElement
;
2235 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2236 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2237 addAndAdaptElement(parentElement
, element
);
2241 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2242 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2243 addAndAdaptElement(parentElement
, element
);
2247 public SpecimenHierarchyDetailElement
createSpecimenHierarchyDetailElement(ICdmFormElement parentElement
) {
2248 SpecimenHierarchyDetailElement element
= new SpecimenHierarchyDetailElement(this, parentElement
);
2249 addAndAdaptElement(parentElement
, element
);
2253 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2254 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2255 addAndAdaptElement(parentElement
, element
);
2259 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2260 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2261 addAndAdaptElement(parentElement
, element
);
2265 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2266 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2267 addAndAdaptElement(parentElement
, element
);
2271 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2272 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2273 addAndAdaptElement(parentElement
, element
);
2277 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2278 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2279 addAndAdaptElement(parentElement
, element
);
2284 * @param parentElement
2287 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2289 parentElement
.addElement(element
);
2292 //--------EntityCollectionSection----------
2293 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2294 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2295 addAndAdaptSection(parentElement
, section
);
2299 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2300 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2301 addAndAdaptSection(parentElement
, section
);
2305 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2306 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2307 addAndAdaptSection(parentElement
, section
);
2311 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2312 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2313 addAndAdaptSection(parentElement
, section
);
2317 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2318 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2319 addAndAdaptSection(parentElement
, section
);
2323 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2324 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2325 addAndAdaptSection(parentElement
, section
);
2329 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2330 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2331 addAndAdaptSection(parentElement
, section
);
2335 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2336 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2337 addAndAdaptSection(parentElement
, section
);
2341 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2342 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2343 addAndAdaptSection(parentElement
, section
);
2347 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2348 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2349 addAndAdaptSection(parentElement
, section
);
2353 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2354 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2355 addAndAdaptSection(parentElement
, section
);
2359 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2360 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2361 addAndAdaptSection(parentElement
, section
);
2365 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2366 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2367 addAndAdaptSection(parentElement
, section
);
2371 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2372 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(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 SynonymRelationship
) {
2645 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2647 } else if (entity
instanceof SpecimenTypeDesignation
) {
2648 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
2649 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2650 removeListener
, style
);
2653 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2654 removeListener
, style
);
2656 } else if (entity
instanceof StateData
) {
2657 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2658 } else if (entity
instanceof StatisticalMeasurementValue
) {
2659 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2660 removeListener
, style
);
2661 } else if (entity
instanceof DerivedUnit
) {
2662 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2663 case LivingSpecimen
:
2664 case PreservedSpecimen
:
2666 element
= new SpecimenCollectionDetailElement(this,
2668 (DerivedUnit
) entity
,
2673 element
= new DerivedUnitElement(this,
2675 (DerivedUnit
) entity
,
2680 } else if (entity
instanceof NamedArea
) {
2681 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2682 } else if (entity
instanceof DeterminationEvent
) {
2683 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2684 } else if (entity
instanceof User
) {
2685 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2686 } else if (entity
instanceof GrantedAuthority
) {
2687 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2688 removeListener
, style
);
2689 } else if (entity
instanceof Group
) {
2690 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2691 } else if (entity
instanceof Taxon
) {
2692 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2693 } else if (entity
instanceof DescriptionElementBase
) {
2694 // this is the special case for protologs, maybe we can do this
2695 // differently when API improves
2696 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2697 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2698 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2700 } else if (entity
instanceof Identifier
) {
2701 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2702 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2705 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2707 } else if (entity
instanceof TermVocabulary
) {
2708 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
2709 switch (termVocabulary
.getTermType()) {
2711 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2714 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
2719 } else if (entity
instanceof MeasurementUnit
) {
2720 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2721 } else if (entity
instanceof StatisticalMeasure
) {
2722 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
2726 if (element
== null) {
2727 MessagingUtils
.messageDialog("No element for entity", this,
2728 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2733 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2734 element
.setPersistentBackground(backgroundColor
);
2737 parentElement
.addElement(element
);
2745 * Creates a selection element for the given type T.
2748 * <strong>Selection elements not handled by this method:</strong>
2750 * <li>{@link TaxonNodeSelectionElement} see
2751 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2753 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2754 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2760 * a {@link Class} object of the type that you want the selection
2762 * @param parentElement
2763 * a {@link ICdmFormElement} object.
2764 * @param labelString
2765 * a {@link String} object.
2766 * @param selectionType
2768 * a {@link ICdmBase} object.
2771 * @param conversation
2772 * a {@link ConversationHolder} object.
2773 * @return a {@link EntitySelectionElement} object.
2775 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2776 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2778 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2779 labelString
, selection
, mode
, style
);
2781 parentElement
.addElement(element
);
2787 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
2790 * <strong>Selection elements not handled by this method:</strong>
2792 * <li>{@link TaxonNodeSelectionElement} see
2793 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2795 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2796 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2802 * a {@link Class} object of the type that you want the selection
2804 * @param parentElement
2805 * a {@link ICdmFormElement} object.
2806 * @param labelString
2807 * a {@link String} object.
2808 * @param selectionType
2810 * a {@link ICdmBase} object.
2813 * @param conversation
2814 * a {@link ConversationHolder} object.
2815 * @return a {@link EntitySelectionElement} object.
2817 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
2818 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
2819 T selection
, int mode
, int style
) {
2820 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, conversation
, parentElement
, clazz
,
2821 labelString
, selection
, mode
, style
);
2823 parentElement
.addElement(element
);
2827 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2828 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2829 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2830 labelString
, selection
, mode
, style
);
2832 parentElement
.addElement(element
);
2836 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
2837 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
2838 // int mode, int style) {
2839 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
2840 // conversation, parentElement, labelString, selection, mode, style);
2842 // parentElement.addElement(element);
2846 /** {@inheritDoc} */
2847 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2848 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2849 adapt(labelElement
);
2850 parentElement
.addElement(labelElement
);
2851 return labelElement
;
2854 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2855 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2856 label
.setText(labelText
+" (yyyy-MM-dd)");
2857 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2858 dateElement
.initController(this, formElement
);
2864 * Getter for the field <code>selectionProvider</code>.
2867 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2869 public ISelectionProvider
getSelectionProvider() {
2870 return selectionProvider
;
2875 * createDetailedDescriptionDetailElement
2878 * @param parentElement
2879 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2883 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2888 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2891 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2892 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2893 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2895 if (entity
instanceof CategoricalData
) {
2896 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2897 (CategoricalData
) entity
, style
);
2898 } else if (entity
instanceof CommonTaxonName
) {
2899 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2901 } else if (entity
instanceof Distribution
) {
2902 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2904 } else if (entity
instanceof IndividualsAssociation
) {
2905 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2906 (IndividualsAssociation
) entity
, style
);
2907 } else if (entity
instanceof QuantitativeData
) {
2908 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2909 (QuantitativeData
) entity
, style
);
2910 } else if (entity
instanceof TaxonInteraction
) {
2911 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2912 (TaxonInteraction
) entity
, style
);
2913 } else if (entity
instanceof TextData
) {
2914 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2916 throw new IllegalStateException("There is no interface for the given description element");
2918 adapt(detailedDescriptionElement
);
2919 parentElement
.addElement(detailedDescriptionElement
);
2920 return detailedDescriptionElement
;
2925 * Creates a styled text as a part of the form.
2930 * the text initial value
2933 * @return the text widget
2935 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2936 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2937 if (value
!= null) {
2938 text
.setText(value
);
2940 text
.setForeground(getColors().getForeground());
2941 text
.setBackground(getColors().getBackground());
2942 // text.addFocusListener(visibilityHandler);
2946 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2947 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2948 addAndAdaptSection(parentElement
, section
);
2953 * @param formElement
2954 * @param conversationHolder
2958 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
2959 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
2960 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
2961 addAndAdaptSection(formElement
, section
);
2966 * @param conversationHolder
2967 * @param formElement
2971 public TeamMemberSection
createNomenclaturalTeamMemberSection(ConversationHolder conversationHolder
,
2972 ICdmFormElement formElement
, int expanded
) {
2973 // TODO Auto-generated method stub