4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
7 import java
.util
.ArrayList
;
8 import java
.util
.HashSet
;
13 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
14 import org
.eclipse
.jface
.viewers
.ISelection
;
15 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
16 import org
.eclipse
.jface
.window
.Window
;
17 import org
.eclipse
.swt
.SWT
;
18 import org
.eclipse
.swt
.custom
.StyledText
;
19 import org
.eclipse
.swt
.events
.FocusAdapter
;
20 import org
.eclipse
.swt
.events
.FocusEvent
;
21 import org
.eclipse
.swt
.events
.FocusListener
;
22 import org
.eclipse
.swt
.events
.MouseAdapter
;
23 import org
.eclipse
.swt
.events
.MouseEvent
;
24 import org
.eclipse
.swt
.events
.MouseListener
;
25 import org
.eclipse
.swt
.events
.SelectionEvent
;
26 import org
.eclipse
.swt
.events
.SelectionListener
;
27 import org
.eclipse
.swt
.events
.TypedEvent
;
28 import org
.eclipse
.swt
.graphics
.Color
;
29 import org
.eclipse
.swt
.graphics
.Font
;
30 import org
.eclipse
.swt
.widgets
.Composite
;
31 import org
.eclipse
.swt
.widgets
.Control
;
32 import org
.eclipse
.swt
.widgets
.Display
;
33 import org
.eclipse
.swt
.widgets
.Event
;
34 import org
.eclipse
.swt
.widgets
.Label
;
35 import org
.eclipse
.ui
.forms
.IFormColors
;
36 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
37 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
38 import org
.eclipse
.ui
.forms
.widgets
.Section
;
39 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
40 import org
.joda
.time
.DateTime
;
41 import org
.joda
.time
.Partial
;
42 import org
.springframework
.security
.core
.GrantedAuthority
;
44 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
45 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
46 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
47 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
48 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
49 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
50 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
51 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
52 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
53 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
54 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
55 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
56 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
57 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
58 import eu
.etaxonomy
.cdm
.model
.common
.IEnumTerm
;
59 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
60 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
61 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
62 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
63 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
64 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
65 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
66 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
67 import eu
.etaxonomy
.cdm
.model
.common
.User
;
68 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
69 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
70 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
71 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
72 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
73 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
74 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
75 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
76 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
77 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
78 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
79 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
80 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
81 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
82 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
83 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
84 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
85 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
86 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
87 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
88 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
89 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
90 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
91 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
92 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
93 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
94 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
95 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
96 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
97 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
98 import eu
.etaxonomy
.cdm
.model
.taxon
.SynonymRelationship
;
99 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
100 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
101 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
102 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
103 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
104 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
105 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
106 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
107 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
108 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
109 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
110 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
111 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
112 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
116 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SynonymRelationshipDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
308 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
312 * CdmFormFactory class.
316 * @created Feb 24, 2010
319 public class CdmFormFactory
extends FormToolkit
{
321 private BoldFontHolder2 boldFontHolder2
;
322 private MouseListener selectionMouseHandler
;
323 private FocusListener selectionFocusHandler
;
325 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
327 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
329 private final int orientation
= Window
.getDefaultOrientation();
330 private ISelectionProvider selectionProvider
;
332 /** Constant <code>EMPTY_SELECTION</code> */
333 public static ISelection EMPTY_SELECTION
= new ISelection() {
335 public boolean isEmpty() {
346 private class SelectionMouseHandler
extends MouseAdapter
{
348 public void mouseDown(MouseEvent e
) {
349 notifySelectionListeners(e
);
359 private class SelectionFocusHandler
extends FocusAdapter
{
361 public void focusGained(FocusEvent e
) {
362 notifySelectionListeners(e
);
366 private void notifySelectionListeners(TypedEvent e
) {
367 Event event
= new Event();
368 event
.widget
= e
.widget
;
369 SelectionEvent selectionEvent
= new SelectionEvent(event
);
371 for (SelectionListener listener
: selectionListenerList
) {
372 listener
.widgetSelected(selectionEvent
);
378 * Constructor for CdmFormFactory.
382 * a {@link org.eclipse.swt.widgets.Display} object.
383 * @param selectionProvider
384 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
386 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
388 this.selectionProvider
= selectionProvider
;
394 * Constructor for CdmFormFactory.
398 * a {@link org.eclipse.swt.widgets.Display} object.
400 public CdmFormFactory(Display display
) {
408 private void init() {
409 boldFontHolder2
= new BoldFontHolder2();
410 selectionMouseHandler
= new SelectionMouseHandler();
411 selectionFocusHandler
= new SelectionFocusHandler();
415 * Creates an instance initialized with the correct selectionProvider
417 * Make sure to remove the instance when the entityComposite disposes via
418 * destroySelectionArbitrator(..)
420 * @param entityElement
421 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
423 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
426 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
427 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
428 selectionArbitrator
.addSelectionProvider(selectionProvider
);
429 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
430 addSelectionListener(selectionArbitrator
);
431 return selectionArbitrator
;
436 * destroySelectionArbitrator
439 * @param selectionArbitrator
441 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
444 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
445 removeSelectionListener(selectionArbitrator
);
446 if (selectionProvider
!= null) {
447 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
449 MessagingUtils
.error(this.getClass(),
450 "Tried to destroy a selection listener from this factories listeners but was null", null);
456 * Adapts the {@link AbstractCdmFormElement}:<br>
457 * - sets the {@link IPropertyChangeListener}s handled by this class
462 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
465 public void adapt(ICdmFormElement formElement
) {
466 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
471 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
473 control
.addFocusListener(selectionFocusHandler
);
475 super.adapt(control
, trackFocus
, trackKeyboard
);
480 public void adapt(Composite composite
) {
481 composite
.addMouseListener(selectionMouseHandler
);
482 super.adapt(composite
);
491 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
494 public void destroyElement(ICdmFormElement formElement
) {
495 // return if element was not initialized
496 if (formElement
== null) {
499 // destroy selection arbitrator, if any
500 if (formElement
instanceof ISelectableElement
) {
501 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
503 // remove this element form its parents list of elements
504 // ICdmFormElement parentElement = formElement.getParentElement();
505 // if(parentElement != null){
506 // parentElement.removeElement(formElement);
508 // call destroy on child elements recursively
509 for (ICdmFormElement childElement
: formElement
.getElements()) {
510 destroyElement(childElement
);
512 // dispose of the controls
513 for (Control control
: formElement
.getControls()) {
514 // we added the layoutComposite of the parental element as the
515 // layout composite to this formElement
516 // but we do not want to destroy it.
517 if (control
.equals(formElement
.getLayoutComposite())) {
532 * a {@link org.eclipse.swt.widgets.Composite} object.
533 * @return a {@link org.eclipse.swt.widgets.Label} object.
535 public Label
createEmptyCell(Composite parent
) {
536 return this.createLabel(parent
, null);
541 * createMultiLanguageTextElement
544 * @param parentElement
545 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
548 * a {@link java.lang.String} object.
549 * @param multilanguageText
550 * a {@link java.util.Map} object.
556 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
559 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
560 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
561 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
562 multilanguageText
, textHeight
, style
);
564 parentElement
.addElement(element
);
568 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
569 KeyStatement keyStatement
, int textHeight
, int style
) {
570 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
573 parentElement
.addElement(element
);
578 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
580 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
581 * @param parentElement the parent container
582 * @param labelString the label name
583 * @param initialObject the object from which the <code>toString()</code> method is called
584 * @param style {@link SWT} style constant
585 * @return the created textfield with label
587 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
588 Object initialObject
, int style
) {
589 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
594 * createTextWithLabelElement
597 * @param parentElement
598 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
601 * a {@link java.lang.String} object.
603 * a {@link java.lang.String} object.
606 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
609 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
610 String initialText
, int style
) {
611 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
615 * createTextWithLabelElement
618 * @param parentElement
619 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
622 * a {@link java.lang.String} object.
624 * a {@link java.lang.String} object.
625 * @param textLimit maximal number of characters allowed
628 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
631 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
632 String initialText
, Integer textLimit
, int style
) {
633 if(initialText
==null){
637 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
640 parentElement
.addElement(element
);
644 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
645 int textHeight
, int style
) {
646 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
648 parentElement
.addElement(element
);
652 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
653 URI initialUri
, int style
) {
654 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
656 parentElement
.addElement(element
);
667 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
668 IOpenUrlEnabled openUrlEnabled
, int style
) {
669 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
672 parentElement
.addElement(element
);
678 * @param parentElement
680 * @param conversationEnabled
685 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
686 ConversationHolder conversation
, User user
, int style
) {
687 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
689 parentElement
.addElement(element
);
695 * createIntegerTextWithLabelElement
698 * @param parentElement
699 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
702 * a {@link java.lang.String} object.
703 * @param initialInteger
704 * a {@link java.lang.Integer} object.
708 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
711 public NumberWithLabelElement
createNumberTextWithLabelElement(
712 ICdmFormElement parentElement
, String labelString
,
713 Number initialNumber
, int style
) {
714 NumberWithLabelElement element
= new NumberWithLabelElement(this,
715 parentElement
, labelString
, initialNumber
, style
);
717 parentElement
.addElement(element
);
723 * createLanguageStringWithLabelElement
726 * @param parentElement
727 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
730 * a {@link java.lang.String} object.
731 * @param languageString
732 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
736 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
739 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
740 String labelString
, LanguageString languageString
, int style
) {
741 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
742 languageString
, style
);
744 parentElement
.addElement(element
);
750 * createLanguageStringWithLabelElement
753 * @param parentElement
754 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
757 * a {@link java.lang.String} object.
758 * @param languageString
759 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
765 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
768 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
769 String labelString
, LanguageString languageString
, int height
, int style
) {
770 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
771 languageString
, height
, style
);
773 parentElement
.addElement(element
);
780 * createKeyValueViewerElement
783 * @param parentElement
784 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
787 * a {@link java.lang.String} object.
788 * @param valueHeading
789 * a {@link java.lang.String} object.
791 * a {@link java.util.Map} object.
792 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
795 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
796 String valueHeading
, Map
<Object
, Object
> map
) {
797 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
799 parentElement
.addElement(element
);
805 * createTermComboElement
808 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
809 * @param termComboType
811 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
813 * @param parentElement
814 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
817 * a {@link java.lang.String} object.
819 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
823 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
827 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
828 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
829 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
832 parentElement
.addElement(element
);
838 * createTermComboElement
841 * @param termComboType
843 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
845 * @param parentElement
846 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
849 * a {@link java.lang.String} object.
851 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
855 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
859 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
861 ICdmFormElement parentElement
,
865 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
867 parentElement
.addElement(element
);
873 * createTermComboElement
876 * @param termComboType
878 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
880 * @param parentElement
881 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
884 * a {@link java.lang.String} object.
886 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
890 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
894 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
895 TermVocabulary
<?
> termVocabulary
,
896 ICdmFormElement parentElement
,
900 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, style
);
902 parentElement
.addElement(element
);
908 * createEnumComboElement
911 * @param enumComboType
913 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
915 * @param parentElement
916 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
920 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
923 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
924 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
926 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
928 parentElement
.addElement(element
);
934 * createBrowserElement
938 * a {@link java.net.URI} object.
941 * @param parentElement
942 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
944 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
947 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
948 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
950 parentElement
.addElement(element
);
959 * @param parentElement
960 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
963 * a {@link java.net.URI} object.
966 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
968 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
969 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
971 parentElement
.addElement(element
);
977 * createTextActionElement
981 * a {@link java.lang.String} object.
983 * a {@link java.lang.String} object.
986 * @param parentElement
987 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
990 * a {@link java.lang.String} object.
991 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
994 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
995 String buttonLabel
, String initialText
, int style
) {
996 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
999 parentElement
.addElement(element
);
1008 * @param parentElement
1009 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1012 * a {@link java.lang.String} object.
1013 * @param initialState
1017 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1020 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1021 if(initialState
==null){
1022 initialState
= Boolean
.FALSE
;
1024 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1026 parentElement
.addElement(element
);
1031 * Creates a section as a part of the form.
1033 * @return the section widget
1036 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1039 public Section
adapt(AbstractFormSection section
) {
1040 section
.setMenu(section
.getLayoutComposite().getMenu());
1041 adapt(section
, true, true);
1043 // handle focus and property change events for cdm use
1044 section
.addFocusListener(selectionFocusHandler
);
1045 section
.setPropertyChangeListeners(propertyChangeListeners
);
1047 if (section
.getToggle() != null) {
1048 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1049 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1052 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1054 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1055 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1056 getColors().initializeSectionToolBarColors();
1057 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1058 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1060 // call setTitleBarForeground regardless as it also sets the label color
1061 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1065 private class BoldFontHolder2
{
1066 private Font normalFont
;
1068 private Font boldFont
;
1070 public BoldFontHolder2() {
1073 public Font
getBoldFont(Font font
) {
1074 createBoldFont(font
);
1078 private void createBoldFont(Font font
) {
1079 if (normalFont
== null || !normalFont
.equals(font
)) {
1083 if (boldFont
== null) {
1084 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1088 public void dispose() {
1089 if (boldFont
!= null) {
1090 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1098 * createToggleableTextField
1101 * @param parentElement
1102 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1104 * @param labelString
1105 * a {@link java.lang.String} object.
1106 * @param initialText
1107 * a {@link java.lang.String} object.
1108 * @param initialState
1112 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1115 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1116 String initialText
, boolean initialState
, int style
) {
1117 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1118 initialState
, style
| orientation
);
1120 parentElement
.addElement(element
);
1126 * createTimePeriodElement
1129 * @param parentElement
1130 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1132 * @param labelString
1133 * a {@link java.lang.String} object.
1135 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1138 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1141 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1142 TimePeriod timePeriod
, int style
) {
1143 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1145 parentElement
.addElement(element
);
1151 * createGatheringEventUnitElement
1154 * @param parentElement
1155 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1157 * @param labelString
1158 * a {@link java.lang.String} object.
1160 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1163 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1166 public GatheringEventUnitElement
createGatheringEventUnitElement(
1167 ICdmFormElement parentElement
,
1169 DerivedUnitFacade gatheringEvent
,
1170 MinMaxTextSection
.UnitType unitType
,
1172 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1179 parentElement
.addElement(element
);
1185 * createPointElement
1190 * @param parentElement
1191 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1194 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1195 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1197 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1198 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1200 parentElement
.addElement(element
);
1207 * @param conversationHolder
1209 * @param detailsViewer
1213 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1214 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1215 parentElement
.addElement(section
);
1222 * createDateDetailSection
1225 * @param parentElement
1226 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1230 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1233 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1234 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1235 parentElement
.addElement(section
);
1242 * createDateDetailSection
1245 * @param parentElement
1246 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1250 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1253 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1254 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1255 parentElement
.addElement(section
);
1262 * createPartialElement
1265 * @param parentElement
1266 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1268 * @param labelString
1269 * a {@link java.lang.String} object.
1271 * a {@link org.joda.time.Partial} object.
1274 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1277 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1279 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1281 parentElement
.addElement(element
);
1287 * addSelectionListener
1291 * a {@link org.eclipse.swt.events.SelectionListener} object.
1293 public void addSelectionListener(SelectionListener listener
) {
1294 selectionListenerList
.add(listener
);
1299 * removeSelectionListener
1303 * a {@link org.eclipse.swt.events.SelectionListener} object.
1305 public void removeSelectionListener(SelectionListener listener
) {
1306 if (listener
== null) {
1307 MessagingUtils
.error(this.getClass(),
1308 "Tried to remove a selection listener from this factories listeners but was null", null);
1310 selectionListenerList
.remove(listener
);
1316 * addPropertyChangeListener
1320 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1323 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1324 if (propertyChangeListeners
.contains(listener
)) {
1327 propertyChangeListeners
.add(0, listener
);
1332 * removePropertyChangeListener
1336 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1339 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1340 propertyChangeListeners
.remove(listener
);
1344 * @return the propertyChangeListeners
1346 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1347 return propertyChangeListeners
;
1352 * createHorizontalSeparator
1355 * @param parentElement
1356 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1360 * @return a {@link org.eclipse.swt.widgets.Label} object.
1362 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1363 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1364 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1370 * createVersionElement
1373 * @param parentElement
1374 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1377 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1382 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1385 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1386 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1388 parentElement
.addElement(element
);
1393 * @param cdmBaseSection
1398 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1399 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1401 parentElement
.addElement(element
);
1407 * createVersionSection
1410 * @param parentElement
1411 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1416 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1419 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1420 VersionSection section
= new VersionSection(this, parentElement
, style
);
1421 parentElement
.addElement(section
);
1431 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1432 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1433 parentElement
.addElement(section
);
1440 * createEmptyElement
1443 * @param parentElement
1444 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1446 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1448 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1449 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1451 parentElement
.addElement(element
);
1457 * createHeadlineSection
1460 * @param parentElement
1461 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1464 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1467 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1468 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1469 parentElement
.addElement(section
);
1476 * createParsingMessageElement
1479 * @param parentElement
1480 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1482 * @param parserProblem
1483 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1488 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1491 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1492 ParserProblem parserProblem
, int style
) {
1493 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1495 parentElement
.addElement(element
);
1499 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1500 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1502 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1503 selectionProvider
, style
);
1505 parentElement
.addElement(section
);
1512 * @param definedTermClass
1513 * @param formElement
1517 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1518 AbstractCdmDetailSection parentElement
, int style
) {
1519 AbstractCdmDetailElement element
= null;
1521 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1522 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1523 } else if (definedTermClass
.equals(Feature
.class)) {
1524 element
= new FeatureDetailElement(this, parentElement
);
1526 element
= new DefinedTermDetailElement(this, parentElement
);
1530 parentElement
.addElement(element
);
1535 //--------DetailSections---------
1536 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1537 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1538 addAndAdaptSection(parentElement
, section
);
1542 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1543 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1544 addAndAdaptSection(parentElement
, section
);
1548 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1549 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1550 addAndAdaptSection(parentElement
, section
);
1554 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1555 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1556 addAndAdaptSection(parentElement
, section
);
1560 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1561 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1562 addAndAdaptSection(parentElement
, section
);
1566 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1567 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1568 addAndAdaptSection(parentElement
, section
);
1572 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1573 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1574 addAndAdaptSection(parentElement
, section
);
1578 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1579 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1580 addAndAdaptSection(parentElement
, section
);
1584 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1585 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1586 addAndAdaptSection(parentElement
, section
);
1590 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1591 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1592 addAndAdaptSection(parentElement
, section
);
1596 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1597 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1598 addAndAdaptSection(parentElement
, section
);
1602 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1603 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1604 addAndAdaptSection(parentElement
, section
);
1608 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1609 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1610 addAndAdaptSection(parentElement
, section
);
1614 public DerivedUnitFacadeDetailSection
createDerivedUnitFacadeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1615 DerivedUnitFacadeDetailSection section
= new DerivedUnitFacadeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1616 addAndAdaptSection(parentElement
, section
);
1620 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1621 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1622 addAndAdaptSection(parentElement
, section
);
1626 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1627 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1628 addAndAdaptSection(parentElement
, section
);
1632 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1633 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1634 addAndAdaptSection(parentElement
, section
);
1638 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1639 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1640 addAndAdaptSection(parentElement
, section
);
1644 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1645 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1646 addAndAdaptSection(parentElement
, section
);
1650 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1651 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1652 addAndAdaptSection(parentElement
, section
);
1656 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1657 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1658 addAndAdaptSection(parentElement
, section
);
1662 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1663 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1664 addAndAdaptSection(parentElement
, section
);
1668 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1669 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1670 addAndAdaptSection(parentElement
, section
);
1674 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1675 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1676 addAndAdaptSection(parentElement
, section
);
1680 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1681 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1682 addAndAdaptSection(parentElement
, section
);
1686 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1687 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1688 addAndAdaptSection(parentElement
, section
);
1692 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1693 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1694 addAndAdaptSection(parentElement
, section
);
1698 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1699 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1700 addAndAdaptSection(parentElement
, section
);
1704 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1705 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1706 addAndAdaptSection(parentElement
, section
);
1710 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1711 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1712 addAndAdaptSection(parentElement
, section
);
1716 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1717 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1718 addAndAdaptSection(parentElement
, section
);
1722 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1723 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1724 addAndAdaptSection(parentElement
, section
);
1728 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1729 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1730 addAndAdaptSection(parentElement
, section
);
1734 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1735 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1736 addAndAdaptSection(parentElement
, section
);
1740 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1741 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1742 addAndAdaptSection(parentElement
, section
);
1746 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1747 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1748 addAndAdaptSection(parentElement
, section
);
1752 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1753 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1754 addAndAdaptSection(parentElement
, section
);
1758 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1759 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1760 addAndAdaptSection(parentElement
, section
);
1764 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1765 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1766 addAndAdaptSection(parentElement
, section
);
1770 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1771 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1772 addAndAdaptSection(parentElement
, section
);
1776 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1777 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1778 addAndAdaptSection(parentElement
, section
);
1782 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1783 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1784 addAndAdaptSection(parentElement
, section
);
1788 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1789 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1790 addAndAdaptSection(parentElement
, section
);
1794 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1795 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1796 addAndAdaptSection(parentElement
, section
);
1800 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1801 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1802 addAndAdaptSection(parentElement
, section
);
1806 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1807 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1808 addAndAdaptSection(parentElement
, section
);
1812 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1813 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1814 addAndAdaptSection(parentElement
, section
);
1818 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1819 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1820 addAndAdaptSection(parentElement
, section
);
1824 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1825 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1826 addAndAdaptSection(parentElement
, section
);
1830 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1831 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1832 addAndAdaptSection(parentElement
, section
);
1836 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1837 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1838 addAndAdaptSection(parentElement
, section
);
1842 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1843 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1844 addAndAdaptSection(parentElement
, section
);
1848 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1849 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1850 addAndAdaptSection(parentElement
, section
);
1854 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1855 parentElement
.addElement(section
);
1859 //--------DetailElements------------
1861 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1862 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1863 addAndAdaptElement(parentElement
, element
);
1867 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1868 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1869 addAndAdaptElement(parentElement
, element
);
1873 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1874 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1875 addAndAdaptElement(parentElement
, element
);
1879 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1880 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1881 addAndAdaptElement(parentElement
, element
);
1885 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1886 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1887 addAndAdaptElement(parentElement
, element
);
1891 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1892 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1893 addAndAdaptElement(parentElement
, element
);
1897 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1898 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1899 addAndAdaptElement(parentElement
, element
);
1903 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1904 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1905 addAndAdaptElement(parentElement
, element
);
1909 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1910 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1911 addAndAdaptElement(parentElement
, element
);
1915 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1916 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1917 addAndAdaptElement(parentElement
, element
);
1921 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1922 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1923 addAndAdaptElement(parentElement
, element
);
1927 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1928 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1929 addAndAdaptElement(parentElement
, element
);
1933 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1934 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1935 addAndAdaptElement(parentElement
, element
);
1939 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1940 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1941 addAndAdaptElement(parentElement
, element
);
1945 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1946 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1947 addAndAdaptElement(parentElement
, element
);
1951 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1952 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1953 addAndAdaptElement(parentElement
, element
);
1957 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1958 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1959 addAndAdaptElement(parentElement
, element
);
1963 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1964 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1965 addAndAdaptElement(parentElement
, element
);
1969 public DerivedUnitFacadeDetailElement
createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement
){
1970 DerivedUnitFacadeDetailElement element
= new DerivedUnitFacadeDetailElement(this, parentElement
);
1971 addAndAdaptElement(parentElement
, element
);
1975 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1976 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1977 addAndAdaptElement(parentElement
, element
);
1981 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1982 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1983 addAndAdaptElement(parentElement
, element
);
1987 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1988 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1989 addAndAdaptElement(parentElement
, element
);
1993 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1994 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1995 addAndAdaptElement(parentElement
, element
);
1999 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
2000 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
2001 addAndAdaptElement(parentElement
, element
);
2005 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2006 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2007 addAndAdaptElement(parentElement
, element
);
2011 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2012 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2013 addAndAdaptElement(parentElement
, element
);
2017 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2018 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2019 addAndAdaptElement(parentElement
, element
);
2023 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2024 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
2025 addAndAdaptElement(parentElement
, element
);
2029 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2030 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2031 addAndAdaptElement(parentElement
, element
);
2036 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2037 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2038 addAndAdaptElement(parentElement
, element
);
2042 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2043 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2044 addAndAdaptElement(parentElement
, element
);
2048 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2049 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2050 addAndAdaptElement(parentElement
, element
);
2054 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2055 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2056 addAndAdaptElement(parentElement
, element
);
2060 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2061 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2062 addAndAdaptElement(parentElement
, element
);
2066 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2067 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2068 addAndAdaptElement(parentElement
, element
);
2072 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2073 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2074 addAndAdaptElement(parentElement
, element
);
2078 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2079 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2080 addAndAdaptElement(parentElement
, element
);
2084 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2085 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2086 addAndAdaptElement(parentElement
, element
);
2090 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2091 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2092 addAndAdaptElement(parentElement
, element
);
2096 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2097 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2098 addAndAdaptElement(parentElement
, element
);
2102 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2103 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2104 addAndAdaptElement(parentElement
, element
);
2108 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2109 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2110 addAndAdaptElement(parentElement
, element
);
2114 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2115 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2116 addAndAdaptElement(parentElement
, element
);
2120 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2121 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2122 addAndAdaptElement(parentElement
, mediaDetailElement
);
2123 return mediaDetailElement
;
2126 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2127 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2128 addAndAdaptElement(parentElement
, element
);
2132 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2133 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2134 addAndAdaptElement(parentElement
, element
);
2139 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2140 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2141 addAndAdaptElement(parentElement
, element
);
2145 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2146 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2147 addAndAdaptElement(parentElement
, element
);
2151 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2152 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2153 addAndAdaptElement(parentElement
, element
);
2157 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2158 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2159 addAndAdaptElement(parentElement
, element
);
2163 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2164 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2165 addAndAdaptElement(parentElement
, element
);
2169 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2170 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2171 addAndAdaptElement(parentElement
, element
);
2176 * @param parentElement
2179 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2181 parentElement
.addElement(element
);
2184 //--------EntityCollectionSection----------
2185 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2186 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2187 addAndAdaptSection(parentElement
, section
);
2191 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2192 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2193 addAndAdaptSection(parentElement
, section
);
2197 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2198 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2199 addAndAdaptSection(parentElement
, section
);
2203 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2204 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2205 addAndAdaptSection(parentElement
, section
);
2209 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2210 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2211 addAndAdaptSection(parentElement
, section
);
2215 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2216 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2217 addAndAdaptSection(parentElement
, section
);
2221 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2222 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2223 addAndAdaptSection(parentElement
, section
);
2227 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2228 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2229 addAndAdaptSection(parentElement
, section
);
2233 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2234 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2235 addAndAdaptSection(parentElement
, section
);
2239 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2240 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2241 addAndAdaptSection(parentElement
, section
);
2245 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2246 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2247 addAndAdaptSection(parentElement
, section
);
2251 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2252 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2253 addAndAdaptSection(parentElement
, section
);
2257 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2258 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2259 addAndAdaptSection(parentElement
, section
);
2263 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2264 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2265 addAndAdaptSection(parentElement
, section
);
2269 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2270 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2271 addAndAdaptSection(parentElement
, section
);
2275 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2276 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2277 addAndAdaptSection(parentElement
, section
);
2281 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2282 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2283 addAndAdaptSection(parentElement
, section
);
2287 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2288 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2289 addAndAdaptSection(parentElement
, section
);
2293 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2294 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2295 addAndAdaptSection(parentElement
, section
);
2299 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2300 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2301 addAndAdaptSection(parentElement
, section
);
2305 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2306 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2307 addAndAdaptSection(parentElement
, section
);
2311 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2312 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2313 addAndAdaptSection(parentElement
, section
);
2317 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2318 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2319 addAndAdaptSection(parentElement
, section
);
2323 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2324 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2325 addAndAdaptSection(parentElement
, section
);
2329 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2330 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2331 addAndAdaptSection(parentElement
, section
);
2335 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2336 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2337 addAndAdaptSection(parentElement
, section
);
2341 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2342 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2343 addAndAdaptSection(parentElement
, section
);
2347 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2348 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2349 addAndAdaptSection(parentElement
, section
);
2353 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2354 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2355 addAndAdaptSection(parentElement
, section
);
2359 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2360 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2361 addAndAdaptSection(parentElement
, section
);
2365 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2366 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2367 addAndAdaptSection(parentElement
, section
);
2371 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2372 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2373 addAndAdaptSection(parentElement
, section
);
2377 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2378 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2379 addAndAdaptSection(parentElement
, section
);
2383 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2384 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
2385 addAndAdaptSection(parentElement
, section
);
2389 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2390 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2391 addAndAdaptSection(parentElement
, section
);
2395 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2396 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2397 addAndAdaptSection(parentElement
, section
);
2401 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2402 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2403 addAndAdaptSection(parentElement
, section
);
2407 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2408 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2409 addAndAdaptSection(parentElement
, section
);
2413 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2414 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2415 addAndAdaptSection(parentElement
, section
);
2421 * createEntityCollectionElement
2424 * @param removeListener
2425 * a {@link org.eclipse.swt.events.SelectionListener} object.
2428 * @param parentElement
2430 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
2432 * @param versionableEntity
2433 * a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
2435 * @param backgroundColor
2436 * a {@link org.eclipse.swt.graphics.Color} object.
2438 * {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
2441 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2442 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2443 AbstractEntityCollectionElement element
= null;
2445 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2447 if (entity
instanceof Annotation
) {
2448 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2449 } else if (entity
instanceof Person
) {
2450 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2451 } else if (entity
instanceof Credit
) {
2452 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2453 } else if (entity
instanceof Extension
) {
2454 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2455 } else if (entity
instanceof Marker
) {
2456 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2457 } else if (entity
instanceof Media
) {
2458 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2459 } else if (entity
instanceof MediaRepresentation
) {
2460 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2462 } else if (entity
instanceof ImageFile
) {
2463 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2464 } else if (entity
instanceof MediaRepresentationPart
) {
2465 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2466 removeListener
, style
);
2467 } else if (entity
instanceof NomenclaturalStatus
) {
2468 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2470 } else if (entity
instanceof Rights
) {
2471 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2472 } else if (entity
instanceof DescriptionElementSource
) {
2473 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2474 removeListener
, style
);
2475 } else if (entity
instanceof IdentifiableSource
) {
2476 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2478 } else if (entity
instanceof DefinedTerm
) {
2479 switch(((DefinedTerm
)entity
).getTermType()) {
2481 element
= new ScopeElement(this,
2483 (DefinedTerm
) entity
,
2488 element
= new ModifierElement(this,
2490 (DefinedTerm
) entity
,
2495 //FIXME : Actually we should through an exception here
2500 } else if (entity
instanceof Reference
) {
2501 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2502 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2505 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2507 } else if (entity
instanceof NameTypeDesignation
) {
2508 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2510 } else if (entity
instanceof NameRelationship
) {
2511 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2513 } else if (entity
instanceof SynonymRelationship
) {
2514 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2516 } else if (entity
instanceof SpecimenTypeDesignation
) {
2517 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2518 removeListener
, style
);
2519 } else if (entity
instanceof StateData
) {
2520 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2521 } else if (entity
instanceof StatisticalMeasurementValue
) {
2522 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2523 removeListener
, style
);
2524 } else if (entity
instanceof DerivedUnit
) {
2525 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2526 case LivingSpecimen
:
2527 case PreservedSpecimen
:
2529 element
= new SpecimenCollectionDetailElement(this,
2531 (DerivedUnit
) entity
,
2536 element
= new DerivedUnitElement(this,
2538 (DerivedUnit
) entity
,
2543 } else if (entity
instanceof NamedArea
) {
2544 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2545 } else if (entity
instanceof DeterminationEvent
) {
2546 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2547 } else if (entity
instanceof User
) {
2548 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2549 } else if (entity
instanceof GrantedAuthority
) {
2550 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2551 removeListener
, style
);
2552 } else if (entity
instanceof Group
) {
2553 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2554 } else if (entity
instanceof Taxon
) {
2555 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2556 } else if (entity
instanceof DescriptionElementBase
) {
2557 // this is the special case for protologs, maybe we can do this
2558 // differently when API improves
2559 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2560 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2561 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2563 } else if (entity
instanceof Identifier
) {
2564 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2567 if (element
== null) {
2568 MessagingUtils
.messageDialog("No element for entity", this,
2569 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2574 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2575 element
.setPersistentBackground(backgroundColor
);
2578 parentElement
.addElement(element
);
2586 * Creates a selection element for the given type T.
2589 * <strong>Selection elements not handled by this method:</strong>
2591 * <li>{@link TaxonNodeSelectionElement} see
2592 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2594 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2595 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2601 * a {@link Class} object of the type that you want the selection
2603 * @param parentElement
2604 * a {@link ICdmFormElement} object.
2605 * @param labelString
2606 * a {@link String} object.
2607 * @param selectionType
2609 * a {@link ICdmBase} object.
2612 * @param conversation
2613 * a {@link ConversationHolder} object.
2614 * @return a {@link EntitySelectionElement} object.
2616 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2617 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2619 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2620 labelString
, selection
, mode
, style
);
2622 parentElement
.addElement(element
);
2626 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2627 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2628 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2629 labelString
, selection
, mode
, style
);
2631 parentElement
.addElement(element
);
2635 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2636 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2637 int mode
, int style
) {
2638 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2639 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2641 parentElement
.addElement(element
);
2645 /** {@inheritDoc} */
2646 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2647 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2648 adapt(labelElement
);
2649 parentElement
.addElement(labelElement
);
2650 return labelElement
;
2653 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2654 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2655 label
.setText(labelText
+" (yyyy-MM-dd)");
2656 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2657 dateElement
.initController(this, formElement
);
2663 * Getter for the field <code>selectionProvider</code>.
2666 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2668 public ISelectionProvider
getSelectionProvider() {
2669 return selectionProvider
;
2674 * createDetailedDescriptionDetailElement
2677 * @param parentElement
2678 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2682 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2687 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2690 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2691 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2692 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2694 if (entity
instanceof CategoricalData
) {
2695 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2696 (CategoricalData
) entity
, style
);
2697 } else if (entity
instanceof CommonTaxonName
) {
2698 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2700 } else if (entity
instanceof Distribution
) {
2701 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2703 } else if (entity
instanceof IndividualsAssociation
) {
2704 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2705 (IndividualsAssociation
) entity
, style
);
2706 } else if (entity
instanceof QuantitativeData
) {
2707 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2708 (QuantitativeData
) entity
, style
);
2709 } else if (entity
instanceof TaxonInteraction
) {
2710 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2711 (TaxonInteraction
) entity
, style
);
2712 } else if (entity
instanceof TextData
) {
2713 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2715 throw new IllegalStateException("There is no interface for the given description element");
2717 adapt(detailedDescriptionElement
);
2718 parentElement
.addElement(detailedDescriptionElement
);
2719 return detailedDescriptionElement
;
2724 * Creates a styled text as a part of the form.
2729 * the text initial value
2732 * @return the text widget
2734 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2735 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2736 if (value
!= null) {
2737 text
.setText(value
);
2739 text
.setForeground(getColors().getForeground());
2740 text
.setBackground(getColors().getBackground());
2741 // text.addFocusListener(visibilityHandler);
2745 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2746 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2747 addAndAdaptSection(parentElement
, section
);