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
.ORCID
;
57 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
58 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
59 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
60 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
61 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
62 import eu
.etaxonomy
.cdm
.model
.common
.ExtendedTimePeriod
;
63 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
64 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
65 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
66 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
67 import eu
.etaxonomy
.cdm
.model
.common
.LSID
;
68 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
69 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
70 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
71 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
72 import eu
.etaxonomy
.cdm
.model
.common
.VerbatimTimePeriod
;
73 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
74 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
75 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
76 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
77 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
78 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
79 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
80 import eu
.etaxonomy
.cdm
.model
.description
.FeatureState
;
81 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
82 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
83 import eu
.etaxonomy
.cdm
.model
.description
.MeasurementUnit
;
84 import eu
.etaxonomy
.cdm
.model
.description
.PresenceAbsenceTerm
;
85 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
86 import eu
.etaxonomy
.cdm
.model
.description
.State
;
87 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
88 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasure
;
89 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
90 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
91 import eu
.etaxonomy
.cdm
.model
.description
.TemporalData
;
92 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
93 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
94 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
95 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
96 import eu
.etaxonomy
.cdm
.model
.media
.ExternalLink
;
97 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
98 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
99 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
100 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
101 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
102 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
103 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
104 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationshipType
;
105 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
106 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
107 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
108 import eu
.etaxonomy
.cdm
.model
.name
.TextualTypeDesignation
;
109 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
110 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
111 import eu
.etaxonomy
.cdm
.model
.permission
.GrantedAuthorityImpl
;
112 import eu
.etaxonomy
.cdm
.model
.permission
.Group
;
113 import eu
.etaxonomy
.cdm
.model
.permission
.User
;
114 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
115 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
116 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
117 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNodeAgentRelation
;
118 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationshipType
;
119 import eu
.etaxonomy
.cdm
.model
.term
.DefinedTerm
;
120 import eu
.etaxonomy
.cdm
.model
.term
.DefinedTermBase
;
121 import eu
.etaxonomy
.cdm
.model
.term
.IEnumTerm
;
122 import eu
.etaxonomy
.cdm
.model
.term
.Representation
;
123 import eu
.etaxonomy
.cdm
.model
.term
.TermBase
;
124 import eu
.etaxonomy
.cdm
.model
.term
.TermTree
;
125 import eu
.etaxonomy
.cdm
.model
.term
.TermType
;
126 import eu
.etaxonomy
.cdm
.model
.term
.TermVocabulary
;
127 import eu
.etaxonomy
.cdm
.persistence
.dto
.TermDto
;
128 import eu
.etaxonomy
.cdm
.persistence
.dto
.TermVocabularyDto
;
129 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
130 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
131 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
132 import eu
.etaxonomy
.taxeditor
.store
.StoreUtil
;
133 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.combo
.InverseTermWrapper
;
135 import eu
.etaxonomy
.taxeditor
.ui
.combo
.MisappliedRelationshipComboElement
;
136 import eu
.etaxonomy
.taxeditor
.ui
.combo
.NameRelationshipTypeCombo
;
137 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
138 import eu
.etaxonomy
.taxeditor
.ui
.combo
.term
.TermComboElement
;
139 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.CloneClassificationDetailElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
141 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
143 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionSection
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ExternalLinksElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ExternalLinksSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.CommonNameSourceElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TemporalDataDetailElement
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDetailElement
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDetailSection
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDtoDetailElement
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDtoDetailSection
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterNodeDetailElement
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterNodeDetailSection
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterNodeDtoDetailElement
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterNodeDtoDetailSection
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureNodeDetailElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureNodeDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureTreeDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureTreeDetailElementForNode
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureTreeDetailSection
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureTreeDetailSectionForNode
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfCollectionElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfEntityCollectionSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfEntityCollectionSectionForNode
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfCollectionElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfEntityCollectionSection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfEntityCollectionSectionForNode
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.RuleConsideredElement
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TextTypeDesignationElement
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreaDetailElement
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitMediaSection
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailElement
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailElement
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopePolyKeyDetailSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationElement
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationDetailElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
323 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
324 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
325 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
326 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
327 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
328 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
329 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
330 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
331 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.OriginalSourceAdvancedSection
;
332 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.OriginalSourceElement
;
333 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
334 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
335 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.SingleSourceSection
;
336 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
337 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
338 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
339 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
340 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
341 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
342 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
343 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
344 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
345 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
346 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
347 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
348 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
349 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
350 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
351 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
352 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
353 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
354 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
355 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
356 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
357 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
358 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
359 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
360 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
361 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailSection
;
362 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonOfRelationshipElement
;
363 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
364 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
365 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
366 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
367 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
368 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
369 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
370 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
371 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
372 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
373 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
374 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
375 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
376 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitDtoCollectionElement
;
377 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitDtoCollectionSection
;
378 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
379 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.PresenceAbsenceTermDetailElement
;
380 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierDtoVocabulariesElement
;
381 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
382 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesDtoCollectionSection
;
383 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
384 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
385 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
386 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyDtoCollectionElement
;
387 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyDtoCollectionSection
;
388 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
389 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
390 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureDtoCollectionElement
;
391 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureDtoCollectionSection
;
392 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermMediaSection
;
393 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
394 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
395 import eu
.etaxonomy
.taxeditor
.ui
.selection
.CommonNameReferenceSelectionElement
;
396 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
397 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithAbbreviatedTitle
;
398 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithIdInVocabulary
;
399 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
400 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
401 import eu
.etaxonomy
.taxeditor
.view
.detail
.CdmSectionPart
;
404 * CdmFormFactory class.
407 * @created Feb 24, 2010
409 public class CdmFormFactory
extends FormToolkit
{
411 private BoldFontHolder2 boldFontHolder2
;
412 private MouseListener selectionMouseHandler
;
413 private FocusListener selectionFocusHandler
;
416 private IEclipseContext context
;
418 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<>();
420 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<>();
422 private final int orientation
= Window
.getDefaultOrientation();
423 private ISelectionProvider selectionProvider
;
425 /** Constant <code>EMPTY_SELECTION</code> */
426 public static ISelection EMPTY_SELECTION
= new ISelection() {
428 public boolean isEmpty() {
437 private class SelectionMouseHandler
extends MouseAdapter
{
439 public void mouseDown(MouseEvent e
) {
440 notifySelectionListeners(e
);
448 private class SelectionFocusHandler
extends FocusAdapter
{
450 public void focusGained(FocusEvent e
) {
451 notifySelectionListeners(e
);
455 private void notifySelectionListeners(TypedEvent e
) {
456 Event event
= new Event();
457 event
.widget
= e
.widget
;
458 SelectionEvent selectionEvent
= new SelectionEvent(event
);
460 for (SelectionListener listener
: selectionListenerList
) {
461 listener
.widgetSelected(selectionEvent
);
465 public CdmFormFactory(Display display
) {
469 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
471 this.selectionProvider
= selectionProvider
;
475 private void init() {
476 boldFontHolder2
= new BoldFontHolder2();
477 selectionMouseHandler
= new SelectionMouseHandler();
478 selectionFocusHandler
= new SelectionFocusHandler();
481 public IEclipseContext
getContext() {
486 * Creates an instance initialized with the correct selectionProvider
488 * Make sure to remove the instance when the entityComposite disposes via
489 * destroySelectionArbitrator(..)
491 * @param entityElement
492 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
494 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
497 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
498 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
499 selectionArbitrator
.addSelectionProvider(selectionProvider
);
500 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
501 addSelectionListener(selectionArbitrator
);
502 return selectionArbitrator
;
507 * destroySelectionArbitrator
510 * @param selectionArbitrator
512 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
515 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
516 if(selectionArbitrator
==null){
519 removeSelectionListener(selectionArbitrator
);
520 if (selectionProvider
!= null) {
521 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
523 MessagingUtils
.error(this.getClass(),
524 "Tried to destroy a selection listener from this factories listeners but was null", null);
530 * Adapts the {@link AbstractCdmFormElement}:<br>
531 * - sets the {@link IPropertyChangeListener}s handled by this class
536 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
539 public void adapt(ICdmFormElement formElement
) {
540 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
544 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
546 control
.addFocusListener(selectionFocusHandler
);
548 super.adapt(control
, trackFocus
, trackKeyboard
);
552 public void adapt(Composite composite
) {
553 composite
.addMouseListener(selectionMouseHandler
);
555 super.adapt(composite
);
562 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
565 public void destroyElement(ICdmFormElement formElement
) {
566 // return if element was not initialized
567 if (formElement
== null) {
570 // destroy selection arbitrator, if any
571 if (formElement
instanceof ISelectableElement
) {
572 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
574 // remove this element form its parents list of elements
575 // ICdmFormElement parentElement = formElement.getParentElement();
576 // if(parentElement != null){
577 // parentElement.removeElement(formElement);
579 // call destroy on child elements recursively
581 Set
<ICdmFormElement
> tempFormElements
= new HashSet
<>();
582 tempFormElements
.addAll(formElement
.getElements());
583 for(ICdmFormElement childElement
: tempFormElements
) {
584 destroyElement(childElement
);
586 // dispose of the controls
587 for (Control control
: formElement
.getControls()) {
588 // we added the layoutComposite of the parental element as the
589 // layout composite to this formElement
590 // but we do not want to destroy it.
591 if (control
.equals(formElement
.getLayoutComposite())) {
594 if (!control
.isDisposed()){
597 control
= null; //needed?
606 * a {@link org.eclipse.swt.widgets.Composite} object.
607 * @return a {@link org.eclipse.swt.widgets.Label} object.
609 public Label
createEmptyCell(Composite parent
) {
610 return this.createLabel(parent
, null);
614 * createMultiLanguageTextElement
616 * @param parentElement
617 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
620 * a {@link java.lang.String} object.
621 * @param multilanguageText
622 * a {@link java.util.Map} object.
628 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
631 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
632 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
633 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
634 multilanguageText
, textHeight
, style
);
636 parentElement
.addElement(element
);
641 * createMultiLanguageTextElement
643 * @param parentElement
644 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
647 * @param Representation
648 * a {@link eu.etaxonomy.cdm.model.term.Representation} object.
654 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
657 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
658 RepresentationElement element
= new RepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
660 parentElement
.addElement(element
);
665 * createMultiLanguageTextElement
667 * @param parentElement
668 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
671 * @param Representation
672 * a {@link eu.etaxonomy.cdm.model.term.Representation} object.
678 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
681 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
682 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
684 parentElement
.addElement(element
);
688 public TranslatableRepresentationElement
createTranslatableRepresentationElementDto(ICdmFormElement parentElement
, Representation representation
, TermDto term
,int textHeight
, int style
, boolean fillDetails
) {
689 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
691 parentElement
.addElement(element
);
696 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
697 KeyStatement keyStatement
, int textHeight
, int style
) {
698 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
701 parentElement
.addElement(element
);
706 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
708 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
709 * @param parentElement the parent container
710 * @param labelString the label name
711 * @param initialObject the object from which the <code>toString()</code> method is called
712 * @param style {@link SWT} style constant
713 * @return the created textfield with label
715 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
716 Object initialObject
, int style
) {
717 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
722 * createTextWithLabelElement
725 * @param parentElement
726 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
729 * a {@link java.lang.String} object.
731 * a {@link java.lang.String} object.
734 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
737 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
738 String initialText
, int style
) {
739 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
743 * createTextWithLabelElement
745 * @param parentElement
746 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
749 * a {@link java.lang.String} object.
751 * a {@link java.lang.String} object.
752 * @param textLimit maximal number of characters allowed
755 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
758 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
759 String initialText
, Integer textLimit
, int style
) {
760 if(initialText
==null){
764 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
767 parentElement
.addElement(element
);
771 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
772 int textHeight
, int style
) {
773 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
775 parentElement
.addElement(element
);
779 public LsidWithExceptionLabelElement
createLsidWithExceptionLabelElement(ICdmFormElement parentElement
, String labelString
,
780 LSID initialLsid
, int style
) {
781 LsidWithExceptionLabelElement element
= new LsidWithExceptionLabelElement(this, parentElement
, labelString
, initialLsid
, null, style
);
783 parentElement
.addElement(element
);
787 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
788 URI initialUri
, int style
) {
789 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
791 parentElement
.addElement(element
);
794 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
795 URI initialUri
,Integer textHeight
, int style
) {
796 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, textHeight
, style
);
798 parentElement
.addElement(element
);
803 public DoiWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
804 DOI initialDoi
, int style
) {
805 DoiWithLabelElement element
= new DoiWithLabelElement(this, parentElement
, labelString
, initialDoi
, null, style
);
807 parentElement
.addElement(element
);
810 public DoiWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
811 DOI initialDoi
,Integer textHeight
, int style
) {
812 DoiWithLabelElement element
= new DoiWithLabelElement(this, parentElement
, labelString
, initialDoi
, textHeight
, style
);
814 parentElement
.addElement(element
);
818 public OrcidWithLabelElement
createOrcidWithLabelElement(ICdmFormElement parentElement
, String labelString
,
819 ORCID initialDoi
, int style
) {
820 OrcidWithLabelElement element
= new OrcidWithLabelElement(this, parentElement
, labelString
, initialDoi
, null, style
);
822 parentElement
.addElement(element
);
825 public OrcidWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
826 ORCID initialDoi
,Integer textHeight
, int style
) {
827 OrcidWithLabelElement element
= new OrcidWithLabelElement(this, parentElement
, labelString
, initialDoi
, textHeight
, style
);
829 parentElement
.addElement(element
);
840 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
841 IOpenUrlEnabled openUrlEnabled
, int style
) {
842 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
845 parentElement
.addElement(element
);
851 * @param parentElement
853 * @param conversationEnabled
858 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
859 ConversationHolder conversation
, User user
, int style
) {
860 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
862 parentElement
.addElement(element
);
868 * createIntegerTextWithLabelElement
871 * @param parentElement
872 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
875 * a {@link java.lang.String} object.
876 * @param initialInteger
877 * a {@link java.lang.Integer} object.
881 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
884 public FloatWithLabelElement
createFloatTextWithLabelElement(
885 ICdmFormElement parentElement
, String labelString
,
886 Number initialNumber
, int style
) {
887 FloatWithLabelElement element
= new FloatWithLabelElement(this,
888 parentElement
, labelString
, initialNumber
, style
);
890 parentElement
.addElement(element
);
894 public BigDecimalWithLabelElement
createBigDecimalTextWithLabelElement(
895 ICdmFormElement parentElement
, String labelString
,
896 Number initialNumber
, int style
) {
897 BigDecimalWithLabelElement element
= new BigDecimalWithLabelElement(this,
898 parentElement
, labelString
, initialNumber
, style
);
900 parentElement
.addElement(element
);
904 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
905 String labelString
, LanguageString languageString
, int style
) {
906 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
909 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
910 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
911 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
912 languageString
, height
, isMultiLine
, style
);
914 parentElement
.addElement(element
);
920 * createKeyValueViewerElement
923 * @param parentElement
924 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
927 * a {@link java.lang.String} object.
928 * @param valueHeading
929 * a {@link java.lang.String} object.
931 * a {@link java.util.Map} object.
932 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
935 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
936 String valueHeading
, Map
<Object
, Object
> map
) {
937 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
939 parentElement
.addElement(element
);
943 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
946 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
947 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
948 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
, selection
, true, style
);
950 parentElement
.addElement(element
);
954 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
956 ICdmFormElement parentElement
,
960 Comparator
<T
> comparator
) {
961 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, comparator
);
964 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
966 ICdmFormElement parentElement
,
969 boolean addEmptyElement
,
971 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, false, null);
974 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
976 ICdmFormElement parentElement
,
980 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, null);
982 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElementDto(
984 ICdmFormElement parentElement
,
988 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, null);
991 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
993 ICdmFormElement parentElement
,
997 return this.createDefinedTermComboElement(null, null, terms
, parentElement
, labelString
, selection
, true, style
, false, null);
999 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1001 ICdmFormElement parentElement
,
1004 boolean addEmptyElement
,
1006 return this.createDefinedTermComboElement(null, null, terms
, parentElement
, labelString
, selection
, addEmptyElement
, style
, false, null);
1008 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1010 ICdmFormElement parentElement
,
1013 boolean addEmptyElement
,
1015 boolean useAbbrevLabel
) {
1016 return createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
1020 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1021 TermVocabulary
<?
> termVocabulary
,
1022 ICdmFormElement parentElement
,
1026 return this.createDefinedTermComboElement(null, termVocabulary
, null, parentElement
, labelString
, selection
, true, style
, false, null);
1029 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1030 TermVocabulary
<?
> termVocabulary
,
1031 ICdmFormElement parentElement
,
1034 boolean addEmptyElement
,
1036 boolean useAbbrevLabel
) {
1037 return createDefinedTermComboElement(null, termVocabulary
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
1040 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1042 TermVocabulary
<?
> termVocabulary
,
1044 ICdmFormElement parentElement
,
1047 boolean addEmptyElement
,
1049 boolean useAbbrevLabel
,
1050 Comparator
<T
> comparator
) {
1052 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1054 parentElement
.addElement(element
);
1057 else if(termVocabulary
!=null){
1058 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1059 if (comparator
!= null){
1060 element
.setTermComparator(comparator
);
1063 parentElement
.addElement(element
);
1065 }else if (terms
!= null){
1067 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, terms
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
1068 if (comparator
!= null){
1069 element
.setTermComparator(comparator
);
1072 parentElement
.addElement(element
);
1076 //this should never happen
1081 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1083 TermVocabulary
<?
> termVocabulary
,
1085 ICdmFormElement parentElement
,
1088 boolean addEmptyElement
,
1090 boolean useAbbrevLabel
,
1091 Comparator
<T
> comparator
) {
1093 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1095 parentElement
.addElement(element
);
1100 //this should never happen
1105 public NameRelationshipTypeCombo
createNameRelationshipTypeCombo(ICdmFormElement parentElement
,
1108 boolean useAbbrevLabel
,
1109 Comparator
<NameRelationshipType
> comparator
) {
1111 NameRelationshipTypeCombo
<InverseTermWrapper
> element
= new NameRelationshipTypeCombo(this, parentElement
, labelString
, true, style
, useAbbrevLabel
, comparator
);
1113 parentElement
.addElement(element
);
1117 public MisappliedRelationshipComboElement
createMisappliedRelationshipComboElement(
1118 ICdmFormElement parentElement
,
1120 TaxonRelationshipType selection
,
1122 MisappliedRelationshipComboElement combo
= new MisappliedRelationshipComboElement(this, parentElement
, labelString
, selection
, false, style
, false);
1124 parentElement
.addElement(combo
);
1128 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1129 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
1130 int style
, boolean hasNullValue
) {
1131 return createEnumComboElement(enumComboType
, parentElement
, null, style
, hasNullValue
);
1133 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1134 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
1136 return createEnumComboElement(enumComboType
, parentElement
, null, style
, false);
1139 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1140 Class
<T
> enumComboType
, ICdmFormElement parentElement
, Comparator
<T
> comparator
,
1141 int style
, boolean hasNullValue
) {
1142 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, comparator
, style
, hasNullValue
);
1144 parentElement
.addElement(element
);
1148 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
1149 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1150 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1152 parentElement
.addElement(element
);
1156 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyDtoComboElement(
1157 TermType termType
, String label
, TermVocabularyDto selection
, ICdmFormElement parentElement
, int style
) {
1158 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1160 parentElement
.addElement(element
);
1166 * createBrowserElement
1170 * a {@link java.net.URI} object.
1173 * @param parentElement
1174 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1176 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1179 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1180 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1182 parentElement
.addElement(element
);
1188 * createImageElement
1191 * @param parentElement
1192 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1195 * a {@link java.net.URI} object.
1198 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1200 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1201 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1203 parentElement
.addElement(element
);
1209 * createTextActionElement
1212 * @param labelString
1213 * a {@link java.lang.String} object.
1214 * @param initialText
1215 * a {@link java.lang.String} object.
1218 * @param parentElement
1219 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1221 * @param buttonLabel
1222 * a {@link java.lang.String} object.
1223 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1226 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1227 String buttonLabel
, String initialText
, int style
) {
1228 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1231 parentElement
.addElement(element
);
1240 * @param parentElement
1241 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1244 * a {@link java.lang.String} object.
1245 * @param initialState
1249 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1252 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1253 if(initialState
==null){
1254 initialState
= Boolean
.FALSE
;
1256 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1258 parentElement
.addElement(element
);
1263 * Creates a section as a part of the form.
1265 * @return the section widget
1268 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1271 public Section
adapt(AbstractFormSection section
) {
1272 section
.setMenu(section
.getLayoutComposite().getMenu());
1273 adapt(section
, true, true);
1275 // handle focus and property change events for cdm use
1276 section
.addFocusListener(selectionFocusHandler
);
1277 section
.setPropertyChangeListeners(propertyChangeListeners
);
1279 section
.addExpansionListener(new ExpansionAdapter(){
1281 public void expansionStateChanged(ExpansionEvent e
) {
1282 super.expansionStateChanged(e
);
1283 if(section
.getEntity()!=null){
1284 PreferencesUtil
.setStringValue(StoreUtil
.getPrefKey(section
.getClass(), section
.getEntity().getClass().getCanonicalName()), e
.getState()?CdmSectionPart
.EXPANDED
:CdmSectionPart
.COLLAPSED
);
1289 if (section
.getToggle() != null) {
1290 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1291 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1294 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1296 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1297 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1298 getColors().initializeSectionToolBarColors();
1299 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1300 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1302 // call setTitleBarForeground regardless as it also sets the label color
1303 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1307 private class BoldFontHolder2
{
1308 private Font normalFont
;
1310 private Font boldFont
;
1312 public BoldFontHolder2() {
1315 public Font
getBoldFont(Font font
) {
1316 createBoldFont(font
);
1320 private void createBoldFont(Font font
) {
1321 if (normalFont
== null || !normalFont
.equals(font
)) {
1325 if (boldFont
== null) {
1326 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1330 public void dispose() {
1331 if (boldFont
!= null) {
1332 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1340 * createToggleableTextField
1343 * @param parentElement
1344 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1346 * @param labelString
1347 * a {@link java.lang.String} object.
1348 * @param initialText
1349 * a {@link java.lang.String} object.
1350 * @param initialState
1354 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1357 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1358 String initialText
, boolean initialState
, int style
) {
1359 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1360 initialState
, style
| orientation
);
1363 parentElement
.addElement(element
);
1369 * createTimePeriodElement
1372 * @param parentElement
1373 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1375 * @param labelString
1376 * a {@link java.lang.String} object.
1378 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1381 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1384 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1385 TimePeriod timePeriod
, int style
) {
1386 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1388 parentElement
.addElement(element
);
1394 * createVerbatimTimePeriodElement
1397 * @param parentElement
1398 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1400 * @param labelString
1401 * a {@link java.lang.String} object.
1403 * a {@link eu.etaxonomy.cdm.model.common.VerbatimTimePeriod} object.
1406 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimTimePeriodElement}
1409 public VerbatimTimePeriodElement
createVerbatimTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1410 VerbatimTimePeriod timePeriod
, int style
) {
1411 VerbatimTimePeriodElement element
= new VerbatimTimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1413 parentElement
.addElement(element
);
1421 * createGatheringEventUnitElement
1424 * @param parentElement
1425 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1427 * @param labelString
1428 * a {@link java.lang.String} object.
1430 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1433 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1436 public GatheringEventUnitElement
createGatheringEventUnitElement(
1437 ICdmFormElement parentElement
,
1439 DerivedUnitFacade gatheringEvent
,
1440 MinMaxTextSection
.UnitType unitType
,
1442 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1449 parentElement
.addElement(element
);
1455 * createPointElement
1460 * @param parentElement
1461 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1464 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1465 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1467 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1468 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1470 parentElement
.addElement(element
);
1475 * Creates an empty section with the given message.<br>
1476 * If message is <code>null</code> a default message will be displayed.
1478 public EmptySection
createEmptySection(String message
, CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1479 EmptySection section
= new EmptySection(message
, formFactory
, parentElement
, style
);
1480 parentElement
.addElement(section
);
1487 * createDateDetailSection
1490 * @param parentElement
1491 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1495 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1498 public DateDetailSection
<TimePeriod
> createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1499 DateDetailSection
<TimePeriod
> section
= new DateDetailSection
<TimePeriod
>(this, parentElement
, false, style
);
1500 parentElement
.addElement(section
);
1507 * createVerbatimDateDetailSection
1510 * @param parentElement
1511 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1515 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimDateDetailSection}
1518 public DateDetailSection
<VerbatimTimePeriod
> createVerbatimDateDetailSection(ICdmFormElement parentElement
, int style
) {
1519 DateDetailSection
<VerbatimTimePeriod
> section
1520 = new DateDetailSection
<VerbatimTimePeriod
>(this, parentElement
, true, style
);
1521 parentElement
.addElement(section
);
1528 * createDateDetailSection
1531 * @param parentElement
1532 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1536 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1539 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1540 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1541 parentElement
.addElement(section
);
1548 * createPartialElement
1551 * @param parentElement
1552 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1554 * @param labelString
1555 * a {@link java.lang.String} object.
1557 * a {@link org.joda.time.Partial} object.
1560 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1563 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1565 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1567 parentElement
.addElement(element
);
1571 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
, boolean showYear
,
1573 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
, showYear
);
1575 parentElement
.addElement(element
);
1581 * addSelectionListener
1585 * a {@link org.eclipse.swt.events.SelectionListener} object.
1587 public void addSelectionListener(SelectionListener listener
) {
1588 selectionListenerList
.add(listener
);
1593 * removeSelectionListener
1597 * a {@link org.eclipse.swt.events.SelectionListener} object.
1599 public void removeSelectionListener(SelectionListener listener
) {
1600 if (listener
== null) {
1601 MessagingUtils
.error(this.getClass(),
1602 "Tried to remove a selection listener from this factories listeners but was null", null);
1604 selectionListenerList
.remove(listener
);
1610 * addPropertyChangeListener
1614 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1617 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1618 if (propertyChangeListeners
.contains(listener
)) {
1621 propertyChangeListeners
.add(0, listener
);
1626 * removePropertyChangeListener
1630 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1633 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1634 propertyChangeListeners
.remove(listener
);
1638 * @return the propertyChangeListeners
1640 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1641 return propertyChangeListeners
;
1646 * createHorizontalSeparator
1649 * @param parentElement
1650 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1654 * @return a {@link org.eclipse.swt.widgets.Label} object.
1656 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1657 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1658 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1664 * createVersionElement
1667 * @param parentElement
1668 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1671 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1676 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1679 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1680 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1682 parentElement
.addElement(element
);
1687 * @param cdmBaseSection
1692 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1693 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1695 parentElement
.addElement(element
);
1701 * createVersionSection
1704 * @param parentElement
1705 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1710 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1713 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1714 VersionSection section
= new VersionSection(this, parentElement
, style
);
1715 parentElement
.addElement(section
);
1725 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1726 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1727 parentElement
.addElement(section
);
1734 * createEmptyElement
1737 * @param parentElement
1738 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1740 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1742 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1743 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1745 parentElement
.addElement(element
);
1751 * createHeadlineSection
1754 * @param parentElement
1755 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1758 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1761 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1762 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1763 parentElement
.addElement(section
);
1770 * createParsingMessageElement
1773 * @param parentElement
1774 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1776 * @param parserProblem
1777 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1782 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1785 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1786 ParserProblem parserProblem
, int style
) {
1787 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1789 parentElement
.addElement(element
);
1793 public DefinedTermDetailSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1794 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1796 DefinedTermDetailSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1797 selectionProvider
, style
);
1799 parentElement
.addElement(section
);
1805 public TermMediaSection
createTermMediaSection(ConversationHolder conversation
,
1806 ICdmFormElement parentElement
, int style
) {
1807 TermMediaSection section
= new TermMediaSection(this, conversation
, parentElement
, style
);
1808 parentElement
.addElement(section
);
1814 public DerivedUnitMediaSection
createDerivedUnitMediaSection(ConversationHolder conversation
,
1815 ICdmFormElement parentElement
, int style
) {
1816 DerivedUnitMediaSection section
= new DerivedUnitMediaSection(this, conversation
, parentElement
, style
);
1817 parentElement
.addElement(section
);
1824 * @param definedTermClass
1825 * @param formElement
1829 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1830 AbstractCdmDetailSection parentElement
, int style
) {
1831 AbstractCdmDetailElement element
= null;
1833 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1834 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1835 } else if (definedTermClass
.equals(Feature
.class)) {
1836 element
= new FeatureDetailElement(this, parentElement
);
1837 } else if(definedTermClass
.equals(PresenceAbsenceTerm
.class)){
1838 element
= new PresenceAbsenceTermDetailElement(this, parentElement
);
1840 element
= new DefinedTermDetailElement(this, parentElement
);
1845 parentElement
.addElement(element
);
1849 public CharacterNodeDetailSection
createCharacterNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1850 CharacterNodeDetailSection section
= new CharacterNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1851 addAndAdaptSection(parentElement
, section
);
1855 public CharacterNodeDtoDetailSection
createCharacterNodeDtoDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1856 CharacterNodeDtoDetailSection section
= new CharacterNodeDtoDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1857 addAndAdaptSection(parentElement
, section
);
1861 public CharacterDetailSection
createCharacterDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1862 CharacterDetailSection section
= new CharacterDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1863 addAndAdaptSection(parentElement
, section
);
1867 public CharacterDtoDetailSection
createCharacterDtoDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1868 CharacterDtoDetailSection section
= new CharacterDtoDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1869 addAndAdaptSection(parentElement
, section
);
1873 public CharacterNodeDetailElement
createCharacterNodeDetailElement(ICdmFormElement parentElement
, int style
){
1874 CharacterNodeDetailElement element
= new CharacterNodeDetailElement(this, parentElement
);
1875 addAndAdaptElement(parentElement
, element
);
1878 public CharacterNodeDtoDetailElement
createCharacterNodeDtoDetailElement(ICdmFormElement parentElement
, int style
){
1879 CharacterNodeDtoDetailElement element
= new CharacterNodeDtoDetailElement(this, parentElement
);
1880 addAndAdaptElement(parentElement
, element
);
1884 public CharacterDetailElement
createCharacterDetailElement(ICdmFormElement parentElement
, int style
){
1885 CharacterDetailElement element
= new CharacterDetailElement(this, parentElement
);
1886 addAndAdaptElement(parentElement
, element
);
1889 public CharacterDtoDetailElement
createCharacterDtoDetailElement(ICdmFormElement parentElement
, int style
){
1890 CharacterDtoDetailElement element
= new CharacterDtoDetailElement(this, parentElement
);
1891 addAndAdaptElement(parentElement
, element
);
1895 public FeatureTreeDetailElement
createFeatureTreeDetailElement(ICdmFormElement parentElement
, int style
){
1896 FeatureTreeDetailElement element
= new FeatureTreeDetailElement(this, parentElement
);
1897 addAndAdaptElement(parentElement
, element
);
1902 * @param parentElement
1906 public AbstractCdmDetailElement
<TermTree
> createFeatureTreeDetailElementForTree(
1907 AbstractCdmDetailSection
<TermTree
> parentElement
, int style
) {
1908 FeatureTreeDetailElementForNode element
= new FeatureTreeDetailElementForNode(this, parentElement
);
1909 addAndAdaptElement(parentElement
, element
);
1913 public FeatureNodeDetailElement
createFeatureNodeDetailElement(ICdmFormElement parentElement
, int style
){
1914 FeatureNodeDetailElement element
= new FeatureNodeDetailElement(this, parentElement
);
1915 addAndAdaptElement(parentElement
, element
);
1920 //--------DetailSections---------
1921 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1922 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1923 addAndAdaptSection(parentElement
, section
);
1927 public FeatureNodeDetailSection
createFeatureNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1928 FeatureNodeDetailSection section
= new FeatureNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1929 addAndAdaptSection(parentElement
, section
);
1933 public FeatureTreeDetailSection
createFeatureTreeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1934 FeatureTreeDetailSection section
= new FeatureTreeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1935 addAndAdaptSection(parentElement
, section
);
1938 public FeatureTreeDetailSectionForNode
createFeatureTreeDetailSectionForTree(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1939 FeatureTreeDetailSectionForNode section
= new FeatureTreeDetailSectionForNode(this, conversation
, parentElement
, selectionProvider
, style
);
1940 addAndAdaptSection(parentElement
, section
);
1944 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1945 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1946 addAndAdaptSection(parentElement
, section
);
1950 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1951 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1952 addAndAdaptSection(parentElement
, section
);
1956 public OriginalSourceAdvancedSection
createOriginalSourceAdvancedSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1957 OriginalSourceAdvancedSection section
= new OriginalSourceAdvancedSection(this, conversation
, parentElement
, selectionProvider
, style
);
1958 addAndAdaptSection(parentElement
, section
);
1962 public SingleSourceSection
createSingleSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, CdmBase cdmEntity
, ISelectionProvider selectionProvider
, String label
, int style
){
1963 SingleSourceSection section
= new SingleSourceSection(this, conversation
, parentElement
, cdmEntity
, selectionProvider
, style
, label
);
1964 addAndAdaptSection(parentElement
, section
);
1968 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1969 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1970 addAndAdaptSection(parentElement
, section
);
1974 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1975 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1976 addAndAdaptSection(parentElement
, section
);
1980 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1981 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1982 addAndAdaptSection(parentElement
, section
);
1986 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1987 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1988 addAndAdaptSection(parentElement
, section
);
1992 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1993 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1994 addAndAdaptSection(parentElement
, section
);
1998 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1999 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2000 addAndAdaptSection(parentElement
, section
);
2004 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2005 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2006 addAndAdaptSection(parentElement
, section
);
2010 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2011 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
2012 addAndAdaptSection(parentElement
, section
);
2018 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
2019 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
2020 addAndAdaptSection(parentElement
, section
);
2024 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2025 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
2026 addAndAdaptSection(parentElement
, section
);
2030 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2031 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2032 addAndAdaptSection(parentElement
, section
);
2036 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2037 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2038 addAndAdaptSection(parentElement
, section
);
2042 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2043 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2044 addAndAdaptSection(parentElement
, section
);
2048 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2049 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
2050 addAndAdaptSection(parentElement
, section
);
2054 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2055 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2056 addAndAdaptSection(parentElement
, section
);
2060 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2061 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
2062 addAndAdaptSection(parentElement
, section
);
2066 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2067 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
2068 addAndAdaptSection(parentElement
, section
);
2072 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2073 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2074 addAndAdaptSection(parentElement
, section
);
2078 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2079 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2080 addAndAdaptSection(parentElement
, section
);
2084 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2085 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2086 addAndAdaptSection(parentElement
, section
);
2090 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2091 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2092 addAndAdaptSection(parentElement
, section
);
2096 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2097 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2098 addAndAdaptSection(parentElement
, section
);
2102 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2103 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2104 addAndAdaptSection(parentElement
, section
);
2108 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2109 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2110 addAndAdaptSection(parentElement
, section
);
2114 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2115 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2116 addAndAdaptSection(parentElement
, section
);
2120 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2121 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2122 addAndAdaptSection(parentElement
, section
);
2126 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2127 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2128 addAndAdaptSection(parentElement
, section
);
2132 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2133 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2134 addAndAdaptSection(parentElement
, section
);
2138 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2139 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
2140 addAndAdaptSection(parentElement
, section
);
2144 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2145 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2146 addAndAdaptSection(parentElement
, section
);
2150 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2151 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2152 addAndAdaptSection(parentElement
, section
);
2156 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2157 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
2158 addAndAdaptSection(parentElement
, section
);
2162 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2163 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
2164 addAndAdaptSection(parentElement
, section
);
2168 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2169 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
2170 addAndAdaptSection(parentElement
, section
);
2174 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2175 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2176 addAndAdaptSection(parentElement
, section
);
2180 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2181 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2182 addAndAdaptSection(parentElement
, section
);
2186 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2187 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2188 addAndAdaptSection(parentElement
, section
);
2192 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2193 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2194 addAndAdaptSection(parentElement
, section
);
2198 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2199 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
2200 addAndAdaptSection(parentElement
, section
);
2204 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2205 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2206 addAndAdaptSection(parentElement
, section
);
2210 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2211 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2212 addAndAdaptSection(parentElement
, section
);
2216 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2217 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2218 addAndAdaptSection(parentElement
, section
);
2222 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2223 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2224 addAndAdaptSection(parentElement
, section
);
2228 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2229 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2230 addAndAdaptSection(parentElement
, section
);
2234 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2235 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2236 addAndAdaptSection(parentElement
, section
);
2240 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2241 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
, true);
2242 addAndAdaptSection(parentElement
, section
);
2246 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2247 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2248 addAndAdaptSection(parentElement
, section
);
2252 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2253 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2254 addAndAdaptSection(parentElement
, section
);
2258 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2259 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2260 addAndAdaptSection(parentElement
, section
);
2264 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2265 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2266 addAndAdaptSection(parentElement
, section
);
2270 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2271 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2272 addAndAdaptSection(parentElement
, section
);
2276 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
2277 parentElement
.addElement(section
);
2281 //--------DetailElements------------
2283 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
2284 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
2285 addAndAdaptElement(parentElement
, element
);
2289 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
2290 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
2291 addAndAdaptElement(parentElement
, element
);
2295 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
2296 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
2297 addAndAdaptElement(parentElement
, element
);
2301 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
2302 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
2303 addAndAdaptElement(parentElement
, element
);
2307 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
2308 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
2309 addAndAdaptElement(parentElement
, element
);
2312 public OriginalSourceElement
createOriginalSourceElement(ICdmFormElement parentElement
, CdmBase cdmEntity
, String label
){
2313 OriginalSourceElement element
= new OriginalSourceElement(this, parentElement
, cdmEntity
, label
);
2314 addAndAdaptElement(parentElement
, element
);
2318 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
2319 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
2320 addAndAdaptElement(parentElement
, element
);
2324 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
2325 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
2326 addAndAdaptElement(parentElement
, element
);
2330 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
2331 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
2332 addAndAdaptElement(parentElement
, element
);
2336 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
2337 UserDetailElement element
= new UserDetailElement(this, parentElement
);
2338 addAndAdaptElement(parentElement
, element
);
2342 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2343 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2344 addAndAdaptElement(parentElement
, element
);
2348 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2349 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2350 addAndAdaptElement(parentElement
, element
);
2354 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2355 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2356 addAndAdaptElement(parentElement
, element
);
2360 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2361 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2362 addAndAdaptElement(parentElement
, element
);
2366 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2367 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2368 addAndAdaptElement(parentElement
, element
);
2372 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2373 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2375 parentElement
.addElement(element
);
2380 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2381 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2382 addAndAdaptElement(parentElement
, element
);
2386 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2387 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2388 addAndAdaptElement(parentElement
, element
);
2392 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2393 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2394 addAndAdaptElement(parentElement
, element
);
2398 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2399 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2400 addAndAdaptElement(parentElement
, element
);
2404 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2405 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2406 addAndAdaptElement(parentElement
, element
);
2410 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2411 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2412 addAndAdaptElement(parentElement
, element
);
2416 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2417 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2418 addAndAdaptElement(parentElement
, element
);
2422 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2423 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2424 addAndAdaptElement(parentElement
, element
);
2428 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2429 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2430 addAndAdaptElement(parentElement
, element
);
2434 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2435 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2436 addAndAdaptElement(parentElement
, element
);
2440 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2441 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2442 addAndAdaptElement(parentElement
, element
);
2446 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2447 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2448 addAndAdaptElement(parentElement
, element
);
2452 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2453 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2454 addAndAdaptElement(parentElement
, element
);
2458 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
, boolean isWizard
){
2459 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
, isWizard
);
2460 addAndAdaptElement(parentElement
, element
);
2464 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2465 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2466 addAndAdaptElement(parentElement
, element
);
2471 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2472 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2473 addAndAdaptElement(parentElement
, element
);
2477 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2478 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2479 addAndAdaptElement(parentElement
, element
);
2483 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2484 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2485 addAndAdaptElement(parentElement
, element
);
2489 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2490 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2491 addAndAdaptElement(parentElement
, element
);
2495 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2496 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2497 addAndAdaptElement(parentElement
, element
);
2501 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2502 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2503 addAndAdaptElement(parentElement
, element
);
2507 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2508 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2509 addAndAdaptElement(parentElement
, element
);
2513 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2514 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2515 addAndAdaptElement(parentElement
, element
);
2519 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2520 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2521 addAndAdaptElement(parentElement
, element
);
2525 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2526 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2527 addAndAdaptElement(parentElement
, element
);
2531 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2532 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2533 addAndAdaptElement(parentElement
, element
);
2537 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2538 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2539 addAndAdaptElement(parentElement
, element
);
2543 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2544 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2545 addAndAdaptElement(parentElement
, element
);
2549 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2550 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2551 addAndAdaptElement(parentElement
, element
);
2555 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2556 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2557 addAndAdaptElement(parentElement
, element
);
2561 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2562 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2563 addAndAdaptElement(parentElement
, element
);
2567 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2568 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2569 addAndAdaptElement(parentElement
, mediaDetailElement
);
2570 return mediaDetailElement
;
2573 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2574 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2575 addAndAdaptElement(parentElement
, element
);
2579 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2580 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2581 addAndAdaptElement(parentElement
, element
);
2585 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2586 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2587 addAndAdaptElement(parentElement
, element
);
2591 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2592 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2593 addAndAdaptElement(parentElement
, element
);
2597 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2598 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2599 addAndAdaptElement(parentElement
, element
);
2603 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2604 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2605 addAndAdaptElement(parentElement
, element
);
2609 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2610 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2611 addAndAdaptElement(parentElement
, element
);
2616 * @param parentElement
2619 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2621 parentElement
.addElement(element
);
2624 //--------EntityCollectionSection----------
2625 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2626 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2627 addAndAdaptSection(parentElement
, section
);
2631 public InapplicableIfEntityCollectionSection
createInapplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2632 InapplicableIfEntityCollectionSection section
= new InapplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2633 addAndAdaptSection(parentElement
, section
);
2637 public OnlyApplicableIfEntityCollectionSection
createOnlyApplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2638 OnlyApplicableIfEntityCollectionSection section
= new OnlyApplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2639 addAndAdaptSection(parentElement
, section
);
2643 public InapplicableIfEntityCollectionSectionForNode
createInapplicableIfEntityCollectionSectionForNode(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2644 InapplicableIfEntityCollectionSectionForNode section
= new InapplicableIfEntityCollectionSectionForNode(this, conversation
, parentElement
, style
);
2645 addAndAdaptSection(parentElement
, section
);
2649 public OnlyApplicableIfEntityCollectionSectionForNode
createOnlyApplicableIfEntityCollectionSectionForNode(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2650 OnlyApplicableIfEntityCollectionSectionForNode section
= new OnlyApplicableIfEntityCollectionSectionForNode(this, conversation
, parentElement
, style
);
2651 addAndAdaptSection(parentElement
, section
);
2655 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2656 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2657 addAndAdaptSection(parentElement
, section
);
2661 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2662 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2663 addAndAdaptSection(parentElement
, section
);
2666 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2667 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2668 addAndAdaptSection(parentElement
, section
);
2671 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, Reference defaultSource
, int style
){
2672 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, defaultSource
, style
);
2673 addAndAdaptSection(parentElement
, section
);
2677 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2678 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2679 addAndAdaptSection(parentElement
, section
);
2683 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2684 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2685 addAndAdaptSection(parentElement
, section
);
2689 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2690 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2691 addAndAdaptSection(parentElement
, section
);
2695 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2696 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2697 addAndAdaptSection(parentElement
, section
);
2701 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2702 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2703 addAndAdaptSection(parentElement
, section
);
2707 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2708 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2709 addAndAdaptSection(parentElement
, section
);
2713 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2714 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2715 addAndAdaptSection(parentElement
, section
);
2719 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2720 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2721 addAndAdaptSection(parentElement
, section
);
2725 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2726 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2727 addAndAdaptSection(parentElement
, section
);
2731 // public ProtologueSection createProtologueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
2732 // ProtologueSection section = new ProtologueSection(this, conversation, parentElement, style);
2733 // addAndAdaptSection(parentElement, section);
2736 public ExternalLinksSection
createExternalLinksSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2737 ExternalLinksSection section
= new ExternalLinksSection(this, conversation
, parentElement
, style
);
2738 addAndAdaptSection(parentElement
, section
);
2742 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2743 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2745 addAndAdaptSection(parentElement
, section
);
2749 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2750 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2751 addAndAdaptSection(parentElement
, section
);
2755 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2756 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2757 addAndAdaptSection(parentElement
, section
);
2761 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2762 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2763 addAndAdaptSection(parentElement
, section
);
2767 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2768 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2769 addAndAdaptSection(parentElement
, section
);
2773 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2774 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2775 addAndAdaptSection(parentElement
, section
);
2779 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2780 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2781 addAndAdaptSection(parentElement
, section
);
2785 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2786 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2787 addAndAdaptSection(parentElement
, section
);
2791 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2792 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2793 addAndAdaptSection(parentElement
, section
);
2797 public StateVocabularyDtoCollectionSection
createStateVocabulariesDtoSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2798 StateVocabularyDtoCollectionSection section
= new StateVocabularyDtoCollectionSection(this, conversation
, parentElement
, style
);
2799 addAndAdaptSection(parentElement
, section
);
2803 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2804 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2805 addAndAdaptSection(parentElement
, section
);
2808 public RecommendedModifierVocabulariesDtoCollectionSection
createRecommendedModifierVocabulariesDtoCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2809 RecommendedModifierVocabulariesDtoCollectionSection section
= new RecommendedModifierVocabulariesDtoCollectionSection(this, conversation
, parentElement
, style
);
2810 addAndAdaptSection(parentElement
, section
);
2814 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2815 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2816 addAndAdaptSection(parentElement
, section
);
2820 public MeasurementUnitDtoCollectionSection
createMeasurementUnitDtoCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2821 MeasurementUnitDtoCollectionSection section
= new MeasurementUnitDtoCollectionSection(this, conversation
, parentElement
, style
);
2822 addAndAdaptSection(parentElement
, section
);
2825 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2826 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2827 addAndAdaptSection(parentElement
, section
);
2831 public StatisticalMeasureDtoCollectionSection
createStatisticalMeasureDtoCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2832 StatisticalMeasureDtoCollectionSection section
= new StatisticalMeasureDtoCollectionSection(this, conversation
, parentElement
, style
);
2833 addAndAdaptSection(parentElement
, section
);
2837 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2838 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2839 addAndAdaptSection(parentElement
, section
);
2843 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2844 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2845 addAndAdaptSection(parentElement
, section
);
2849 public GeoScopePolyKeyDetailSection
createGeoScopePolyKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2850 GeoScopePolyKeyDetailSection section
= new GeoScopePolyKeyDetailSection(this, conversation
, parentElement
, style
);
2851 addAndAdaptSection(parentElement
, section
);
2855 public IdentifierSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2856 IdentifierSection section
= new IdentifierSection(this, conversation
, parentElement
, style
);
2857 addAndAdaptSection(parentElement
, section
);
2861 public DerivedUnitFacadeIdentifierSection
createDerivedUnitFacadeIdentifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2862 DerivedUnitFacadeIdentifierSection section
= new DerivedUnitFacadeIdentifierSection(this, conversation
, parentElement
, style
);
2863 addAndAdaptSection(parentElement
, section
);
2867 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2868 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2869 addAndAdaptSection(parentElement
, section
);
2873 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2874 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2875 addAndAdaptSection(parentElement
, section
);
2879 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2880 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2881 addAndAdaptSection(parentElement
, section
);
2885 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2886 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2887 addAndAdaptSection(parentElement
, section
);
2891 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2892 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2893 addAndAdaptSection(parentElement
, section
);
2897 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2898 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2899 addAndAdaptSection(parentElement
, section
);
2903 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2904 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2905 addAndAdaptSection(parentElement
, section
);
2909 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2910 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2911 addAndAdaptSection(parentElement
, section
);
2915 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2916 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2917 addAndAdaptSection(parentElement
, section
);
2921 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2922 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2923 addAndAdaptSection(parentElement
, section
);
2927 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2928 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2929 addAndAdaptSection(parentElement
, section
);
2933 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2934 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2935 addAndAdaptSection(parentElement
, section
);
2939 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2940 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2941 addAndAdaptSection(parentElement
, section
);
2946 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2947 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2948 AbstractEntityCollectionElement
<?
> element
= null;
2950 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2952 if (entity
instanceof Annotation
) {
2953 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2954 }else if (entity
instanceof Person
) {
2955 boolean isNomenclatural
= false;
2956 if (parentElement
instanceof TeamMemberSection
){
2957 isNomenclatural
= ((TeamMemberSection
) parentElement
).isNomenclaturalTeam();
2959 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
, isNomenclatural
);
2960 } else if (entity
instanceof Credit
) {
2961 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2962 } else if (entity
instanceof Extension
) {
2963 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2964 } else if (entity
instanceof ExternalLink
) {
2965 element
= new ExternalLinksElement(this, parentElement
, (ExternalLink
) entity
, removeListener
, style
);
2966 } else if (entity
instanceof Marker
) {
2967 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2968 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2969 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
, removeListener
, backgroundColor
, style
);
2970 }else if (entity
instanceof Media
) {
2971 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2972 } else if (entity
instanceof MediaRepresentation
) {
2973 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2975 } else if (entity
instanceof ImageFile
) {
2976 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2977 } else if (entity
instanceof MediaRepresentationPart
) {
2978 element
= new MediaRepresentationPartElement
<>(this, parentElement
, (MediaRepresentationPart
) entity
,
2979 removeListener
, style
);
2980 } else if (entity
instanceof NomenclaturalStatus
) {
2981 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2983 } else if (entity
instanceof Rights
) {
2984 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2985 } else if (entity
instanceof DescriptionElementSource
&& parentElement
.getEntity() instanceof CommonTaxonName
) {
2986 element
= new CommonNameSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2987 removeListener
, style
);
2988 } else if (entity
instanceof DescriptionElementSource
&& parentElement
.getEntity() instanceof Distribution
) {
2989 Composite parent
= null;
2990 if (parentElement
instanceof DescriptionElementSourceSection
){
2991 parent
= ((DescriptionElementSourceSection
)parentElement
).getParent();
2993 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2994 removeListener
, style
, false);
2995 } else if (entity
instanceof DescriptionElementSource
) {
2996 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2997 removeListener
, style
, false);
2998 }else if (entity
instanceof TaxonNodeAgentRelation
) {
2999 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
,
3000 removeListener
,backgroundColor
, style
);
3001 }else if (entity
instanceof IdentifiableSource
&& parentElement
.getEntity() instanceof DescriptionElementBase
) {
3002 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
3004 } else if (entity
instanceof IdentifiableSource
) {
3005 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
3007 } else if (entity
instanceof DefinedTerm
) {
3008 switch(((DefinedTerm
)entity
).getTermType()) {
3010 element
= new ScopeElement(this,
3012 (DefinedTerm
) entity
,
3017 element
= new ModifierElement(this,
3019 (DefinedTerm
) entity
,
3027 } else if (entity
instanceof Reference
) {
3028 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
3029 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
3032 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
3034 } else if (entity
instanceof NameTypeDesignation
) {
3035 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
3037 } else if (entity
instanceof TextualTypeDesignation
) {
3038 element
= new TextTypeDesignationElement(this, parentElement
, (TextualTypeDesignation
) entity
, removeListener
,
3040 } else if (entity
instanceof NameRelationship
) {
3041 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
3043 } else if (entity
instanceof SpecimenTypeDesignation
) {
3044 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
3045 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
3046 removeListener
, style
);
3049 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
3050 removeListener
, style
);
3052 } else if (entity
instanceof StateData
) {
3053 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
3054 } else if (entity
instanceof StatisticalMeasurementValue
) {
3055 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
3056 removeListener
, style
);
3057 } else if (entity
instanceof DerivedUnit
) {
3058 switch(((DerivedUnit
)entity
).getRecordBasis()) {
3059 case LivingSpecimen
:
3060 case PreservedSpecimen
:
3062 element
= new SpecimenCollectionDetailElement(this,
3064 (DerivedUnit
) entity
,
3069 element
= new DerivedUnitElement(this,
3071 (DerivedUnit
) entity
,
3076 } else if (entity
instanceof NamedArea
) {
3077 element
= new CollectingAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
3078 } else if (entity
instanceof DeterminationEvent
) {
3079 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
3080 } else if (entity
instanceof User
) {
3081 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
3082 } else if (entity
instanceof GrantedAuthority
) {
3083 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
, ((Group
)parentElement
.getEntity()),
3084 removeListener
, style
);
3085 } else if (entity
instanceof Group
) {
3086 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
3087 } else if (entity
instanceof Taxon
) {
3088 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
3089 } else if (entity
instanceof DescriptionElementBase
) {
3090 // this is the special case for protologs, maybe we can do this
3091 // differently when API improves
3092 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
3093 // if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
3094 // element = new ProtologueElement(this, parentElement, descriptionElement, removeListener, style);
3096 } else if (entity
instanceof Identifier
) {
3097 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
3098 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
3101 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
3103 } else if (entity
instanceof TermVocabulary
) {
3104 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
3105 switch (termVocabulary
.getTermType()) {
3107 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
3110 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
3115 }else if (entity
instanceof TermVocabularyDto
) {
3116 TermVocabularyDto termVocabulary
= (TermVocabularyDto
)entity
;
3117 switch (termVocabulary
.getTermType()) {
3119 element
= new StateVocabularyDtoCollectionElement(this, parentElement
, termVocabulary
, removeListener
, backgroundColor
, style
);
3122 element
= new RecommendedModifierDtoVocabulariesElement(this, parentElement
, termVocabulary
, removeListener
, backgroundColor
, style
);
3127 }else if (entity
instanceof MeasurementUnit
) {
3128 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
3129 }else if (entity
instanceof TermDto
) {
3130 if(((TermDto
)entity
).getTermType().equals(TermType
.MeasurementUnit
)){
3131 element
= new MeasurementUnitDtoCollectionElement(this, parentElement
, (TermDto
) entity
, removeListener
, backgroundColor
, style
);
3132 }else if (((TermDto
)entity
).getTermType().equals(TermType
.StatisticalMeasure
)){
3133 element
= new StatisticalMeasureDtoCollectionElement(this, parentElement
, (TermDto
) entity
, removeListener
, backgroundColor
, style
);
3135 }else if (entity
instanceof StatisticalMeasure
) {
3136 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
3137 } else if (entity
instanceof FeatureState
&& parentElement
instanceof InapplicableIfEntityCollectionSection
) {
3138 element
= new InapplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
3139 } else if (entity
instanceof FeatureState
&& parentElement
instanceof OnlyApplicableIfEntityCollectionSection
) {
3140 element
= new OnlyApplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
3143 //check for parent section when entity is null
3144 //this happens when AbstractUnboundEntityCollectionSection is used
3146 if(parentElement
instanceof ScopeSection
|| parentElement
instanceof ScopeRestrictionSection
){
3147 element
= new ScopeElement(this,
3149 (DefinedTerm
) entity
,
3153 else if(parentElement
instanceof ModifierSection
){
3154 element
= new ModifierElement(this,
3156 (DefinedTerm
) entity
,
3163 if (element
== null) {
3164 MessagingUtils
.messageDialog(
3165 String
.format("Error when creating section %s",
3166 parentElement
.getClass().getSimpleName()),
3168 String
.format("Could not generate collection element for entity of class %s."
3169 + " Looks like the case is not yet handled. Check implementation.\n"
3170 + "Entity: %s", entity
.getClass(), entity
.toString()), null);
3174 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
3175 element
.setPersistentBackground(backgroundColor
);
3178 parentElement
.addElement(element
);
3186 * Creates a selection element for the given type T.
3189 * <strong>Selection elements not handled by this method:</strong>
3191 * <li>{@link TaxonNodeSelectionElement} see
3192 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
3194 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
3195 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
3201 * a {@link Class} object of the type that you want the selection
3203 * @param parentElement
3204 * a {@link ICdmFormElement} object.
3205 * @param labelString
3206 * a {@link String} object.
3207 * @param selectionType
3209 * a {@link ICdmBase} object.
3212 * @param conversation
3213 * a {@link ConversationHolder} object.
3214 * @return a {@link EntitySelectionElement} object.
3216 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
3217 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
3218 int style
, Integer limit
) {
3219 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this,
3220 parentElement
, clazz
,
3221 labelString
, selection
, mode
, style
, limit
);
3223 parentElement
.addElement(element
);
3227 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
3228 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
3229 int style
, boolean filterElement
) {
3230 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, //conversation,
3231 parentElement
, clazz
,
3232 labelString
, selection
, mode
, style
, filterElement
);
3234 parentElement
.addElement(element
);
3238 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
3239 // ConversationHolder conversation,
3240 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
3242 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this,
3243 parentElement
, clazz
,
3244 labelString
, selection
, mode
, style
);
3246 parentElement
.addElement(element
);
3250 public CommonNameReferenceSelectionElement
createCommonNameReferenceSelectionElement(ICdmFormElement parentElement
, String labelString
, Reference selection
, int mode
,
3252 CommonNameReferenceSelectionElement element
= new CommonNameReferenceSelectionElement(this,
3253 parentElement
, labelString
, selection
, mode
, style
);
3255 parentElement
.addElement(element
);
3261 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
3264 * <strong>Selection elements not handled by this method:</strong>
3266 * <li>{@link TaxonNodeSelectionElement} see
3267 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
3269 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
3270 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
3276 * a {@link Class} object of the type that you want the selection
3278 * @param parentElement
3279 * a {@link ICdmFormElement} object.
3280 * @param labelString
3281 * a {@link String} object.
3282 * @param selectionType
3284 * a {@link ICdmBase} object.
3287 * @param conversation
3288 * a {@link ConversationHolder} object.
3289 * @return a {@link EntitySelectionElement} object.
3291 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
3292 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
3293 T selection
, int mode
, int style
) {
3294 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, //conversation,
3295 parentElement
, clazz
,
3296 labelString
, selection
, mode
, style
);
3298 parentElement
.addElement(element
);
3302 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
3303 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
3304 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this,
3306 labelString
, selection
, mode
, style
, null);
3308 parentElement
.addElement(element
);
3311 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
3312 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
, Integer limit
) {
3313 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, //conversation,
3315 labelString
, selection
, mode
, style
, limit
);
3317 parentElement
.addElement(element
);
3322 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
3323 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
3324 // int mode, int style) {
3325 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
3326 // conversation, parentElement, labelString, selection, mode, style);
3328 // parentElement.addElement(element);
3332 /** {@inheritDoc} */
3333 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
3334 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
3335 adapt(labelElement
);
3336 parentElement
.addElement(labelElement
);
3337 return labelElement
;
3342 // public DateElementFormElement createDateElementForm(ICdmFormElement formElement, String labelText, DateTime dateTime, int style){
3343 // Label label = new Label(formElement.getLayoutComposite(), style);
3344 // label.setText(labelText+" (yyyy-MM-dd)");
3345 // DateElementFormElement dateElement = new DateElementFormElement(this, dateTime, style, formElement.getLayoutComposite());
3346 // dateElement.initInternalController();
3348 // return dateElement;
3351 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
, boolean editableText
){
3352 Label label
= new Label(formElement
.getLayoutComposite(), style
);
3353 label
.setText(labelText
);
3354 label
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3355 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, labelText
, style
, editableText
);
3356 dateElement
.initController(this, formElement
);
3357 dateElement
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3363 * Getter for the field <code>selectionProvider</code>.
3366 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
3368 public ISelectionProvider
getSelectionProvider() {
3369 return selectionProvider
;
3374 * createDetailedDescriptionDetailElement
3377 * @param parentElement
3378 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
3382 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
3387 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
3390 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
3391 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
, boolean enabled
) {
3392 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
3394 if (entity
instanceof CategoricalData
) {
3395 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
3396 (CategoricalData
) entity
, style
);
3397 } else if (entity
instanceof CommonTaxonName
) {
3398 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
3400 } else if (entity
instanceof Distribution
&& !enabled
) {
3401 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3403 } else if (entity
instanceof Distribution
) {
3404 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3406 }else if (entity
instanceof IndividualsAssociation
) {
3407 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
3408 (IndividualsAssociation
) entity
, style
);
3409 } else if (entity
instanceof QuantitativeData
) {
3410 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
3411 (QuantitativeData
) entity
, style
);
3412 } else if (entity
instanceof TaxonInteraction
) {
3413 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
3414 (TaxonInteraction
) entity
, style
);
3415 } else if (entity
instanceof TemporalData
) {
3416 detailedDescriptionElement
= new TemporalDataDetailElement(this, parentElement
, (TemporalData
) entity
, style
);
3417 } else if (entity
instanceof TextData
) {
3418 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
3421 throw new IllegalStateException("There is no interface for the given description element");
3423 adapt(detailedDescriptionElement
);
3424 parentElement
.addElement(detailedDescriptionElement
);
3425 return detailedDescriptionElement
;
3430 * Creates a styled text as a part of the form.
3435 * the text initial value
3438 * @return the text widget
3440 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
3441 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
3442 if (value
!= null) {
3443 text
.setText(value
);
3445 text
.setForeground(getColors().getForeground());
3446 text
.setBackground(getColors().getBackground());
3447 // text.addFocusListener(visibilityHandler);
3451 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
3452 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
3453 addAndAdaptSection(parentElement
, section
);
3458 * @param formElement
3459 * @param conversationHolder
3463 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
3464 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
3465 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
3466 addAndAdaptSection(formElement
, section
);
3471 public TaxonOfRelationshipElement
createTaxonOfRelationshipDetailElement(
3472 ICdmFormElement parentElement
, int style
) {
3473 TaxonOfRelationshipElement section
= new TaxonOfRelationshipElement(this, parentElement
, style
);
3474 addAndAdaptElement(parentElement
, section
);
3478 public TaxonDetailSection
createTaxonDetailSection(ConversationHolder conversationHolder
,
3479 ICdmFormElement formElement
, ISelectionProvider selectionProvider
, int style
) {
3480 TaxonDetailSection section
= new TaxonDetailSection(this, conversationHolder
, formElement
, selectionProvider
, style
);
3481 addAndAdaptSection(formElement
, section
);
3488 * createTextWithLabelElement
3491 * @param parentElement
3492 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
3494 * @param labelString
3495 * a {@link java.lang.String} object.
3496 * @param initialText
3497 * a {@link java.lang.String} object.
3498 * @param textLimit maximal number of characters allowed
3501 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
3504 public RuleConsideredElement
createRuleConsideredElement(ICdmFormElement parentElement
, String labelString
, boolean isShowCodeEdition
, int style
) {
3505 RuleConsideredElement element
= new RuleConsideredElement(this, parentElement
, labelString
, isShowCodeEdition
, style
);
3507 parentElement
.addElement(element
);
3513 * @param formElement
3520 public EntitySelectionElementWithIdInVocabulary
createSelectionElementWithIdInVocabulary(Class
<NamedArea
> clazz
,
3521 ICdmFormElement formElement
, String labelString
, NamedArea area
, int mode
, int style
) {
3522 EntitySelectionElementWithIdInVocabulary element
= new EntitySelectionElementWithIdInVocabulary(this,
3523 formElement
, clazz
, labelString
, area
, mode
, style
);
3525 formElement
.addElement(element
);
3530 * @param extendedTimePeriodElement
3534 public ExtendedTimeDetailSection
createExtendedTimeDetailSection(
3535 ExtendedTimePeriodElement parentElement
, int style
) {
3536 ExtendedTimeDetailSection section
= new ExtendedTimeDetailSection(this, parentElement
, style
);
3537 parentElement
.addElement(section
);
3541 public ExtendedTimePeriodElement
createExtendedTimePeriodElement(
3542 ICdmFormElement parentElement
, String labelString
, ExtendedTimePeriod timePeriod
, int style
) {
3543 ExtendedTimePeriodElement section
= new ExtendedTimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
3544 parentElement
.addElement(section
);
3552 // public RichTextWithLabelElement createRichTextLabelElement(ICdmFormElement parentElement, String labelString, String initialText, int textHeight, int style) {
3553 // RichTextWithLabelElement element = new RichTextWithLabelElement(this, parentElement, labelString,
3554 // initialText, textHeight, style);
3556 // parentElement.addElement(element);