4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
6 import java
.util
.ArrayList
;
7 import java
.util
.Comparator
;
8 import java
.util
.HashSet
;
13 import javax
.inject
.Inject
;
15 import org
.eclipse
.e4
.core
.contexts
.IEclipseContext
;
16 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
17 import org
.eclipse
.jface
.viewers
.ISelection
;
18 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
19 import org
.eclipse
.jface
.window
.Window
;
20 //import org.eclipse.nebula.widgets.richtext.RichTextEditor;
21 import org
.eclipse
.swt
.SWT
;
22 import org
.eclipse
.swt
.custom
.StyledText
;
23 import org
.eclipse
.swt
.events
.FocusAdapter
;
24 import org
.eclipse
.swt
.events
.FocusEvent
;
25 import org
.eclipse
.swt
.events
.FocusListener
;
26 import org
.eclipse
.swt
.events
.MouseAdapter
;
27 import org
.eclipse
.swt
.events
.MouseEvent
;
28 import org
.eclipse
.swt
.events
.MouseListener
;
29 import org
.eclipse
.swt
.events
.SelectionEvent
;
30 import org
.eclipse
.swt
.events
.SelectionListener
;
31 import org
.eclipse
.swt
.events
.TypedEvent
;
32 import org
.eclipse
.swt
.graphics
.Color
;
33 import org
.eclipse
.swt
.graphics
.Font
;
34 import org
.eclipse
.swt
.widgets
.Composite
;
35 import org
.eclipse
.swt
.widgets
.Control
;
36 import org
.eclipse
.swt
.widgets
.Display
;
37 import org
.eclipse
.swt
.widgets
.Event
;
38 import org
.eclipse
.swt
.widgets
.Label
;
39 import org
.eclipse
.ui
.forms
.IFormColors
;
40 import org
.eclipse
.ui
.forms
.events
.ExpansionAdapter
;
41 import org
.eclipse
.ui
.forms
.events
.ExpansionEvent
;
42 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
43 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
44 import org
.eclipse
.ui
.forms
.widgets
.Section
;
45 import org
.eclipse
.ui
.forms
.widgets
.TableWrapData
;
46 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
47 import org
.joda
.time
.DateTime
;
48 import org
.joda
.time
.Partial
;
49 import org
.springframework
.security
.core
.GrantedAuthority
;
51 import eu
.etaxonomy
.cdm
.common
.URI
;v
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
.AdvancedNomenclaturalSourceElement
;
330 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.AdvancedSourceElement
;
331 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
332 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
333 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalSourceElement
;
334 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.OriginalSourceAdvancedSection
;
335 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.OriginalSourceElement
;
336 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
337 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
338 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.SingleSourceSection
;
339 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
340 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
341 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
342 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
343 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
344 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
345 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
346 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
347 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
348 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
349 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
350 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
351 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
352 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
353 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
354 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
355 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
356 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
357 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
358 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
359 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
360 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
361 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
362 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
363 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
364 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailSection
;
365 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonOfRelationshipElement
;
366 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
367 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
368 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
369 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
370 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
371 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
372 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
373 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
374 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
375 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
376 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
377 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
378 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
379 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitDtoCollectionElement
;
380 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitDtoCollectionSection
;
381 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
382 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.PresenceAbsenceTermDetailElement
;
383 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierDtoVocabulariesElement
;
384 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
385 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesDtoCollectionSection
;
386 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
387 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
388 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
389 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyDtoCollectionElement
;
390 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyDtoCollectionSection
;
391 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
392 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
393 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureDtoCollectionElement
;
394 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureDtoCollectionSection
;
395 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermMediaSection
;
396 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
397 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
398 import eu
.etaxonomy
.taxeditor
.ui
.selection
.CommonNameReferenceSelectionElement
;
399 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
400 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithAbbreviatedTitle
;
401 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithIdInVocabulary
;
402 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
403 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
404 import eu
.etaxonomy
.taxeditor
.view
.detail
.CdmSectionPart
;
407 * CdmFormFactory class.
410 * @created Feb 24, 2010
412 public class CdmFormFactory
extends FormToolkit
{
414 private BoldFontHolder2 boldFontHolder2
;
415 private MouseListener selectionMouseHandler
;
416 private FocusListener selectionFocusHandler
;
419 private IEclipseContext context
;
421 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<>();
423 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<>();
425 private final int orientation
= Window
.getDefaultOrientation();
426 private ISelectionProvider selectionProvider
;
428 /** Constant <code>EMPTY_SELECTION</code> */
429 public static ISelection EMPTY_SELECTION
= new ISelection() {
431 public boolean isEmpty() {
440 private class SelectionMouseHandler
extends MouseAdapter
{
442 public void mouseDown(MouseEvent e
) {
443 notifySelectionListeners(e
);
451 private class SelectionFocusHandler
extends FocusAdapter
{
453 public void focusGained(FocusEvent e
) {
454 notifySelectionListeners(e
);
458 private void notifySelectionListeners(TypedEvent e
) {
459 Event event
= new Event();
460 event
.widget
= e
.widget
;
461 SelectionEvent selectionEvent
= new SelectionEvent(event
);
463 for (SelectionListener listener
: selectionListenerList
) {
464 listener
.widgetSelected(selectionEvent
);
468 public CdmFormFactory(Display display
) {
472 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
474 this.selectionProvider
= selectionProvider
;
478 private void init() {
479 boldFontHolder2
= new BoldFontHolder2();
480 selectionMouseHandler
= new SelectionMouseHandler();
481 selectionFocusHandler
= new SelectionFocusHandler();
484 public IEclipseContext
getContext() {
489 * Creates an instance initialized with the correct selectionProvider
491 * Make sure to remove the instance when the entityComposite disposes via
492 * destroySelectionArbitrator(..)
494 * @param entityElement
495 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
497 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
500 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
501 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
502 selectionArbitrator
.addSelectionProvider(selectionProvider
);
503 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
504 addSelectionListener(selectionArbitrator
);
505 return selectionArbitrator
;
510 * destroySelectionArbitrator
513 * @param selectionArbitrator
515 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
518 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
519 if(selectionArbitrator
==null){
522 removeSelectionListener(selectionArbitrator
);
523 if (selectionProvider
!= null) {
524 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
526 MessagingUtils
.error(this.getClass(),
527 "Tried to destroy a selection listener from this factories listeners but was null", null);
533 * Adapts the {@link AbstractCdmFormElement}:<br>
534 * - sets the {@link IPropertyChangeListener}s handled by this class
539 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
542 public void adapt(ICdmFormElement formElement
) {
543 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
547 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
549 control
.addFocusListener(selectionFocusHandler
);
551 super.adapt(control
, trackFocus
, trackKeyboard
);
555 public void adapt(Composite composite
) {
556 composite
.addMouseListener(selectionMouseHandler
);
558 super.adapt(composite
);
565 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
568 public void destroyElement(ICdmFormElement formElement
) {
569 // return if element was not initialized
570 if (formElement
== null) {
573 // destroy selection arbitrator, if any
574 if (formElement
instanceof ISelectableElement
) {
575 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
577 // remove this element form its parents list of elements
578 // ICdmFormElement parentElement = formElement.getParentElement();
579 // if(parentElement != null){
580 // parentElement.removeElement(formElement);
582 // call destroy on child elements recursively
584 Set
<ICdmFormElement
> tempFormElements
= new HashSet
<>();
585 tempFormElements
.addAll(formElement
.getElements());
586 for(ICdmFormElement childElement
: tempFormElements
) {
587 destroyElement(childElement
);
589 // dispose of the controls
590 for (Control control
: formElement
.getControls()) {
591 // we added the layoutComposite of the parental element as the
592 // layout composite to this formElement
593 // but we do not want to destroy it.
594 if (control
.equals(formElement
.getLayoutComposite())) {
597 if (!control
.isDisposed()){
600 control
= null; //needed?
609 * a {@link org.eclipse.swt.widgets.Composite} object.
610 * @return a {@link org.eclipse.swt.widgets.Label} object.
612 public Label
createEmptyCell(Composite parent
) {
613 return this.createLabel(parent
, null);
617 * createMultiLanguageTextElement
619 * @param parentElement
620 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
623 * a {@link java.lang.String} object.
624 * @param multilanguageText
625 * a {@link java.util.Map} object.
631 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
634 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
635 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
636 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
637 multilanguageText
, textHeight
, style
);
639 parentElement
.addElement(element
);
644 * createMultiLanguageTextElement
646 * @param parentElement
647 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
650 * @param Representation
651 * a {@link eu.etaxonomy.cdm.model.term.Representation} object.
657 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
660 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
661 RepresentationElement element
= new RepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
663 parentElement
.addElement(element
);
668 * createMultiLanguageTextElement
670 * @param parentElement
671 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
674 * @param Representation
675 * a {@link eu.etaxonomy.cdm.model.term.Representation} object.
681 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
684 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
685 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
687 parentElement
.addElement(element
);
691 public TranslatableRepresentationElement
createTranslatableRepresentationElementDto(ICdmFormElement parentElement
, Representation representation
, TermDto term
,int textHeight
, int style
, boolean fillDetails
) {
692 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
694 parentElement
.addElement(element
);
699 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
700 KeyStatement keyStatement
, int textHeight
, int style
) {
701 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
704 parentElement
.addElement(element
);
709 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
711 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
712 * @param parentElement the parent container
713 * @param labelString the label name
714 * @param initialObject the object from which the <code>toString()</code> method is called
715 * @param style {@link SWT} style constant
716 * @return the created textfield with label
718 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
719 Object initialObject
, int style
) {
720 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
725 * createTextWithLabelElement
728 * @param parentElement
729 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
732 * a {@link java.lang.String} object.
734 * a {@link java.lang.String} object.
737 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
740 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
741 String initialText
, int style
) {
742 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
746 * createTextWithLabelElement
748 * @param parentElement
749 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
752 * a {@link java.lang.String} object.
754 * a {@link java.lang.String} object.
755 * @param textLimit maximal number of characters allowed
758 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
761 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
762 String initialText
, Integer textLimit
, int style
) {
763 if(initialText
==null){
767 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
770 parentElement
.addElement(element
);
774 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
775 int textHeight
, int style
) {
776 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
778 parentElement
.addElement(element
);
782 public LsidWithExceptionLabelElement
createLsidWithExceptionLabelElement(ICdmFormElement parentElement
, String labelString
,
783 LSID initialLsid
, int style
) {
784 LsidWithExceptionLabelElement element
= new LsidWithExceptionLabelElement(this, parentElement
, labelString
, initialLsid
, null, style
);
786 parentElement
.addElement(element
);
790 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
791 URI initialUri
, int style
) {
792 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
794 parentElement
.addElement(element
);
797 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
798 URI initialUri
,Integer textHeight
, int style
) {
799 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, textHeight
, style
);
801 parentElement
.addElement(element
);
806 public DoiWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
807 DOI initialDoi
, int style
) {
808 DoiWithLabelElement element
= new DoiWithLabelElement(this, parentElement
, labelString
, initialDoi
, null, style
);
810 parentElement
.addElement(element
);
813 public DoiWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
814 DOI initialDoi
,Integer textHeight
, int style
) {
815 DoiWithLabelElement element
= new DoiWithLabelElement(this, parentElement
, labelString
, initialDoi
, textHeight
, style
);
817 parentElement
.addElement(element
);
821 public OrcidWithLabelElement
createOrcidWithLabelElement(ICdmFormElement parentElement
, String labelString
,
822 ORCID initialDoi
, int style
) {
823 OrcidWithLabelElement element
= new OrcidWithLabelElement(this, parentElement
, labelString
, initialDoi
, null, style
);
825 parentElement
.addElement(element
);
828 public OrcidWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
829 ORCID initialDoi
,Integer textHeight
, int style
) {
830 OrcidWithLabelElement element
= new OrcidWithLabelElement(this, parentElement
, labelString
, initialDoi
, textHeight
, style
);
832 parentElement
.addElement(element
);
843 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
844 IOpenUrlEnabled openUrlEnabled
, int style
) {
845 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
848 parentElement
.addElement(element
);
854 * @param parentElement
856 * @param conversationEnabled
861 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
862 ConversationHolder conversation
, User user
, int style
) {
863 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
865 parentElement
.addElement(element
);
871 * createIntegerTextWithLabelElement
874 * @param parentElement
875 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
878 * a {@link java.lang.String} object.
879 * @param initialInteger
880 * a {@link java.lang.Integer} object.
884 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
887 public FloatWithLabelElement
createFloatTextWithLabelElement(
888 ICdmFormElement parentElement
, String labelString
,
889 Number initialNumber
, int style
) {
890 FloatWithLabelElement element
= new FloatWithLabelElement(this,
891 parentElement
, labelString
, initialNumber
, style
);
893 parentElement
.addElement(element
);
897 public BigDecimalWithLabelElement
createBigDecimalTextWithLabelElement(
898 ICdmFormElement parentElement
, String labelString
,
899 Number initialNumber
, int style
) {
900 BigDecimalWithLabelElement element
= new BigDecimalWithLabelElement(this,
901 parentElement
, labelString
, initialNumber
, style
);
903 parentElement
.addElement(element
);
907 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
908 String labelString
, LanguageString languageString
, int style
) {
909 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
912 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
913 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
914 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
915 languageString
, height
, isMultiLine
, style
);
917 parentElement
.addElement(element
);
923 * createKeyValueViewerElement
926 * @param parentElement
927 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
930 * a {@link java.lang.String} object.
931 * @param valueHeading
932 * a {@link java.lang.String} object.
934 * a {@link java.util.Map} object.
935 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
938 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
939 String valueHeading
, Map
<Object
, Object
> map
) {
940 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
942 parentElement
.addElement(element
);
946 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
949 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
950 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
951 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
, selection
, true, style
);
953 parentElement
.addElement(element
);
957 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
959 ICdmFormElement parentElement
,
963 Comparator
<T
> comparator
) {
964 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, comparator
);
967 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
969 ICdmFormElement parentElement
,
972 boolean addEmptyElement
,
974 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, false, null);
977 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
979 ICdmFormElement parentElement
,
983 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, null);
985 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElementDto(
987 ICdmFormElement parentElement
,
991 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, null);
994 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
996 ICdmFormElement parentElement
,
1000 return this.createDefinedTermComboElement(null, null, terms
, parentElement
, labelString
, selection
, true, style
, false, null);
1002 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1004 ICdmFormElement parentElement
,
1007 boolean addEmptyElement
,
1009 return this.createDefinedTermComboElement(null, null, terms
, parentElement
, labelString
, selection
, addEmptyElement
, style
, false, null);
1011 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1013 ICdmFormElement parentElement
,
1016 boolean addEmptyElement
,
1018 boolean useAbbrevLabel
) {
1019 return createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
1023 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1024 TermVocabulary
<?
> termVocabulary
,
1025 ICdmFormElement parentElement
,
1029 return this.createDefinedTermComboElement(null, termVocabulary
, null, parentElement
, labelString
, selection
, true, style
, false, null);
1032 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1033 TermVocabulary
<?
> termVocabulary
,
1034 ICdmFormElement parentElement
,
1037 boolean addEmptyElement
,
1039 boolean useAbbrevLabel
) {
1040 return createDefinedTermComboElement(null, termVocabulary
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
1043 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1045 TermVocabulary
<?
> termVocabulary
,
1047 ICdmFormElement parentElement
,
1050 boolean addEmptyElement
,
1052 boolean useAbbrevLabel
,
1053 Comparator
<T
> comparator
) {
1055 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1057 parentElement
.addElement(element
);
1060 else if(termVocabulary
!=null){
1061 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1062 if (comparator
!= null){
1063 element
.setTermComparator(comparator
);
1066 parentElement
.addElement(element
);
1068 }else if (terms
!= null){
1070 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, terms
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
1071 if (comparator
!= null){
1072 element
.setTermComparator(comparator
);
1075 parentElement
.addElement(element
);
1079 //this should never happen
1084 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1086 TermVocabulary
<?
> termVocabulary
,
1088 ICdmFormElement parentElement
,
1091 boolean addEmptyElement
,
1093 boolean useAbbrevLabel
,
1094 Comparator
<T
> comparator
) {
1096 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1098 parentElement
.addElement(element
);
1103 //this should never happen
1108 public NameRelationshipTypeCombo
createNameRelationshipTypeCombo(ICdmFormElement parentElement
,
1111 boolean useAbbrevLabel
,
1112 Comparator
<NameRelationshipType
> comparator
) {
1114 NameRelationshipTypeCombo
<InverseTermWrapper
> element
= new NameRelationshipTypeCombo(this, parentElement
, labelString
, true, style
, useAbbrevLabel
, comparator
);
1116 parentElement
.addElement(element
);
1120 public MisappliedRelationshipComboElement
createMisappliedRelationshipComboElement(
1121 ICdmFormElement parentElement
,
1123 TaxonRelationshipType selection
,
1125 MisappliedRelationshipComboElement combo
= new MisappliedRelationshipComboElement(this, parentElement
, labelString
, selection
, false, style
, false);
1127 parentElement
.addElement(combo
);
1131 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1132 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
1133 int style
, boolean hasNullValue
) {
1134 return createEnumComboElement(enumComboType
, parentElement
, null, style
, hasNullValue
);
1136 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1137 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
1139 return createEnumComboElement(enumComboType
, parentElement
, null, style
, false);
1142 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1143 Class
<T
> enumComboType
, ICdmFormElement parentElement
, Comparator
<T
> comparator
,
1144 int style
, boolean hasNullValue
) {
1145 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, comparator
, style
, hasNullValue
);
1147 parentElement
.addElement(element
);
1151 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
1152 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1153 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1155 parentElement
.addElement(element
);
1159 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyDtoComboElement(
1160 TermType termType
, String label
, TermVocabularyDto selection
, ICdmFormElement parentElement
, int style
) {
1161 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1163 parentElement
.addElement(element
);
1169 * createBrowserElement
1173 * a {@link java.net.URI} object.
1176 * @param parentElement
1177 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1179 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1182 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1183 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1185 parentElement
.addElement(element
);
1191 * createImageElement
1194 * @param parentElement
1195 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1198 * a {@link java.net.URI} object.
1201 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1203 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1204 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1206 parentElement
.addElement(element
);
1212 * createTextActionElement
1215 * @param labelString
1216 * a {@link java.lang.String} object.
1217 * @param initialText
1218 * a {@link java.lang.String} object.
1221 * @param parentElement
1222 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1224 * @param buttonLabel
1225 * a {@link java.lang.String} object.
1226 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1229 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1230 String buttonLabel
, String initialText
, int style
) {
1231 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1234 parentElement
.addElement(element
);
1243 * @param parentElement
1244 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1247 * a {@link java.lang.String} object.
1248 * @param initialState
1252 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1255 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1256 if(initialState
==null){
1257 initialState
= Boolean
.FALSE
;
1259 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1261 parentElement
.addElement(element
);
1266 * Creates a section as a part of the form.
1268 * @return the section widget
1271 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
1274 public Section
adapt(AbstractFormSection section
) {
1275 section
.setMenu(section
.getLayoutComposite().getMenu());
1276 adapt(section
, true, true);
1278 // handle focus and property change events for cdm use
1279 section
.addFocusListener(selectionFocusHandler
);
1280 section
.setPropertyChangeListeners(propertyChangeListeners
);
1282 section
.addExpansionListener(new ExpansionAdapter(){
1284 public void expansionStateChanged(ExpansionEvent e
) {
1285 super.expansionStateChanged(e
);
1286 if(section
.getEntity()!=null){
1287 PreferencesUtil
.setStringValue(StoreUtil
.getPrefKey(section
.getClass(), section
.getEntity().getClass().getCanonicalName()), e
.getState()?CdmSectionPart
.EXPANDED
:CdmSectionPart
.COLLAPSED
);
1292 if (section
.getToggle() != null) {
1293 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1294 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1297 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1299 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1300 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1301 getColors().initializeSectionToolBarColors();
1302 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1303 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1305 // call setTitleBarForeground regardless as it also sets the label color
1306 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1310 private class BoldFontHolder2
{
1311 private Font normalFont
;
1313 private Font boldFont
;
1315 public BoldFontHolder2() {
1318 public Font
getBoldFont(Font font
) {
1319 createBoldFont(font
);
1323 private void createBoldFont(Font font
) {
1324 if (normalFont
== null || !normalFont
.equals(font
)) {
1328 if (boldFont
== null) {
1329 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1333 public void dispose() {
1334 if (boldFont
!= null) {
1335 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1343 * createToggleableTextField
1346 * @param parentElement
1347 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1349 * @param labelString
1350 * a {@link java.lang.String} object.
1351 * @param initialText
1352 * a {@link java.lang.String} object.
1353 * @param initialState
1357 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1360 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1361 String initialText
, boolean initialState
, int style
) {
1362 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1363 initialState
, style
| orientation
);
1366 parentElement
.addElement(element
);
1372 * createTimePeriodElement
1375 * @param parentElement
1376 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1378 * @param labelString
1379 * a {@link java.lang.String} object.
1381 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1384 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1387 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1388 TimePeriod timePeriod
, int style
) {
1389 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1391 parentElement
.addElement(element
);
1397 * createVerbatimTimePeriodElement
1400 * @param parentElement
1401 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1403 * @param labelString
1404 * a {@link java.lang.String} object.
1406 * a {@link eu.etaxonomy.cdm.model.common.VerbatimTimePeriod} object.
1409 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimTimePeriodElement}
1412 public VerbatimTimePeriodElement
createVerbatimTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1413 VerbatimTimePeriod timePeriod
, int style
) {
1414 VerbatimTimePeriodElement element
= new VerbatimTimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1416 parentElement
.addElement(element
);
1424 * createGatheringEventUnitElement
1427 * @param parentElement
1428 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1430 * @param labelString
1431 * a {@link java.lang.String} object.
1433 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1436 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1439 public GatheringEventUnitElement
createGatheringEventUnitElement(
1440 ICdmFormElement parentElement
,
1442 DerivedUnitFacade gatheringEvent
,
1443 MinMaxTextSection
.UnitType unitType
,
1445 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1452 parentElement
.addElement(element
);
1458 * createPointElement
1463 * @param parentElement
1464 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1467 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1468 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1470 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1471 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1473 parentElement
.addElement(element
);
1478 * Creates an empty section with the given message.<br>
1479 * If message is <code>null</code> a default message will be displayed.
1481 public EmptySection
createEmptySection(String message
, CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1482 EmptySection section
= new EmptySection(message
, formFactory
, parentElement
, style
);
1483 parentElement
.addElement(section
);
1490 * createDateDetailSection
1493 * @param parentElement
1494 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1498 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1501 public DateDetailSection
<TimePeriod
> createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1502 DateDetailSection
<TimePeriod
> section
= new DateDetailSection
<TimePeriod
>(this, parentElement
, false, style
);
1503 parentElement
.addElement(section
);
1510 * createVerbatimDateDetailSection
1513 * @param parentElement
1514 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1518 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimDateDetailSection}
1521 public DateDetailSection
<VerbatimTimePeriod
> createVerbatimDateDetailSection(ICdmFormElement parentElement
, int style
) {
1522 DateDetailSection
<VerbatimTimePeriod
> section
1523 = new DateDetailSection
<VerbatimTimePeriod
>(this, parentElement
, true, style
);
1524 parentElement
.addElement(section
);
1531 * createDateDetailSection
1534 * @param parentElement
1535 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1539 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1542 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1543 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1544 parentElement
.addElement(section
);
1551 * createPartialElement
1554 * @param parentElement
1555 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1557 * @param labelString
1558 * a {@link java.lang.String} object.
1560 * a {@link org.joda.time.Partial} object.
1563 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1566 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1568 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1570 parentElement
.addElement(element
);
1574 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
, boolean showYear
,
1576 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
, showYear
);
1578 parentElement
.addElement(element
);
1584 * addSelectionListener
1588 * a {@link org.eclipse.swt.events.SelectionListener} object.
1590 public void addSelectionListener(SelectionListener listener
) {
1591 selectionListenerList
.add(listener
);
1596 * removeSelectionListener
1600 * a {@link org.eclipse.swt.events.SelectionListener} object.
1602 public void removeSelectionListener(SelectionListener listener
) {
1603 if (listener
== null) {
1604 MessagingUtils
.error(this.getClass(),
1605 "Tried to remove a selection listener from this factories listeners but was null", null);
1607 selectionListenerList
.remove(listener
);
1613 * addPropertyChangeListener
1617 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1620 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1621 if (propertyChangeListeners
.contains(listener
)) {
1624 propertyChangeListeners
.add(0, listener
);
1629 * removePropertyChangeListener
1633 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1636 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1637 propertyChangeListeners
.remove(listener
);
1641 * @return the propertyChangeListeners
1643 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1644 return propertyChangeListeners
;
1649 * createHorizontalSeparator
1652 * @param parentElement
1653 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1657 * @return a {@link org.eclipse.swt.widgets.Label} object.
1659 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1660 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1661 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1667 * createVersionElement
1670 * @param parentElement
1671 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1674 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1679 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1682 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1683 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1685 parentElement
.addElement(element
);
1690 * @param cdmBaseSection
1695 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1696 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1698 parentElement
.addElement(element
);
1704 * createVersionSection
1707 * @param parentElement
1708 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1713 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1716 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1717 VersionSection section
= new VersionSection(this, parentElement
, style
);
1718 parentElement
.addElement(section
);
1728 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1729 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1730 parentElement
.addElement(section
);
1737 * createEmptyElement
1740 * @param parentElement
1741 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1743 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1745 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1746 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1748 parentElement
.addElement(element
);
1754 * createHeadlineSection
1757 * @param parentElement
1758 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1761 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1764 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1765 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1766 parentElement
.addElement(section
);
1773 * createParsingMessageElement
1776 * @param parentElement
1777 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1779 * @param parserProblem
1780 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1785 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1788 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1789 ParserProblem parserProblem
, int style
) {
1790 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1792 parentElement
.addElement(element
);
1796 public DefinedTermDetailSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1797 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1799 DefinedTermDetailSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1800 selectionProvider
, style
);
1802 parentElement
.addElement(section
);
1808 public TermMediaSection
createTermMediaSection(ConversationHolder conversation
,
1809 ICdmFormElement parentElement
, int style
) {
1810 TermMediaSection section
= new TermMediaSection(this, conversation
, parentElement
, style
);
1811 parentElement
.addElement(section
);
1817 public DerivedUnitMediaSection
createDerivedUnitMediaSection(ConversationHolder conversation
,
1818 ICdmFormElement parentElement
, int style
) {
1819 DerivedUnitMediaSection section
= new DerivedUnitMediaSection(this, conversation
, parentElement
, style
);
1820 parentElement
.addElement(section
);
1827 * @param definedTermClass
1828 * @param formElement
1832 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1833 AbstractCdmDetailSection parentElement
, int style
) {
1834 AbstractCdmDetailElement element
= null;
1836 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1837 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1838 } else if (definedTermClass
.equals(Feature
.class)) {
1839 element
= new FeatureDetailElement(this, parentElement
);
1840 } else if(definedTermClass
.equals(PresenceAbsenceTerm
.class)){
1841 element
= new PresenceAbsenceTermDetailElement(this, parentElement
);
1843 element
= new DefinedTermDetailElement(this, parentElement
);
1848 parentElement
.addElement(element
);
1852 public CharacterNodeDetailSection
createCharacterNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1853 CharacterNodeDetailSection section
= new CharacterNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1854 addAndAdaptSection(parentElement
, section
);
1858 public CharacterNodeDtoDetailSection
createCharacterNodeDtoDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1859 CharacterNodeDtoDetailSection section
= new CharacterNodeDtoDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1860 addAndAdaptSection(parentElement
, section
);
1864 public CharacterDetailSection
createCharacterDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1865 CharacterDetailSection section
= new CharacterDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1866 addAndAdaptSection(parentElement
, section
);
1870 public CharacterDtoDetailSection
createCharacterDtoDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1871 CharacterDtoDetailSection section
= new CharacterDtoDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1872 addAndAdaptSection(parentElement
, section
);
1876 public CharacterNodeDetailElement
createCharacterNodeDetailElement(ICdmFormElement parentElement
, int style
){
1877 CharacterNodeDetailElement element
= new CharacterNodeDetailElement(this, parentElement
);
1878 addAndAdaptElement(parentElement
, element
);
1881 public CharacterNodeDtoDetailElement
createCharacterNodeDtoDetailElement(ICdmFormElement parentElement
, int style
){
1882 CharacterNodeDtoDetailElement element
= new CharacterNodeDtoDetailElement(this, parentElement
);
1883 addAndAdaptElement(parentElement
, element
);
1887 public CharacterDetailElement
createCharacterDetailElement(ICdmFormElement parentElement
, int style
){
1888 CharacterDetailElement element
= new CharacterDetailElement(this, parentElement
);
1889 addAndAdaptElement(parentElement
, element
);
1892 public CharacterDtoDetailElement
createCharacterDtoDetailElement(ICdmFormElement parentElement
, int style
){
1893 CharacterDtoDetailElement element
= new CharacterDtoDetailElement(this, parentElement
);
1894 addAndAdaptElement(parentElement
, element
);
1898 public FeatureTreeDetailElement
createFeatureTreeDetailElement(ICdmFormElement parentElement
, int style
){
1899 FeatureTreeDetailElement element
= new FeatureTreeDetailElement(this, parentElement
);
1900 addAndAdaptElement(parentElement
, element
);
1905 * @param parentElement
1909 public AbstractCdmDetailElement
<TermTree
> createFeatureTreeDetailElementForTree(
1910 AbstractCdmDetailSection
<TermTree
> parentElement
, int style
) {
1911 FeatureTreeDetailElementForNode element
= new FeatureTreeDetailElementForNode(this, parentElement
);
1912 addAndAdaptElement(parentElement
, element
);
1916 public FeatureNodeDetailElement
createFeatureNodeDetailElement(ICdmFormElement parentElement
, int style
){
1917 FeatureNodeDetailElement element
= new FeatureNodeDetailElement(this, parentElement
);
1918 addAndAdaptElement(parentElement
, element
);
1923 //--------DetailSections---------
1924 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1925 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1926 addAndAdaptSection(parentElement
, section
);
1930 public FeatureNodeDetailSection
createFeatureNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1931 FeatureNodeDetailSection section
= new FeatureNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1932 addAndAdaptSection(parentElement
, section
);
1936 public FeatureTreeDetailSection
createFeatureTreeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1937 FeatureTreeDetailSection section
= new FeatureTreeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1938 addAndAdaptSection(parentElement
, section
);
1941 public FeatureTreeDetailSectionForNode
createFeatureTreeDetailSectionForTree(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1942 FeatureTreeDetailSectionForNode section
= new FeatureTreeDetailSectionForNode(this, conversation
, parentElement
, selectionProvider
, style
);
1943 addAndAdaptSection(parentElement
, section
);
1947 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1948 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1949 addAndAdaptSection(parentElement
, section
);
1953 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1954 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1955 addAndAdaptSection(parentElement
, section
);
1959 public OriginalSourceAdvancedSection
createOriginalSourceAdvancedSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1960 OriginalSourceAdvancedSection section
= new OriginalSourceAdvancedSection(this, conversation
, parentElement
, selectionProvider
, style
);
1961 addAndAdaptSection(parentElement
, section
);
1965 public AdvancedSourceElement
createAdvancedSourceDetailElement(ICdmFormElement parentElement
, int style
){
1966 AdvancedSourceElement element
= new AdvancedSourceElement(this, parentElement
);
1967 addAndAdaptElement(parentElement
, element
);
1971 public AdvancedSourceElement
createAdvancedNomenclaturalSourceDetailElement(ICdmFormElement parentElement
, int style
){
1972 AdvancedNomenclaturalSourceElement element
= new AdvancedNomenclaturalSourceElement(this, parentElement
);
1973 addAndAdaptElement(parentElement
, element
);
1977 public SingleSourceSection
createSingleSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, CdmBase cdmEntity
, ISelectionProvider selectionProvider
, String label
, int style
){
1978 SingleSourceSection section
= new SingleSourceSection(this, conversation
, parentElement
, cdmEntity
, selectionProvider
, style
, label
);
1979 addAndAdaptSection(parentElement
, section
);
1983 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1984 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1985 addAndAdaptSection(parentElement
, section
);
1989 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1990 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1991 addAndAdaptSection(parentElement
, section
);
1995 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1996 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1997 addAndAdaptSection(parentElement
, section
);
2001 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2002 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
2003 addAndAdaptSection(parentElement
, section
);
2007 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2008 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
2009 addAndAdaptSection(parentElement
, section
);
2013 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2014 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2015 addAndAdaptSection(parentElement
, section
);
2019 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2020 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2021 addAndAdaptSection(parentElement
, section
);
2025 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2026 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
2027 addAndAdaptSection(parentElement
, section
);
2033 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
2034 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
2035 addAndAdaptSection(parentElement
, section
);
2039 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2040 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
2041 addAndAdaptSection(parentElement
, section
);
2045 public FieldUnitDetailSection
createFieldUnitDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2046 FieldUnitDetailSection section
= new FieldUnitDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2047 addAndAdaptSection(parentElement
, section
);
2051 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2052 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2053 addAndAdaptSection(parentElement
, section
);
2057 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2058 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2059 addAndAdaptSection(parentElement
, section
);
2063 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2064 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
2065 addAndAdaptSection(parentElement
, section
);
2069 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2070 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2071 addAndAdaptSection(parentElement
, section
);
2075 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2076 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
2077 addAndAdaptSection(parentElement
, section
);
2081 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2082 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
2083 addAndAdaptSection(parentElement
, section
);
2087 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2088 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2089 addAndAdaptSection(parentElement
, section
);
2093 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2094 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2095 addAndAdaptSection(parentElement
, section
);
2099 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2100 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2101 addAndAdaptSection(parentElement
, section
);
2105 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2106 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2107 addAndAdaptSection(parentElement
, section
);
2111 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2112 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2113 addAndAdaptSection(parentElement
, section
);
2117 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2118 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2119 addAndAdaptSection(parentElement
, section
);
2123 public FieldUnitGeneralDetailSection
createFieldUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2124 FieldUnitGeneralDetailSection section
= new FieldUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2125 addAndAdaptSection(parentElement
, section
);
2129 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2130 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2131 addAndAdaptSection(parentElement
, section
);
2135 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2136 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2137 addAndAdaptSection(parentElement
, section
);
2141 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2142 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2143 addAndAdaptSection(parentElement
, section
);
2147 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2148 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2149 addAndAdaptSection(parentElement
, section
);
2153 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2154 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
2155 addAndAdaptSection(parentElement
, section
);
2159 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2160 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2161 addAndAdaptSection(parentElement
, section
);
2165 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2166 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2167 addAndAdaptSection(parentElement
, section
);
2171 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2172 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
2173 addAndAdaptSection(parentElement
, section
);
2177 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2178 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
2179 addAndAdaptSection(parentElement
, section
);
2183 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2184 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
2185 addAndAdaptSection(parentElement
, section
);
2189 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2190 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2191 addAndAdaptSection(parentElement
, section
);
2195 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2196 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2197 addAndAdaptSection(parentElement
, section
);
2201 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2202 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2203 addAndAdaptSection(parentElement
, section
);
2207 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2208 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2209 addAndAdaptSection(parentElement
, section
);
2213 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2214 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
2215 addAndAdaptSection(parentElement
, section
);
2219 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2220 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2221 addAndAdaptSection(parentElement
, section
);
2225 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2226 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2227 addAndAdaptSection(parentElement
, section
);
2231 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2232 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2233 addAndAdaptSection(parentElement
, section
);
2237 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2238 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2239 addAndAdaptSection(parentElement
, section
);
2243 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2244 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2245 addAndAdaptSection(parentElement
, section
);
2249 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2250 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2251 addAndAdaptSection(parentElement
, section
);
2255 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2256 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
, true);
2257 addAndAdaptSection(parentElement
, section
);
2261 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2262 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2263 addAndAdaptSection(parentElement
, section
);
2267 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2268 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2269 addAndAdaptSection(parentElement
, section
);
2273 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2274 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2275 addAndAdaptSection(parentElement
, section
);
2279 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2280 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2281 addAndAdaptSection(parentElement
, section
);
2285 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2286 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2287 addAndAdaptSection(parentElement
, section
);
2291 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
2292 parentElement
.addElement(section
);
2296 //--------DetailElements------------
2298 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
2299 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
2300 addAndAdaptElement(parentElement
, element
);
2304 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
2305 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
2306 addAndAdaptElement(parentElement
, element
);
2310 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
2311 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
2312 addAndAdaptElement(parentElement
, element
);
2316 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
2317 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
2318 addAndAdaptElement(parentElement
, element
);
2322 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
2323 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
2324 addAndAdaptElement(parentElement
, element
);
2327 public OriginalSourceElement
createOriginalSourceElement(ICdmFormElement parentElement
, CdmBase cdmEntity
, String label
){
2328 OriginalSourceElement element
= new OriginalSourceElement(this, parentElement
, cdmEntity
, label
);
2329 addAndAdaptElement(parentElement
, element
);
2334 public NomenclaturalSourceElement
createNomenclaturalSourceElement(ICdmFormElement parentElement
, CdmBase cdmEntity
, String label
){
2335 NomenclaturalSourceElement element
= new NomenclaturalSourceElement(this, parentElement
, cdmEntity
, label
);
2336 addAndAdaptElement(parentElement
, element
);
2340 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
2341 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
2342 addAndAdaptElement(parentElement
, element
);
2346 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
2347 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
2348 addAndAdaptElement(parentElement
, element
);
2352 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
2353 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
2354 addAndAdaptElement(parentElement
, element
);
2358 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
2359 UserDetailElement element
= new UserDetailElement(this, parentElement
);
2360 addAndAdaptElement(parentElement
, element
);
2364 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2365 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2366 addAndAdaptElement(parentElement
, element
);
2370 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2371 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2372 addAndAdaptElement(parentElement
, element
);
2376 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2377 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2378 addAndAdaptElement(parentElement
, element
);
2382 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2383 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2384 addAndAdaptElement(parentElement
, element
);
2388 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2389 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2390 addAndAdaptElement(parentElement
, element
);
2394 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2395 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2397 parentElement
.addElement(element
);
2402 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2403 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2404 addAndAdaptElement(parentElement
, element
);
2408 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2409 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2410 addAndAdaptElement(parentElement
, element
);
2414 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2415 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2416 addAndAdaptElement(parentElement
, element
);
2420 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2421 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2422 addAndAdaptElement(parentElement
, element
);
2426 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2427 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2428 addAndAdaptElement(parentElement
, element
);
2432 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2433 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2434 addAndAdaptElement(parentElement
, element
);
2438 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2439 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2440 addAndAdaptElement(parentElement
, element
);
2444 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2445 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2446 addAndAdaptElement(parentElement
, element
);
2450 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2451 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2452 addAndAdaptElement(parentElement
, element
);
2456 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2457 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2458 addAndAdaptElement(parentElement
, element
);
2462 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2463 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2464 addAndAdaptElement(parentElement
, element
);
2468 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2469 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2470 addAndAdaptElement(parentElement
, element
);
2474 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2475 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2476 addAndAdaptElement(parentElement
, element
);
2480 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
, boolean isWizard
){
2481 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
, isWizard
);
2482 addAndAdaptElement(parentElement
, element
);
2486 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2487 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2488 addAndAdaptElement(parentElement
, element
);
2493 public FieldUnitGeneralDetailElement
createFieldUnitGeneralDetailElement(ICdmFormElement parentElement
){
2494 FieldUnitGeneralDetailElement element
= new FieldUnitGeneralDetailElement(this, parentElement
);
2495 addAndAdaptElement(parentElement
, element
);
2499 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2500 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2501 addAndAdaptElement(parentElement
, element
);
2505 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2506 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2507 addAndAdaptElement(parentElement
, element
);
2511 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2512 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2513 addAndAdaptElement(parentElement
, element
);
2517 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2518 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2519 addAndAdaptElement(parentElement
, element
);
2523 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2524 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2525 addAndAdaptElement(parentElement
, element
);
2529 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2530 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2531 addAndAdaptElement(parentElement
, element
);
2535 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2536 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2537 addAndAdaptElement(parentElement
, element
);
2541 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2542 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2543 addAndAdaptElement(parentElement
, element
);
2547 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2548 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2549 addAndAdaptElement(parentElement
, element
);
2553 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2554 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2555 addAndAdaptElement(parentElement
, element
);
2559 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2560 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2561 addAndAdaptElement(parentElement
, element
);
2565 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2566 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2567 addAndAdaptElement(parentElement
, element
);
2571 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2572 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2573 addAndAdaptElement(parentElement
, element
);
2577 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2578 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2579 addAndAdaptElement(parentElement
, element
);
2583 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2584 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2585 addAndAdaptElement(parentElement
, element
);
2589 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2590 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2591 addAndAdaptElement(parentElement
, mediaDetailElement
);
2592 return mediaDetailElement
;
2595 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2596 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2597 addAndAdaptElement(parentElement
, element
);
2601 public FieldUnitDetailElement
createFieldUnitDetailElement(ICdmFormElement parentElement
) {
2602 FieldUnitDetailElement element
= new FieldUnitDetailElement(this, parentElement
);
2603 addAndAdaptElement(parentElement
, element
);
2607 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2608 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2609 addAndAdaptElement(parentElement
, element
);
2613 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2614 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2615 addAndAdaptElement(parentElement
, element
);
2619 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2620 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2621 addAndAdaptElement(parentElement
, element
);
2625 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2626 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2627 addAndAdaptElement(parentElement
, element
);
2631 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2632 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2633 addAndAdaptElement(parentElement
, element
);
2638 * @param parentElement
2641 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2643 parentElement
.addElement(element
);
2646 //--------EntityCollectionSection----------
2647 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2648 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2649 addAndAdaptSection(parentElement
, section
);
2653 public InapplicableIfEntityCollectionSection
createInapplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2654 InapplicableIfEntityCollectionSection section
= new InapplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2655 addAndAdaptSection(parentElement
, section
);
2659 public OnlyApplicableIfEntityCollectionSection
createOnlyApplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2660 OnlyApplicableIfEntityCollectionSection section
= new OnlyApplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2661 addAndAdaptSection(parentElement
, section
);
2665 public InapplicableIfEntityCollectionSectionForNode
createInapplicableIfEntityCollectionSectionForNode(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2666 InapplicableIfEntityCollectionSectionForNode section
= new InapplicableIfEntityCollectionSectionForNode(this, conversation
, parentElement
, style
);
2667 addAndAdaptSection(parentElement
, section
);
2671 public OnlyApplicableIfEntityCollectionSectionForNode
createOnlyApplicableIfEntityCollectionSectionForNode(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2672 OnlyApplicableIfEntityCollectionSectionForNode section
= new OnlyApplicableIfEntityCollectionSectionForNode(this, conversation
, parentElement
, style
);
2673 addAndAdaptSection(parentElement
, section
);
2677 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2678 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2679 addAndAdaptSection(parentElement
, section
);
2683 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2684 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2685 addAndAdaptSection(parentElement
, section
);
2688 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2689 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2690 addAndAdaptSection(parentElement
, section
);
2693 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, Reference defaultSource
, int style
){
2694 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, defaultSource
, style
);
2695 addAndAdaptSection(parentElement
, section
);
2699 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2700 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2701 addAndAdaptSection(parentElement
, section
);
2705 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2706 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2707 addAndAdaptSection(parentElement
, section
);
2711 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2712 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2713 addAndAdaptSection(parentElement
, section
);
2717 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2718 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2719 addAndAdaptSection(parentElement
, section
);
2723 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2724 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2725 addAndAdaptSection(parentElement
, section
);
2729 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2730 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2731 addAndAdaptSection(parentElement
, section
);
2735 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2736 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2737 addAndAdaptSection(parentElement
, section
);
2741 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2742 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2743 addAndAdaptSection(parentElement
, section
);
2747 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2748 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2749 addAndAdaptSection(parentElement
, section
);
2753 // public ProtologueSection createProtologueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
2754 // ProtologueSection section = new ProtologueSection(this, conversation, parentElement, style);
2755 // addAndAdaptSection(parentElement, section);
2758 public ExternalLinksSection
createExternalLinksSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2759 ExternalLinksSection section
= new ExternalLinksSection(this, conversation
, parentElement
, style
);
2760 addAndAdaptSection(parentElement
, section
);
2764 public ExternalLinksSection
createExternalLinksSection(ConversationHolder conversation
, ICdmFormElement parentElement
, String label
, int style
){
2765 ExternalLinksSection section
= new ExternalLinksSection(this, conversation
, parentElement
, label
, style
);
2766 addAndAdaptSection(parentElement
, section
);
2770 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2771 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2773 addAndAdaptSection(parentElement
, section
);
2777 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2778 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2779 addAndAdaptSection(parentElement
, section
);
2783 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2784 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2785 addAndAdaptSection(parentElement
, section
);
2789 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2790 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2791 addAndAdaptSection(parentElement
, section
);
2795 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2796 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2797 addAndAdaptSection(parentElement
, section
);
2801 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2802 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2803 addAndAdaptSection(parentElement
, section
);
2807 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2808 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2809 addAndAdaptSection(parentElement
, section
);
2813 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2814 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2815 addAndAdaptSection(parentElement
, section
);
2819 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2820 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2821 addAndAdaptSection(parentElement
, section
);
2825 public StateVocabularyDtoCollectionSection
createStateVocabulariesDtoSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2826 StateVocabularyDtoCollectionSection section
= new StateVocabularyDtoCollectionSection(this, conversation
, parentElement
, style
);
2827 addAndAdaptSection(parentElement
, section
);
2831 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2832 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2833 addAndAdaptSection(parentElement
, section
);
2836 public RecommendedModifierVocabulariesDtoCollectionSection
createRecommendedModifierVocabulariesDtoCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2837 RecommendedModifierVocabulariesDtoCollectionSection section
= new RecommendedModifierVocabulariesDtoCollectionSection(this, conversation
, parentElement
, style
);
2838 addAndAdaptSection(parentElement
, section
);
2842 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2843 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2844 addAndAdaptSection(parentElement
, section
);
2848 public MeasurementUnitDtoCollectionSection
createMeasurementUnitDtoCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2849 MeasurementUnitDtoCollectionSection section
= new MeasurementUnitDtoCollectionSection(this, conversation
, parentElement
, style
);
2850 addAndAdaptSection(parentElement
, section
);
2853 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2854 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2855 addAndAdaptSection(parentElement
, section
);
2859 public StatisticalMeasureDtoCollectionSection
createStatisticalMeasureDtoCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2860 StatisticalMeasureDtoCollectionSection section
= new StatisticalMeasureDtoCollectionSection(this, conversation
, parentElement
, style
);
2861 addAndAdaptSection(parentElement
, section
);
2865 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2866 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2867 addAndAdaptSection(parentElement
, section
);
2871 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2872 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2873 addAndAdaptSection(parentElement
, section
);
2877 public GeoScopePolyKeyDetailSection
createGeoScopePolyKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2878 GeoScopePolyKeyDetailSection section
= new GeoScopePolyKeyDetailSection(this, conversation
, parentElement
, style
);
2879 addAndAdaptSection(parentElement
, section
);
2883 public IdentifierSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2884 IdentifierSection section
= new IdentifierSection(this, conversation
, parentElement
, style
);
2885 addAndAdaptSection(parentElement
, section
);
2889 public DerivedUnitFacadeIdentifierSection
createDerivedUnitFacadeIdentifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2890 DerivedUnitFacadeIdentifierSection section
= new DerivedUnitFacadeIdentifierSection(this, conversation
, parentElement
, style
);
2891 addAndAdaptSection(parentElement
, section
);
2895 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2896 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2897 addAndAdaptSection(parentElement
, section
);
2901 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2902 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2903 addAndAdaptSection(parentElement
, section
);
2907 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2908 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2909 addAndAdaptSection(parentElement
, section
);
2913 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2914 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2915 addAndAdaptSection(parentElement
, section
);
2919 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2920 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2921 addAndAdaptSection(parentElement
, section
);
2925 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2926 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2927 addAndAdaptSection(parentElement
, section
);
2931 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2932 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2933 addAndAdaptSection(parentElement
, section
);
2937 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2938 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2939 addAndAdaptSection(parentElement
, section
);
2943 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2944 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2945 addAndAdaptSection(parentElement
, section
);
2949 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2950 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2951 addAndAdaptSection(parentElement
, section
);
2955 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2956 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2957 addAndAdaptSection(parentElement
, section
);
2961 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2962 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2963 addAndAdaptSection(parentElement
, section
);
2967 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2968 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2969 addAndAdaptSection(parentElement
, section
);
2974 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2975 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2976 AbstractEntityCollectionElement
<?
> element
= null;
2978 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2980 if (entity
instanceof Annotation
) {
2981 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2982 }else if (entity
instanceof Person
) {
2983 boolean isNomenclatural
= false;
2984 if (parentElement
instanceof TeamMemberSection
){
2985 isNomenclatural
= ((TeamMemberSection
) parentElement
).isNomenclaturalTeam();
2987 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
, isNomenclatural
);
2988 } else if (entity
instanceof Credit
) {
2989 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2990 } else if (entity
instanceof Extension
) {
2991 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2992 } else if (entity
instanceof ExternalLink
) {
2993 element
= new ExternalLinksElement(this, parentElement
, (ExternalLink
) entity
, removeListener
, style
);
2994 } else if (entity
instanceof Marker
) {
2995 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2996 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2997 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
, removeListener
, backgroundColor
, style
);
2998 }else if (entity
instanceof Media
) {
2999 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
3000 } else if (entity
instanceof MediaRepresentation
) {
3001 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
3003 } else if (entity
instanceof ImageFile
) {
3004 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
3005 } else if (entity
instanceof MediaRepresentationPart
) {
3006 element
= new MediaRepresentationPartElement
<>(this, parentElement
, (MediaRepresentationPart
) entity
,
3007 removeListener
, style
);
3008 } else if (entity
instanceof NomenclaturalStatus
) {
3009 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
3011 } else if (entity
instanceof Rights
) {
3012 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
3013 } else if (entity
instanceof DescriptionElementSource
&& parentElement
.getEntity() instanceof CommonTaxonName
) {
3014 element
= new CommonNameSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
3015 removeListener
, style
);
3016 } else if (entity
instanceof DescriptionElementSource
&& parentElement
.getEntity() instanceof Distribution
) {
3017 Composite parent
= null;
3018 if (parentElement
instanceof DescriptionElementSourceSection
){
3019 parent
= ((DescriptionElementSourceSection
)parentElement
).getParent();
3021 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
3022 removeListener
, style
, false);
3023 } else if (entity
instanceof DescriptionElementSource
) {
3024 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
3025 removeListener
, style
, false);
3026 }else if (entity
instanceof TaxonNodeAgentRelation
) {
3027 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
,
3028 removeListener
,backgroundColor
, style
);
3029 }else if (entity
instanceof IdentifiableSource
&& parentElement
.getEntity() instanceof DescriptionElementBase
) {
3030 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
3032 } else if (entity
instanceof IdentifiableSource
) {
3033 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
3035 } else if (entity
instanceof DefinedTerm
) {
3036 switch(((DefinedTerm
)entity
).getTermType()) {
3038 element
= new ScopeElement(this,
3040 (DefinedTerm
) entity
,
3045 element
= new ModifierElement(this,
3047 (DefinedTerm
) entity
,
3055 } else if (entity
instanceof Reference
) {
3056 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
3057 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
3060 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
3062 } else if (entity
instanceof NameTypeDesignation
) {
3063 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
3065 } else if (entity
instanceof TextualTypeDesignation
) {
3066 element
= new TextTypeDesignationElement(this, parentElement
, (TextualTypeDesignation
) entity
, removeListener
,
3068 } else if (entity
instanceof NameRelationship
) {
3069 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
3071 } else if (entity
instanceof SpecimenTypeDesignation
) {
3072 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
3073 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
3074 removeListener
, style
);
3077 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
3078 removeListener
, style
);
3080 } else if (entity
instanceof StateData
) {
3081 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
3082 } else if (entity
instanceof StatisticalMeasurementValue
) {
3083 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
3084 removeListener
, style
);
3085 } else if (entity
instanceof DerivedUnit
) {
3086 switch(((DerivedUnit
)entity
).getRecordBasis()) {
3087 case LivingSpecimen
:
3088 case PreservedSpecimen
:
3090 element
= new SpecimenCollectionDetailElement(this,
3092 (DerivedUnit
) entity
,
3097 element
= new DerivedUnitElement(this,
3099 (DerivedUnit
) entity
,
3104 } else if (entity
instanceof NamedArea
) {
3105 element
= new CollectingAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
3106 } else if (entity
instanceof DeterminationEvent
) {
3107 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
3108 } else if (entity
instanceof User
) {
3109 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
3110 } else if (entity
instanceof GrantedAuthority
) {
3111 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
, ((Group
)parentElement
.getEntity()),
3112 removeListener
, style
);
3113 } else if (entity
instanceof Group
) {
3114 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
3115 } else if (entity
instanceof Taxon
) {
3116 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
3117 } else if (entity
instanceof DescriptionElementBase
) {
3118 // this is the special case for protologs, maybe we can do this
3119 // differently when API improves
3120 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
3121 // if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
3122 // element = new ProtologueElement(this, parentElement, descriptionElement, removeListener, style);
3124 } else if (entity
instanceof Identifier
) {
3125 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
3126 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
<DnaSample
>) entity
, removeListener
, backgroundColor
, style
);
3129 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
3131 } else if (entity
instanceof TermVocabulary
) {
3132 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
3133 switch (termVocabulary
.getTermType()) {
3135 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
3138 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
3143 }else if (entity
instanceof TermVocabularyDto
) {
3144 TermVocabularyDto termVocabulary
= (TermVocabularyDto
)entity
;
3145 switch (termVocabulary
.getTermType()) {
3147 element
= new StateVocabularyDtoCollectionElement(this, parentElement
, termVocabulary
, removeListener
, backgroundColor
, style
);
3150 element
= new RecommendedModifierDtoVocabulariesElement(this, parentElement
, termVocabulary
, removeListener
, backgroundColor
, style
);
3155 }else if (entity
instanceof MeasurementUnit
) {
3156 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
3157 }else if (entity
instanceof TermDto
) {
3158 if(((TermDto
)entity
).getTermType().equals(TermType
.MeasurementUnit
)){
3159 element
= new MeasurementUnitDtoCollectionElement(this, parentElement
, (TermDto
) entity
, removeListener
, backgroundColor
, style
);
3160 }else if (((TermDto
)entity
).getTermType().equals(TermType
.StatisticalMeasure
)){
3161 element
= new StatisticalMeasureDtoCollectionElement(this, parentElement
, (TermDto
) entity
, removeListener
, backgroundColor
, style
);
3163 }else if (entity
instanceof StatisticalMeasure
) {
3164 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
3165 } else if (entity
instanceof FeatureState
&& parentElement
instanceof InapplicableIfEntityCollectionSection
) {
3166 element
= new InapplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
3167 } else if (entity
instanceof FeatureState
&& parentElement
instanceof OnlyApplicableIfEntityCollectionSection
) {
3168 element
= new OnlyApplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
3171 //check for parent section when entity is null
3172 //this happens when AbstractUnboundEntityCollectionSection is used
3174 if(parentElement
instanceof ScopeSection
|| parentElement
instanceof ScopeRestrictionSection
){
3175 element
= new ScopeElement(this,
3177 (DefinedTerm
) entity
,
3181 else if(parentElement
instanceof ModifierSection
){
3182 element
= new ModifierElement(this,
3184 (DefinedTerm
) entity
,
3191 if (element
== null) {
3192 MessagingUtils
.messageDialog(
3193 String
.format("Error when creating section %s",
3194 parentElement
.getClass().getSimpleName()),
3196 String
.format("Could not generate collection element for entity of class %s."
3197 + " Looks like the case is not yet handled. Check implementation.\n"
3198 + "Entity: %s", entity
.getClass(), entity
.toString()), null);
3202 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
3203 element
.setPersistentBackground(backgroundColor
);
3206 parentElement
.addElement(element
);
3214 * Creates a selection element for the given type T.
3217 * <strong>Selection elements not handled by this method:</strong>
3219 * <li>{@link TaxonNodeSelectionElement} see
3220 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
3222 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
3223 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
3229 * a {@link Class} object of the type that you want the selection
3231 * @param parentElement
3232 * a {@link ICdmFormElement} object.
3233 * @param labelString
3234 * a {@link String} object.
3235 * @param selectionType
3237 * a {@link ICdmBase} object.
3240 * @param conversation
3241 * a {@link ConversationHolder} object.
3242 * @return a {@link EntitySelectionElement} object.
3244 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
3245 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
3246 int style
, Integer limit
) {
3247 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this,
3248 parentElement
, clazz
,
3249 labelString
, selection
, mode
, style
, limit
);
3251 parentElement
.addElement(element
);
3255 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
3256 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
3257 int style
, boolean filterElement
) {
3258 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, //conversation,
3259 parentElement
, clazz
,
3260 labelString
, selection
, mode
, style
, filterElement
);
3262 parentElement
.addElement(element
);
3266 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
3267 // ConversationHolder conversation,
3268 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
3270 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this,
3271 parentElement
, clazz
,
3272 labelString
, selection
, mode
, style
);
3274 parentElement
.addElement(element
);
3278 public CommonNameReferenceSelectionElement
createCommonNameReferenceSelectionElement(ICdmFormElement parentElement
, String labelString
, Reference selection
, int mode
,
3280 CommonNameReferenceSelectionElement element
= new CommonNameReferenceSelectionElement(this,
3281 parentElement
, labelString
, selection
, mode
, style
);
3283 parentElement
.addElement(element
);
3289 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
3292 * <strong>Selection elements not handled by this method:</strong>
3294 * <li>{@link TaxonNodeSelectionElement} see
3295 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
3297 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
3298 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
3304 * a {@link Class} object of the type that you want the selection
3306 * @param parentElement
3307 * a {@link ICdmFormElement} object.
3308 * @param labelString
3309 * a {@link String} object.
3310 * @param selectionType
3312 * a {@link ICdmBase} object.
3315 * @param conversation
3316 * a {@link ConversationHolder} object.
3317 * @return a {@link EntitySelectionElement} object.
3319 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
3320 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
3321 T selection
, int mode
, int style
) {
3322 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, //conversation,
3323 parentElement
, clazz
,
3324 labelString
, selection
, mode
, style
);
3326 parentElement
.addElement(element
);
3330 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
3331 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
3332 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this,
3334 labelString
, selection
, mode
, style
, null);
3336 parentElement
.addElement(element
);
3339 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
3340 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
, Integer limit
) {
3341 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, //conversation,
3343 labelString
, selection
, mode
, style
, limit
);
3345 parentElement
.addElement(element
);
3350 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
3351 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
3352 // int mode, int style) {
3353 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
3354 // conversation, parentElement, labelString, selection, mode, style);
3356 // parentElement.addElement(element);
3360 /** {@inheritDoc} */
3361 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
3362 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
3363 adapt(labelElement
);
3364 parentElement
.addElement(labelElement
);
3365 return labelElement
;
3370 // public DateElementFormElement createDateElementForm(ICdmFormElement formElement, String labelText, DateTime dateTime, int style){
3371 // Label label = new Label(formElement.getLayoutComposite(), style);
3372 // label.setText(labelText+" (yyyy-MM-dd)");
3373 // DateElementFormElement dateElement = new DateElementFormElement(this, dateTime, style, formElement.getLayoutComposite());
3374 // dateElement.initInternalController();
3376 // return dateElement;
3379 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
, boolean editableText
){
3380 Label label
= new Label(formElement
.getLayoutComposite(), style
);
3381 label
.setText(labelText
);
3382 label
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3383 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, labelText
, style
, editableText
);
3384 dateElement
.initController(this, formElement
);
3385 dateElement
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3391 * Getter for the field <code>selectionProvider</code>.
3394 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
3396 public ISelectionProvider
getSelectionProvider() {
3397 return selectionProvider
;
3402 * createDetailedDescriptionDetailElement
3405 * @param parentElement
3406 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
3410 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
3415 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
3418 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
3419 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
, boolean enabled
) {
3420 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
3422 if (entity
instanceof CategoricalData
) {
3423 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
3424 (CategoricalData
) entity
, style
);
3425 } else if (entity
instanceof CommonTaxonName
) {
3426 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
3428 } else if (entity
instanceof Distribution
&& !enabled
) {
3429 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3431 } else if (entity
instanceof Distribution
) {
3432 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3434 }else if (entity
instanceof IndividualsAssociation
) {
3435 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
3436 (IndividualsAssociation
) entity
, style
);
3437 } else if (entity
instanceof QuantitativeData
) {
3438 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
3439 (QuantitativeData
) entity
, style
);
3440 } else if (entity
instanceof TaxonInteraction
) {
3441 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
3442 (TaxonInteraction
) entity
, style
);
3443 } else if (entity
instanceof TemporalData
) {
3444 detailedDescriptionElement
= new TemporalDataDetailElement(this, parentElement
, (TemporalData
) entity
, style
);
3445 } else if (entity
instanceof TextData
) {
3446 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
3449 throw new IllegalStateException("There is no interface for the given description element");
3451 adapt(detailedDescriptionElement
);
3452 parentElement
.addElement(detailedDescriptionElement
);
3453 return detailedDescriptionElement
;
3458 * Creates a styled text as a part of the form.
3463 * the text initial value
3466 * @return the text widget
3468 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
3469 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
3470 if (value
!= null) {
3471 text
.setText(value
);
3473 text
.setForeground(getColors().getForeground());
3474 text
.setBackground(getColors().getBackground());
3475 // text.addFocusListener(visibilityHandler);
3479 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
3480 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
3481 addAndAdaptSection(parentElement
, section
);
3486 * @param formElement
3487 * @param conversationHolder
3491 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
3492 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
3493 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
3494 addAndAdaptSection(formElement
, section
);
3499 public TaxonOfRelationshipElement
createTaxonOfRelationshipDetailElement(
3500 ICdmFormElement parentElement
, int style
) {
3501 TaxonOfRelationshipElement section
= new TaxonOfRelationshipElement(this, parentElement
, style
);
3502 addAndAdaptElement(parentElement
, section
);
3506 public TaxonDetailSection
createTaxonDetailSection(ConversationHolder conversationHolder
,
3507 ICdmFormElement formElement
, ISelectionProvider selectionProvider
, int style
) {
3508 TaxonDetailSection section
= new TaxonDetailSection(this, conversationHolder
, formElement
, selectionProvider
, style
);
3509 addAndAdaptSection(formElement
, section
);
3516 * createTextWithLabelElement
3519 * @param parentElement
3520 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
3522 * @param labelString
3523 * a {@link java.lang.String} object.
3524 * @param initialText
3525 * a {@link java.lang.String} object.
3526 * @param textLimit maximal number of characters allowed
3529 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
3532 public RuleConsideredElement
createRuleConsideredElement(ICdmFormElement parentElement
, String labelString
, boolean isShowCodeEdition
, int style
) {
3533 RuleConsideredElement element
= new RuleConsideredElement(this, parentElement
, labelString
, isShowCodeEdition
, style
);
3535 parentElement
.addElement(element
);
3541 * @param formElement
3548 public EntitySelectionElementWithIdInVocabulary
createSelectionElementWithIdInVocabulary(Class
<NamedArea
> clazz
,
3549 ICdmFormElement formElement
, String labelString
, NamedArea area
, int mode
, int style
) {
3550 EntitySelectionElementWithIdInVocabulary element
= new EntitySelectionElementWithIdInVocabulary(this,
3551 formElement
, clazz
, labelString
, area
, mode
, style
);
3553 formElement
.addElement(element
);
3558 * @param extendedTimePeriodElement
3562 public ExtendedTimeDetailSection
createExtendedTimeDetailSection(
3563 ExtendedTimePeriodElement parentElement
, int style
) {
3564 ExtendedTimeDetailSection section
= new ExtendedTimeDetailSection(this, parentElement
, style
);
3565 parentElement
.addElement(section
);
3569 public ExtendedTimePeriodElement
createExtendedTimePeriodElement(
3570 ICdmFormElement parentElement
, String labelString
, ExtendedTimePeriod timePeriod
, int style
) {
3571 ExtendedTimePeriodElement section
= new ExtendedTimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
3572 parentElement
.addElement(section
);
3580 // public RichTextWithLabelElement createRichTextLabelElement(ICdmFormElement parentElement, String labelString, String initialText, int textHeight, int style) {
3581 // RichTextWithLabelElement element = new RichTextWithLabelElement(this, parentElement, labelString,
3582 // initialText, textHeight, style);
3584 // parentElement.addElement(element);