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
.association
.TaxonAssociationDetailElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailElement
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDeterminationHistoryDetailSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
310 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
314 * CdmFormFactory class.
318 * @created Feb 24, 2010
321 public class CdmFormFactory
extends FormToolkit
{
323 private BoldFontHolder2 boldFontHolder2
;
324 private MouseListener selectionMouseHandler
;
325 private FocusListener selectionFocusHandler
;
327 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
329 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
331 private final int orientation
= Window
.getDefaultOrientation();
332 private ISelectionProvider selectionProvider
;
334 /** Constant <code>EMPTY_SELECTION</code> */
335 public static ISelection EMPTY_SELECTION
= new ISelection() {
337 public boolean isEmpty() {
348 private class SelectionMouseHandler
extends MouseAdapter
{
350 public void mouseDown(MouseEvent e
) {
351 notifySelectionListeners(e
);
361 private class SelectionFocusHandler
extends FocusAdapter
{
363 public void focusGained(FocusEvent e
) {
364 notifySelectionListeners(e
);
368 private void notifySelectionListeners(TypedEvent e
) {
369 Event event
= new Event();
370 event
.widget
= e
.widget
;
371 SelectionEvent selectionEvent
= new SelectionEvent(event
);
373 for (SelectionListener listener
: selectionListenerList
) {
374 listener
.widgetSelected(selectionEvent
);
380 * Constructor for CdmFormFactory.
384 * a {@link org.eclipse.swt.widgets.Display} object.
385 * @param selectionProvider
386 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
388 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
390 this.selectionProvider
= selectionProvider
;
396 * Constructor for CdmFormFactory.
400 * a {@link org.eclipse.swt.widgets.Display} object.
402 public CdmFormFactory(Display display
) {
410 private void init() {
411 boldFontHolder2
= new BoldFontHolder2();
412 selectionMouseHandler
= new SelectionMouseHandler();
413 selectionFocusHandler
= new SelectionFocusHandler();
417 * Creates an instance initialized with the correct selectionProvider
419 * Make sure to remove the instance when the entityComposite disposes via
420 * destroySelectionArbitrator(..)
422 * @param entityElement
423 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
425 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
428 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
429 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
430 selectionArbitrator
.addSelectionProvider(selectionProvider
);
431 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
432 addSelectionListener(selectionArbitrator
);
433 return selectionArbitrator
;
438 * destroySelectionArbitrator
441 * @param selectionArbitrator
443 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
446 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
447 removeSelectionListener(selectionArbitrator
);
448 if (selectionProvider
!= null) {
449 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
451 MessagingUtils
.error(this.getClass(),
452 "Tried to destroy a selection listener from this factories listeners but was null", null);
458 * Adapts the {@link AbstractCdmFormElement}:<br>
459 * - sets the {@link IPropertyChangeListener}s handled by this class
464 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
467 public void adapt(ICdmFormElement formElement
) {
468 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
473 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
475 control
.addFocusListener(selectionFocusHandler
);
477 super.adapt(control
, trackFocus
, trackKeyboard
);
482 public void adapt(Composite composite
) {
483 composite
.addMouseListener(selectionMouseHandler
);
484 super.adapt(composite
);
493 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
496 public void destroyElement(ICdmFormElement formElement
) {
497 // return if element was not initialized
498 if (formElement
== null) {
501 // destroy selection arbitrator, if any
502 if (formElement
instanceof ISelectableElement
) {
503 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
505 // remove this element form its parents list of elements
506 // ICdmFormElement parentElement = formElement.getParentElement();
507 // if(parentElement != null){
508 // parentElement.removeElement(formElement);
510 // call destroy on child elements recursively
511 for (ICdmFormElement childElement
: formElement
.getElements()) {
512 destroyElement(childElement
);
514 // dispose of the controls
515 for (Control control
: formElement
.getControls()) {
516 // we added the layoutComposite of the parental element as the
517 // layout composite to this formElement
518 // but we do not want to destroy it.
519 if (control
.equals(formElement
.getLayoutComposite())) {
534 * a {@link org.eclipse.swt.widgets.Composite} object.
535 * @return a {@link org.eclipse.swt.widgets.Label} object.
537 public Label
createEmptyCell(Composite parent
) {
538 return this.createLabel(parent
, null);
543 * createMultiLanguageTextElement
546 * @param parentElement
547 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
550 * a {@link java.lang.String} object.
551 * @param multilanguageText
552 * a {@link java.util.Map} object.
558 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
561 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
562 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
563 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
564 multilanguageText
, textHeight
, style
);
566 parentElement
.addElement(element
);
570 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
571 KeyStatement keyStatement
, int textHeight
, int style
) {
572 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
575 parentElement
.addElement(element
);
580 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
582 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
583 * @param parentElement the parent container
584 * @param labelString the label name
585 * @param initialObject the object from which the <code>toString()</code> method is called
586 * @param style {@link SWT} style constant
587 * @return the created textfield with label
589 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
590 Object initialObject
, int style
) {
591 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
596 * createTextWithLabelElement
599 * @param parentElement
600 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
603 * a {@link java.lang.String} object.
605 * a {@link java.lang.String} object.
608 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
611 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
612 String initialText
, int style
) {
613 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
617 * createTextWithLabelElement
620 * @param parentElement
621 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
624 * a {@link java.lang.String} object.
626 * a {@link java.lang.String} object.
627 * @param textLimit maximal number of characters allowed
630 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
633 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
634 String initialText
, Integer textLimit
, int style
) {
635 if(initialText
==null){
639 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
642 parentElement
.addElement(element
);
646 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
647 int textHeight
, int style
) {
648 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
650 parentElement
.addElement(element
);
654 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
655 URI initialUri
, int style
) {
656 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
658 parentElement
.addElement(element
);
669 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
670 IOpenUrlEnabled openUrlEnabled
, int style
) {
671 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
674 parentElement
.addElement(element
);
680 * @param parentElement
682 * @param conversationEnabled
687 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
688 ConversationHolder conversation
, User user
, int style
) {
689 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
691 parentElement
.addElement(element
);
697 * createIntegerTextWithLabelElement
700 * @param parentElement
701 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
704 * a {@link java.lang.String} object.
705 * @param initialInteger
706 * a {@link java.lang.Integer} object.
710 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
713 public NumberWithLabelElement
createNumberTextWithLabelElement(
714 ICdmFormElement parentElement
, String labelString
,
715 Number initialNumber
, int style
) {
716 NumberWithLabelElement element
= new NumberWithLabelElement(this,
717 parentElement
, labelString
, initialNumber
, style
);
719 parentElement
.addElement(element
);
723 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
724 String labelString
, LanguageString languageString
, int style
) {
725 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
728 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
729 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
730 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
731 languageString
, height
, isMultiLine
, style
);
733 parentElement
.addElement(element
);
739 * createKeyValueViewerElement
742 * @param parentElement
743 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
746 * a {@link java.lang.String} object.
747 * @param valueHeading
748 * a {@link java.lang.String} object.
750 * a {@link java.util.Map} object.
751 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
754 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
755 String valueHeading
, Map
<Object
, Object
> map
) {
756 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
758 parentElement
.addElement(element
);
764 * createTermComboElement
767 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
768 * @param termComboType
770 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
772 * @param parentElement
773 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
776 * a {@link java.lang.String} object.
778 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
782 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
786 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
787 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
788 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
791 parentElement
.addElement(element
);
797 * createTermComboElement
800 * @param termComboType
802 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
804 * @param parentElement
805 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
808 * a {@link java.lang.String} object.
810 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
814 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
818 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
820 ICdmFormElement parentElement
,
824 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
826 parentElement
.addElement(element
);
832 * createTermComboElement
835 * @param termComboType
837 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
839 * @param parentElement
840 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
843 * a {@link java.lang.String} object.
845 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
849 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
853 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
854 TermVocabulary
<?
> termVocabulary
,
855 ICdmFormElement parentElement
,
859 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, style
);
861 parentElement
.addElement(element
);
867 * createEnumComboElement
870 * @param enumComboType
872 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
874 * @param parentElement
875 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
879 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
882 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
883 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
885 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
887 parentElement
.addElement(element
);
893 * createBrowserElement
897 * a {@link java.net.URI} object.
900 * @param parentElement
901 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
903 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
906 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
907 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
909 parentElement
.addElement(element
);
918 * @param parentElement
919 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
922 * a {@link java.net.URI} object.
925 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
927 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
928 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
930 parentElement
.addElement(element
);
936 * createTextActionElement
940 * a {@link java.lang.String} object.
942 * a {@link java.lang.String} object.
945 * @param parentElement
946 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
949 * a {@link java.lang.String} object.
950 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
953 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
954 String buttonLabel
, String initialText
, int style
) {
955 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
958 parentElement
.addElement(element
);
967 * @param parentElement
968 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
971 * a {@link java.lang.String} object.
972 * @param initialState
976 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
979 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
980 if(initialState
==null){
981 initialState
= Boolean
.FALSE
;
983 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
985 parentElement
.addElement(element
);
990 * Creates a section as a part of the form.
992 * @return the section widget
995 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
998 public Section
adapt(AbstractFormSection section
) {
999 section
.setMenu(section
.getLayoutComposite().getMenu());
1000 adapt(section
, true, true);
1002 // handle focus and property change events for cdm use
1003 section
.addFocusListener(selectionFocusHandler
);
1004 section
.setPropertyChangeListeners(propertyChangeListeners
);
1006 if (section
.getToggle() != null) {
1007 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1008 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1011 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1013 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1014 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1015 getColors().initializeSectionToolBarColors();
1016 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1017 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1019 // call setTitleBarForeground regardless as it also sets the label color
1020 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1024 private class BoldFontHolder2
{
1025 private Font normalFont
;
1027 private Font boldFont
;
1029 public BoldFontHolder2() {
1032 public Font
getBoldFont(Font font
) {
1033 createBoldFont(font
);
1037 private void createBoldFont(Font font
) {
1038 if (normalFont
== null || !normalFont
.equals(font
)) {
1042 if (boldFont
== null) {
1043 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1047 public void dispose() {
1048 if (boldFont
!= null) {
1049 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1057 * createToggleableTextField
1060 * @param parentElement
1061 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1063 * @param labelString
1064 * a {@link java.lang.String} object.
1065 * @param initialText
1066 * a {@link java.lang.String} object.
1067 * @param initialState
1071 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1074 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1075 String initialText
, boolean initialState
, int style
) {
1076 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1077 initialState
, style
| orientation
);
1079 parentElement
.addElement(element
);
1085 * createTimePeriodElement
1088 * @param parentElement
1089 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1091 * @param labelString
1092 * a {@link java.lang.String} object.
1094 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1097 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1100 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1101 TimePeriod timePeriod
, int style
) {
1102 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1104 parentElement
.addElement(element
);
1110 * createGatheringEventUnitElement
1113 * @param parentElement
1114 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1116 * @param labelString
1117 * a {@link java.lang.String} object.
1119 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1122 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1125 public GatheringEventUnitElement
createGatheringEventUnitElement(
1126 ICdmFormElement parentElement
,
1128 DerivedUnitFacade gatheringEvent
,
1129 MinMaxTextSection
.UnitType unitType
,
1131 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1138 parentElement
.addElement(element
);
1144 * createPointElement
1149 * @param parentElement
1150 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1153 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1154 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1156 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1157 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1159 parentElement
.addElement(element
);
1166 * @param conversationHolder
1168 * @param detailsViewer
1172 public EmptySection
createEmptySection(CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1173 EmptySection section
= new EmptySection(formFactory
, parentElement
, style
);
1174 parentElement
.addElement(section
);
1181 * createDateDetailSection
1184 * @param parentElement
1185 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1189 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1192 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1193 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1194 parentElement
.addElement(section
);
1201 * createDateDetailSection
1204 * @param parentElement
1205 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1209 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1212 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1213 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1214 parentElement
.addElement(section
);
1221 * createPartialElement
1224 * @param parentElement
1225 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1227 * @param labelString
1228 * a {@link java.lang.String} object.
1230 * a {@link org.joda.time.Partial} object.
1233 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1236 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1238 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1240 parentElement
.addElement(element
);
1246 * addSelectionListener
1250 * a {@link org.eclipse.swt.events.SelectionListener} object.
1252 public void addSelectionListener(SelectionListener listener
) {
1253 selectionListenerList
.add(listener
);
1258 * removeSelectionListener
1262 * a {@link org.eclipse.swt.events.SelectionListener} object.
1264 public void removeSelectionListener(SelectionListener listener
) {
1265 if (listener
== null) {
1266 MessagingUtils
.error(this.getClass(),
1267 "Tried to remove a selection listener from this factories listeners but was null", null);
1269 selectionListenerList
.remove(listener
);
1275 * addPropertyChangeListener
1279 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1282 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1283 if (propertyChangeListeners
.contains(listener
)) {
1286 propertyChangeListeners
.add(0, listener
);
1291 * removePropertyChangeListener
1295 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1298 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1299 propertyChangeListeners
.remove(listener
);
1303 * @return the propertyChangeListeners
1305 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1306 return propertyChangeListeners
;
1311 * createHorizontalSeparator
1314 * @param parentElement
1315 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1319 * @return a {@link org.eclipse.swt.widgets.Label} object.
1321 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1322 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1323 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1329 * createVersionElement
1332 * @param parentElement
1333 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1336 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1341 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1344 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1345 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1347 parentElement
.addElement(element
);
1352 * @param cdmBaseSection
1357 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1358 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1360 parentElement
.addElement(element
);
1366 * createVersionSection
1369 * @param parentElement
1370 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1375 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1378 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1379 VersionSection section
= new VersionSection(this, parentElement
, style
);
1380 parentElement
.addElement(section
);
1390 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1391 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1392 parentElement
.addElement(section
);
1399 * createEmptyElement
1402 * @param parentElement
1403 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1405 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1407 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1408 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1410 parentElement
.addElement(element
);
1416 * createHeadlineSection
1419 * @param parentElement
1420 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1423 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1426 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1427 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1428 parentElement
.addElement(section
);
1435 * createParsingMessageElement
1438 * @param parentElement
1439 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1441 * @param parserProblem
1442 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1447 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1450 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1451 ParserProblem parserProblem
, int style
) {
1452 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1454 parentElement
.addElement(element
);
1458 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1459 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1461 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1462 selectionProvider
, style
);
1464 parentElement
.addElement(section
);
1471 * @param definedTermClass
1472 * @param formElement
1476 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1477 AbstractCdmDetailSection parentElement
, int style
) {
1478 AbstractCdmDetailElement element
= null;
1480 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1481 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1482 } else if (definedTermClass
.equals(Feature
.class)) {
1483 element
= new FeatureDetailElement(this, parentElement
);
1485 element
= new DefinedTermDetailElement(this, parentElement
);
1489 parentElement
.addElement(element
);
1494 //--------DetailSections---------
1495 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1496 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1497 addAndAdaptSection(parentElement
, section
);
1501 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1502 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1503 addAndAdaptSection(parentElement
, section
);
1507 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1508 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1509 addAndAdaptSection(parentElement
, section
);
1513 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1514 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1515 addAndAdaptSection(parentElement
, section
);
1519 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1520 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1521 addAndAdaptSection(parentElement
, section
);
1525 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1526 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1527 addAndAdaptSection(parentElement
, section
);
1531 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1532 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1533 addAndAdaptSection(parentElement
, section
);
1537 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1538 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1539 addAndAdaptSection(parentElement
, section
);
1543 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1544 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1545 addAndAdaptSection(parentElement
, section
);
1549 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1550 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1551 addAndAdaptSection(parentElement
, section
);
1555 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1556 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1557 addAndAdaptSection(parentElement
, section
);
1561 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1562 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1563 addAndAdaptSection(parentElement
, section
);
1567 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1568 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1569 addAndAdaptSection(parentElement
, section
);
1573 public DerivedUnitFacadeDetailSection
createDerivedUnitFacadeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1574 DerivedUnitFacadeDetailSection section
= new DerivedUnitFacadeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1575 addAndAdaptSection(parentElement
, section
);
1579 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1580 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1581 addAndAdaptSection(parentElement
, section
);
1585 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1586 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1587 addAndAdaptSection(parentElement
, section
);
1591 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1592 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1593 addAndAdaptSection(parentElement
, section
);
1597 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1598 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1599 addAndAdaptSection(parentElement
, section
);
1603 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1604 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1605 addAndAdaptSection(parentElement
, section
);
1609 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1610 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1611 addAndAdaptSection(parentElement
, section
);
1615 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1616 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1617 addAndAdaptSection(parentElement
, section
);
1621 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1622 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1623 addAndAdaptSection(parentElement
, section
);
1627 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1628 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1629 addAndAdaptSection(parentElement
, section
);
1633 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1634 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1635 addAndAdaptSection(parentElement
, section
);
1639 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1640 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1641 addAndAdaptSection(parentElement
, section
);
1645 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1646 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1647 addAndAdaptSection(parentElement
, section
);
1651 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1652 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1653 addAndAdaptSection(parentElement
, section
);
1657 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1658 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1659 addAndAdaptSection(parentElement
, section
);
1663 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1664 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1665 addAndAdaptSection(parentElement
, section
);
1669 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1670 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1671 addAndAdaptSection(parentElement
, section
);
1675 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1676 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1677 addAndAdaptSection(parentElement
, section
);
1681 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1682 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1683 addAndAdaptSection(parentElement
, section
);
1687 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1688 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1689 addAndAdaptSection(parentElement
, section
);
1693 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1694 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1695 addAndAdaptSection(parentElement
, section
);
1699 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1700 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1701 addAndAdaptSection(parentElement
, section
);
1705 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1706 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1707 addAndAdaptSection(parentElement
, section
);
1711 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1712 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1713 addAndAdaptSection(parentElement
, section
);
1717 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1718 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1719 addAndAdaptSection(parentElement
, section
);
1723 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1724 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1725 addAndAdaptSection(parentElement
, section
);
1729 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1730 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1731 addAndAdaptSection(parentElement
, section
);
1735 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1736 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
1737 addAndAdaptSection(parentElement
, section
);
1741 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1742 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1743 addAndAdaptSection(parentElement
, section
);
1747 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1748 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1749 addAndAdaptSection(parentElement
, section
);
1753 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1754 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1755 addAndAdaptSection(parentElement
, section
);
1759 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1760 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1761 addAndAdaptSection(parentElement
, section
);
1765 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1766 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1767 addAndAdaptSection(parentElement
, section
);
1771 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1772 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1773 addAndAdaptSection(parentElement
, section
);
1777 public PreservedSpecimenDeterminationDetailSection
createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1778 PreservedSpecimenDeterminationDetailSection section
= new PreservedSpecimenDeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1779 addAndAdaptSection(parentElement
, section
);
1783 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1784 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1785 addAndAdaptSection(parentElement
, section
);
1789 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1790 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1791 addAndAdaptSection(parentElement
, section
);
1795 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1796 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1797 addAndAdaptSection(parentElement
, section
);
1801 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1802 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1803 addAndAdaptSection(parentElement
, section
);
1807 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1808 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1809 addAndAdaptSection(parentElement
, section
);
1813 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1814 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1815 addAndAdaptSection(parentElement
, section
);
1819 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1820 parentElement
.addElement(section
);
1824 //--------DetailElements------------
1826 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1827 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1828 addAndAdaptElement(parentElement
, element
);
1832 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1833 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1834 addAndAdaptElement(parentElement
, element
);
1838 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1839 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1840 addAndAdaptElement(parentElement
, element
);
1844 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1845 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1846 addAndAdaptElement(parentElement
, element
);
1850 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1851 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1852 addAndAdaptElement(parentElement
, element
);
1856 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1857 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1858 addAndAdaptElement(parentElement
, element
);
1862 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1863 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1864 addAndAdaptElement(parentElement
, element
);
1868 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1869 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1870 addAndAdaptElement(parentElement
, element
);
1874 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1875 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1876 addAndAdaptElement(parentElement
, element
);
1880 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1881 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1882 addAndAdaptElement(parentElement
, element
);
1886 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1887 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1888 addAndAdaptElement(parentElement
, element
);
1892 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1893 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1894 addAndAdaptElement(parentElement
, element
);
1898 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1899 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1900 addAndAdaptElement(parentElement
, element
);
1904 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1905 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1906 addAndAdaptElement(parentElement
, element
);
1910 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1911 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1912 addAndAdaptElement(parentElement
, element
);
1916 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1917 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1918 addAndAdaptElement(parentElement
, element
);
1922 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1923 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1924 addAndAdaptElement(parentElement
, element
);
1928 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1929 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1930 addAndAdaptElement(parentElement
, element
);
1934 public DerivedUnitFacadeDetailElement
createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement
){
1935 DerivedUnitFacadeDetailElement element
= new DerivedUnitFacadeDetailElement(this, parentElement
);
1936 addAndAdaptElement(parentElement
, element
);
1940 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1941 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1942 addAndAdaptElement(parentElement
, element
);
1946 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1947 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1948 addAndAdaptElement(parentElement
, element
);
1952 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1953 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1954 addAndAdaptElement(parentElement
, element
);
1958 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1959 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1960 addAndAdaptElement(parentElement
, element
);
1964 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1965 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1966 addAndAdaptElement(parentElement
, element
);
1970 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1971 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1972 addAndAdaptElement(parentElement
, element
);
1976 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1977 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1978 addAndAdaptElement(parentElement
, element
);
1982 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1983 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1984 addAndAdaptElement(parentElement
, element
);
1988 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1989 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
1990 addAndAdaptElement(parentElement
, element
);
1994 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1995 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
1996 addAndAdaptElement(parentElement
, element
);
2001 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2002 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2003 addAndAdaptElement(parentElement
, element
);
2007 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2008 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2009 addAndAdaptElement(parentElement
, element
);
2013 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2014 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2015 addAndAdaptElement(parentElement
, element
);
2019 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2020 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2021 addAndAdaptElement(parentElement
, element
);
2025 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2026 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2027 addAndAdaptElement(parentElement
, element
);
2031 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2032 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2033 addAndAdaptElement(parentElement
, element
);
2037 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2038 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2039 addAndAdaptElement(parentElement
, element
);
2043 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2044 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2045 addAndAdaptElement(parentElement
, element
);
2049 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2050 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2051 addAndAdaptElement(parentElement
, element
);
2055 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2056 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2057 addAndAdaptElement(parentElement
, element
);
2061 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2062 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2063 addAndAdaptElement(parentElement
, element
);
2067 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2068 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2069 addAndAdaptElement(parentElement
, element
);
2073 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2074 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2075 addAndAdaptElement(parentElement
, element
);
2079 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2080 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2081 addAndAdaptElement(parentElement
, element
);
2085 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2086 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2087 addAndAdaptElement(parentElement
, element
);
2091 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2092 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2093 addAndAdaptElement(parentElement
, mediaDetailElement
);
2094 return mediaDetailElement
;
2097 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2098 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2099 addAndAdaptElement(parentElement
, element
);
2103 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2104 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2105 addAndAdaptElement(parentElement
, element
);
2110 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2111 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2112 addAndAdaptElement(parentElement
, element
);
2116 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2117 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2118 addAndAdaptElement(parentElement
, element
);
2122 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2123 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2124 addAndAdaptElement(parentElement
, element
);
2128 public PreservedSpecimenDeterminationDetailElement
createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement
) {
2129 PreservedSpecimenDeterminationDetailElement element
= new PreservedSpecimenDeterminationDetailElement(this, parentElement
);
2130 addAndAdaptElement(parentElement
, element
);
2134 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2135 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2136 addAndAdaptElement(parentElement
, element
);
2140 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2141 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2142 addAndAdaptElement(parentElement
, element
);
2147 * @param parentElement
2150 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2152 parentElement
.addElement(element
);
2155 //--------EntityCollectionSection----------
2156 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2157 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
2158 addAndAdaptSection(parentElement
, section
);
2162 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2163 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2164 addAndAdaptSection(parentElement
, section
);
2168 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2169 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2170 addAndAdaptSection(parentElement
, section
);
2174 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2175 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2176 addAndAdaptSection(parentElement
, section
);
2180 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2181 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2182 addAndAdaptSection(parentElement
, section
);
2186 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2187 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2188 addAndAdaptSection(parentElement
, section
);
2192 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2193 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2194 addAndAdaptSection(parentElement
, section
);
2198 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2199 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2200 addAndAdaptSection(parentElement
, section
);
2204 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2205 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2206 addAndAdaptSection(parentElement
, section
);
2210 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2211 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2212 addAndAdaptSection(parentElement
, section
);
2216 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2217 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2218 addAndAdaptSection(parentElement
, section
);
2222 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2223 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2224 addAndAdaptSection(parentElement
, section
);
2228 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2229 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2230 addAndAdaptSection(parentElement
, section
);
2234 public SynonymRelationshipDetailSection
createSynonymRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2235 SynonymRelationshipDetailSection section
= new SynonymRelationshipDetailSection(this, conversation
, parentElement
, style
);
2236 addAndAdaptSection(parentElement
, section
);
2240 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2241 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2242 addAndAdaptSection(parentElement
, section
);
2246 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2247 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2248 addAndAdaptSection(parentElement
, section
);
2252 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2253 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2254 addAndAdaptSection(parentElement
, section
);
2258 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2259 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2260 addAndAdaptSection(parentElement
, section
);
2264 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2265 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2266 addAndAdaptSection(parentElement
, section
);
2270 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2271 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2272 addAndAdaptSection(parentElement
, section
);
2276 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2277 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2278 addAndAdaptSection(parentElement
, section
);
2282 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2283 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2284 addAndAdaptSection(parentElement
, section
);
2288 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2289 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2290 addAndAdaptSection(parentElement
, section
);
2294 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2295 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2296 addAndAdaptSection(parentElement
, section
);
2300 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2301 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2302 addAndAdaptSection(parentElement
, section
);
2306 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2307 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2308 addAndAdaptSection(parentElement
, section
);
2312 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2313 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2314 addAndAdaptSection(parentElement
, section
);
2318 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2319 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2320 addAndAdaptSection(parentElement
, section
);
2324 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2325 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2326 addAndAdaptSection(parentElement
, section
);
2330 public PreservedSpecimenDeterminationHistoryDetailSection
createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2331 PreservedSpecimenDeterminationHistoryDetailSection section
= new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2332 addAndAdaptSection(parentElement
, section
);
2336 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2337 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2338 addAndAdaptSection(parentElement
, section
);
2342 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2343 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2344 addAndAdaptSection(parentElement
, section
);
2348 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2349 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2350 addAndAdaptSection(parentElement
, section
);
2354 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2355 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
2356 addAndAdaptSection(parentElement
, section
);
2360 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2361 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2362 addAndAdaptSection(parentElement
, section
);
2366 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2367 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2368 addAndAdaptSection(parentElement
, section
);
2372 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2373 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2374 addAndAdaptSection(parentElement
, section
);
2378 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2379 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2380 addAndAdaptSection(parentElement
, section
);
2384 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2385 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2386 addAndAdaptSection(parentElement
, section
);
2392 * createEntityCollectionElement
2395 * @param removeListener
2396 * a {@link org.eclipse.swt.events.SelectionListener} object.
2399 * @param parentElement
2401 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
2403 * @param versionableEntity
2404 * a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
2406 * @param backgroundColor
2407 * a {@link org.eclipse.swt.graphics.Color} object.
2409 * {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
2412 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2413 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2414 AbstractEntityCollectionElement element
= null;
2416 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2418 if (entity
instanceof Annotation
) {
2419 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2420 } else if (entity
instanceof Person
) {
2421 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2422 } else if (entity
instanceof Credit
) {
2423 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2424 } else if (entity
instanceof Extension
) {
2425 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2426 } else if (entity
instanceof Marker
) {
2427 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2428 } else if (entity
instanceof Media
) {
2429 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2430 } else if (entity
instanceof MediaRepresentation
) {
2431 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2433 } else if (entity
instanceof ImageFile
) {
2434 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2435 } else if (entity
instanceof MediaRepresentationPart
) {
2436 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2437 removeListener
, style
);
2438 } else if (entity
instanceof NomenclaturalStatus
) {
2439 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2441 } else if (entity
instanceof Rights
) {
2442 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2443 } else if (entity
instanceof DescriptionElementSource
) {
2444 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2445 removeListener
, style
);
2446 } else if (entity
instanceof IdentifiableSource
) {
2447 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2449 } else if (entity
instanceof DefinedTerm
) {
2450 switch(((DefinedTerm
)entity
).getTermType()) {
2452 element
= new ScopeElement(this,
2454 (DefinedTerm
) entity
,
2459 element
= new ModifierElement(this,
2461 (DefinedTerm
) entity
,
2466 //FIXME : Actually we should through an exception here
2471 } else if (entity
instanceof Reference
) {
2472 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2473 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2476 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2478 } else if (entity
instanceof NameTypeDesignation
) {
2479 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2481 } else if (entity
instanceof NameRelationship
) {
2482 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2484 } else if (entity
instanceof SynonymRelationship
) {
2485 element
= new SynonymRelationshipDetailElement(this, parentElement
, (SynonymRelationship
) entity
, removeListener
,
2487 } else if (entity
instanceof SpecimenTypeDesignation
) {
2488 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2489 removeListener
, style
);
2490 } else if (entity
instanceof StateData
) {
2491 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2492 } else if (entity
instanceof StatisticalMeasurementValue
) {
2493 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2494 removeListener
, style
);
2495 } else if (entity
instanceof DerivedUnit
) {
2496 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2497 case LivingSpecimen
:
2498 case PreservedSpecimen
:
2500 element
= new SpecimenCollectionDetailElement(this,
2502 (DerivedUnit
) entity
,
2507 element
= new DerivedUnitElement(this,
2509 (DerivedUnit
) entity
,
2514 } else if (entity
instanceof NamedArea
) {
2515 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2516 } else if (entity
instanceof DeterminationEvent
) {
2517 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2518 } else if (entity
instanceof User
) {
2519 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2520 } else if (entity
instanceof GrantedAuthority
) {
2521 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2522 removeListener
, style
);
2523 } else if (entity
instanceof Group
) {
2524 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2525 } else if (entity
instanceof Taxon
) {
2526 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2527 } else if (entity
instanceof DescriptionElementBase
) {
2528 // this is the special case for protologs, maybe we can do this
2529 // differently when API improves
2530 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2531 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2532 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2534 } else if (entity
instanceof Identifier
) {
2535 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2538 if (element
== null) {
2539 MessagingUtils
.messageDialog("No element for entity", this,
2540 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2545 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2546 element
.setPersistentBackground(backgroundColor
);
2549 parentElement
.addElement(element
);
2557 * Creates a selection element for the given type T.
2560 * <strong>Selection elements not handled by this method:</strong>
2562 * <li>{@link TaxonNodeSelectionElement} see
2563 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2565 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2566 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2572 * a {@link Class} object of the type that you want the selection
2574 * @param parentElement
2575 * a {@link ICdmFormElement} object.
2576 * @param labelString
2577 * a {@link String} object.
2578 * @param selectionType
2580 * a {@link ICdmBase} object.
2583 * @param conversation
2584 * a {@link ConversationHolder} object.
2585 * @return a {@link EntitySelectionElement} object.
2587 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2588 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2590 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2591 labelString
, selection
, mode
, style
);
2593 parentElement
.addElement(element
);
2597 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2598 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2599 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2600 labelString
, selection
, mode
, style
);
2602 parentElement
.addElement(element
);
2606 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2607 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2608 int mode
, int style
) {
2609 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2610 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2612 parentElement
.addElement(element
);
2616 /** {@inheritDoc} */
2617 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2618 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2619 adapt(labelElement
);
2620 parentElement
.addElement(labelElement
);
2621 return labelElement
;
2624 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
){
2625 Label label
= new Label(formElement
.getLayoutComposite(), style
);
2626 label
.setText(labelText
+" (yyyy-MM-dd)");
2627 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, style
);
2628 dateElement
.initController(this, formElement
);
2634 * Getter for the field <code>selectionProvider</code>.
2637 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2639 public ISelectionProvider
getSelectionProvider() {
2640 return selectionProvider
;
2645 * createDetailedDescriptionDetailElement
2648 * @param parentElement
2649 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2653 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2658 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2661 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2662 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2663 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2665 if (entity
instanceof CategoricalData
) {
2666 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2667 (CategoricalData
) entity
, style
);
2668 } else if (entity
instanceof CommonTaxonName
) {
2669 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2671 } else if (entity
instanceof Distribution
) {
2672 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2674 } else if (entity
instanceof IndividualsAssociation
) {
2675 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2676 (IndividualsAssociation
) entity
, style
);
2677 } else if (entity
instanceof QuantitativeData
) {
2678 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2679 (QuantitativeData
) entity
, style
);
2680 } else if (entity
instanceof TaxonInteraction
) {
2681 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2682 (TaxonInteraction
) entity
, style
);
2683 } else if (entity
instanceof TextData
) {
2684 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2686 throw new IllegalStateException("There is no interface for the given description element");
2688 adapt(detailedDescriptionElement
);
2689 parentElement
.addElement(detailedDescriptionElement
);
2690 return detailedDescriptionElement
;
2695 * Creates a styled text as a part of the form.
2700 * the text initial value
2703 * @return the text widget
2705 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2706 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2707 if (value
!= null) {
2708 text
.setText(value
);
2710 text
.setForeground(getColors().getForeground());
2711 text
.setBackground(getColors().getBackground());
2712 // text.addFocusListener(visibilityHandler);
2716 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
2717 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2718 addAndAdaptSection(parentElement
, section
);