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
.Partial
;
41 import org
.springframework
.security
.core
.GrantedAuthority
;
43 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
44 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
45 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
46 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
47 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
48 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
49 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
50 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
51 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
52 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
53 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
54 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
55 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
56 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
57 import eu
.etaxonomy
.cdm
.model
.common
.IEnumTerm
;
58 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
59 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
60 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
61 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
62 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
63 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
64 import eu
.etaxonomy
.cdm
.model
.common
.User
;
65 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
66 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
67 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
68 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
69 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
70 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
71 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
72 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
73 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
74 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
75 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
76 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
77 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
78 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
79 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
80 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
81 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
82 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
83 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
84 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
85 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
86 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
87 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
88 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
89 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
90 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
91 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
92 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
93 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
94 import eu
.etaxonomy
.cdm
.model
.taxon
.SynonymRelationship
;
95 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
96 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
97 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
98 import eu
.etaxonomy
.taxeditor
.model
.AbstractUtility
;
99 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
100 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
101 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
102 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
103 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
104 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
105 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
106 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
107 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
108 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
109 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
110 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
111 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
113 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
116 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailElement
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailSection
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.LivingPlantPhotoGeneralDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.LivingPlantPhotoGeneralDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.SpecimenScanGeneralDetailElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.SpecimenScanGeneralDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
299 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
300 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
305 * CdmFormFactory class.
309 * @created Feb 24, 2010
312 public class CdmFormFactory
extends FormToolkit
{
314 private BoldFontHolder2 boldFontHolder2
;
315 private MouseListener selectionMouseHandler
;
316 private FocusListener selectionFocusHandler
;
318 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
320 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
322 private final int orientation
= Window
.getDefaultOrientation();
323 private ISelectionProvider selectionProvider
;
325 /** Constant <code>EMPTY_SELECTION</code> */
326 public static ISelection EMPTY_SELECTION
= new ISelection() {
328 public boolean isEmpty() {
339 private class SelectionMouseHandler
extends MouseAdapter
{
341 public void mouseDown(MouseEvent e
) {
342 notifySelectionListeners(e
);
352 private class SelectionFocusHandler
extends FocusAdapter
{
354 public void focusGained(FocusEvent e
) {
355 notifySelectionListeners(e
);
359 private void notifySelectionListeners(TypedEvent e
) {
360 Event event
= new Event();
361 event
.widget
= e
.widget
;
362 SelectionEvent selectionEvent
= new SelectionEvent(event
);
364 for (SelectionListener listener
: selectionListenerList
) {
365 listener
.widgetSelected(selectionEvent
);
371 * Constructor for CdmFormFactory.
375 * a {@link org.eclipse.swt.widgets.Display} object.
376 * @param selectionProvider
377 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
379 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
381 this.selectionProvider
= selectionProvider
;
387 * Constructor for CdmFormFactory.
391 * a {@link org.eclipse.swt.widgets.Display} object.
393 public CdmFormFactory(Display display
) {
401 private void init() {
402 boldFontHolder2
= new BoldFontHolder2();
403 selectionMouseHandler
= new SelectionMouseHandler();
404 selectionFocusHandler
= new SelectionFocusHandler();
408 * Creates an instance initialized with the correct selectionProvider
410 * Make sure to remove the instance when the entityComposite disposes via
411 * destroySelectionArbitrator(..)
413 * @param entityElement
414 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
416 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
419 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
420 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
421 selectionArbitrator
.addSelectionProvider(selectionProvider
);
422 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
423 addSelectionListener(selectionArbitrator
);
424 return selectionArbitrator
;
429 * destroySelectionArbitrator
432 * @param selectionArbitrator
434 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
437 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
438 removeSelectionListener(selectionArbitrator
);
439 if (selectionProvider
!= null) {
440 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
442 AbstractUtility
.error(this.getClass(),
443 "Tried to destroy a selection listener from this factories listeners but was null", null);
449 * Adapts the {@link AbstractCdmFormElement}:<br>
450 * - sets the {@link IPropertyChangeListener}s handled by this class
455 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
458 public void adapt(ICdmFormElement formElement
) {
459 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
464 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
466 control
.addFocusListener(selectionFocusHandler
);
468 super.adapt(control
, trackFocus
, trackKeyboard
);
473 public void adapt(Composite composite
) {
474 composite
.addMouseListener(selectionMouseHandler
);
475 super.adapt(composite
);
484 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
487 public void destroyElement(ICdmFormElement formElement
) {
488 // return if element was not initialized
489 if (formElement
== null) {
492 // destroy selection arbitrator, if any
493 if (formElement
instanceof ISelectableElement
) {
494 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
496 // remove this element form its parents list of elements
497 // ICdmFormElement parentElement = formElement.getParentElement();
498 // if(parentElement != null){
499 // parentElement.removeElement(formElement);
501 // call destroy on child elements recursively
502 for (ICdmFormElement childElement
: formElement
.getElements()) {
503 destroyElement(childElement
);
505 // dispose of the controls
506 for (Control control
: formElement
.getControls()) {
507 // we added the layoutComposite of the parental element as the
508 // layout composite to this formElement
509 // but we do not want to destroy it.
510 if (control
.equals(formElement
.getLayoutComposite())) {
525 * a {@link org.eclipse.swt.widgets.Composite} object.
526 * @return a {@link org.eclipse.swt.widgets.Label} object.
528 public Label
createEmptyCell(Composite parent
) {
529 return this.createLabel(parent
, null);
534 * createMultilineTextWithLabel
538 * a {@link java.lang.String} object.
543 * @param parentElement
544 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
546 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
549 public TextWithLabelElement
createMultilineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
550 int textHeight
, int style
) {
551 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, style
);
553 parentElement
.addElement(element
);
559 * createMultiLanguageTextElement
562 * @param parentElement
563 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
566 * a {@link java.lang.String} object.
567 * @param multilanguageText
568 * a {@link java.util.Map} object.
574 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
577 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
578 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
579 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
580 multilanguageText
, textHeight
, style
);
582 parentElement
.addElement(element
);
586 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
587 KeyStatement keyStatement
, int textHeight
, int style
) {
588 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
591 parentElement
.addElement(element
);
596 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
598 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
599 * @param parentElement the parent container
600 * @param labelString the label name
601 * @param initialObject the object from which the <code>toString()</code> method is called
602 * @param style {@link SWT} style constant
603 * @return the created textfield with label
605 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
606 Object initialObject
, int style
) {
607 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
612 * createTextWithLabelElement
615 * @param parentElement
616 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
619 * a {@link java.lang.String} object.
621 * a {@link java.lang.String} object.
624 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
627 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
628 String initialText
, int style
) {
629 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
633 * createTextWithLabelElement
636 * @param parentElement
637 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
640 * a {@link java.lang.String} object.
642 * a {@link java.lang.String} object.
643 * @param textLimit maximal number of characters allowed
646 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
649 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
650 String initialText
, Integer textLimit
, int style
) {
651 if(initialText
==null){
655 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null, textLimit
, style
);
657 parentElement
.addElement(element
);
661 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
662 URI initialUri
, int style
) {
663 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
665 parentElement
.addElement(element
);
676 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
677 IOpenUrlEnabled openUrlEnabled
, int style
) {
678 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
681 parentElement
.addElement(element
);
687 * @param parentElement
689 * @param conversationEnabled
694 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
695 ConversationHolder conversation
, User user
, int style
) {
696 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
698 parentElement
.addElement(element
);
704 * createIntegerTextWithLabelElement
707 * @param parentElement
708 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
711 * a {@link java.lang.String} object.
712 * @param initialInteger
713 * a {@link java.lang.Integer} object.
717 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
720 public NumberWithLabelElement
createNumberTextWithLabelElement(
721 ICdmFormElement parentElement
, String labelString
,
722 Number initialNumber
, int style
) {
723 NumberWithLabelElement element
= new NumberWithLabelElement(this,
724 parentElement
, labelString
, initialNumber
, style
);
726 parentElement
.addElement(element
);
732 * createLanguageStringWithLabelElement
735 * @param parentElement
736 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
739 * a {@link java.lang.String} object.
740 * @param languageString
741 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
745 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
748 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
749 String labelString
, LanguageString languageString
, int style
) {
750 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
751 languageString
, style
);
753 parentElement
.addElement(element
);
759 * createLanguageStringWithLabelElement
762 * @param parentElement
763 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
766 * a {@link java.lang.String} object.
767 * @param languageString
768 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
774 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
777 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
778 String labelString
, LanguageString languageString
, int height
, int style
) {
779 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
780 languageString
, height
, style
);
782 parentElement
.addElement(element
);
791 * @param parentElement
792 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
795 * a {@link java.lang.String} object.
798 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
801 public TextWithLabelElement
createTextElement(ICdmFormElement parentElement
, String initialText
, int style
) {
802 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, null, initialText
, null, style
);
804 parentElement
.addElement(element
);
810 * createKeyValueViewerElement
813 * @param parentElement
814 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
817 * a {@link java.lang.String} object.
818 * @param valueHeading
819 * a {@link java.lang.String} object.
821 * a {@link java.util.Map} object.
822 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
825 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
826 String valueHeading
, Map
<Object
, Object
> map
) {
827 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
829 parentElement
.addElement(element
);
835 * createTermComboElement
838 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
839 * @param termComboType
841 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
843 * @param parentElement
844 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
847 * a {@link java.lang.String} object.
849 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
853 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
857 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
858 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
859 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
862 parentElement
.addElement(element
);
868 * createTermComboElement
871 * @param termComboType
873 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
875 * @param parentElement
876 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
879 * a {@link java.lang.String} object.
881 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
885 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
889 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
891 ICdmFormElement parentElement
,
895 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
897 parentElement
.addElement(element
);
903 * createEnumComboElement
906 * @param enumComboType
908 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
910 * @param parentElement
911 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
915 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
918 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
919 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
921 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
923 parentElement
.addElement(element
);
929 * createBrowserElement
933 * a {@link java.net.URI} object.
936 * @param parentElement
937 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
939 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
942 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
943 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
945 parentElement
.addElement(element
);
954 * @param parentElement
955 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
958 * a {@link java.net.URI} object.
961 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
963 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
964 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
966 parentElement
.addElement(element
);
972 * createTextActionElement
976 * a {@link java.lang.String} object.
978 * a {@link java.lang.String} object.
981 * @param parentElement
982 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
985 * a {@link java.lang.String} object.
986 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
989 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
990 String buttonLabel
, String initialText
, int style
) {
991 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
994 parentElement
.addElement(element
);
1003 * @param parentElement
1004 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1007 * a {@link java.lang.String} object.
1008 * @param initialState
1012 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1015 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1016 if(initialState
==null){
1017 initialState
= Boolean
.FALSE
;
1019 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1021 parentElement
.addElement(element
);
1026 * Creates a section as a part of the form.
1028 * @return the section widget
1031 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1034 public Section
adapt(AbstractFormSection section
) {
1035 section
.setMenu(section
.getLayoutComposite().getMenu());
1036 adapt(section
, true, true);
1038 // handle focus and property change events for cdm use
1039 section
.addFocusListener(selectionFocusHandler
);
1040 section
.setPropertyChangeListeners(propertyChangeListeners
);
1042 if (section
.getToggle() != null) {
1043 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1044 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1047 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1049 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1050 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1051 getColors().initializeSectionToolBarColors();
1052 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1053 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1055 // call setTitleBarForeground regardless as it also sets the label color
1056 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1060 private class BoldFontHolder2
{
1061 private Font normalFont
;
1063 private Font boldFont
;
1065 public BoldFontHolder2() {
1068 public Font
getBoldFont(Font font
) {
1069 createBoldFont(font
);
1073 private void createBoldFont(Font font
) {
1074 if (normalFont
== null || !normalFont
.equals(font
)) {
1078 if (boldFont
== null) {
1079 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1083 public void dispose() {
1084 if (boldFont
!= null) {
1085 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1093 * createToggleableTextField
1096 * @param parentElement
1097 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1099 * @param labelString
1100 * a {@link java.lang.String} object.
1101 * @param initialText
1102 * a {@link java.lang.String} object.
1103 * @param initialState
1107 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1110 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1111 String initialText
, boolean initialState
, int style
) {
1112 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1113 initialState
, style
| orientation
);
1115 parentElement
.addElement(element
);
1121 * createTimePeriodElement
1124 * @param parentElement
1125 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1127 * @param labelString
1128 * a {@link java.lang.String} object.
1130 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1133 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1136 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1137 TimePeriod timePeriod
, int style
) {
1138 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1140 parentElement
.addElement(element
);
1146 * createGatheringEventUnitElement
1149 * @param parentElement
1150 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1152 * @param labelString
1153 * a {@link java.lang.String} object.
1155 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1158 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1161 public GatheringEventUnitElement
createGatheringEventUnitElement(
1162 ICdmFormElement parentElement
,
1164 DerivedUnitFacade gatheringEvent
,
1165 MinMaxTextSection
.UnitType unitType
,
1167 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1174 parentElement
.addElement(element
);
1180 * createPointElement
1185 * @param parentElement
1186 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1189 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1190 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1192 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1193 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1195 parentElement
.addElement(element
);
1202 * @param conversationHolder
1204 * @param detailsViewer
1208 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1209 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1210 parentElement
.addElement(section
);
1217 * createDateDetailSection
1220 * @param parentElement
1221 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1225 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1228 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1229 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1230 parentElement
.addElement(section
);
1237 * createDateDetailSection
1240 * @param parentElement
1241 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1245 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1248 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1249 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1250 parentElement
.addElement(section
);
1257 * createPartialElement
1260 * @param parentElement
1261 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1263 * @param labelString
1264 * a {@link java.lang.String} object.
1266 * a {@link org.joda.time.Partial} object.
1269 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1272 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1274 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1276 parentElement
.addElement(element
);
1282 * addSelectionListener
1286 * a {@link org.eclipse.swt.events.SelectionListener} object.
1288 public void addSelectionListener(SelectionListener listener
) {
1289 selectionListenerList
.add(listener
);
1294 * removeSelectionListener
1298 * a {@link org.eclipse.swt.events.SelectionListener} object.
1300 public void removeSelectionListener(SelectionListener listener
) {
1301 if (listener
== null) {
1302 AbstractUtility
.error(this.getClass(),
1303 "Tried to remove a selection listener from this factories listeners but was null", null);
1305 selectionListenerList
.remove(listener
);
1311 * addPropertyChangeListener
1315 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1318 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1319 if (propertyChangeListeners
.contains(listener
)) {
1322 propertyChangeListeners
.add(0, listener
);
1327 * removePropertyChangeListener
1331 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1334 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1335 propertyChangeListeners
.remove(listener
);
1339 * @return the propertyChangeListeners
1341 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1342 return propertyChangeListeners
;
1347 * createHorizontalSeparator
1350 * @param parentElement
1351 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1355 * @return a {@link org.eclipse.swt.widgets.Label} object.
1357 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1358 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1359 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1365 * createVersionElement
1368 * @param parentElement
1369 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1372 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1377 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1380 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1381 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1383 parentElement
.addElement(element
);
1388 * @param cdmBaseSection
1393 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1394 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1396 parentElement
.addElement(element
);
1402 * createVersionSection
1405 * @param parentElement
1406 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1411 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1414 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1415 VersionSection section
= new VersionSection(this, parentElement
, style
);
1416 parentElement
.addElement(section
);
1426 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1427 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1428 parentElement
.addElement(section
);
1435 * createEmptyElement
1438 * @param parentElement
1439 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1441 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1443 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
) {
1444 EmptyElement element
= new EmptyElement(this, parentElement
, null, SWT
.NULL
);
1446 parentElement
.addElement(element
);
1452 * createHeadlineSection
1455 * @param parentElement
1456 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1459 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1462 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1463 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1464 parentElement
.addElement(section
);
1471 * createParsingMessageElement
1474 * @param parentElement
1475 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1477 * @param parserProblem
1478 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1483 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1486 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1487 ParserProblem parserProblem
, int style
) {
1488 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1490 parentElement
.addElement(element
);
1494 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1495 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1497 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1498 selectionProvider
, style
);
1500 parentElement
.addElement(section
);
1507 * @param definedTermClass
1508 * @param formElement
1512 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1513 AbstractCdmDetailSection parentElement
, int style
) {
1514 AbstractCdmDetailElement element
= null;
1516 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1517 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1518 } else if (definedTermClass
.equals(Feature
.class)) {
1519 element
= new FeatureDetailElement(this, parentElement
);
1521 element
= new DefinedTermDetailElement(this, parentElement
);
1525 parentElement
.addElement(element
);
1530 //--------DetailSections---------
1531 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1532 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1533 addAndAdaptSection(parentElement
, section
);
1537 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1538 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1539 addAndAdaptSection(parentElement
, section
);
1543 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1544 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1545 addAndAdaptSection(parentElement
, section
);
1549 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1550 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1551 addAndAdaptSection(parentElement
, section
);
1555 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1556 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1557 addAndAdaptSection(parentElement
, section
);
1561 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1562 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1563 addAndAdaptSection(parentElement
, section
);
1567 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1568 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1569 addAndAdaptSection(parentElement
, section
);
1573 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1574 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1575 addAndAdaptSection(parentElement
, section
);
1579 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1580 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1581 addAndAdaptSection(parentElement
, section
);
1585 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1586 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1587 addAndAdaptSection(parentElement
, section
);
1591 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1592 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1593 addAndAdaptSection(parentElement
, section
);
1597 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1598 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1599 addAndAdaptSection(parentElement
, section
);
1603 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1604 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1605 addAndAdaptSection(parentElement
, section
);
1609 public DerivedUnitFacadeDetailSection
createDerivedUnitFacadeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1610 DerivedUnitFacadeDetailSection section
= new DerivedUnitFacadeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1611 addAndAdaptSection(parentElement
, section
);
1615 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1616 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1617 addAndAdaptSection(parentElement
, section
);
1621 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1622 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1623 addAndAdaptSection(parentElement
, section
);
1627 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1628 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1629 addAndAdaptSection(parentElement
, section
);
1633 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1634 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1635 addAndAdaptSection(parentElement
, section
);
1639 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1640 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1641 addAndAdaptSection(parentElement
, section
);
1645 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1646 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1647 addAndAdaptSection(parentElement
, section
);
1651 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1652 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1653 addAndAdaptSection(parentElement
, section
);
1657 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1658 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1659 addAndAdaptSection(parentElement
, section
);
1663 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1664 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1665 addAndAdaptSection(parentElement
, section
);
1669 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1670 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1671 addAndAdaptSection(parentElement
, section
);
1675 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1676 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1677 addAndAdaptSection(parentElement
, section
);
1681 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1682 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1683 addAndAdaptSection(parentElement
, section
);
1687 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1688 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1689 addAndAdaptSection(parentElement
, section
);
1693 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1694 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1695 addAndAdaptSection(parentElement
, section
);
1699 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1700 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1701 addAndAdaptSection(parentElement
, section
);
1705 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1706 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1707 addAndAdaptSection(parentElement
, section
);
1711 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1712 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1713 addAndAdaptSection(parentElement
, section
);
1717 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1718 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1719 addAndAdaptSection(parentElement
, section
);
1723 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1724 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1725 addAndAdaptSection(parentElement
, section
);
1729 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1730 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1731 addAndAdaptSection(parentElement
, section
);
1735 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1736 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1737 addAndAdaptSection(parentElement
, section
);
1741 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1742 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1743 addAndAdaptSection(parentElement
, section
);
1747 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1748 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1749 addAndAdaptSection(parentElement
, section
);
1753 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1754 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1755 addAndAdaptSection(parentElement
, section
);
1759 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1760 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1761 addAndAdaptSection(parentElement
, section
);
1765 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1766 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1767 addAndAdaptSection(parentElement
, section
);
1771 public SpecimenScanGeneralDetailSection
createSpecimenScanGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1772 SpecimenScanGeneralDetailSection section
= new SpecimenScanGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1773 addAndAdaptSection(parentElement
, section
);
1777 public LivingPlantPhotoGeneralDetailSection
createLivingPlantPhotoGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1778 LivingPlantPhotoGeneralDetailSection section
= new LivingPlantPhotoGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1779 addAndAdaptSection(parentElement
, section
);
1783 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1784 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1785 addAndAdaptSection(parentElement
, section
);
1789 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1790 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1791 addAndAdaptSection(parentElement
, section
);
1795 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1796 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1797 addAndAdaptSection(parentElement
, section
);
1801 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1802 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1803 addAndAdaptSection(parentElement
, section
);
1807 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1808 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1809 addAndAdaptSection(parentElement
, section
);
1813 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1814 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1815 addAndAdaptSection(parentElement
, section
);
1819 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1820 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1821 addAndAdaptSection(parentElement
, section
);
1825 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1826 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1827 addAndAdaptSection(parentElement
, section
);
1831 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1832 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1833 addAndAdaptSection(parentElement
, section
);
1837 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1838 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1839 addAndAdaptSection(parentElement
, section
);
1843 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1844 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1845 addAndAdaptSection(parentElement
, section
);
1849 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1850 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1851 addAndAdaptSection(parentElement
, section
);
1855 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1856 parentElement
.addElement(section
);
1860 //--------DetailElements------------
1862 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1863 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1864 addAndAdaptElement(parentElement
, element
);
1868 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1869 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1870 addAndAdaptElement(parentElement
, element
);
1874 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1875 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1876 addAndAdaptElement(parentElement
, element
);
1880 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1881 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1882 addAndAdaptElement(parentElement
, element
);
1886 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1887 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1888 addAndAdaptElement(parentElement
, element
);
1892 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1893 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1894 addAndAdaptElement(parentElement
, element
);
1898 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1899 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1900 addAndAdaptElement(parentElement
, element
);
1904 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1905 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1906 addAndAdaptElement(parentElement
, element
);
1910 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1911 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1912 addAndAdaptElement(parentElement
, element
);
1916 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1917 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1918 addAndAdaptElement(parentElement
, element
);
1922 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1923 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1924 addAndAdaptElement(parentElement
, element
);
1928 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1929 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1930 addAndAdaptElement(parentElement
, element
);
1934 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1935 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1936 addAndAdaptElement(parentElement
, element
);
1940 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1941 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1942 addAndAdaptElement(parentElement
, element
);
1946 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1947 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1948 addAndAdaptElement(parentElement
, element
);
1952 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1953 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1954 addAndAdaptElement(parentElement
, element
);
1958 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1959 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1960 addAndAdaptElement(parentElement
, element
);
1964 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1965 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1966 addAndAdaptElement(parentElement
, element
);
1970 public DerivedUnitFacadeDetailElement
createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement
){
1971 DerivedUnitFacadeDetailElement element
= new DerivedUnitFacadeDetailElement(this, parentElement
);
1972 addAndAdaptElement(parentElement
, element
);
1976 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1977 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1978 addAndAdaptElement(parentElement
, element
);
1982 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1983 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1984 addAndAdaptElement(parentElement
, element
);
1988 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1989 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1990 addAndAdaptElement(parentElement
, element
);
1994 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1995 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1996 addAndAdaptElement(parentElement
, element
);
2000 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
2001 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
2002 addAndAdaptElement(parentElement
, element
);
2006 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2007 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2008 addAndAdaptElement(parentElement
, element
);
2012 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2013 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2014 addAndAdaptElement(parentElement
, element
);
2018 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2019 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2020 addAndAdaptElement(parentElement
, element
);
2024 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2025 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
2026 addAndAdaptElement(parentElement
, element
);
2030 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2031 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2032 addAndAdaptElement(parentElement
, element
);
2037 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2038 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2039 addAndAdaptElement(parentElement
, element
);
2043 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2044 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2045 addAndAdaptElement(parentElement
, element
);
2049 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2050 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2051 addAndAdaptElement(parentElement
, element
);
2055 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2056 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2057 addAndAdaptElement(parentElement
, element
);
2061 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2062 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2063 addAndAdaptElement(parentElement
, element
);
2067 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2068 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2069 addAndAdaptElement(parentElement
, element
);
2073 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2074 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2075 addAndAdaptElement(parentElement
, element
);
2079 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2080 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2081 addAndAdaptElement(parentElement
, element
);
2085 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2086 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2087 addAndAdaptElement(parentElement
, element
);
2091 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2092 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2093 addAndAdaptElement(parentElement
, element
);
2097 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2098 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2099 addAndAdaptElement(parentElement
, element
);
2103 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2104 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2105 addAndAdaptElement(parentElement
, element
);
2109 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2110 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2111 addAndAdaptElement(parentElement
, element
);
2115 public SpecimenScanGeneralDetailElement
createSpecimenScanGeneralDetailElement(ICdmFormElement parentElement
){
2116 SpecimenScanGeneralDetailElement element
= new SpecimenScanGeneralDetailElement(this, parentElement
);
2117 addAndAdaptElement(parentElement
, element
);
2121 public LivingPlantPhotoGeneralDetailElement
createLivingPlantPhotoGeneralDetailElement(ICdmFormElement parentElement
){
2122 LivingPlantPhotoGeneralDetailElement element
= new LivingPlantPhotoGeneralDetailElement(this, parentElement
);
2123 addAndAdaptElement(parentElement
, element
);
2127 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2128 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2129 addAndAdaptElement(parentElement
, element
);
2134 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2135 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2136 addAndAdaptElement(parentElement
, element
);
2140 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2141 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2142 addAndAdaptElement(parentElement
, element
);
2147 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2148 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2149 addAndAdaptElement(parentElement
, element
);
2153 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2154 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2155 addAndAdaptElement(parentElement
, element
);
2159 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2160 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2161 addAndAdaptElement(parentElement
, element
);
2165 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2166 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2167 addAndAdaptElement(parentElement
, element
);
2171 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2172 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2173 addAndAdaptElement(parentElement
, element
);
2178 * @param parentElement
2181 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2183 parentElement
.addElement(element
);
2186 //--------EntityCollectionSection----------
2187 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2188 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2189 addAndAdaptSection(parentElement
, section
);
2193 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2194 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2195 addAndAdaptSection(parentElement
, section
);
2199 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2200 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2201 addAndAdaptSection(parentElement
, section
);
2205 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2206 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2207 addAndAdaptSection(parentElement
, section
);
2211 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2212 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2213 addAndAdaptSection(parentElement
, section
);
2217 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2218 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2219 addAndAdaptSection(parentElement
, section
);
2223 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2224 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2225 addAndAdaptSection(parentElement
, section
);
2229 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2230 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2231 addAndAdaptSection(parentElement
, section
);
2235 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2236 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2237 addAndAdaptSection(parentElement
, section
);
2241 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2242 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2243 addAndAdaptSection(parentElement
, section
);
2247 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2248 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2249 addAndAdaptSection(parentElement
, section
);
2253 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2254 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2255 addAndAdaptSection(parentElement
, section
);
2259 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2260 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2261 addAndAdaptSection(parentElement
, section
);
2265 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2266 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2267 addAndAdaptSection(parentElement
, section
);
2271 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2272 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2273 addAndAdaptSection(parentElement
, section
);
2277 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2278 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2279 addAndAdaptSection(parentElement
, section
);
2283 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2284 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2285 addAndAdaptSection(parentElement
, section
);
2289 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2290 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2291 addAndAdaptSection(parentElement
, section
);
2295 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2296 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2297 addAndAdaptSection(parentElement
, section
);
2301 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2302 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2303 addAndAdaptSection(parentElement
, section
);
2307 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2308 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2309 addAndAdaptSection(parentElement
, section
);
2313 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2314 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2315 addAndAdaptSection(parentElement
, section
);
2319 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2320 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2321 addAndAdaptSection(parentElement
, section
);
2325 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2326 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2327 addAndAdaptSection(parentElement
, section
);
2331 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2332 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2333 addAndAdaptSection(parentElement
, section
);
2337 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2338 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2339 addAndAdaptSection(parentElement
, section
);
2343 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2344 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2345 addAndAdaptSection(parentElement
, section
);
2349 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2350 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2351 addAndAdaptSection(parentElement
, section
);
2355 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2356 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2357 addAndAdaptSection(parentElement
, section
);
2361 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2362 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2363 addAndAdaptSection(parentElement
, section
);
2367 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2368 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2369 addAndAdaptSection(parentElement
, section
);
2373 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2374 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
2375 addAndAdaptSection(parentElement
, section
);
2379 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2380 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2381 addAndAdaptSection(parentElement
, section
);
2385 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2386 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2387 addAndAdaptSection(parentElement
, section
);
2391 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2392 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2393 addAndAdaptSection(parentElement
, section
);
2397 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2398 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2399 addAndAdaptSection(parentElement
, section
);
2403 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2404 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2405 addAndAdaptSection(parentElement
, section
);
2411 * createEntityCollectionElement
2414 * @param removeListener
2415 * a {@link org.eclipse.swt.events.SelectionListener} object.
2418 * @param parentElement
2420 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
2422 * @param versionableEntity
2423 * a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
2425 * @param backgroundColor
2426 * a {@link org.eclipse.swt.graphics.Color} object.
2428 * {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
2431 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2432 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2433 AbstractEntityCollectionElement element
= null;
2435 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2437 if (entity
instanceof Annotation
) {
2438 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2439 } else if (entity
instanceof Person
) {
2440 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2441 } else if (entity
instanceof Credit
) {
2442 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2443 } else if (entity
instanceof Extension
) {
2444 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2445 } else if (entity
instanceof Marker
) {
2446 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2447 } else if (entity
instanceof Media
) {
2448 element
= new MediaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2449 } else if (entity
instanceof MediaRepresentation
) {
2450 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2452 } else if (entity
instanceof ImageFile
) {
2453 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2454 } else if (entity
instanceof MediaRepresentationPart
) {
2455 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2456 removeListener
, style
);
2457 } else if (entity
instanceof NomenclaturalStatus
) {
2458 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2460 } else if (entity
instanceof Rights
) {
2461 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2462 } else if (entity
instanceof DescriptionElementSource
) {
2463 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2464 removeListener
, style
);
2465 } else if (entity
instanceof IdentifiableSource
) {
2466 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2468 } else if (entity
instanceof DefinedTerm
) {
2469 switch(((DefinedTerm
)entity
).getTermType()) {
2471 element
= new ScopeElement(this,
2473 (DefinedTerm
) entity
,
2478 element
= new ModifierElement(this,
2480 (DefinedTerm
) entity
,
2485 //FIXME : Actually we should through an exception here
2490 } else if (entity
instanceof Reference
) {
2491 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2492 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2495 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2497 } else if (entity
instanceof NameTypeDesignation
) {
2498 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2500 } else if (entity
instanceof NameRelationship
) {
2501 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2503 } else if (entity
instanceof SynonymRelationship
) {
2504 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2506 } else if (entity
instanceof SpecimenTypeDesignation
) {
2507 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2508 removeListener
, style
);
2509 } else if (entity
instanceof StateData
) {
2510 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2511 } else if (entity
instanceof StatisticalMeasurementValue
) {
2512 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2513 removeListener
, style
);
2514 } else if (entity
instanceof DerivedUnit
) {
2515 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2516 case LivingSpecimen
:
2517 case PreservedSpecimen
:
2519 element
= new SpecimenCollectionDetailElement(this,
2521 (DerivedUnit
) entity
,
2526 element
= new DerivedUnitElement(this,
2528 (DerivedUnit
) entity
,
2533 } else if (entity
instanceof NamedArea
) {
2534 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2535 } else if (entity
instanceof DeterminationEvent
) {
2536 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2537 } else if (entity
instanceof User
) {
2538 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2539 } else if (entity
instanceof GrantedAuthority
) {
2540 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2541 removeListener
, style
);
2542 } else if (entity
instanceof Group
) {
2543 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2544 } else if (entity
instanceof Taxon
) {
2545 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2546 } else if (entity
instanceof DescriptionElementBase
) {
2547 // this is the special case for protologs, maybe we can do this
2548 // differently when API improves
2549 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2550 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2551 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2555 if (element
== null) {
2556 AbstractUtility
.errorDialog("No element for entity", this,
2557 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2561 else if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2562 element
.setPersistentBackground(backgroundColor
);
2564 parentElement
.addElement(element
);
2572 * Creates a selection element for the given type T.
2575 * <strong>Selection elements not handled by this method:</strong>
2577 * <li>{@link TaxonNodeSelectionElement} see
2578 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2580 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2581 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2587 * a {@link Class} object of the type that you want the selection
2589 * @param parentElement
2590 * a {@link ICdmFormElement} object.
2591 * @param labelString
2592 * a {@link String} object.
2593 * @param selectionType
2595 * a {@link ICdmBase} object.
2598 * @param conversation
2599 * a {@link ConversationHolder} object.
2600 * @return a {@link EntitySelectionElement} object.
2602 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2603 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2605 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2606 labelString
, selection
, mode
, style
);
2608 parentElement
.addElement(element
);
2612 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2613 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2614 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2615 labelString
, selection
, mode
, style
);
2617 parentElement
.addElement(element
);
2621 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2622 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2623 int mode
, int style
) {
2624 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2625 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2627 parentElement
.addElement(element
);
2631 /** {@inheritDoc} */
2632 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2633 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2634 adapt(labelElement
);
2635 parentElement
.addElement(labelElement
);
2636 return labelElement
;
2641 * Getter for the field <code>selectionProvider</code>.
2644 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2646 public ISelectionProvider
getSelectionProvider() {
2647 return selectionProvider
;
2652 * createDetailedDescriptionDetailElement
2655 * @param parentElement
2656 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2660 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2665 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2668 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2669 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2670 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2672 if (entity
instanceof CategoricalData
) {
2673 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2674 (CategoricalData
) entity
, style
);
2675 } else if (entity
instanceof CommonTaxonName
) {
2676 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2678 } else if (entity
instanceof Distribution
) {
2679 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2681 } else if (entity
instanceof IndividualsAssociation
) {
2682 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2683 (IndividualsAssociation
) entity
, style
);
2684 } else if (entity
instanceof QuantitativeData
) {
2685 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2686 (QuantitativeData
) entity
, style
);
2687 } else if (entity
instanceof TaxonInteraction
) {
2688 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2689 (TaxonInteraction
) entity
, style
);
2690 } else if (entity
instanceof TextData
) {
2691 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2693 throw new IllegalStateException("There is no interface for the given description element");
2695 adapt(detailedDescriptionElement
);
2696 parentElement
.addElement(detailedDescriptionElement
);
2697 return detailedDescriptionElement
;
2702 * Creates a styled text as a part of the form.
2707 * the text initial value
2710 * @return the text widget
2712 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2713 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2714 if (value
!= null) {
2715 text
.setText(value
);
2717 text
.setForeground(getColors().getForeground());
2718 text
.setBackground(getColors().getBackground());
2719 // text.addFocusListener(visibilityHandler);
2723 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2724 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2725 addAndAdaptSection(parentElement
, section
);