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
.VocabularyComboElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.combo
.term
.TermComboElement
;
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
.CharacterNodeDetailElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterNodeDetailSection
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureNodeDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureNodeDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureTreeDetailElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureTreeDetailSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfCollectionElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfEntityCollectionSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfCollectionElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfEntityCollectionSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.RuleConsideredElement
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TextTypeDesignationElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreaDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopePolyKeyDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationElement
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationDetailElement
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
323 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
324 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
325 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
326 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
327 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
328 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
329 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
330 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
331 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
332 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
333 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
334 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
335 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
336 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
337 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
338 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
339 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
340 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
341 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
342 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
343 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
344 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailSection
;
345 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonOfRelationshipElement
;
346 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
347 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
348 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
349 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
350 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
351 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
352 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
353 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
354 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
355 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
356 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
357 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
358 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
359 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
360 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.PresenceAbsenceTermDetailElement
;
361 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
362 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
363 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
364 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
365 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
366 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
367 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermMediaSection
;
368 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
369 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
370 import eu
.etaxonomy
.taxeditor
.ui
.selection
.CommonNameReferenceSelectionElement
;
371 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
372 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithAbbreviatedTitle
;
373 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
374 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
375 import eu
.etaxonomy
.taxeditor
.view
.detail
.CdmSectionPart
;
379 * CdmFormFactory class.
383 * @created Feb 24, 2010
385 public class CdmFormFactory
extends FormToolkit
{
387 private BoldFontHolder2 boldFontHolder2
;
388 private MouseListener selectionMouseHandler
;
389 private FocusListener selectionFocusHandler
;
392 private IEclipseContext context
;
394 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
396 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
398 private final int orientation
= Window
.getDefaultOrientation();
399 private ISelectionProvider selectionProvider
;
401 /** Constant <code>EMPTY_SELECTION</code> */
402 public static ISelection EMPTY_SELECTION
= new ISelection() {
404 public boolean isEmpty() {
415 private class SelectionMouseHandler
extends MouseAdapter
{
417 public void mouseDown(MouseEvent e
) {
418 notifySelectionListeners(e
);
428 private class SelectionFocusHandler
extends FocusAdapter
{
430 public void focusGained(FocusEvent e
) {
431 notifySelectionListeners(e
);
435 private void notifySelectionListeners(TypedEvent e
) {
436 Event event
= new Event();
437 event
.widget
= e
.widget
;
438 SelectionEvent selectionEvent
= new SelectionEvent(event
);
440 for (SelectionListener listener
: selectionListenerList
) {
441 listener
.widgetSelected(selectionEvent
);
445 public CdmFormFactory(Display display
) {
449 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
451 this.selectionProvider
= selectionProvider
;
455 private void init() {
456 boldFontHolder2
= new BoldFontHolder2();
457 selectionMouseHandler
= new SelectionMouseHandler();
458 selectionFocusHandler
= new SelectionFocusHandler();
461 public IEclipseContext
getContext() {
466 * Creates an instance initialized with the correct selectionProvider
468 * Make sure to remove the instance when the entityComposite disposes via
469 * destroySelectionArbitrator(..)
471 * @param entityElement
472 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
474 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
477 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
478 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
479 selectionArbitrator
.addSelectionProvider(selectionProvider
);
480 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
481 addSelectionListener(selectionArbitrator
);
482 return selectionArbitrator
;
487 * destroySelectionArbitrator
490 * @param selectionArbitrator
492 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
495 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
496 if(selectionArbitrator
==null){
499 removeSelectionListener(selectionArbitrator
);
500 if (selectionProvider
!= null) {
501 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
503 MessagingUtils
.error(this.getClass(),
504 "Tried to destroy a selection listener from this factories listeners but was null", null);
510 * Adapts the {@link AbstractCdmFormElement}:<br>
511 * - sets the {@link IPropertyChangeListener}s handled by this class
516 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
519 public void adapt(ICdmFormElement formElement
) {
520 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
525 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
527 control
.addFocusListener(selectionFocusHandler
);
529 super.adapt(control
, trackFocus
, trackKeyboard
);
534 public void adapt(Composite composite
) {
535 composite
.addMouseListener(selectionMouseHandler
);
537 super.adapt(composite
);
546 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
549 public void destroyElement(ICdmFormElement formElement
) {
550 // return if element was not initialized
551 if (formElement
== null) {
554 // destroy selection arbitrator, if any
555 if (formElement
instanceof ISelectableElement
) {
556 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
558 // remove this element form its parents list of elements
559 // ICdmFormElement parentElement = formElement.getParentElement();
560 // if(parentElement != null){
561 // parentElement.removeElement(formElement);
563 // call destroy on child elements recursively
564 for (ICdmFormElement childElement
: formElement
.getElements()) {
565 destroyElement(childElement
);
567 // dispose of the controls
568 for (Control control
: formElement
.getControls()) {
569 // we added the layoutComposite of the parental element as the
570 // layout composite to this formElement
571 // but we do not want to destroy it.
572 if (control
.equals(formElement
.getLayoutComposite())) {
575 if (control
!= null && !control
.isDisposed()){
589 * a {@link org.eclipse.swt.widgets.Composite} object.
590 * @return a {@link org.eclipse.swt.widgets.Label} object.
592 public Label
createEmptyCell(Composite parent
) {
593 return this.createLabel(parent
, null);
598 * createMultiLanguageTextElement
601 * @param parentElement
602 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
605 * a {@link java.lang.String} object.
606 * @param multilanguageText
607 * a {@link java.util.Map} object.
613 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
616 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
617 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
618 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
619 multilanguageText
, textHeight
, style
);
621 parentElement
.addElement(element
);
627 * createMultiLanguageTextElement
630 * @param parentElement
631 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
634 * @param Representation
635 * a {@link eu.etaxonomy.cdm.model.term.Representation} object.
641 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
644 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
645 RepresentationElement element
= new RepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
647 parentElement
.addElement(element
);
653 * createMultiLanguageTextElement
656 * @param parentElement
657 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
660 * @param Representation
661 * a {@link eu.etaxonomy.cdm.model.term.Representation} object.
667 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
670 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
671 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
673 parentElement
.addElement(element
);
677 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
678 KeyStatement keyStatement
, int textHeight
, int style
) {
679 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
682 parentElement
.addElement(element
);
687 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
689 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
690 * @param parentElement the parent container
691 * @param labelString the label name
692 * @param initialObject the object from which the <code>toString()</code> method is called
693 * @param style {@link SWT} style constant
694 * @return the created textfield with label
696 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
697 Object initialObject
, int style
) {
698 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
703 * createTextWithLabelElement
706 * @param parentElement
707 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
710 * a {@link java.lang.String} object.
712 * a {@link java.lang.String} object.
715 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
718 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
719 String initialText
, int style
) {
720 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
724 * createTextWithLabelElement
727 * @param parentElement
728 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
731 * a {@link java.lang.String} object.
733 * a {@link java.lang.String} object.
734 * @param textLimit maximal number of characters allowed
737 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
740 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
741 String initialText
, Integer textLimit
, int style
) {
742 if(initialText
==null){
746 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
749 parentElement
.addElement(element
);
753 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
754 int textHeight
, int style
) {
755 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
757 parentElement
.addElement(element
);
761 public LsidWithExceptionLabelElement
createLsidWithExceptionLabelElement(ICdmFormElement parentElement
, String labelString
,
762 LSID initialLsid
, int style
) {
763 LsidWithExceptionLabelElement element
= new LsidWithExceptionLabelElement(this, parentElement
, labelString
, initialLsid
, null, style
);
765 parentElement
.addElement(element
);
769 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
770 URI initialUri
, int style
) {
771 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
773 parentElement
.addElement(element
);
776 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
777 URI initialUri
,Integer textHeight
, int style
) {
778 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, textHeight
, style
);
780 parentElement
.addElement(element
);
785 public DoiWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
786 DOI initialDoi
, int style
) {
787 DoiWithLabelElement element
= new DoiWithLabelElement(this, parentElement
, labelString
, initialDoi
, null, style
);
789 parentElement
.addElement(element
);
792 public DoiWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
793 DOI initialDoi
,Integer textHeight
, int style
) {
794 DoiWithLabelElement element
= new DoiWithLabelElement(this, parentElement
, labelString
, initialDoi
, textHeight
, style
);
796 parentElement
.addElement(element
);
807 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
808 IOpenUrlEnabled openUrlEnabled
, int style
) {
809 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
812 parentElement
.addElement(element
);
818 * @param parentElement
820 * @param conversationEnabled
825 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
826 ConversationHolder conversation
, User user
, int style
) {
827 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
829 parentElement
.addElement(element
);
835 * createIntegerTextWithLabelElement
838 * @param parentElement
839 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
842 * a {@link java.lang.String} object.
843 * @param initialInteger
844 * a {@link java.lang.Integer} object.
848 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
851 public NumberWithLabelElement
createNumberTextWithLabelElement(
852 ICdmFormElement parentElement
, String labelString
,
853 Number initialNumber
, int style
) {
854 NumberWithLabelElement element
= new NumberWithLabelElement(this,
855 parentElement
, labelString
, initialNumber
, style
);
857 parentElement
.addElement(element
);
861 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
862 String labelString
, LanguageString languageString
, int style
) {
863 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
866 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
867 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
868 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
869 languageString
, height
, isMultiLine
, style
);
871 parentElement
.addElement(element
);
877 * createKeyValueViewerElement
880 * @param parentElement
881 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
884 * a {@link java.lang.String} object.
885 * @param valueHeading
886 * a {@link java.lang.String} object.
888 * a {@link java.util.Map} object.
889 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
892 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
893 String valueHeading
, Map
<Object
, Object
> map
) {
894 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
896 parentElement
.addElement(element
);
900 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
903 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
904 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
905 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
, selection
, true, style
);
907 parentElement
.addElement(element
);
911 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
913 ICdmFormElement parentElement
,
917 Comparator
<T
> comparator
) {
918 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, comparator
);
921 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
923 ICdmFormElement parentElement
,
926 boolean addEmptyElement
,
928 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, false, null);
931 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
933 ICdmFormElement parentElement
,
937 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, null);
940 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
942 ICdmFormElement parentElement
,
946 return this.createDefinedTermComboElement(null, null, terms
, parentElement
, labelString
, selection
, true, style
, false, null);
948 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
950 ICdmFormElement parentElement
,
953 boolean addEmptyElement
,
955 return this.createDefinedTermComboElement(null, null, terms
, parentElement
, labelString
, selection
, addEmptyElement
, style
, false, null);
957 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
959 ICdmFormElement parentElement
,
962 boolean addEmptyElement
,
964 boolean useAbbrevLabel
) {
965 return createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
969 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
970 TermVocabulary
<?
> termVocabulary
,
971 ICdmFormElement parentElement
,
975 return this.createDefinedTermComboElement(null, termVocabulary
, null, parentElement
, labelString
, selection
, true, style
, false, null);
978 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
979 TermVocabulary
<?
> termVocabulary
,
980 ICdmFormElement parentElement
,
983 boolean addEmptyElement
,
985 boolean useAbbrevLabel
) {
986 return createDefinedTermComboElement(null, termVocabulary
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
989 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
991 TermVocabulary
<?
> termVocabulary
,
993 ICdmFormElement parentElement
,
996 boolean addEmptyElement
,
998 boolean useAbbrevLabel
,
999 Comparator
<T
> comparator
) {
1001 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1003 parentElement
.addElement(element
);
1006 else if(termVocabulary
!=null){
1007 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1008 if (comparator
!= null){
1009 element
.setTermComparator(comparator
);
1012 parentElement
.addElement(element
);
1014 }else if (terms
!= null){
1016 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, terms
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
1017 if (comparator
!= null){
1018 element
.setTermComparator(comparator
);
1021 parentElement
.addElement(element
);
1025 //this should never happen
1030 public NameRelationshipTypeCombo
createNameRelationshipTypeCombo(ICdmFormElement parentElement
,
1033 boolean useAbbrevLabel
,
1034 Comparator
<NameRelationshipType
> comparator
) {
1036 NameRelationshipTypeCombo
<InverseTermWrapper
> element
= new NameRelationshipTypeCombo(this, parentElement
, labelString
, true, style
, useAbbrevLabel
, comparator
);
1038 parentElement
.addElement(element
);
1042 public MisappliedRelationshipComboElement
createMisappliedRelationshipComboElement(
1043 ICdmFormElement parentElement
,
1045 TaxonRelationshipType selection
,
1047 MisappliedRelationshipComboElement combo
= new MisappliedRelationshipComboElement(this, parentElement
, labelString
, selection
, false, style
, false);
1049 parentElement
.addElement(combo
);
1053 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1054 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
1056 return createEnumComboElement(enumComboType
, parentElement
, null, style
);
1059 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1060 Class
<T
> enumComboType
, ICdmFormElement parentElement
, Comparator
<T
> comparator
,
1062 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, comparator
, style
);
1064 parentElement
.addElement(element
);
1068 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
1069 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1070 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1072 parentElement
.addElement(element
);
1078 * createBrowserElement
1082 * a {@link java.net.URI} object.
1085 * @param parentElement
1086 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1088 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1091 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1092 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1094 parentElement
.addElement(element
);
1100 * createImageElement
1103 * @param parentElement
1104 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1107 * a {@link java.net.URI} object.
1110 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1112 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1113 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1115 parentElement
.addElement(element
);
1121 * createTextActionElement
1124 * @param labelString
1125 * a {@link java.lang.String} object.
1126 * @param initialText
1127 * a {@link java.lang.String} object.
1130 * @param parentElement
1131 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1133 * @param buttonLabel
1134 * a {@link java.lang.String} object.
1135 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1138 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1139 String buttonLabel
, String initialText
, int style
) {
1140 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1143 parentElement
.addElement(element
);
1152 * @param parentElement
1153 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1156 * a {@link java.lang.String} object.
1157 * @param initialState
1161 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1164 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1165 if(initialState
==null){
1166 initialState
= Boolean
.FALSE
;
1168 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1170 parentElement
.addElement(element
);
1175 * Creates a section as a part of the form.
1177 * @return the section widget
1180 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1183 public Section
adapt(AbstractFormSection section
) {
1184 section
.setMenu(section
.getLayoutComposite().getMenu());
1185 adapt(section
, true, true);
1187 // handle focus and property change events for cdm use
1188 section
.addFocusListener(selectionFocusHandler
);
1189 section
.setPropertyChangeListeners(propertyChangeListeners
);
1191 section
.addExpansionListener(new ExpansionAdapter(){
1193 public void expansionStateChanged(ExpansionEvent e
) {
1194 super.expansionStateChanged(e
);
1195 if(section
.getEntity()!=null){
1196 PreferencesUtil
.setStringValue(StoreUtil
.getPrefKey(section
.getClass(), section
.getEntity().getClass().getCanonicalName()), e
.getState()?CdmSectionPart
.EXPANDED
:CdmSectionPart
.COLLAPSED
);
1201 if (section
.getToggle() != null) {
1202 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1203 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1206 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1208 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1209 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1210 getColors().initializeSectionToolBarColors();
1211 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1212 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1214 // call setTitleBarForeground regardless as it also sets the label color
1215 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1219 private class BoldFontHolder2
{
1220 private Font normalFont
;
1222 private Font boldFont
;
1224 public BoldFontHolder2() {
1227 public Font
getBoldFont(Font font
) {
1228 createBoldFont(font
);
1232 private void createBoldFont(Font font
) {
1233 if (normalFont
== null || !normalFont
.equals(font
)) {
1237 if (boldFont
== null) {
1238 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1242 public void dispose() {
1243 if (boldFont
!= null) {
1244 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1252 * createToggleableTextField
1255 * @param parentElement
1256 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1258 * @param labelString
1259 * a {@link java.lang.String} object.
1260 * @param initialText
1261 * a {@link java.lang.String} object.
1262 * @param initialState
1266 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1269 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1270 String initialText
, boolean initialState
, int style
) {
1271 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1272 initialState
, style
| orientation
);
1275 parentElement
.addElement(element
);
1281 * createTimePeriodElement
1284 * @param parentElement
1285 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1287 * @param labelString
1288 * a {@link java.lang.String} object.
1290 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1293 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1296 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1297 TimePeriod timePeriod
, int style
) {
1298 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1300 parentElement
.addElement(element
);
1306 * createVerbatimTimePeriodElement
1309 * @param parentElement
1310 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1312 * @param labelString
1313 * a {@link java.lang.String} object.
1315 * a {@link eu.etaxonomy.cdm.model.common.VerbatimTimePeriod} object.
1318 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimTimePeriodElement}
1321 public VerbatimTimePeriodElement
createVerbatimTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1322 VerbatimTimePeriod timePeriod
, int style
) {
1323 VerbatimTimePeriodElement element
= new VerbatimTimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1325 parentElement
.addElement(element
);
1333 * createGatheringEventUnitElement
1336 * @param parentElement
1337 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1339 * @param labelString
1340 * a {@link java.lang.String} object.
1342 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1345 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1348 public GatheringEventUnitElement
createGatheringEventUnitElement(
1349 ICdmFormElement parentElement
,
1351 DerivedUnitFacade gatheringEvent
,
1352 MinMaxTextSection
.UnitType unitType
,
1354 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1361 parentElement
.addElement(element
);
1367 * createPointElement
1372 * @param parentElement
1373 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1376 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1377 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1379 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1380 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1382 parentElement
.addElement(element
);
1387 * Creates an empty section with the given message.<br>
1388 * If message is <code>null</code> a default message will be displayed.
1390 public EmptySection
createEmptySection(String message
, CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1391 EmptySection section
= new EmptySection(message
, formFactory
, parentElement
, style
);
1392 parentElement
.addElement(section
);
1399 * createDateDetailSection
1402 * @param parentElement
1403 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1407 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1410 public DateDetailSection
<TimePeriod
> createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1411 DateDetailSection
<TimePeriod
> section
= new DateDetailSection
<TimePeriod
>(this, parentElement
, false, style
);
1412 parentElement
.addElement(section
);
1419 * createVerbatimDateDetailSection
1422 * @param parentElement
1423 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1427 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimDateDetailSection}
1430 public DateDetailSection
<VerbatimTimePeriod
> createVerbatimDateDetailSection(ICdmFormElement parentElement
, int style
) {
1431 DateDetailSection
<VerbatimTimePeriod
> section
1432 = new DateDetailSection
<VerbatimTimePeriod
>(this, parentElement
, true, style
);
1433 parentElement
.addElement(section
);
1440 * createDateDetailSection
1443 * @param parentElement
1444 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1448 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1451 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1452 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1453 parentElement
.addElement(section
);
1460 * createPartialElement
1463 * @param parentElement
1464 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1466 * @param labelString
1467 * a {@link java.lang.String} object.
1469 * a {@link org.joda.time.Partial} object.
1472 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1475 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1477 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1479 parentElement
.addElement(element
);
1485 * addSelectionListener
1489 * a {@link org.eclipse.swt.events.SelectionListener} object.
1491 public void addSelectionListener(SelectionListener listener
) {
1492 selectionListenerList
.add(listener
);
1497 * removeSelectionListener
1501 * a {@link org.eclipse.swt.events.SelectionListener} object.
1503 public void removeSelectionListener(SelectionListener listener
) {
1504 if (listener
== null) {
1505 MessagingUtils
.error(this.getClass(),
1506 "Tried to remove a selection listener from this factories listeners but was null", null);
1508 selectionListenerList
.remove(listener
);
1514 * addPropertyChangeListener
1518 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1521 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1522 if (propertyChangeListeners
.contains(listener
)) {
1525 propertyChangeListeners
.add(0, listener
);
1530 * removePropertyChangeListener
1534 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1537 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1538 propertyChangeListeners
.remove(listener
);
1542 * @return the propertyChangeListeners
1544 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1545 return propertyChangeListeners
;
1550 * createHorizontalSeparator
1553 * @param parentElement
1554 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1558 * @return a {@link org.eclipse.swt.widgets.Label} object.
1560 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1561 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1562 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1568 * createVersionElement
1571 * @param parentElement
1572 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1575 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1580 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1583 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1584 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1586 parentElement
.addElement(element
);
1591 * @param cdmBaseSection
1596 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1597 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1599 parentElement
.addElement(element
);
1605 * createVersionSection
1608 * @param parentElement
1609 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1614 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1617 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1618 VersionSection section
= new VersionSection(this, parentElement
, style
);
1619 parentElement
.addElement(section
);
1629 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1630 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1631 parentElement
.addElement(section
);
1638 * createEmptyElement
1641 * @param parentElement
1642 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1644 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1646 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1647 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1649 parentElement
.addElement(element
);
1655 * createHeadlineSection
1658 * @param parentElement
1659 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1662 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1665 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1666 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1667 parentElement
.addElement(section
);
1674 * createParsingMessageElement
1677 * @param parentElement
1678 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1680 * @param parserProblem
1681 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1686 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1689 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1690 ParserProblem parserProblem
, int style
) {
1691 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1693 parentElement
.addElement(element
);
1697 public DefinedTermDetailSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1698 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1700 DefinedTermDetailSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1701 selectionProvider
, style
);
1703 parentElement
.addElement(section
);
1709 public TermMediaSection
createTermMediaSection(ConversationHolder conversation
,
1710 ICdmFormElement parentElement
, int style
) {
1711 TermMediaSection section
= new TermMediaSection(this, conversation
, parentElement
, style
);
1712 parentElement
.addElement(section
);
1719 * @param definedTermClass
1720 * @param formElement
1724 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1725 AbstractCdmDetailSection parentElement
, int style
) {
1726 AbstractCdmDetailElement element
= null;
1728 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1729 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1730 } else if (definedTermClass
.equals(Feature
.class)) {
1731 element
= new FeatureDetailElement(this, parentElement
);
1732 } else if(definedTermClass
.equals(PresenceAbsenceTerm
.class)){
1733 element
= new PresenceAbsenceTermDetailElement(this, parentElement
);
1735 element
= new DefinedTermDetailElement(this, parentElement
);
1740 parentElement
.addElement(element
);
1744 public CharacterNodeDetailSection
createCharacterNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1745 CharacterNodeDetailSection section
= new CharacterNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1746 addAndAdaptSection(parentElement
, section
);
1750 public CharacterDetailSection
createCharacterDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1751 CharacterDetailSection section
= new CharacterDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1752 addAndAdaptSection(parentElement
, section
);
1756 public CharacterNodeDetailElement
createCharacterNodeDetailElement(ICdmFormElement parentElement
, int style
){
1757 CharacterNodeDetailElement element
= new CharacterNodeDetailElement(this, parentElement
);
1758 addAndAdaptElement(parentElement
, element
);
1762 public CharacterDetailElement
createCharacterDetailElement(ICdmFormElement parentElement
, int style
){
1763 CharacterDetailElement element
= new CharacterDetailElement(this, parentElement
);
1764 addAndAdaptElement(parentElement
, element
);
1768 public FeatureTreeDetailElement
createFeatureTreeDetailElement(ICdmFormElement parentElement
, int style
){
1769 FeatureTreeDetailElement element
= new FeatureTreeDetailElement(this, parentElement
);
1770 addAndAdaptElement(parentElement
, element
);
1774 public FeatureNodeDetailElement
createFeatureNodeDetailElement(ICdmFormElement parentElement
, int style
){
1775 FeatureNodeDetailElement element
= new FeatureNodeDetailElement(this, parentElement
);
1776 addAndAdaptElement(parentElement
, element
);
1781 //--------DetailSections---------
1782 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1783 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1784 addAndAdaptSection(parentElement
, section
);
1788 public FeatureNodeDetailSection
createFeatureNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1789 FeatureNodeDetailSection section
= new FeatureNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1790 addAndAdaptSection(parentElement
, section
);
1794 public FeatureTreeDetailSection
createFeatureTreeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1795 FeatureTreeDetailSection section
= new FeatureTreeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1796 addAndAdaptSection(parentElement
, section
);
1800 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1801 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1802 addAndAdaptSection(parentElement
, section
);
1806 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1807 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1808 addAndAdaptSection(parentElement
, section
);
1812 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1813 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1814 addAndAdaptSection(parentElement
, section
);
1818 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1819 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1820 addAndAdaptSection(parentElement
, section
);
1824 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1825 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1826 addAndAdaptSection(parentElement
, section
);
1830 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1831 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1832 addAndAdaptSection(parentElement
, section
);
1836 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1837 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1838 addAndAdaptSection(parentElement
, section
);
1842 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1843 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1844 addAndAdaptSection(parentElement
, section
);
1848 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1849 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1850 addAndAdaptSection(parentElement
, section
);
1854 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1855 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1856 addAndAdaptSection(parentElement
, section
);
1862 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
1863 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
1864 addAndAdaptSection(parentElement
, section
);
1868 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1869 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1870 addAndAdaptSection(parentElement
, section
);
1874 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1875 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1876 addAndAdaptSection(parentElement
, section
);
1880 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1881 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1882 addAndAdaptSection(parentElement
, section
);
1886 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1887 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1888 addAndAdaptSection(parentElement
, section
);
1892 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1893 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
1894 addAndAdaptSection(parentElement
, section
);
1898 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1899 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1900 addAndAdaptSection(parentElement
, section
);
1904 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1905 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
1906 addAndAdaptSection(parentElement
, section
);
1910 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1911 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1912 addAndAdaptSection(parentElement
, section
);
1916 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1917 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1918 addAndAdaptSection(parentElement
, section
);
1922 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1923 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1924 addAndAdaptSection(parentElement
, section
);
1928 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1929 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1930 addAndAdaptSection(parentElement
, section
);
1934 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1935 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1936 addAndAdaptSection(parentElement
, section
);
1940 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1941 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1942 addAndAdaptSection(parentElement
, section
);
1946 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1947 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1948 addAndAdaptSection(parentElement
, section
);
1952 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1953 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1954 addAndAdaptSection(parentElement
, section
);
1958 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1959 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1960 addAndAdaptSection(parentElement
, section
);
1964 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1965 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1966 addAndAdaptSection(parentElement
, section
);
1970 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1971 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1972 addAndAdaptSection(parentElement
, section
);
1976 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1977 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1978 addAndAdaptSection(parentElement
, section
);
1982 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1983 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
1984 addAndAdaptSection(parentElement
, section
);
1988 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1989 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1990 addAndAdaptSection(parentElement
, section
);
1994 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1995 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1996 addAndAdaptSection(parentElement
, section
);
2000 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2001 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
2002 addAndAdaptSection(parentElement
, section
);
2006 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2007 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
2008 addAndAdaptSection(parentElement
, section
);
2012 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2013 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
2014 addAndAdaptSection(parentElement
, section
);
2018 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2019 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2020 addAndAdaptSection(parentElement
, section
);
2024 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2025 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2026 addAndAdaptSection(parentElement
, section
);
2030 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2031 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2032 addAndAdaptSection(parentElement
, section
);
2036 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2037 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2038 addAndAdaptSection(parentElement
, section
);
2042 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2043 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
2044 addAndAdaptSection(parentElement
, section
);
2048 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2049 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2050 addAndAdaptSection(parentElement
, section
);
2054 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2055 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2056 addAndAdaptSection(parentElement
, section
);
2060 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2061 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2062 addAndAdaptSection(parentElement
, section
);
2066 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2067 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2068 addAndAdaptSection(parentElement
, section
);
2072 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2073 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2074 addAndAdaptSection(parentElement
, section
);
2078 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2079 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2080 addAndAdaptSection(parentElement
, section
);
2084 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2085 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
, true);
2086 addAndAdaptSection(parentElement
, section
);
2090 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2091 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2092 addAndAdaptSection(parentElement
, section
);
2096 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2097 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2098 addAndAdaptSection(parentElement
, section
);
2102 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2103 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2104 addAndAdaptSection(parentElement
, section
);
2108 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2109 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2110 addAndAdaptSection(parentElement
, section
);
2114 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2115 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2116 addAndAdaptSection(parentElement
, section
);
2120 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
2121 parentElement
.addElement(section
);
2125 //--------DetailElements------------
2127 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
2128 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
2129 addAndAdaptElement(parentElement
, element
);
2133 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
2134 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
2135 addAndAdaptElement(parentElement
, element
);
2139 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
2140 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
2141 addAndAdaptElement(parentElement
, element
);
2145 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
2146 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
2147 addAndAdaptElement(parentElement
, element
);
2151 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
2152 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
2153 addAndAdaptElement(parentElement
, element
);
2157 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
2158 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
2159 addAndAdaptElement(parentElement
, element
);
2163 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
2164 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
2165 addAndAdaptElement(parentElement
, element
);
2169 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
2170 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
2171 addAndAdaptElement(parentElement
, element
);
2175 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
2176 UserDetailElement element
= new UserDetailElement(this, parentElement
);
2177 addAndAdaptElement(parentElement
, element
);
2181 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2182 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2183 addAndAdaptElement(parentElement
, element
);
2187 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2188 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2189 addAndAdaptElement(parentElement
, element
);
2193 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2194 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2195 addAndAdaptElement(parentElement
, element
);
2199 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2200 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2201 addAndAdaptElement(parentElement
, element
);
2205 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2206 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2207 addAndAdaptElement(parentElement
, element
);
2211 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2212 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2214 parentElement
.addElement(element
);
2219 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2220 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2221 addAndAdaptElement(parentElement
, element
);
2225 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2226 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2227 addAndAdaptElement(parentElement
, element
);
2231 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2232 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2233 addAndAdaptElement(parentElement
, element
);
2237 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2238 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2239 addAndAdaptElement(parentElement
, element
);
2243 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2244 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2245 addAndAdaptElement(parentElement
, element
);
2249 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2250 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2251 addAndAdaptElement(parentElement
, element
);
2255 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2256 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2257 addAndAdaptElement(parentElement
, element
);
2261 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2262 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2263 addAndAdaptElement(parentElement
, element
);
2267 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2268 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2269 addAndAdaptElement(parentElement
, element
);
2273 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2274 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2275 addAndAdaptElement(parentElement
, element
);
2279 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2280 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2281 addAndAdaptElement(parentElement
, element
);
2285 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2286 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2287 addAndAdaptElement(parentElement
, element
);
2291 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2292 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2293 addAndAdaptElement(parentElement
, element
);
2297 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
, boolean isWizard
){
2298 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
, isWizard
);
2299 addAndAdaptElement(parentElement
, element
);
2303 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2304 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2305 addAndAdaptElement(parentElement
, element
);
2310 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2311 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2312 addAndAdaptElement(parentElement
, element
);
2316 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2317 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2318 addAndAdaptElement(parentElement
, element
);
2322 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2323 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2324 addAndAdaptElement(parentElement
, element
);
2328 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2329 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2330 addAndAdaptElement(parentElement
, element
);
2334 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2335 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2336 addAndAdaptElement(parentElement
, element
);
2340 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2341 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2342 addAndAdaptElement(parentElement
, element
);
2346 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2347 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2348 addAndAdaptElement(parentElement
, element
);
2352 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2353 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2354 addAndAdaptElement(parentElement
, element
);
2358 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2359 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2360 addAndAdaptElement(parentElement
, element
);
2364 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2365 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2366 addAndAdaptElement(parentElement
, element
);
2370 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2371 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2372 addAndAdaptElement(parentElement
, element
);
2376 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2377 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2378 addAndAdaptElement(parentElement
, element
);
2382 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2383 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2384 addAndAdaptElement(parentElement
, element
);
2388 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2389 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2390 addAndAdaptElement(parentElement
, element
);
2394 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2395 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2396 addAndAdaptElement(parentElement
, element
);
2400 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2401 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2402 addAndAdaptElement(parentElement
, element
);
2406 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2407 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2408 addAndAdaptElement(parentElement
, mediaDetailElement
);
2409 return mediaDetailElement
;
2412 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2413 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2414 addAndAdaptElement(parentElement
, element
);
2418 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2419 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2420 addAndAdaptElement(parentElement
, element
);
2424 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2425 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2426 addAndAdaptElement(parentElement
, element
);
2430 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2431 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2432 addAndAdaptElement(parentElement
, element
);
2436 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2437 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2438 addAndAdaptElement(parentElement
, element
);
2442 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2443 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2444 addAndAdaptElement(parentElement
, element
);
2448 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2449 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2450 addAndAdaptElement(parentElement
, element
);
2455 * @param parentElement
2458 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2460 parentElement
.addElement(element
);
2463 //--------EntityCollectionSection----------
2464 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2465 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2466 addAndAdaptSection(parentElement
, section
);
2470 public InapplicableIfEntityCollectionSection
createInapplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2471 InapplicableIfEntityCollectionSection section
= new InapplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2472 addAndAdaptSection(parentElement
, section
);
2476 public OnlyApplicableIfEntityCollectionSection
createOnlyApplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2477 OnlyApplicableIfEntityCollectionSection section
= new OnlyApplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2478 addAndAdaptSection(parentElement
, section
);
2482 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2483 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2484 addAndAdaptSection(parentElement
, section
);
2488 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2489 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2490 addAndAdaptSection(parentElement
, section
);
2494 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2495 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2496 addAndAdaptSection(parentElement
, section
);
2500 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2501 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2502 addAndAdaptSection(parentElement
, section
);
2506 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2507 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2508 addAndAdaptSection(parentElement
, section
);
2512 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2513 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2514 addAndAdaptSection(parentElement
, section
);
2518 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2519 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2520 addAndAdaptSection(parentElement
, section
);
2524 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2525 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2526 addAndAdaptSection(parentElement
, section
);
2530 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2531 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2532 addAndAdaptSection(parentElement
, section
);
2536 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2537 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2538 addAndAdaptSection(parentElement
, section
);
2542 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2543 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2544 addAndAdaptSection(parentElement
, section
);
2548 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2549 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2550 addAndAdaptSection(parentElement
, section
);
2554 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2555 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
2556 addAndAdaptSection(parentElement
, section
);
2559 public ExternalLinksSection
createExternalLinksSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2560 ExternalLinksSection section
= new ExternalLinksSection(this, conversation
, parentElement
, style
);
2561 addAndAdaptSection(parentElement
, section
);
2565 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2566 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2567 addAndAdaptSection(parentElement
, section
);
2571 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2572 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2573 addAndAdaptSection(parentElement
, section
);
2577 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2578 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2579 addAndAdaptSection(parentElement
, section
);
2583 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2584 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2585 addAndAdaptSection(parentElement
, section
);
2589 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2590 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2591 addAndAdaptSection(parentElement
, section
);
2595 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2596 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2597 addAndAdaptSection(parentElement
, section
);
2601 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2602 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2603 addAndAdaptSection(parentElement
, section
);
2607 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2608 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2609 addAndAdaptSection(parentElement
, section
);
2613 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2614 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2615 addAndAdaptSection(parentElement
, section
);
2619 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2620 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2621 addAndAdaptSection(parentElement
, section
);
2625 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2626 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2627 addAndAdaptSection(parentElement
, section
);
2631 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2632 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2633 addAndAdaptSection(parentElement
, section
);
2637 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2638 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2639 addAndAdaptSection(parentElement
, section
);
2643 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2644 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2645 addAndAdaptSection(parentElement
, section
);
2649 public GeoScopePolyKeyDetailSection
createGeoScopePolyKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2650 GeoScopePolyKeyDetailSection section
= new GeoScopePolyKeyDetailSection(this, conversation
, parentElement
, style
);
2651 addAndAdaptSection(parentElement
, section
);
2655 public IdentifierSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2656 IdentifierSection section
= new IdentifierSection(this, conversation
, parentElement
, style
);
2657 addAndAdaptSection(parentElement
, section
);
2661 public DerivedUnitFacadeIdentifierSection
createDerivedUnitFacadeIdentifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2662 DerivedUnitFacadeIdentifierSection section
= new DerivedUnitFacadeIdentifierSection(this, conversation
, parentElement
, style
);
2663 addAndAdaptSection(parentElement
, section
);
2667 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2668 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2669 addAndAdaptSection(parentElement
, section
);
2673 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2674 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2675 addAndAdaptSection(parentElement
, section
);
2679 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2680 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2681 addAndAdaptSection(parentElement
, section
);
2685 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2686 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2687 addAndAdaptSection(parentElement
, section
);
2691 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2692 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2693 addAndAdaptSection(parentElement
, section
);
2697 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2698 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2699 addAndAdaptSection(parentElement
, section
);
2703 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2704 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2705 addAndAdaptSection(parentElement
, section
);
2709 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2710 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2711 addAndAdaptSection(parentElement
, section
);
2715 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2716 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2717 addAndAdaptSection(parentElement
, section
);
2721 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2722 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2723 addAndAdaptSection(parentElement
, section
);
2727 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2728 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2729 addAndAdaptSection(parentElement
, section
);
2733 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2734 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2735 addAndAdaptSection(parentElement
, section
);
2739 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2740 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2741 addAndAdaptSection(parentElement
, section
);
2746 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2747 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2748 AbstractEntityCollectionElement
<?
> element
= null;
2750 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2752 if (entity
instanceof Annotation
) {
2753 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2754 }else if (entity
instanceof Person
) {
2755 boolean isNomenclatural
= false;
2756 if (parentElement
instanceof TeamMemberSection
){
2757 isNomenclatural
= ((TeamMemberSection
) parentElement
).isNomenclaturalTeam();
2759 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
, isNomenclatural
);
2760 } else if (entity
instanceof Credit
) {
2761 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2762 } else if (entity
instanceof Extension
) {
2763 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2764 } else if (entity
instanceof ExternalLink
) {
2765 element
= new ExternalLinksElement(this, parentElement
, (ExternalLink
) entity
, removeListener
, style
);
2766 } else if (entity
instanceof Marker
) {
2767 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2768 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2769 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
, removeListener
, backgroundColor
, style
);
2770 }else if (entity
instanceof Media
) {
2771 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2772 } else if (entity
instanceof MediaRepresentation
) {
2773 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2775 } else if (entity
instanceof ImageFile
) {
2776 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2777 } else if (entity
instanceof MediaRepresentationPart
) {
2778 element
= new MediaRepresentationPartElement
<>(this, parentElement
, (MediaRepresentationPart
) entity
,
2779 removeListener
, style
);
2780 } else if (entity
instanceof NomenclaturalStatus
) {
2781 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2783 } else if (entity
instanceof Rights
) {
2784 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2785 } else if (entity
instanceof DescriptionElementSource
&& parentElement
.getEntity() instanceof CommonTaxonName
) {
2786 element
= new CommonNameSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2787 removeListener
, style
);
2788 } else if (entity
instanceof DescriptionElementSource
) {
2789 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2790 removeListener
, style
, false);
2791 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2792 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
,
2793 removeListener
,backgroundColor
, style
);
2795 else if (entity
instanceof IdentifiableSource
) {
2796 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2798 } else if (entity
instanceof DefinedTerm
) {
2799 switch(((DefinedTerm
)entity
).getTermType()) {
2801 element
= new ScopeElement(this,
2803 (DefinedTerm
) entity
,
2808 element
= new ModifierElement(this,
2810 (DefinedTerm
) entity
,
2818 } else if (entity
instanceof Reference
) {
2819 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
2820 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2823 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2825 } else if (entity
instanceof NameTypeDesignation
) {
2826 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2828 } else if (entity
instanceof TextualTypeDesignation
) {
2829 element
= new TextTypeDesignationElement(this, parentElement
, (TextualTypeDesignation
) entity
, removeListener
,
2831 } else if (entity
instanceof NameRelationship
) {
2832 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2834 } else if (entity
instanceof SpecimenTypeDesignation
) {
2835 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
2836 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2837 removeListener
, style
);
2840 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2841 removeListener
, style
);
2843 } else if (entity
instanceof StateData
) {
2844 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2845 } else if (entity
instanceof StatisticalMeasurementValue
) {
2846 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2847 removeListener
, style
);
2848 } else if (entity
instanceof DerivedUnit
) {
2849 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2850 case LivingSpecimen
:
2851 case PreservedSpecimen
:
2853 element
= new SpecimenCollectionDetailElement(this,
2855 (DerivedUnit
) entity
,
2860 element
= new DerivedUnitElement(this,
2862 (DerivedUnit
) entity
,
2867 } else if (entity
instanceof NamedArea
) {
2868 element
= new CollectingAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2869 } else if (entity
instanceof DeterminationEvent
) {
2870 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2871 } else if (entity
instanceof User
) {
2872 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2873 } else if (entity
instanceof GrantedAuthority
) {
2874 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
, ((Group
)parentElement
.getEntity()),
2875 removeListener
, style
);
2876 } else if (entity
instanceof Group
) {
2877 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2878 } else if (entity
instanceof Taxon
) {
2879 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2880 } else if (entity
instanceof DescriptionElementBase
) {
2881 // this is the special case for protologs, maybe we can do this
2882 // differently when API improves
2883 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2884 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2885 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2887 } else if (entity
instanceof Identifier
) {
2888 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
2889 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
2892 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
2894 } else if (entity
instanceof TermVocabulary
) {
2895 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
2896 switch (termVocabulary
.getTermType()) {
2898 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
2901 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
2906 } else if (entity
instanceof MeasurementUnit
) {
2907 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
2908 } else if (entity
instanceof StatisticalMeasure
) {
2909 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
2910 } else if (entity
instanceof FeatureState
&& parentElement
instanceof InapplicableIfEntityCollectionSection
) {
2911 element
= new InapplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
2912 } else if (entity
instanceof FeatureState
&& parentElement
instanceof OnlyApplicableIfEntityCollectionSection
) {
2913 element
= new OnlyApplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
2916 //check for parent section when entity is null
2917 //this happens when AbstractUnboundEntityCollectionSection is used
2919 if(parentElement
instanceof ScopeSection
|| parentElement
instanceof ScopeRestrictionSection
){
2920 element
= new ScopeElement(this,
2922 (DefinedTerm
) entity
,
2926 else if(parentElement
instanceof ModifierSection
){
2927 element
= new ModifierElement(this,
2929 (DefinedTerm
) entity
,
2936 if (element
== null) {
2937 MessagingUtils
.messageDialog(
2938 String
.format("Error when creating section %s",
2939 parentElement
.getClass().getSimpleName()),
2941 String
.format("Could not generate collection element for entity of class %s."
2942 + " Looks like the case is not yet handled. Check implementation.\n"
2943 + "Entity: %s", entity
.getClass(), entity
.toString()), null);
2947 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2948 element
.setPersistentBackground(backgroundColor
);
2951 parentElement
.addElement(element
);
2959 * Creates a selection element for the given type T.
2962 * <strong>Selection elements not handled by this method:</strong>
2964 * <li>{@link TaxonNodeSelectionElement} see
2965 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2967 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2968 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2974 * a {@link Class} object of the type that you want the selection
2976 * @param parentElement
2977 * a {@link ICdmFormElement} object.
2978 * @param labelString
2979 * a {@link String} object.
2980 * @param selectionType
2982 * a {@link ICdmBase} object.
2985 * @param conversation
2986 * a {@link ConversationHolder} object.
2987 * @return a {@link EntitySelectionElement} object.
2989 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2990 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2991 int style
, boolean filterElement
) {
2992 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, //conversation,
2993 parentElement
, clazz
,
2994 labelString
, selection
, mode
, style
, filterElement
);
2996 parentElement
.addElement(element
);
3000 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
3001 // ConversationHolder conversation,
3002 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
3004 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this,
3005 parentElement
, clazz
,
3006 labelString
, selection
, mode
, style
);
3008 parentElement
.addElement(element
);
3012 public CommonNameReferenceSelectionElement
createCommonNameReferenceSelectionElement(ICdmFormElement parentElement
, String labelString
, Reference selection
, int mode
,
3014 CommonNameReferenceSelectionElement element
= new CommonNameReferenceSelectionElement(this,
3015 parentElement
, labelString
, selection
, mode
, style
);
3017 parentElement
.addElement(element
);
3023 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
3026 * <strong>Selection elements not handled by this method:</strong>
3028 * <li>{@link TaxonNodeSelectionElement} see
3029 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
3031 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
3032 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
3038 * a {@link Class} object of the type that you want the selection
3040 * @param parentElement
3041 * a {@link ICdmFormElement} object.
3042 * @param labelString
3043 * a {@link String} object.
3044 * @param selectionType
3046 * a {@link ICdmBase} object.
3049 * @param conversation
3050 * a {@link ConversationHolder} object.
3051 * @return a {@link EntitySelectionElement} object.
3053 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
3054 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
3055 T selection
, int mode
, int style
) {
3056 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, //conversation,
3057 parentElement
, clazz
,
3058 labelString
, selection
, mode
, style
);
3060 parentElement
.addElement(element
);
3064 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
3065 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
3066 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, //conversation,
3068 labelString
, selection
, mode
, style
);
3070 parentElement
.addElement(element
);
3076 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
3077 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
3078 // int mode, int style) {
3079 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
3080 // conversation, parentElement, labelString, selection, mode, style);
3082 // parentElement.addElement(element);
3086 /** {@inheritDoc} */
3087 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
3088 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
3089 adapt(labelElement
);
3090 parentElement
.addElement(labelElement
);
3091 return labelElement
;
3096 // public DateElementFormElement createDateElementForm(ICdmFormElement formElement, String labelText, DateTime dateTime, int style){
3097 // Label label = new Label(formElement.getLayoutComposite(), style);
3098 // label.setText(labelText+" (yyyy-MM-dd)");
3099 // DateElementFormElement dateElement = new DateElementFormElement(this, dateTime, style, formElement.getLayoutComposite());
3100 // dateElement.initInternalController();
3102 // return dateElement;
3105 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
, boolean editableText
){
3106 Label label
= new Label(formElement
.getLayoutComposite(), style
);
3107 label
.setText(labelText
);
3108 label
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3109 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, labelText
, style
, editableText
);
3110 dateElement
.initController(this, formElement
);
3111 dateElement
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3117 * Getter for the field <code>selectionProvider</code>.
3120 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
3122 public ISelectionProvider
getSelectionProvider() {
3123 return selectionProvider
;
3128 * createDetailedDescriptionDetailElement
3131 * @param parentElement
3132 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
3136 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
3141 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
3144 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
3145 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
, boolean enabled
) {
3146 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
3148 if (entity
instanceof CategoricalData
) {
3149 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
3150 (CategoricalData
) entity
, style
);
3151 } else if (entity
instanceof CommonTaxonName
) {
3152 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
3154 } else if (entity
instanceof Distribution
&& !enabled
) {
3155 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3157 } else if (entity
instanceof Distribution
) {
3158 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3160 }else if (entity
instanceof IndividualsAssociation
) {
3161 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
3162 (IndividualsAssociation
) entity
, style
);
3163 } else if (entity
instanceof QuantitativeData
) {
3164 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
3165 (QuantitativeData
) entity
, style
);
3166 } else if (entity
instanceof TaxonInteraction
) {
3167 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
3168 (TaxonInteraction
) entity
, style
);
3169 } else if (entity
instanceof TextData
) {
3170 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
3172 throw new IllegalStateException("There is no interface for the given description element");
3174 adapt(detailedDescriptionElement
);
3175 parentElement
.addElement(detailedDescriptionElement
);
3176 return detailedDescriptionElement
;
3181 * Creates a styled text as a part of the form.
3186 * the text initial value
3189 * @return the text widget
3191 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
3192 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
3193 if (value
!= null) {
3194 text
.setText(value
);
3196 text
.setForeground(getColors().getForeground());
3197 text
.setBackground(getColors().getBackground());
3198 // text.addFocusListener(visibilityHandler);
3202 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
3203 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
3204 addAndAdaptSection(parentElement
, section
);
3209 * @param formElement
3210 * @param conversationHolder
3214 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
3215 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
3216 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
3217 addAndAdaptSection(formElement
, section
);
3222 public TaxonOfRelationshipElement
createTaxonOfRelationshipDetailElement(
3223 ICdmFormElement parentElement
, int style
) {
3224 TaxonOfRelationshipElement section
= new TaxonOfRelationshipElement(this, parentElement
, style
);
3225 addAndAdaptElement(parentElement
, section
);
3229 public TaxonDetailSection
createTaxonDetailSection(ConversationHolder conversationHolder
,
3230 ICdmFormElement formElement
, ISelectionProvider selectionProvider
, int style
) {
3231 TaxonDetailSection section
= new TaxonDetailSection(this, conversationHolder
, formElement
, selectionProvider
, style
);
3232 addAndAdaptSection(formElement
, section
);
3239 * createTextWithLabelElement
3242 * @param parentElement
3243 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
3245 * @param labelString
3246 * a {@link java.lang.String} object.
3247 * @param initialText
3248 * a {@link java.lang.String} object.
3249 * @param textLimit maximal number of characters allowed
3252 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
3255 public RuleConsideredElement
createRuleConsideredElement(ICdmFormElement parentElement
, String labelString
, boolean isShowCodeEdition
, int style
) {
3256 RuleConsideredElement element
= new RuleConsideredElement(this, parentElement
, labelString
, isShowCodeEdition
, style
);
3258 parentElement
.addElement(element
);
3263 // public RichTextWithLabelElement createRichTextLabelElement(ICdmFormElement parentElement, String labelString, String initialText, int textHeight, int style) {
3264 // RichTextWithLabelElement element = new RichTextWithLabelElement(this, parentElement, labelString,
3265 // initialText, textHeight, style);
3267 // parentElement.addElement(element);