4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
7 import java
.util
.ArrayList
;
8 import java
.util
.Comparator
;
9 import java
.util
.HashSet
;
10 import java
.util
.List
;
14 import javax
.inject
.Inject
;
16 import org
.eclipse
.e4
.core
.contexts
.IEclipseContext
;
17 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
18 import org
.eclipse
.jface
.viewers
.ISelection
;
19 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
20 import org
.eclipse
.jface
.window
.Window
;
21 //import org.eclipse.nebula.widgets.richtext.RichTextEditor;
22 import org
.eclipse
.swt
.SWT
;
23 import org
.eclipse
.swt
.custom
.StyledText
;
24 import org
.eclipse
.swt
.events
.FocusAdapter
;
25 import org
.eclipse
.swt
.events
.FocusEvent
;
26 import org
.eclipse
.swt
.events
.FocusListener
;
27 import org
.eclipse
.swt
.events
.MouseAdapter
;
28 import org
.eclipse
.swt
.events
.MouseEvent
;
29 import org
.eclipse
.swt
.events
.MouseListener
;
30 import org
.eclipse
.swt
.events
.SelectionEvent
;
31 import org
.eclipse
.swt
.events
.SelectionListener
;
32 import org
.eclipse
.swt
.events
.TypedEvent
;
33 import org
.eclipse
.swt
.graphics
.Color
;
34 import org
.eclipse
.swt
.graphics
.Font
;
35 import org
.eclipse
.swt
.widgets
.Composite
;
36 import org
.eclipse
.swt
.widgets
.Control
;
37 import org
.eclipse
.swt
.widgets
.Display
;
38 import org
.eclipse
.swt
.widgets
.Event
;
39 import org
.eclipse
.swt
.widgets
.Label
;
40 import org
.eclipse
.ui
.forms
.IFormColors
;
41 import org
.eclipse
.ui
.forms
.events
.ExpansionAdapter
;
42 import org
.eclipse
.ui
.forms
.events
.ExpansionEvent
;
43 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
44 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
45 import org
.eclipse
.ui
.forms
.widgets
.Section
;
46 import org
.eclipse
.ui
.forms
.widgets
.TableWrapData
;
47 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
48 import org
.joda
.time
.DateTime
;
49 import org
.joda
.time
.Partial
;
50 import org
.springframework
.security
.core
.GrantedAuthority
;
52 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
53 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
54 import eu
.etaxonomy
.cdm
.common
.DOI
;
55 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
56 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
57 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
58 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
59 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
60 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
61 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
62 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
63 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
64 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
65 import eu
.etaxonomy
.cdm
.model
.common
.LSID
;
66 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
67 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
68 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
69 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
70 import eu
.etaxonomy
.cdm
.model
.common
.VerbatimTimePeriod
;
71 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
72 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
73 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
74 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
75 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
76 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
77 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
78 import eu
.etaxonomy
.cdm
.model
.description
.FeatureState
;
79 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
80 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
81 import eu
.etaxonomy
.cdm
.model
.description
.MeasurementUnit
;
82 import eu
.etaxonomy
.cdm
.model
.description
.PresenceAbsenceTerm
;
83 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
84 import eu
.etaxonomy
.cdm
.model
.description
.State
;
85 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
86 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasure
;
87 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
88 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
89 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
90 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
91 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
92 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
93 import eu
.etaxonomy
.cdm
.model
.media
.ExternalLink
;
94 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
95 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
96 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
97 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
98 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
99 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
100 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
101 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationshipType
;
102 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
103 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
104 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
105 import eu
.etaxonomy
.cdm
.model
.name
.TextualTypeDesignation
;
106 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
107 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
108 import eu
.etaxonomy
.cdm
.model
.permission
.GrantedAuthorityImpl
;
109 import eu
.etaxonomy
.cdm
.model
.permission
.Group
;
110 import eu
.etaxonomy
.cdm
.model
.permission
.User
;
111 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
112 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
113 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
114 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNodeAgentRelation
;
115 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationshipType
;
116 import eu
.etaxonomy
.cdm
.model
.term
.DefinedTerm
;
117 import eu
.etaxonomy
.cdm
.model
.term
.DefinedTermBase
;
118 import eu
.etaxonomy
.cdm
.model
.term
.IEnumTerm
;
119 import eu
.etaxonomy
.cdm
.model
.term
.Representation
;
120 import eu
.etaxonomy
.cdm
.model
.term
.TermBase
;
121 import eu
.etaxonomy
.cdm
.model
.term
.TermType
;
122 import eu
.etaxonomy
.cdm
.model
.term
.TermVocabulary
;
123 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
124 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
125 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
126 import eu
.etaxonomy
.taxeditor
.store
.StoreUtil
;
127 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
128 import eu
.etaxonomy
.taxeditor
.ui
.combo
.InverseTermWrapper
;
129 import eu
.etaxonomy
.taxeditor
.ui
.combo
.MisappliedRelationshipComboElement
;
130 import eu
.etaxonomy
.taxeditor
.ui
.combo
.NameRelationshipTypeCombo
;
131 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
133 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.CloneClassificationDetailElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
135 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
136 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
137 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
138 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionSection
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ExternalLinksElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ExternalLinksSection
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.CommonNameSourceElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDetailElement
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDetailSection
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureNodeDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureNodeDetailSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureTreeDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureTreeDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfCollectionElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfEntityCollectionSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfCollectionElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfEntityCollectionSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TextTypeDesignationElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreaDetailElement
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopePolyKeyDetailSection
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationElement
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationDetailElement
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
323 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
324 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
325 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
326 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
327 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
328 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
329 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
330 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
331 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
332 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
333 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
334 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
335 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
336 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
337 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
338 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
339 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
340 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
341 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailSection
;
342 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonOfRelationshipElement
;
343 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
344 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
345 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
346 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
347 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
348 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
349 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
350 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
351 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
352 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
353 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
354 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
355 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
356 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
357 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.PresenceAbsenceTermDetailElement
;
358 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
359 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
360 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
361 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
362 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
363 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
364 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermMediaSection
;
365 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
366 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
367 import eu
.etaxonomy
.taxeditor
.ui
.selection
.CommonNameReferenceSelectionElement
;
368 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
369 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithAbbreviatedTitle
;
370 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
371 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
372 import eu
.etaxonomy
.taxeditor
.view
.detail
.CdmSectionPart
;
376 * CdmFormFactory class.
380 * @created Feb 24, 2010
382 public class CdmFormFactory
extends FormToolkit
{
384 private BoldFontHolder2 boldFontHolder2
;
385 private MouseListener selectionMouseHandler
;
386 private FocusListener selectionFocusHandler
;
389 private IEclipseContext context
;
391 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
393 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
395 private final int orientation
= Window
.getDefaultOrientation();
396 private ISelectionProvider selectionProvider
;
398 /** Constant <code>EMPTY_SELECTION</code> */
399 public static ISelection EMPTY_SELECTION
= new ISelection() {
401 public boolean isEmpty() {
412 private class SelectionMouseHandler
extends MouseAdapter
{
414 public void mouseDown(MouseEvent e
) {
415 notifySelectionListeners(e
);
425 private class SelectionFocusHandler
extends FocusAdapter
{
427 public void focusGained(FocusEvent e
) {
428 notifySelectionListeners(e
);
432 private void notifySelectionListeners(TypedEvent e
) {
433 Event event
= new Event();
434 event
.widget
= e
.widget
;
435 SelectionEvent selectionEvent
= new SelectionEvent(event
);
437 for (SelectionListener listener
: selectionListenerList
) {
438 listener
.widgetSelected(selectionEvent
);
442 public CdmFormFactory(Display display
) {
446 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
448 this.selectionProvider
= selectionProvider
;
452 private void init() {
453 boldFontHolder2
= new BoldFontHolder2();
454 selectionMouseHandler
= new SelectionMouseHandler();
455 selectionFocusHandler
= new SelectionFocusHandler();
458 public IEclipseContext
getContext() {
463 * Creates an instance initialized with the correct selectionProvider
465 * Make sure to remove the instance when the entityComposite disposes via
466 * destroySelectionArbitrator(..)
468 * @param entityElement
469 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
471 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
474 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
475 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
476 selectionArbitrator
.addSelectionProvider(selectionProvider
);
477 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
478 addSelectionListener(selectionArbitrator
);
479 return selectionArbitrator
;
484 * destroySelectionArbitrator
487 * @param selectionArbitrator
489 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
492 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
493 if(selectionArbitrator
==null){
496 removeSelectionListener(selectionArbitrator
);
497 if (selectionProvider
!= null) {
498 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
500 MessagingUtils
.error(this.getClass(),
501 "Tried to destroy a selection listener from this factories listeners but was null", null);
507 * Adapts the {@link AbstractCdmFormElement}:<br>
508 * - sets the {@link IPropertyChangeListener}s handled by this class
513 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
516 public void adapt(ICdmFormElement formElement
) {
517 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
522 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
524 control
.addFocusListener(selectionFocusHandler
);
526 super.adapt(control
, trackFocus
, trackKeyboard
);
531 public void adapt(Composite composite
) {
532 composite
.addMouseListener(selectionMouseHandler
);
534 super.adapt(composite
);
543 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
546 public void destroyElement(ICdmFormElement formElement
) {
547 // return if element was not initialized
548 if (formElement
== null) {
551 // destroy selection arbitrator, if any
552 if (formElement
instanceof ISelectableElement
) {
553 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
555 // remove this element form its parents list of elements
556 // ICdmFormElement parentElement = formElement.getParentElement();
557 // if(parentElement != null){
558 // parentElement.removeElement(formElement);
560 // call destroy on child elements recursively
561 for (ICdmFormElement childElement
: formElement
.getElements()) {
562 destroyElement(childElement
);
564 // dispose of the controls
565 for (Control control
: formElement
.getControls()) {
566 // we added the layoutComposite of the parental element as the
567 // layout composite to this formElement
568 // but we do not want to destroy it.
569 if (control
.equals(formElement
.getLayoutComposite())) {
572 if (control
!= null && !control
.isDisposed()){
586 * a {@link org.eclipse.swt.widgets.Composite} object.
587 * @return a {@link org.eclipse.swt.widgets.Label} object.
589 public Label
createEmptyCell(Composite parent
) {
590 return this.createLabel(parent
, null);
595 * createMultiLanguageTextElement
598 * @param parentElement
599 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
602 * a {@link java.lang.String} object.
603 * @param multilanguageText
604 * a {@link java.util.Map} object.
610 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
613 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
614 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
615 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
616 multilanguageText
, textHeight
, style
);
618 parentElement
.addElement(element
);
624 * createMultiLanguageTextElement
627 * @param parentElement
628 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
631 * @param Representation
632 * a {@link eu.etaxonomy.cdm.model.term.Representation} object.
638 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
641 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
642 RepresentationElement element
= new RepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
644 parentElement
.addElement(element
);
650 * createMultiLanguageTextElement
653 * @param parentElement
654 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
657 * @param Representation
658 * a {@link eu.etaxonomy.cdm.model.term.Representation} object.
664 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
667 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
668 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
670 parentElement
.addElement(element
);
674 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
675 KeyStatement keyStatement
, int textHeight
, int style
) {
676 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
679 parentElement
.addElement(element
);
684 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
686 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
687 * @param parentElement the parent container
688 * @param labelString the label name
689 * @param initialObject the object from which the <code>toString()</code> method is called
690 * @param style {@link SWT} style constant
691 * @return the created textfield with label
693 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
694 Object initialObject
, int style
) {
695 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
700 * createTextWithLabelElement
703 * @param parentElement
704 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
707 * a {@link java.lang.String} object.
709 * a {@link java.lang.String} object.
712 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
715 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
716 String initialText
, int style
) {
717 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
721 * createTextWithLabelElement
724 * @param parentElement
725 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
728 * a {@link java.lang.String} object.
730 * a {@link java.lang.String} object.
731 * @param textLimit maximal number of characters allowed
734 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
737 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
738 String initialText
, Integer textLimit
, int style
) {
739 if(initialText
==null){
743 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
746 parentElement
.addElement(element
);
750 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
751 int textHeight
, int style
) {
752 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
754 parentElement
.addElement(element
);
758 public LsidWithExceptionLabelElement
createLsidWithExceptionLabelElement(ICdmFormElement parentElement
, String labelString
,
759 LSID initialLsid
, int style
) {
760 LsidWithExceptionLabelElement element
= new LsidWithExceptionLabelElement(this, parentElement
, labelString
, initialLsid
, null, style
);
762 parentElement
.addElement(element
);
766 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
767 URI initialUri
, int style
) {
768 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
770 parentElement
.addElement(element
);
773 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
774 URI initialUri
,Integer textHeight
, int style
) {
775 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, textHeight
, style
);
777 parentElement
.addElement(element
);
782 public DoiWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
783 DOI initialDoi
, int style
) {
784 DoiWithLabelElement element
= new DoiWithLabelElement(this, parentElement
, labelString
, initialDoi
, null, style
);
786 parentElement
.addElement(element
);
789 public DoiWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
790 DOI initialDoi
,Integer textHeight
, int style
) {
791 DoiWithLabelElement element
= new DoiWithLabelElement(this, parentElement
, labelString
, initialDoi
, textHeight
, style
);
793 parentElement
.addElement(element
);
804 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
805 IOpenUrlEnabled openUrlEnabled
, int style
) {
806 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
809 parentElement
.addElement(element
);
815 * @param parentElement
817 * @param conversationEnabled
822 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
823 ConversationHolder conversation
, User user
, int style
) {
824 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
826 parentElement
.addElement(element
);
832 * createIntegerTextWithLabelElement
835 * @param parentElement
836 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
839 * a {@link java.lang.String} object.
840 * @param initialInteger
841 * a {@link java.lang.Integer} object.
845 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
848 public NumberWithLabelElement
createNumberTextWithLabelElement(
849 ICdmFormElement parentElement
, String labelString
,
850 Number initialNumber
, int style
) {
851 NumberWithLabelElement element
= new NumberWithLabelElement(this,
852 parentElement
, labelString
, initialNumber
, style
);
854 parentElement
.addElement(element
);
858 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
859 String labelString
, LanguageString languageString
, int style
) {
860 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
863 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
864 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
865 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
866 languageString
, height
, isMultiLine
, style
);
868 parentElement
.addElement(element
);
874 * createKeyValueViewerElement
877 * @param parentElement
878 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
881 * a {@link java.lang.String} object.
882 * @param valueHeading
883 * a {@link java.lang.String} object.
885 * a {@link java.util.Map} object.
886 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
889 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
890 String valueHeading
, Map
<Object
, Object
> map
) {
891 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
893 parentElement
.addElement(element
);
897 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
900 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
901 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
902 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
, selection
, true, style
);
904 parentElement
.addElement(element
);
908 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
910 ICdmFormElement parentElement
,
914 Comparator
<T
> comparator
) {
915 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, comparator
);
918 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
920 ICdmFormElement parentElement
,
923 boolean addEmptyElement
,
925 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, false, null);
928 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
930 ICdmFormElement parentElement
,
934 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, null);
937 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
939 ICdmFormElement parentElement
,
943 return this.createDefinedTermComboElement(null, null, terms
, parentElement
, labelString
, selection
, true, style
, false, null);
945 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
947 ICdmFormElement parentElement
,
950 boolean addEmptyElement
,
952 boolean useAbbrevLabel
) {
953 return createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
957 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
958 TermVocabulary
<?
> termVocabulary
,
959 ICdmFormElement parentElement
,
963 return this.createDefinedTermComboElement(null, termVocabulary
, null, parentElement
, labelString
, selection
, true, style
, false, null);
966 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
967 TermVocabulary
<?
> termVocabulary
,
968 ICdmFormElement parentElement
,
971 boolean addEmptyElement
,
973 boolean useAbbrevLabel
) {
974 return createDefinedTermComboElement(null, termVocabulary
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
977 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
979 TermVocabulary
<?
> termVocabulary
,
981 ICdmFormElement parentElement
,
984 boolean addEmptyElement
,
986 boolean useAbbrevLabel
,
987 Comparator
<T
> comparator
) {
989 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
991 parentElement
.addElement(element
);
994 else if(termVocabulary
!=null){
995 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
996 if (comparator
!= null){
997 element
.setTermComparator(comparator
);
1000 parentElement
.addElement(element
);
1002 }else if (terms
!= null){
1004 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, terms
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
1005 if (comparator
!= null){
1006 element
.setTermComparator(comparator
);
1009 parentElement
.addElement(element
);
1013 //this should never happen
1018 public NameRelationshipTypeCombo
createNameRelationshipTypeCombo(ICdmFormElement parentElement
,
1021 boolean useAbbrevLabel
,
1022 Comparator
<NameRelationshipType
> comparator
) {
1024 NameRelationshipTypeCombo
<InverseTermWrapper
> element
= new NameRelationshipTypeCombo(this, parentElement
, labelString
, true, style
, useAbbrevLabel
, comparator
);
1026 parentElement
.addElement(element
);
1030 public MisappliedRelationshipComboElement
createMisappliedRelationshipComboElement(
1031 ICdmFormElement parentElement
,
1033 TaxonRelationshipType selection
,
1035 MisappliedRelationshipComboElement combo
= new MisappliedRelationshipComboElement(this, parentElement
, labelString
, selection
, false, style
, false);
1037 parentElement
.addElement(combo
);
1041 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1042 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
1044 return createEnumComboElement(enumComboType
, parentElement
, null, style
);
1047 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1048 Class
<T
> enumComboType
, ICdmFormElement parentElement
, Comparator
<T
> comparator
,
1050 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, comparator
, style
);
1052 parentElement
.addElement(element
);
1056 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
1057 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1058 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1060 parentElement
.addElement(element
);
1066 * createBrowserElement
1070 * a {@link java.net.URI} object.
1073 * @param parentElement
1074 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1076 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1079 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1080 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1082 parentElement
.addElement(element
);
1088 * createImageElement
1091 * @param parentElement
1092 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1095 * a {@link java.net.URI} object.
1098 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1100 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1101 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1103 parentElement
.addElement(element
);
1109 * createTextActionElement
1112 * @param labelString
1113 * a {@link java.lang.String} object.
1114 * @param initialText
1115 * a {@link java.lang.String} object.
1118 * @param parentElement
1119 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1121 * @param buttonLabel
1122 * a {@link java.lang.String} object.
1123 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1126 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1127 String buttonLabel
, String initialText
, int style
) {
1128 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1131 parentElement
.addElement(element
);
1140 * @param parentElement
1141 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1144 * a {@link java.lang.String} object.
1145 * @param initialState
1149 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1152 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1153 if(initialState
==null){
1154 initialState
= Boolean
.FALSE
;
1156 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1158 parentElement
.addElement(element
);
1163 * Creates a section as a part of the form.
1165 * @return the section widget
1168 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1171 public Section
adapt(AbstractFormSection section
) {
1172 section
.setMenu(section
.getLayoutComposite().getMenu());
1173 adapt(section
, true, true);
1175 // handle focus and property change events for cdm use
1176 section
.addFocusListener(selectionFocusHandler
);
1177 section
.setPropertyChangeListeners(propertyChangeListeners
);
1179 section
.addExpansionListener(new ExpansionAdapter(){
1181 public void expansionStateChanged(ExpansionEvent e
) {
1182 super.expansionStateChanged(e
);
1183 if(section
.getEntity()!=null){
1184 PreferencesUtil
.setStringValue(StoreUtil
.getPrefKey(section
.getClass(), section
.getEntity().getClass().getCanonicalName()), e
.getState()?CdmSectionPart
.EXPANDED
:CdmSectionPart
.COLLAPSED
);
1189 if (section
.getToggle() != null) {
1190 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1191 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1194 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1196 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1197 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1198 getColors().initializeSectionToolBarColors();
1199 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1200 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1202 // call setTitleBarForeground regardless as it also sets the label color
1203 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1207 private class BoldFontHolder2
{
1208 private Font normalFont
;
1210 private Font boldFont
;
1212 public BoldFontHolder2() {
1215 public Font
getBoldFont(Font font
) {
1216 createBoldFont(font
);
1220 private void createBoldFont(Font font
) {
1221 if (normalFont
== null || !normalFont
.equals(font
)) {
1225 if (boldFont
== null) {
1226 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1230 public void dispose() {
1231 if (boldFont
!= null) {
1232 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1240 * createToggleableTextField
1243 * @param parentElement
1244 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1246 * @param labelString
1247 * a {@link java.lang.String} object.
1248 * @param initialText
1249 * a {@link java.lang.String} object.
1250 * @param initialState
1254 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1257 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1258 String initialText
, boolean initialState
, int style
) {
1259 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1260 initialState
, style
| orientation
);
1263 parentElement
.addElement(element
);
1269 * createTimePeriodElement
1272 * @param parentElement
1273 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1275 * @param labelString
1276 * a {@link java.lang.String} object.
1278 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1281 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1284 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1285 TimePeriod timePeriod
, int style
) {
1286 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1288 parentElement
.addElement(element
);
1294 * createVerbatimTimePeriodElement
1297 * @param parentElement
1298 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1300 * @param labelString
1301 * a {@link java.lang.String} object.
1303 * a {@link eu.etaxonomy.cdm.model.common.VerbatimTimePeriod} object.
1306 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimTimePeriodElement}
1309 public VerbatimTimePeriodElement
createVerbatimTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1310 VerbatimTimePeriod timePeriod
, int style
) {
1311 VerbatimTimePeriodElement element
= new VerbatimTimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1313 parentElement
.addElement(element
);
1321 * createGatheringEventUnitElement
1324 * @param parentElement
1325 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1327 * @param labelString
1328 * a {@link java.lang.String} object.
1330 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1333 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1336 public GatheringEventUnitElement
createGatheringEventUnitElement(
1337 ICdmFormElement parentElement
,
1339 DerivedUnitFacade gatheringEvent
,
1340 MinMaxTextSection
.UnitType unitType
,
1342 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1349 parentElement
.addElement(element
);
1355 * createPointElement
1360 * @param parentElement
1361 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1364 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1365 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1367 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1368 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1370 parentElement
.addElement(element
);
1375 * Creates an empty section with the given message.<br>
1376 * If message is <code>null</code> a default message will be displayed.
1378 public EmptySection
createEmptySection(String message
, CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1379 EmptySection section
= new EmptySection(message
, formFactory
, parentElement
, style
);
1380 parentElement
.addElement(section
);
1387 * createDateDetailSection
1390 * @param parentElement
1391 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1395 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1398 public DateDetailSection
<TimePeriod
> createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1399 DateDetailSection
<TimePeriod
> section
= new DateDetailSection
<TimePeriod
>(this, parentElement
, false, style
);
1400 parentElement
.addElement(section
);
1407 * createVerbatimDateDetailSection
1410 * @param parentElement
1411 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1415 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimDateDetailSection}
1418 public DateDetailSection
<VerbatimTimePeriod
> createVerbatimDateDetailSection(ICdmFormElement parentElement
, int style
) {
1419 DateDetailSection
<VerbatimTimePeriod
> section
1420 = new DateDetailSection
<VerbatimTimePeriod
>(this, parentElement
, true, style
);
1421 parentElement
.addElement(section
);
1428 * createDateDetailSection
1431 * @param parentElement
1432 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1436 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1439 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1440 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1441 parentElement
.addElement(section
);
1448 * createPartialElement
1451 * @param parentElement
1452 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1454 * @param labelString
1455 * a {@link java.lang.String} object.
1457 * a {@link org.joda.time.Partial} object.
1460 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1463 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1465 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1467 parentElement
.addElement(element
);
1473 * addSelectionListener
1477 * a {@link org.eclipse.swt.events.SelectionListener} object.
1479 public void addSelectionListener(SelectionListener listener
) {
1480 selectionListenerList
.add(listener
);
1485 * removeSelectionListener
1489 * a {@link org.eclipse.swt.events.SelectionListener} object.
1491 public void removeSelectionListener(SelectionListener listener
) {
1492 if (listener
== null) {
1493 MessagingUtils
.error(this.getClass(),
1494 "Tried to remove a selection listener from this factories listeners but was null", null);
1496 selectionListenerList
.remove(listener
);
1502 * addPropertyChangeListener
1506 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1509 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1510 if (propertyChangeListeners
.contains(listener
)) {
1513 propertyChangeListeners
.add(0, listener
);
1518 * removePropertyChangeListener
1522 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1525 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1526 propertyChangeListeners
.remove(listener
);
1530 * @return the propertyChangeListeners
1532 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1533 return propertyChangeListeners
;
1538 * createHorizontalSeparator
1541 * @param parentElement
1542 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1546 * @return a {@link org.eclipse.swt.widgets.Label} object.
1548 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1549 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1550 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1556 * createVersionElement
1559 * @param parentElement
1560 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1563 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1568 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1571 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1572 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1574 parentElement
.addElement(element
);
1579 * @param cdmBaseSection
1584 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1585 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1587 parentElement
.addElement(element
);
1593 * createVersionSection
1596 * @param parentElement
1597 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1602 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1605 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1606 VersionSection section
= new VersionSection(this, parentElement
, style
);
1607 parentElement
.addElement(section
);
1617 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1618 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1619 parentElement
.addElement(section
);
1626 * createEmptyElement
1629 * @param parentElement
1630 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1632 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1634 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1635 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1637 parentElement
.addElement(element
);
1643 * createHeadlineSection
1646 * @param parentElement
1647 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1650 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1653 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1654 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1655 parentElement
.addElement(section
);
1662 * createParsingMessageElement
1665 * @param parentElement
1666 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1668 * @param parserProblem
1669 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1674 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1677 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1678 ParserProblem parserProblem
, int style
) {
1679 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1681 parentElement
.addElement(element
);
1685 public DefinedTermDetailSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1686 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1688 DefinedTermDetailSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1689 selectionProvider
, style
);
1691 parentElement
.addElement(section
);
1697 public TermMediaSection
createTermMediaSection(ConversationHolder conversation
,
1698 ICdmFormElement parentElement
, int style
) {
1699 TermMediaSection section
= new TermMediaSection(this, conversation
, parentElement
, style
);
1700 parentElement
.addElement(section
);
1707 * @param definedTermClass
1708 * @param formElement
1712 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1713 AbstractCdmDetailSection parentElement
, int style
) {
1714 AbstractCdmDetailElement element
= null;
1716 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1717 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1718 } else if (definedTermClass
.equals(Feature
.class)) {
1719 element
= new FeatureDetailElement(this, parentElement
);
1720 } else if(definedTermClass
.equals(PresenceAbsenceTerm
.class)){
1721 element
= new PresenceAbsenceTermDetailElement(this, parentElement
);
1723 element
= new DefinedTermDetailElement(this, parentElement
);
1728 parentElement
.addElement(element
);
1732 public CharacterDetailSection
createCharacterDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1733 CharacterDetailSection section
= new CharacterDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1734 addAndAdaptSection(parentElement
, section
);
1738 public CharacterDetailElement
createCharacterDetailElement(ICdmFormElement parentElement
, int style
){
1739 CharacterDetailElement element
= new CharacterDetailElement(this, parentElement
);
1740 addAndAdaptElement(parentElement
, element
);
1744 public FeatureTreeDetailElement
createFeatureTreeDetailElement(ICdmFormElement parentElement
, int style
){
1745 FeatureTreeDetailElement element
= new FeatureTreeDetailElement(this, parentElement
);
1746 addAndAdaptElement(parentElement
, element
);
1750 public FeatureNodeDetailElement
createFeatureNodeDetailElement(ICdmFormElement parentElement
, int style
){
1751 FeatureNodeDetailElement element
= new FeatureNodeDetailElement(this, parentElement
);
1752 addAndAdaptElement(parentElement
, element
);
1757 //--------DetailSections---------
1758 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1759 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1760 addAndAdaptSection(parentElement
, section
);
1764 public FeatureNodeDetailSection
createFeatureNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1765 FeatureNodeDetailSection section
= new FeatureNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1766 addAndAdaptSection(parentElement
, section
);
1770 public FeatureTreeDetailSection
createFeatureTreeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1771 FeatureTreeDetailSection section
= new FeatureTreeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1772 addAndAdaptSection(parentElement
, section
);
1776 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1777 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1778 addAndAdaptSection(parentElement
, section
);
1782 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1783 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1784 addAndAdaptSection(parentElement
, section
);
1788 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1789 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1790 addAndAdaptSection(parentElement
, section
);
1794 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1795 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1796 addAndAdaptSection(parentElement
, section
);
1800 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1801 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1802 addAndAdaptSection(parentElement
, section
);
1806 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1807 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1808 addAndAdaptSection(parentElement
, section
);
1812 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1813 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1814 addAndAdaptSection(parentElement
, section
);
1818 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1819 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1820 addAndAdaptSection(parentElement
, section
);
1824 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1825 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1826 addAndAdaptSection(parentElement
, section
);
1830 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1831 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1832 addAndAdaptSection(parentElement
, section
);
1838 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
1839 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
1840 addAndAdaptSection(parentElement
, section
);
1844 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1845 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1846 addAndAdaptSection(parentElement
, section
);
1850 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1851 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1852 addAndAdaptSection(parentElement
, section
);
1856 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1857 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1858 addAndAdaptSection(parentElement
, section
);
1862 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1863 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1864 addAndAdaptSection(parentElement
, section
);
1868 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1869 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
1870 addAndAdaptSection(parentElement
, section
);
1874 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1875 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1876 addAndAdaptSection(parentElement
, section
);
1880 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1881 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1882 addAndAdaptSection(parentElement
, section
);
1886 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1887 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1888 addAndAdaptSection(parentElement
, section
);
1892 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1893 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1894 addAndAdaptSection(parentElement
, section
);
1898 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1899 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1900 addAndAdaptSection(parentElement
, section
);
1904 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1905 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1906 addAndAdaptSection(parentElement
, section
);
1910 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1911 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1912 addAndAdaptSection(parentElement
, section
);
1916 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1917 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1918 addAndAdaptSection(parentElement
, section
);
1922 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1923 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1924 addAndAdaptSection(parentElement
, section
);
1928 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1929 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1930 addAndAdaptSection(parentElement
, section
);
1934 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1935 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1936 addAndAdaptSection(parentElement
, section
);
1940 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1941 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1942 addAndAdaptSection(parentElement
, section
);
1946 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1947 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1948 addAndAdaptSection(parentElement
, section
);
1952 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1953 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1954 addAndAdaptSection(parentElement
, section
);
1958 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1959 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
1960 addAndAdaptSection(parentElement
, section
);
1964 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1965 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1966 addAndAdaptSection(parentElement
, section
);
1970 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1971 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1972 addAndAdaptSection(parentElement
, section
);
1976 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1977 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
1978 addAndAdaptSection(parentElement
, section
);
1982 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1983 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
1984 addAndAdaptSection(parentElement
, section
);
1988 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1989 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
1990 addAndAdaptSection(parentElement
, section
);
1994 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1995 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1996 addAndAdaptSection(parentElement
, section
);
2000 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2001 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2002 addAndAdaptSection(parentElement
, section
);
2006 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2007 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2008 addAndAdaptSection(parentElement
, section
);
2012 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2013 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2014 addAndAdaptSection(parentElement
, section
);
2018 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2019 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
2020 addAndAdaptSection(parentElement
, section
);
2024 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2025 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2026 addAndAdaptSection(parentElement
, section
);
2030 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2031 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2032 addAndAdaptSection(parentElement
, section
);
2036 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2037 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2038 addAndAdaptSection(parentElement
, section
);
2042 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2043 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2044 addAndAdaptSection(parentElement
, section
);
2048 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2049 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2050 addAndAdaptSection(parentElement
, section
);
2054 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2055 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2056 addAndAdaptSection(parentElement
, section
);
2060 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2061 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
, true);
2062 addAndAdaptSection(parentElement
, section
);
2066 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2067 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2068 addAndAdaptSection(parentElement
, section
);
2072 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2073 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2074 addAndAdaptSection(parentElement
, section
);
2078 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2079 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2080 addAndAdaptSection(parentElement
, section
);
2084 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2085 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2086 addAndAdaptSection(parentElement
, section
);
2090 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2091 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2092 addAndAdaptSection(parentElement
, section
);
2096 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
2097 parentElement
.addElement(section
);
2101 //--------DetailElements------------
2103 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
2104 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
2105 addAndAdaptElement(parentElement
, element
);
2109 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
2110 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
2111 addAndAdaptElement(parentElement
, element
);
2115 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
2116 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
2117 addAndAdaptElement(parentElement
, element
);
2121 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
2122 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
2123 addAndAdaptElement(parentElement
, element
);
2127 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
2128 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
2129 addAndAdaptElement(parentElement
, element
);
2133 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
2134 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
2135 addAndAdaptElement(parentElement
, element
);
2139 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
2140 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
2141 addAndAdaptElement(parentElement
, element
);
2145 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
2146 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
2147 addAndAdaptElement(parentElement
, element
);
2151 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
2152 UserDetailElement element
= new UserDetailElement(this, parentElement
);
2153 addAndAdaptElement(parentElement
, element
);
2157 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2158 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2159 addAndAdaptElement(parentElement
, element
);
2163 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2164 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2165 addAndAdaptElement(parentElement
, element
);
2169 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2170 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2171 addAndAdaptElement(parentElement
, element
);
2175 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2176 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2177 addAndAdaptElement(parentElement
, element
);
2181 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2182 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2183 addAndAdaptElement(parentElement
, element
);
2187 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2188 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2190 parentElement
.addElement(element
);
2195 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2196 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2197 addAndAdaptElement(parentElement
, element
);
2201 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2202 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2203 addAndAdaptElement(parentElement
, element
);
2207 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2208 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2209 addAndAdaptElement(parentElement
, element
);
2213 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2214 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2215 addAndAdaptElement(parentElement
, element
);
2219 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2220 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2221 addAndAdaptElement(parentElement
, element
);
2225 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2226 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2227 addAndAdaptElement(parentElement
, element
);
2231 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2232 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2233 addAndAdaptElement(parentElement
, element
);
2237 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2238 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2239 addAndAdaptElement(parentElement
, element
);
2243 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2244 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2245 addAndAdaptElement(parentElement
, element
);
2249 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2250 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2251 addAndAdaptElement(parentElement
, element
);
2255 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2256 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2257 addAndAdaptElement(parentElement
, element
);
2261 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2262 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2263 addAndAdaptElement(parentElement
, element
);
2267 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2268 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2269 addAndAdaptElement(parentElement
, element
);
2273 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
, boolean isWizard
){
2274 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
, isWizard
);
2275 addAndAdaptElement(parentElement
, element
);
2279 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2280 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2281 addAndAdaptElement(parentElement
, element
);
2286 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2287 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2288 addAndAdaptElement(parentElement
, element
);
2292 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2293 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2294 addAndAdaptElement(parentElement
, element
);
2298 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2299 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2300 addAndAdaptElement(parentElement
, element
);
2304 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2305 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2306 addAndAdaptElement(parentElement
, element
);
2310 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2311 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2312 addAndAdaptElement(parentElement
, element
);
2316 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2317 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2318 addAndAdaptElement(parentElement
, element
);
2322 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2323 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2324 addAndAdaptElement(parentElement
, element
);
2328 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2329 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2330 addAndAdaptElement(parentElement
, element
);
2334 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2335 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2336 addAndAdaptElement(parentElement
, element
);
2340 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2341 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2342 addAndAdaptElement(parentElement
, element
);
2346 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2347 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2348 addAndAdaptElement(parentElement
, element
);
2352 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2353 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2354 addAndAdaptElement(parentElement
, element
);
2358 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2359 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2360 addAndAdaptElement(parentElement
, element
);
2364 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2365 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2366 addAndAdaptElement(parentElement
, element
);
2370 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2371 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2372 addAndAdaptElement(parentElement
, element
);
2376 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2377 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2378 addAndAdaptElement(parentElement
, element
);
2382 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2383 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2384 addAndAdaptElement(parentElement
, mediaDetailElement
);
2385 return mediaDetailElement
;
2388 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2389 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2390 addAndAdaptElement(parentElement
, element
);
2394 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2395 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2396 addAndAdaptElement(parentElement
, element
);
2400 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2401 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2402 addAndAdaptElement(parentElement
, element
);
2406 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2407 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2408 addAndAdaptElement(parentElement
, element
);
2412 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2413 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2414 addAndAdaptElement(parentElement
, element
);
2418 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2419 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2420 addAndAdaptElement(parentElement
, element
);
2424 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2425 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2426 addAndAdaptElement(parentElement
, element
);
2431 * @param parentElement
2434 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2436 parentElement
.addElement(element
);
2439 //--------EntityCollectionSection----------
2440 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2441 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2442 addAndAdaptSection(parentElement
, section
);
2446 public InapplicableIfEntityCollectionSection
createInapplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2447 InapplicableIfEntityCollectionSection section
= new InapplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2448 addAndAdaptSection(parentElement
, section
);
2452 public OnlyApplicableIfEntityCollectionSection
createOnlyApplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2453 OnlyApplicableIfEntityCollectionSection section
= new OnlyApplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2454 addAndAdaptSection(parentElement
, section
);
2458 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2459 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2460 addAndAdaptSection(parentElement
, section
);
2464 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2465 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2466 addAndAdaptSection(parentElement
, section
);
2470 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2471 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2472 addAndAdaptSection(parentElement
, section
);
2476 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2477 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2478 addAndAdaptSection(parentElement
, section
);
2482 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2483 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2484 addAndAdaptSection(parentElement
, section
);
2488 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2489 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2490 addAndAdaptSection(parentElement
, section
);
2494 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2495 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2496 addAndAdaptSection(parentElement
, section
);
2500 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2501 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2502 addAndAdaptSection(parentElement
, section
);
2506 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2507 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2508 addAndAdaptSection(parentElement
, section
);
2512 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2513 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2514 addAndAdaptSection(parentElement
, section
);
2518 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2519 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2520 addAndAdaptSection(parentElement
, section
);
2524 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2525 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2526 addAndAdaptSection(parentElement
, section
);
2530 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2531 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2532 addAndAdaptSection(parentElement
, section
);
2535 public ExternalLinksSection
createExternalLinksSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2536 ExternalLinksSection section
= new ExternalLinksSection(this, conversation
, parentElement
, style
);
2537 addAndAdaptSection(parentElement
, section
);
2541 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2542 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2543 addAndAdaptSection(parentElement
, section
);
2547 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2548 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2549 addAndAdaptSection(parentElement
, section
);
2553 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2554 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2555 addAndAdaptSection(parentElement
, section
);
2559 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2560 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2561 addAndAdaptSection(parentElement
, section
);
2565 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2566 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2567 addAndAdaptSection(parentElement
, section
);
2571 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2572 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2573 addAndAdaptSection(parentElement
, section
);
2577 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2578 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2579 addAndAdaptSection(parentElement
, section
);
2583 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2584 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2585 addAndAdaptSection(parentElement
, section
);
2589 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2590 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2591 addAndAdaptSection(parentElement
, section
);
2595 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2596 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2597 addAndAdaptSection(parentElement
, section
);
2601 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2602 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2603 addAndAdaptSection(parentElement
, section
);
2607 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2608 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2609 addAndAdaptSection(parentElement
, section
);
2613 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2614 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2615 addAndAdaptSection(parentElement
, section
);
2619 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2620 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2621 addAndAdaptSection(parentElement
, section
);
2625 public GeoScopePolyKeyDetailSection
createGeoScopePolyKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2626 GeoScopePolyKeyDetailSection section
= new GeoScopePolyKeyDetailSection(this, conversation
, parentElement
, style
);
2627 addAndAdaptSection(parentElement
, section
);
2631 public IdentifierSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2632 IdentifierSection section
= new IdentifierSection(this, conversation
, parentElement
, style
);
2633 addAndAdaptSection(parentElement
, section
);
2637 public DerivedUnitFacadeIdentifierSection
createDerivedUnitFacadeIdentifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2638 DerivedUnitFacadeIdentifierSection section
= new DerivedUnitFacadeIdentifierSection(this, conversation
, parentElement
, style
);
2639 addAndAdaptSection(parentElement
, section
);
2643 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2644 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2645 addAndAdaptSection(parentElement
, section
);
2649 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2650 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2651 addAndAdaptSection(parentElement
, section
);
2655 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2656 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2657 addAndAdaptSection(parentElement
, section
);
2661 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2662 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2663 addAndAdaptSection(parentElement
, section
);
2667 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2668 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2669 addAndAdaptSection(parentElement
, section
);
2673 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2674 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2675 addAndAdaptSection(parentElement
, section
);
2679 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2680 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2681 addAndAdaptSection(parentElement
, section
);
2685 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2686 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2687 addAndAdaptSection(parentElement
, section
);
2691 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2692 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2693 addAndAdaptSection(parentElement
, section
);
2697 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2698 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2699 addAndAdaptSection(parentElement
, section
);
2703 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2704 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2705 addAndAdaptSection(parentElement
, section
);
2709 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2710 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2711 addAndAdaptSection(parentElement
, section
);
2715 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2716 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2717 addAndAdaptSection(parentElement
, section
);
2722 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2723 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2724 AbstractEntityCollectionElement
<?
> element
= null;
2726 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2728 if (entity
instanceof Annotation
) {
2729 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2730 }else if (entity
instanceof Person
) {
2731 boolean isNomenclatural
= false;
2732 if (parentElement
instanceof TeamMemberSection
){
2733 isNomenclatural
= ((TeamMemberSection
) parentElement
).isNomenclaturalTeam();
2735 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
, isNomenclatural
);
2736 } else if (entity
instanceof Credit
) {
2737 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2738 } else if (entity
instanceof Extension
) {
2739 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2740 } else if (entity
instanceof ExternalLink
) {
2741 element
= new ExternalLinksElement(this, parentElement
, (ExternalLink
) entity
, removeListener
, style
);
2742 } else if (entity
instanceof Marker
) {
2743 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2744 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2745 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
, removeListener
, backgroundColor
, style
);
2746 }else if (entity
instanceof Media
) {
2747 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2748 } else if (entity
instanceof MediaRepresentation
) {
2749 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2751 } else if (entity
instanceof ImageFile
) {
2752 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2753 } else if (entity
instanceof MediaRepresentationPart
) {
2754 element
= new MediaRepresentationPartElement
<>(this, parentElement
, (MediaRepresentationPart
) entity
,
2755 removeListener
, style
);
2756 } else if (entity
instanceof NomenclaturalStatus
) {
2757 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2759 } else if (entity
instanceof Rights
) {
2760 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2761 } else if (entity
instanceof DescriptionElementSource
&& parentElement
.getEntity() instanceof CommonTaxonName
) {
2762 element
= new CommonNameSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2763 removeListener
, style
);
2764 } else if (entity
instanceof DescriptionElementSource
) {
2765 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2766 removeListener
, style
, false);
2767 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2768 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
,
2769 removeListener
,backgroundColor
, style
);
2771 else if (entity
instanceof IdentifiableSource
) {
2772 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2774 } else if (entity
instanceof DefinedTerm
) {
2775 switch(((DefinedTerm
)entity
).getTermType()) {
2777 element
= new ScopeElement(this,
2779 (DefinedTerm
) entity
,
2784 element
= new ModifierElement(this,
2786 (DefinedTerm
) entity
,
2794 } else if (entity
instanceof Reference
) {
2795 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2796 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2799 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2801 } else if (entity
instanceof NameTypeDesignation
) {
2802 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2804 } else if (entity
instanceof TextualTypeDesignation
) {
2805 element
= new TextTypeDesignationElement(this, parentElement
, (TextualTypeDesignation
) entity
, removeListener
,
2807 } else if (entity
instanceof NameRelationship
) {
2808 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2810 } else if (entity
instanceof SpecimenTypeDesignation
) {
2811 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
2812 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2813 removeListener
, style
);
2816 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2817 removeListener
, style
);
2819 } else if (entity
instanceof StateData
) {
2820 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2821 } else if (entity
instanceof StatisticalMeasurementValue
) {
2822 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2823 removeListener
, style
);
2824 } else if (entity
instanceof DerivedUnit
) {
2825 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2826 case LivingSpecimen
:
2827 case PreservedSpecimen
:
2829 element
= new SpecimenCollectionDetailElement(this,
2831 (DerivedUnit
) entity
,
2836 element
= new DerivedUnitElement(this,
2838 (DerivedUnit
) entity
,
2843 } else if (entity
instanceof NamedArea
) {
2844 element
= new CollectingAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2845 } else if (entity
instanceof DeterminationEvent
) {
2846 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2847 } else if (entity
instanceof User
) {
2848 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2849 } else if (entity
instanceof GrantedAuthority
) {
2850 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
, ((Group
)parentElement
.getEntity()),
2851 removeListener
, style
);
2852 } else if (entity
instanceof Group
) {
2853 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2854 } else if (entity
instanceof Taxon
) {
2855 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2856 } else if (entity
instanceof DescriptionElementBase
) {
2857 // this is the special case for protologs, maybe we can do this
2858 // differently when API improves
2859 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2860 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2861 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2863 } else if (entity
instanceof Identifier
) {
2864 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2865 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2868 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2870 } else if (entity
instanceof TermVocabulary
) {
2871 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
2872 switch (termVocabulary
.getTermType()) {
2874 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2877 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
2882 } else if (entity
instanceof MeasurementUnit
) {
2883 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2884 } else if (entity
instanceof StatisticalMeasure
) {
2885 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
2886 } else if (entity
instanceof FeatureState
&& parentElement
instanceof InapplicableIfEntityCollectionSection
) {
2887 element
= new InapplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
2888 } else if (entity
instanceof FeatureState
&& parentElement
instanceof OnlyApplicableIfEntityCollectionSection
) {
2889 element
= new OnlyApplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
2892 //check for parent section when entity is null
2893 //this happens when AbstractUnboundEntityCollectionSection is used
2895 if(parentElement
instanceof ScopeSection
|| parentElement
instanceof ScopeRestrictionSection
){
2896 element
= new ScopeElement(this,
2898 (DefinedTerm
) entity
,
2902 else if(parentElement
instanceof ModifierSection
){
2903 element
= new ModifierElement(this,
2905 (DefinedTerm
) entity
,
2912 if (element
== null) {
2913 MessagingUtils
.messageDialog(
2914 String
.format("Error when creating section %s",
2915 parentElement
.getClass().getSimpleName()),
2917 String
.format("Could not generate collection element for entity of class %s."
2918 + " Looks like the case is not yet handled. Check implementation.\n"
2919 + "Entity: %s", entity
.getClass(), entity
.toString()), null);
2923 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2924 element
.setPersistentBackground(backgroundColor
);
2927 parentElement
.addElement(element
);
2935 * Creates a selection element for the given type T.
2938 * <strong>Selection elements not handled by this method:</strong>
2940 * <li>{@link TaxonNodeSelectionElement} see
2941 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2943 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2944 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2950 * a {@link Class} object of the type that you want the selection
2952 * @param parentElement
2953 * a {@link ICdmFormElement} object.
2954 * @param labelString
2955 * a {@link String} object.
2956 * @param selectionType
2958 * a {@link ICdmBase} object.
2961 * @param conversation
2962 * a {@link ConversationHolder} object.
2963 * @return a {@link EntitySelectionElement} object.
2965 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2966 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2967 int style
, boolean filterElement
) {
2968 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, //conversation,
2969 parentElement
, clazz
,
2970 labelString
, selection
, mode
, style
, filterElement
);
2972 parentElement
.addElement(element
);
2976 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2977 // ConversationHolder conversation,
2978 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2980 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this,
2981 parentElement
, clazz
,
2982 labelString
, selection
, mode
, style
);
2984 parentElement
.addElement(element
);
2988 public CommonNameReferenceSelectionElement
createCommonNameReferenceSelectionElement(ICdmFormElement parentElement
, String labelString
, Reference selection
, int mode
,
2990 CommonNameReferenceSelectionElement element
= new CommonNameReferenceSelectionElement(this,
2991 parentElement
, labelString
, selection
, mode
, style
);
2993 parentElement
.addElement(element
);
2999 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
3002 * <strong>Selection elements not handled by this method:</strong>
3004 * <li>{@link TaxonNodeSelectionElement} see
3005 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
3007 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
3008 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
3014 * a {@link Class} object of the type that you want the selection
3016 * @param parentElement
3017 * a {@link ICdmFormElement} object.
3018 * @param labelString
3019 * a {@link String} object.
3020 * @param selectionType
3022 * a {@link ICdmBase} object.
3025 * @param conversation
3026 * a {@link ConversationHolder} object.
3027 * @return a {@link EntitySelectionElement} object.
3029 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
3030 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
3031 T selection
, int mode
, int style
) {
3032 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, //conversation,
3033 parentElement
, clazz
,
3034 labelString
, selection
, mode
, style
);
3036 parentElement
.addElement(element
);
3040 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
3041 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
3042 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, //conversation,
3044 labelString
, selection
, mode
, style
);
3046 parentElement
.addElement(element
);
3052 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
3053 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
3054 // int mode, int style) {
3055 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
3056 // conversation, parentElement, labelString, selection, mode, style);
3058 // parentElement.addElement(element);
3062 /** {@inheritDoc} */
3063 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
3064 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
3065 adapt(labelElement
);
3066 parentElement
.addElement(labelElement
);
3067 return labelElement
;
3072 // public DateElementFormElement createDateElementForm(ICdmFormElement formElement, String labelText, DateTime dateTime, int style){
3073 // Label label = new Label(formElement.getLayoutComposite(), style);
3074 // label.setText(labelText+" (yyyy-MM-dd)");
3075 // DateElementFormElement dateElement = new DateElementFormElement(this, dateTime, style, formElement.getLayoutComposite());
3076 // dateElement.initInternalController();
3078 // return dateElement;
3081 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
, boolean editableText
){
3082 Label label
= new Label(formElement
.getLayoutComposite(), style
);
3083 label
.setText(labelText
);
3084 label
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3085 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, labelText
, style
, editableText
);
3086 dateElement
.initController(this, formElement
);
3087 dateElement
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3093 * Getter for the field <code>selectionProvider</code>.
3096 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
3098 public ISelectionProvider
getSelectionProvider() {
3099 return selectionProvider
;
3104 * createDetailedDescriptionDetailElement
3107 * @param parentElement
3108 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
3112 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
3117 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
3120 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
3121 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
, boolean enabled
) {
3122 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
3124 if (entity
instanceof CategoricalData
) {
3125 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
3126 (CategoricalData
) entity
, style
);
3127 } else if (entity
instanceof CommonTaxonName
) {
3128 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
3130 } else if (entity
instanceof Distribution
&& !enabled
) {
3131 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3133 } else if (entity
instanceof Distribution
) {
3134 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3136 }else if (entity
instanceof IndividualsAssociation
) {
3137 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
3138 (IndividualsAssociation
) entity
, style
);
3139 } else if (entity
instanceof QuantitativeData
) {
3140 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
3141 (QuantitativeData
) entity
, style
);
3142 } else if (entity
instanceof TaxonInteraction
) {
3143 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
3144 (TaxonInteraction
) entity
, style
);
3145 } else if (entity
instanceof TextData
) {
3146 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
3148 throw new IllegalStateException("There is no interface for the given description element");
3150 adapt(detailedDescriptionElement
);
3151 parentElement
.addElement(detailedDescriptionElement
);
3152 return detailedDescriptionElement
;
3157 * Creates a styled text as a part of the form.
3162 * the text initial value
3165 * @return the text widget
3167 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
3168 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
3169 if (value
!= null) {
3170 text
.setText(value
);
3172 text
.setForeground(getColors().getForeground());
3173 text
.setBackground(getColors().getBackground());
3174 // text.addFocusListener(visibilityHandler);
3178 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
3179 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
3180 addAndAdaptSection(parentElement
, section
);
3185 * @param formElement
3186 * @param conversationHolder
3190 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
3191 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
3192 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
3193 addAndAdaptSection(formElement
, section
);
3198 public TaxonOfRelationshipElement
createTaxonOfRelationshipDetailElement(
3199 ICdmFormElement parentElement
, int style
) {
3200 TaxonOfRelationshipElement section
= new TaxonOfRelationshipElement(this, parentElement
, style
);
3201 addAndAdaptElement(parentElement
, section
);
3205 public TaxonDetailSection
createTaxonDetailSection(ConversationHolder conversationHolder
,
3206 ICdmFormElement formElement
, ISelectionProvider selectionProvider
, int style
) {
3207 TaxonDetailSection section
= new TaxonDetailSection(this, conversationHolder
, formElement
, selectionProvider
, style
);
3208 addAndAdaptSection(formElement
, section
);
3216 // public RichTextWithLabelElement createRichTextLabelElement(ICdmFormElement parentElement, String labelString, String initialText, int textHeight, int style) {
3217 // RichTextWithLabelElement element = new RichTextWithLabelElement(this, parentElement, labelString,
3218 // initialText, textHeight, style);
3220 // parentElement.addElement(element);