2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.ui
.element
;
11 import java
.util
.ArrayList
;
12 import java
.util
.Comparator
;
13 import java
.util
.HashSet
;
14 import java
.util
.List
;
18 import javax
.inject
.Inject
;
20 import org
.eclipse
.e4
.core
.contexts
.IEclipseContext
;
21 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
22 import org
.eclipse
.jface
.viewers
.ISelection
;
23 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
24 import org
.eclipse
.jface
.window
.Window
;
25 //import org.eclipse.nebula.widgets.richtext.RichTextEditor;
26 import org
.eclipse
.swt
.SWT
;
27 import org
.eclipse
.swt
.custom
.StyledText
;
28 import org
.eclipse
.swt
.events
.FocusAdapter
;
29 import org
.eclipse
.swt
.events
.FocusEvent
;
30 import org
.eclipse
.swt
.events
.FocusListener
;
31 import org
.eclipse
.swt
.events
.MouseAdapter
;
32 import org
.eclipse
.swt
.events
.MouseEvent
;
33 import org
.eclipse
.swt
.events
.MouseListener
;
34 import org
.eclipse
.swt
.events
.SelectionEvent
;
35 import org
.eclipse
.swt
.events
.SelectionListener
;
36 import org
.eclipse
.swt
.events
.TypedEvent
;
37 import org
.eclipse
.swt
.graphics
.Color
;
38 import org
.eclipse
.swt
.graphics
.Font
;
39 import org
.eclipse
.swt
.widgets
.Composite
;
40 import org
.eclipse
.swt
.widgets
.Control
;
41 import org
.eclipse
.swt
.widgets
.Display
;
42 import org
.eclipse
.swt
.widgets
.Event
;
43 import org
.eclipse
.swt
.widgets
.Label
;
44 import org
.eclipse
.ui
.forms
.IFormColors
;
45 import org
.eclipse
.ui
.forms
.events
.ExpansionAdapter
;
46 import org
.eclipse
.ui
.forms
.events
.ExpansionEvent
;
47 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
48 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
49 import org
.eclipse
.ui
.forms
.widgets
.Section
;
50 import org
.eclipse
.ui
.forms
.widgets
.TableWrapData
;
51 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
52 import org
.joda
.time
.DateTime
;
53 import org
.joda
.time
.Partial
;
54 import org
.springframework
.security
.core
.GrantedAuthority
;
56 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
57 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
58 import eu
.etaxonomy
.cdm
.common
.DOI
;
59 import eu
.etaxonomy
.cdm
.common
.URI
;
60 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
61 import eu
.etaxonomy
.cdm
.model
.agent
.ORCID
;
62 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
63 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
64 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
65 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
66 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
67 import eu
.etaxonomy
.cdm
.model
.common
.ExtendedTimePeriod
;
68 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
69 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
70 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
71 import eu
.etaxonomy
.cdm
.model
.common
.Identifier
;
72 import eu
.etaxonomy
.cdm
.model
.common
.LSID
;
73 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
74 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
75 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
76 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
77 import eu
.etaxonomy
.cdm
.model
.common
.VerbatimTimePeriod
;
78 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
79 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
80 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
81 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
82 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
83 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
84 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
85 import eu
.etaxonomy
.cdm
.model
.description
.FeatureState
;
86 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
87 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
88 import eu
.etaxonomy
.cdm
.model
.description
.MeasurementUnit
;
89 import eu
.etaxonomy
.cdm
.model
.description
.PresenceAbsenceTerm
;
90 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
91 import eu
.etaxonomy
.cdm
.model
.description
.State
;
92 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
93 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasure
;
94 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
95 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
96 import eu
.etaxonomy
.cdm
.model
.description
.TemporalData
;
97 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
98 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
99 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
100 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
101 import eu
.etaxonomy
.cdm
.model
.media
.ExternalLink
;
102 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
103 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
104 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
105 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
106 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
107 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
108 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationshipType
;
109 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
110 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
111 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
112 import eu
.etaxonomy
.cdm
.model
.name
.TextualTypeDesignation
;
113 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
114 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
115 import eu
.etaxonomy
.cdm
.model
.permission
.GrantedAuthorityImpl
;
116 import eu
.etaxonomy
.cdm
.model
.permission
.Group
;
117 import eu
.etaxonomy
.cdm
.model
.permission
.User
;
118 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
119 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
120 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
121 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNodeAgentRelation
;
122 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationshipType
;
123 import eu
.etaxonomy
.cdm
.model
.term
.DefinedTerm
;
124 import eu
.etaxonomy
.cdm
.model
.term
.DefinedTermBase
;
125 import eu
.etaxonomy
.cdm
.model
.term
.IEnumTerm
;
126 import eu
.etaxonomy
.cdm
.model
.term
.Representation
;
127 import eu
.etaxonomy
.cdm
.model
.term
.TermBase
;
128 import eu
.etaxonomy
.cdm
.model
.term
.TermTree
;
129 import eu
.etaxonomy
.cdm
.model
.term
.TermType
;
130 import eu
.etaxonomy
.cdm
.model
.term
.TermVocabulary
;
131 import eu
.etaxonomy
.cdm
.persistence
.dto
.TermDto
;
132 import eu
.etaxonomy
.cdm
.persistence
.dto
.TermVocabularyDto
;
133 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
134 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
135 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
136 import eu
.etaxonomy
.taxeditor
.store
.StoreUtil
;
137 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
138 import eu
.etaxonomy
.taxeditor
.ui
.combo
.InverseTermWrapper
;
139 import eu
.etaxonomy
.taxeditor
.ui
.combo
.MisappliedRelationshipComboElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.combo
.NameRelationshipTypeCombo
;
141 import eu
.etaxonomy
.taxeditor
.ui
.combo
.VocabularyComboElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.combo
.term
.TermComboElement
;
143 import eu
.etaxonomy
.taxeditor
.ui
.dialog
.CloneClassificationDetailElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.element
.MinMaxTextSection
.UnitType
;
145 import eu
.etaxonomy
.taxeditor
.ui
.mvc
.element
.DateElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
147 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeAgentRelationCollectionSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ExternalLinksElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ExternalLinksSection
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.CommonNameSourceElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TemporalDataDetailElement
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDetailElement
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDetailSection
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDtoDetailElement
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterDtoDetailSection
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterNodeDetailElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterNodeDetailSection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterNodeDtoDetailElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.CharacterNodeDtoDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfCollectionElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfEntityCollectionSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.InapplicableIfEntityCollectionSectionForNode
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfCollectionElement
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfEntityCollectionSection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.OnlyApplicableIfEntityCollectionSectionForNode
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.TermNodeDetailElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.TermNodeDetailSection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.TermTreeDetailElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.TermTreeDetailElementForNode
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.TermTreeDetailSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.TermTreeDetailSectionForNode
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaMetaElement
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
257 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
258 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
259 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
260 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.RuleConsideredElement
;
261 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
262 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TextTypeDesignationElement
;
263 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
264 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreaDetailElement
;
265 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
266 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
267 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
268 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
269 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
270 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailElement
;
271 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
272 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitMediaSection
;
273 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
274 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
275 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
276 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
277 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
278 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitFacadeDetailElement
;
279 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitFacadeDetailSection
;
280 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitFacadeGeneralDetailElement
;
281 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitFacadeGeneralDetailSection
;
282 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
283 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
284 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopeDetailSection
;
285 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeoScopePolyKeyDetailSection
;
286 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.OriginalLabelDataSection
;
287 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
288 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
289 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
290 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationElement
;
291 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
292 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailElement
;
293 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
294 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenCurrentDeterminationDetailSection
;
295 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailElement
;
296 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenDetailSection
;
297 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailElement
;
298 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenGeneralDetailSection
;
299 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.derivedUnit
.PreservedSpecimenSourceCollectionDetailSection
;
300 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AbstractSampleDesignationDetailSection
;
301 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailElement
;
302 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationCloningDetailSection
;
303 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoCollectionDetailSection
;
304 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGelPhotoDetailElement
;
305 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailElement
;
306 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationGeneralDetailSection
;
307 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailElement
;
308 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.AmplificationPrimerDetailSection
;
309 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.CurrentSampleDesignationDetailSection
;
310 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailElement
;
311 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
312 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailElement
;
313 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
314 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationDetailElement
;
315 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
316 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.PrimerGeneralDetailElement
;
317 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailElement
;
318 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
319 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationHistoryDetailSection
;
320 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationTextDetailElement
;
321 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
322 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailElement
;
323 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
324 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailElement
;
325 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
326 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailElement
;
327 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
328 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
329 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailElement
;
330 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
331 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailElement
;
332 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
333 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.AdvancedNomenclaturalSourceElement
;
334 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.AdvancedSourceElement
;
335 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
336 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
337 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalSourceElement
;
338 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.OriginalSourceAdvancedSection
;
339 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.OriginalSourceElement
;
340 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
341 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
342 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.SecundumSourceElement
;
343 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.SingleSourceSection
;
344 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
345 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
346 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
347 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
348 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
349 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
350 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
351 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
352 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
353 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
354 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
355 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
356 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
357 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
358 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
359 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
360 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
361 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
362 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierElement
;
363 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.IdentifierSection
;
364 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
365 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
366 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
367 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
368 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
369 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailSection
;
370 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonOfRelationshipElement
;
371 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
372 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
373 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
374 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
375 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
376 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
377 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
378 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
379 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
380 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
381 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.FeatureDetailElement
;
382 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.LanguageDetailElement
;
383 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionElement
;
384 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitCollectionSection
;
385 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitDtoCollectionElement
;
386 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.MeasurementUnitDtoCollectionSection
;
387 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
388 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.PresenceAbsenceTermDetailElement
;
389 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierDtoVocabulariesElement
;
390 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesCollectionSection
;
391 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesDtoCollectionSection
;
392 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.RecommendedModifierVocabulariesElement
;
393 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionElement
;
394 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyCollectionSection
;
395 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyDtoCollectionElement
;
396 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StateVocabularyDtoCollectionSection
;
397 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionElement
;
398 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureCollectionSection
;
399 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureDtoCollectionElement
;
400 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.StatisticalMeasureDtoCollectionSection
;
401 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermMediaSection
;
402 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
403 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
404 import eu
.etaxonomy
.taxeditor
.ui
.selection
.CommonNameReferenceSelectionElement
;
405 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
406 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithAbbreviatedTitle
;
407 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElementWithIdInVocabulary
;
408 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
409 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
410 import eu
.etaxonomy
.taxeditor
.view
.detail
.CdmSectionPart
;
413 * CdmFormFactory class.
416 * @created Feb 24, 2010
418 public class CdmFormFactory
extends FormToolkit
{
420 private BoldFontHolder2 boldFontHolder2
;
421 private MouseListener selectionMouseHandler
;
422 private FocusListener selectionFocusHandler
;
425 private IEclipseContext context
;
427 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<>();
429 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<>();
431 private final int orientation
= Window
.getDefaultOrientation();
432 private ISelectionProvider selectionProvider
;
434 /** Constant <code>EMPTY_SELECTION</code> */
435 public static ISelection EMPTY_SELECTION
= new ISelection() {
437 public boolean isEmpty() {
446 private class SelectionMouseHandler
extends MouseAdapter
{
448 public void mouseDown(MouseEvent e
) {
449 notifySelectionListeners(e
);
457 private class SelectionFocusHandler
extends FocusAdapter
{
459 public void focusGained(FocusEvent e
) {
460 notifySelectionListeners(e
);
464 private void notifySelectionListeners(TypedEvent e
) {
465 Event event
= new Event();
466 event
.widget
= e
.widget
;
467 SelectionEvent selectionEvent
= new SelectionEvent(event
);
469 for (SelectionListener listener
: selectionListenerList
) {
470 listener
.widgetSelected(selectionEvent
);
474 public CdmFormFactory(Display display
) {
478 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
480 this.selectionProvider
= selectionProvider
;
484 private void init() {
485 boldFontHolder2
= new BoldFontHolder2();
486 selectionMouseHandler
= new SelectionMouseHandler();
487 selectionFocusHandler
= new SelectionFocusHandler();
490 public IEclipseContext
getContext() {
495 * Creates an instance initialized with the correct selectionProvider
497 * Make sure to remove the instance when the entityComposite disposes via
498 * destroySelectionArbitrator(..)
500 * @param entityElement
501 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
503 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
506 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
507 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
508 selectionArbitrator
.addSelectionProvider(selectionProvider
);
509 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
510 addSelectionListener(selectionArbitrator
);
511 return selectionArbitrator
;
516 * destroySelectionArbitrator
519 * @param selectionArbitrator
521 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
524 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
525 if(selectionArbitrator
==null){
528 removeSelectionListener(selectionArbitrator
);
529 if (selectionProvider
!= null) {
530 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
532 MessagingUtils
.error(this.getClass(),
533 "Tried to destroy a selection listener from this factories listeners but was null", null);
539 * Adapts the {@link AbstractCdmFormElement}:<br>
540 * - sets the {@link IPropertyChangeListener}s handled by this class
545 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
548 public void adapt(ICdmFormElement formElement
) {
549 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
553 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
555 control
.addFocusListener(selectionFocusHandler
);
557 super.adapt(control
, trackFocus
, trackKeyboard
);
561 public void adapt(Composite composite
) {
562 composite
.addMouseListener(selectionMouseHandler
);
564 super.adapt(composite
);
571 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
574 public void destroyElement(ICdmFormElement formElement
) {
575 // return if element was not initialized
576 if (formElement
== null) {
579 // destroy selection arbitrator, if any
580 if (formElement
instanceof ISelectableElement
) {
581 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
583 // remove this element form its parents list of elements
584 // ICdmFormElement parentElement = formElement.getParentElement();
585 // if(parentElement != null){
586 // parentElement.removeElement(formElement);
588 // call destroy on child elements recursively
590 Set
<ICdmFormElement
> tempFormElements
= new HashSet
<>();
591 tempFormElements
.addAll(formElement
.getElements());
592 for(ICdmFormElement childElement
: tempFormElements
) {
593 destroyElement(childElement
);
595 // dispose of the controls
596 for (Control control
: formElement
.getControls()) {
597 // we added the layoutComposite of the parental element as the
598 // layout composite to this formElement
599 // but we do not want to destroy it.
600 if (control
.equals(formElement
.getLayoutComposite())) {
603 if (!control
.isDisposed()){
606 control
= null; //needed?
615 * a {@link org.eclipse.swt.widgets.Composite} object.
616 * @return a {@link org.eclipse.swt.widgets.Label} object.
618 public Label
createEmptyCell(Composite parent
) {
619 return this.createLabel(parent
, null);
623 * createMultiLanguageTextElement
625 * @param parentElement
626 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
629 * a {@link java.lang.String} object.
630 * @param multilanguageText
631 * a {@link java.util.Map} object.
637 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
640 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
641 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
642 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
643 multilanguageText
, textHeight
, style
);
645 parentElement
.addElement(element
);
650 * createMultiLanguageTextElement
652 * @param parentElement
653 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
656 * @param Representation
657 * a {@link eu.etaxonomy.cdm.model.term.Representation} object.
663 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
666 public RepresentationElement
createRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
667 RepresentationElement element
= new RepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
669 parentElement
.addElement(element
);
674 * createMultiLanguageTextElement
676 * @param parentElement
677 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
680 * @param Representation
681 * a {@link eu.etaxonomy.cdm.model.term.Representation} object.
687 * {@link eu.etaxonomy.taxeditor.ui.element.RepresentationElement}
690 public TranslatableRepresentationElement
createTranslatableRepresentationElement(ICdmFormElement parentElement
, Representation representation
, TermBase term
,int textHeight
, int style
, boolean fillDetails
) {
691 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
693 parentElement
.addElement(element
);
697 public TranslatableRepresentationElement
createTranslatableRepresentationElementDto(ICdmFormElement parentElement
, Representation representation
, TermDto term
,int textHeight
, int style
, boolean fillDetails
) {
698 TranslatableRepresentationElement element
= new TranslatableRepresentationElement(this, parentElement
, representation
, term
, textHeight
, style
, fillDetails
);
700 parentElement
.addElement(element
);
705 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
706 KeyStatement keyStatement
, int textHeight
, int style
) {
707 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
710 parentElement
.addElement(element
);
715 * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
717 * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
718 * @param parentElement the parent container
719 * @param labelString the label name
720 * @param initialObject the object from which the <code>toString()</code> method is called
721 * @param style {@link SWT} style constant
722 * @return the created textfield with label
724 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
725 Object initialObject
, int style
) {
726 return createTextWithLabelElement(parentElement
, labelString
, initialObject
==null?
"":initialObject
.toString(), style
);
731 * createTextWithLabelElement
734 * @param parentElement
735 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
738 * a {@link java.lang.String} object.
740 * a {@link java.lang.String} object.
743 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
746 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
747 String initialText
, int style
) {
748 return createTextWithLabelElement(parentElement
, labelString
, initialText
, null, style
);
752 * createTextWithLabelElement
754 * @param parentElement
755 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
758 * a {@link java.lang.String} object.
760 * a {@link java.lang.String} object.
761 * @param textLimit maximal number of characters allowed
764 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
767 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
768 String initialText
, Integer textLimit
, int style
) {
769 if(initialText
==null){
773 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
776 parentElement
.addElement(element
);
780 public TextWithLabelElement
createMultiLineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
781 int textHeight
, int style
) {
782 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, true, style
);
784 parentElement
.addElement(element
);
788 public LsidWithExceptionLabelElement
createLsidWithExceptionLabelElement(ICdmFormElement parentElement
, String labelString
,
789 LSID initialLsid
, int style
) {
790 LsidWithExceptionLabelElement element
= new LsidWithExceptionLabelElement(this, parentElement
, labelString
, initialLsid
, null, style
);
792 parentElement
.addElement(element
);
796 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
797 URI initialUri
, int style
) {
798 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
800 parentElement
.addElement(element
);
803 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
804 URI initialUri
,Integer textHeight
, int style
) {
805 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, textHeight
, style
);
807 parentElement
.addElement(element
);
812 public DoiWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
813 DOI initialDoi
, int style
) {
814 DoiWithLabelElement element
= new DoiWithLabelElement(this, parentElement
, labelString
, initialDoi
, null, style
);
816 parentElement
.addElement(element
);
819 public DoiWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
820 DOI initialDoi
,Integer textHeight
, int style
) {
821 DoiWithLabelElement element
= new DoiWithLabelElement(this, parentElement
, labelString
, initialDoi
, textHeight
, style
);
823 parentElement
.addElement(element
);
827 public OrcidWithLabelElement
createOrcidWithLabelElement(ICdmFormElement parentElement
, String labelString
,
828 ORCID initialDoi
, int style
) {
829 OrcidWithLabelElement element
= new OrcidWithLabelElement(this, parentElement
, labelString
, initialDoi
, null, style
);
831 parentElement
.addElement(element
);
834 public OrcidWithLabelElement
createDoiWithLabelElement(ICdmFormElement parentElement
, String labelString
,
835 ORCID initialDoi
,Integer textHeight
, int style
) {
836 OrcidWithLabelElement element
= new OrcidWithLabelElement(this, parentElement
, labelString
, initialDoi
, textHeight
, style
);
838 parentElement
.addElement(element
);
849 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
850 IOpenUrlEnabled openUrlEnabled
, int style
) {
851 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
854 parentElement
.addElement(element
);
860 * @param parentElement
862 * @param conversationEnabled
867 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
868 ConversationHolder conversation
, User user
, int style
) {
869 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
871 parentElement
.addElement(element
);
877 * createIntegerTextWithLabelElement
880 * @param parentElement
881 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
884 * a {@link java.lang.String} object.
885 * @param initialInteger
886 * a {@link java.lang.Integer} object.
890 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
893 public FloatWithLabelElement
createFloatTextWithLabelElement(
894 ICdmFormElement parentElement
, String labelString
,
895 Number initialNumber
, int style
) {
896 FloatWithLabelElement element
= new FloatWithLabelElement(this,
897 parentElement
, labelString
, initialNumber
, style
);
899 parentElement
.addElement(element
);
903 public BigDecimalWithLabelElement
createBigDecimalTextWithLabelElement(
904 ICdmFormElement parentElement
, String labelString
,
905 Number initialNumber
, int style
) {
906 BigDecimalWithLabelElement element
= new BigDecimalWithLabelElement(this,
907 parentElement
, labelString
, initialNumber
, style
);
909 parentElement
.addElement(element
);
913 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
914 String labelString
, LanguageString languageString
, int style
) {
915 return createLanguageStringWithLabelElement(parentElement
, labelString
, languageString
, null, false, style
);
918 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
919 String labelString
, LanguageString languageString
, Integer height
, boolean isMultiLine
, int style
) {
920 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
921 languageString
, height
, isMultiLine
, style
);
923 parentElement
.addElement(element
);
929 * createKeyValueViewerElement
932 * @param parentElement
933 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
936 * a {@link java.lang.String} object.
937 * @param valueHeading
938 * a {@link java.lang.String} object.
940 * a {@link java.util.Map} object.
941 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
944 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
945 String valueHeading
, Map
<Object
, Object
> map
) {
946 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
948 parentElement
.addElement(element
);
953 * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
956 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
957 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
958 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
, selection
, true, style
);
960 parentElement
.addElement(element
);
964 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
966 ICdmFormElement parentElement
,
970 Comparator
<T
> comparator
) {
971 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, comparator
);
974 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
976 ICdmFormElement parentElement
,
979 boolean addEmptyElement
,
981 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, false, null);
984 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
986 ICdmFormElement parentElement
,
990 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, null);
992 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElementDto(
994 ICdmFormElement parentElement
,
998 return this.createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, true, style
, false, null);
1001 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1003 ICdmFormElement parentElement
,
1007 return this.createDefinedTermComboElement(null, null, terms
, parentElement
, labelString
, selection
, true, style
, false, null);
1010 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1012 ICdmFormElement parentElement
,
1015 boolean addEmptyElement
,
1017 return this.createDefinedTermComboElement(null, null, terms
, parentElement
, labelString
, selection
, addEmptyElement
, style
, false, null);
1020 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1022 ICdmFormElement parentElement
,
1025 boolean addEmptyElement
,
1027 boolean useAbbrevLabel
) {
1028 return createDefinedTermComboElement(termType
, null, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
1032 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1033 TermVocabulary
<?
> termVocabulary
,
1034 ICdmFormElement parentElement
,
1038 return this.createDefinedTermComboElement(null, termVocabulary
, null, parentElement
, labelString
, selection
, true, style
, false, null);
1041 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1042 TermVocabulary
<?
> termVocabulary
,
1043 ICdmFormElement parentElement
,
1046 boolean addEmptyElement
,
1048 boolean useAbbrevLabel
) {
1049 return createDefinedTermComboElement(null, termVocabulary
, null, parentElement
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, null);
1052 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1054 TermVocabulary
<?
> termVocabulary
,
1056 ICdmFormElement parentElement
,
1059 boolean addEmptyElement
,
1061 boolean useAbbrevLabel
,
1062 Comparator
<T
> comparator
) {
1065 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1067 parentElement
.addElement(element
);
1070 else if(termVocabulary
!=null){
1071 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termVocabulary
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1072 if (comparator
!= null){
1073 element
.setTermComparator(comparator
);
1076 parentElement
.addElement(element
);
1078 }else if (terms
!= null){
1080 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, terms
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
);
1081 if (comparator
!= null){
1082 element
.setTermComparator(comparator
);
1085 parentElement
.addElement(element
);
1089 //this should never happen
1094 private <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
1096 TermVocabulary
<?
> termVocabulary
,
1098 ICdmFormElement parentElement
,
1101 boolean addEmptyElement
,
1103 boolean useAbbrevLabel
,
1104 Comparator
<T
> comparator
) {
1106 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, addEmptyElement
, style
, useAbbrevLabel
, comparator
);
1108 parentElement
.addElement(element
);
1113 //this should never happen
1118 public NameRelationshipTypeCombo
createNameRelationshipTypeCombo(ICdmFormElement parentElement
,
1121 boolean useAbbrevLabel
,
1122 Comparator
<NameRelationshipType
> comparator
) {
1124 NameRelationshipTypeCombo
<InverseTermWrapper
> element
= new NameRelationshipTypeCombo(this, parentElement
, labelString
, true, style
, useAbbrevLabel
, comparator
);
1126 parentElement
.addElement(element
);
1130 public MisappliedRelationshipComboElement
createMisappliedRelationshipComboElement(
1131 ICdmFormElement parentElement
,
1133 TaxonRelationshipType selection
,
1135 MisappliedRelationshipComboElement combo
= new MisappliedRelationshipComboElement(this, parentElement
, labelString
, selection
, false, style
, false);
1137 parentElement
.addElement(combo
);
1141 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1142 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
1143 int style
, boolean hasNullValue
) {
1144 return createEnumComboElement(enumComboType
, parentElement
, null, style
, hasNullValue
);
1146 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1147 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
1149 return createEnumComboElement(enumComboType
, parentElement
, null, style
, false);
1152 public <T
extends IEnumTerm
<T
>> EnumComboElement
<T
> createEnumComboElement(
1153 Class
<T
> enumComboType
, ICdmFormElement parentElement
, Comparator
<T
> comparator
,
1154 int style
, boolean hasNullValue
) {
1155 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, comparator
, style
, hasNullValue
);
1157 parentElement
.addElement(element
);
1161 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyComboElement(
1162 TermType termType
, String label
, VOC selection
, ICdmFormElement parentElement
, int style
) {
1163 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1165 parentElement
.addElement(element
);
1169 public <TERM
extends DefinedTermBase
<TERM
>, VOC
extends TermVocabulary
<TERM
>> VocabularyComboElement
<TERM
, VOC
> createVocabularyDtoComboElement(
1170 TermType termType
, String label
, TermVocabularyDto selection
, ICdmFormElement parentElement
, int style
) {
1171 VocabularyComboElement
<TERM
, VOC
> element
= new VocabularyComboElement
<TERM
, VOC
>(this, parentElement
, termType
, label
, selection
, style
);
1173 parentElement
.addElement(element
);
1179 * createBrowserElement
1183 * a {@link eu.etaxonomy.cdm.common.URI} object.
1186 * @param parentElement
1187 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1189 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
1192 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1193 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
1195 parentElement
.addElement(element
);
1201 * createImageElement
1204 * @param parentElement
1205 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1208 * a {@link eu.etaxonomy.cdm.common.URI} object.
1211 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
1213 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
1214 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
1216 parentElement
.addElement(element
);
1222 * createTextActionElement
1225 * @param labelString
1226 * a {@link java.lang.String} object.
1227 * @param initialText
1228 * a {@link java.lang.String} object.
1231 * @param parentElement
1232 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1234 * @param buttonLabel
1235 * a {@link java.lang.String} object.
1236 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
1239 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
1240 String buttonLabel
, String initialText
, int style
) {
1241 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
1244 parentElement
.addElement(element
);
1253 * @param parentElement
1254 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1257 * a {@link java.lang.String} object.
1258 * @param initialState
1262 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
1265 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, Boolean initialState
, int style
) {
1266 if(initialState
==null){
1267 initialState
= Boolean
.FALSE
;
1269 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
1271 parentElement
.addElement(element
);
1276 * Creates a section as a part of the form.
1278 * @return the section widget
1280 public Section
adapt(AbstractFormSection section
) {
1281 section
.setMenu(section
.getLayoutComposite().getMenu());
1282 adapt(section
, true, true);
1284 // handle focus and property change events for cdm use
1285 section
.addFocusListener(selectionFocusHandler
);
1286 section
.setPropertyChangeListeners(propertyChangeListeners
);
1288 section
.addExpansionListener(new ExpansionAdapter(){
1290 public void expansionStateChanged(ExpansionEvent e
) {
1291 super.expansionStateChanged(e
);
1292 if(section
.getEntity()!=null){
1293 PreferencesUtil
.setStringValue(StoreUtil
.getPrefKey(section
.getClass(), section
.getEntity().getClass().getCanonicalName()), e
.getState()?CdmSectionPart
.EXPANDED
:CdmSectionPart
.COLLAPSED
);
1298 if (section
.getToggle() != null) {
1299 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
1300 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
1303 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
1305 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
1306 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
1307 getColors().initializeSectionToolBarColors();
1308 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
1309 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
1311 // call setTitleBarForeground regardless as it also sets the label color
1312 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
1316 private class BoldFontHolder2
{
1317 private Font normalFont
;
1319 private Font boldFont
;
1321 public BoldFontHolder2() {
1324 public Font
getBoldFont(Font font
) {
1325 createBoldFont(font
);
1329 private void createBoldFont(Font font
) {
1330 if (normalFont
== null || !normalFont
.equals(font
)) {
1334 if (boldFont
== null) {
1335 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
1339 public void dispose() {
1340 if (boldFont
!= null) {
1341 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1348 * createToggleableTextField with relevance
1350 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1351 String initialText
, boolean initialState
, CacheRelevance relevance
, int style
) {
1353 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1354 initialState
, relevance
, style
| orientation
);
1356 parentElement
.addElement(element
);
1361 * like {@link #createToggleableTextField(ICdmFormElement, String, String, boolean, CacheRelevance, int)}
1362 * but with predefined cache relevance == 1
1364 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1365 String initialText
, boolean initialState
, int style
) {
1366 return createToggleableTextField(parentElement
, labelString
, initialText
, initialState
, CacheRelevance
.CACHE1
, style
);
1370 * like {@link #createToggleableTextField(ICdmFormElement, String, String, boolean, CacheRelevance, int)}
1371 * but with predefined cache relevance == 1
1373 public RemovableTextElement
createRemovableTextField(ICdmFormElement parentElement
, String labelString
,
1374 String initialText
, int style
) {
1375 RemovableTextElement element
= new RemovableTextElement(this, parentElement
, labelString
, initialText
,
1376 style
| orientation
);
1379 parentElement
.addElement(element
);
1385 * createTimePeriodElement
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
);
1396 * createVerbatimTimePeriodElement
1398 public VerbatimTimePeriodElement
createVerbatimTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1399 VerbatimTimePeriod timePeriod
, int style
) {
1400 VerbatimTimePeriodElement element
= new VerbatimTimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1402 parentElement
.addElement(element
);
1407 * createGatheringEventUnitElement
1409 public GatheringEventUnitElement
createGatheringEventUnitElement(
1410 ICdmFormElement parentElement
,
1412 DerivedUnitFacade gatheringEvent
,
1413 MinMaxTextSection
.UnitType unitType
,
1415 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1422 parentElement
.addElement(element
);
1427 * createPointElement
1429 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1430 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1432 parentElement
.addElement(element
);
1437 * Creates an empty section with the given message.<br>
1438 * If message is <code>null</code> a default message will be displayed.
1440 public EmptySection
createEmptySection(String message
, CdmFormFactory formFactory
, ICdmFormElement parentElement
, int style
) {
1441 EmptySection section
= new EmptySection(message
, formFactory
, parentElement
, style
);
1442 parentElement
.addElement(section
);
1449 * createDateDetailSection
1452 * @param parentElement
1453 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1457 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1460 public DateDetailSection
<TimePeriod
> createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1461 DateDetailSection
<TimePeriod
> section
= new DateDetailSection
<TimePeriod
>(this, parentElement
, false, style
);
1462 parentElement
.addElement(section
);
1469 * createVerbatimDateDetailSection
1472 * @param parentElement
1473 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1477 * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimDateDetailSection}
1480 public DateDetailSection
<VerbatimTimePeriod
> createVerbatimDateDetailSection(ICdmFormElement parentElement
, int style
) {
1481 DateDetailSection
<VerbatimTimePeriod
> section
1482 = new DateDetailSection
<VerbatimTimePeriod
>(this, parentElement
, true, 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.MinMaxTextSection}
1501 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1502 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1503 parentElement
.addElement(section
);
1510 * createPartialElement
1513 * @param parentElement
1514 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1516 * @param labelString
1517 * a {@link java.lang.String} object.
1519 * a {@link org.joda.time.Partial} object.
1522 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1525 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1527 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1529 parentElement
.addElement(element
);
1533 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
, boolean showYear
,
1535 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
, showYear
);
1537 parentElement
.addElement(element
);
1543 * addSelectionListener
1547 * a {@link org.eclipse.swt.events.SelectionListener} object.
1549 public void addSelectionListener(SelectionListener listener
) {
1550 selectionListenerList
.add(listener
);
1555 * removeSelectionListener
1559 * a {@link org.eclipse.swt.events.SelectionListener} object.
1561 public void removeSelectionListener(SelectionListener listener
) {
1562 if (listener
== null) {
1563 MessagingUtils
.error(this.getClass(),
1564 "Tried to remove a selection listener from this factories listeners but was null", null);
1566 selectionListenerList
.remove(listener
);
1572 * addPropertyChangeListener
1576 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1579 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1580 if (propertyChangeListeners
.contains(listener
)) {
1583 propertyChangeListeners
.add(0, listener
);
1588 * removePropertyChangeListener
1592 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1595 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1596 propertyChangeListeners
.remove(listener
);
1600 * @return the propertyChangeListeners
1602 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1603 return propertyChangeListeners
;
1608 * createHorizontalSeparator
1611 * @param parentElement
1612 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1616 * @return a {@link org.eclipse.swt.widgets.Label} object.
1618 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1619 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1620 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1626 * createVersionElement
1629 * @param parentElement
1630 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1633 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1638 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1641 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1642 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1644 parentElement
.addElement(element
);
1649 * @param cdmBaseSection
1654 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1655 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1657 parentElement
.addElement(element
);
1663 * createVersionSection
1666 * @param parentElement
1667 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1672 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1675 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1676 VersionSection section
= new VersionSection(this, parentElement
, style
);
1677 parentElement
.addElement(section
);
1687 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1688 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1689 parentElement
.addElement(section
);
1696 * createEmptyElement
1699 * @param parentElement
1700 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1702 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1704 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
, String emptyText
) {
1705 EmptyElement element
= new EmptyElement(this, parentElement
, emptyText
, SWT
.NULL
);
1707 parentElement
.addElement(element
);
1713 * createHeadlineSection
1716 * @param parentElement
1717 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1720 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1723 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1724 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1725 parentElement
.addElement(section
);
1732 * createParsingMessageElement
1735 * @param parentElement
1736 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1738 * @param parserProblem
1739 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1744 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1747 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1748 ParserProblem parserProblem
, int style
) {
1749 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1751 parentElement
.addElement(element
);
1755 public DefinedTermDetailSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1756 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1758 DefinedTermDetailSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1759 selectionProvider
, style
);
1761 parentElement
.addElement(section
);
1767 public TermMediaSection
createTermMediaSection(ConversationHolder conversation
,
1768 ICdmFormElement parentElement
, int style
) {
1769 TermMediaSection section
= new TermMediaSection(this, conversation
, parentElement
, style
);
1770 parentElement
.addElement(section
);
1776 public DerivedUnitMediaSection
createDerivedUnitMediaSection(ConversationHolder conversation
,
1777 ICdmFormElement parentElement
, int style
) {
1778 DerivedUnitMediaSection section
= new DerivedUnitMediaSection(this, conversation
, parentElement
, style
);
1779 parentElement
.addElement(section
);
1786 * @param definedTermClass
1787 * @param formElement
1791 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
,
1792 ICdmFormElement parentElement
, int style
) {
1793 AbstractCdmDetailElement element
= null;
1795 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1796 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1797 } else if (definedTermClass
.equals(Feature
.class)) {
1798 element
= new FeatureDetailElement(this, parentElement
);
1799 } else if(definedTermClass
.equals(PresenceAbsenceTerm
.class)){
1800 element
= new PresenceAbsenceTermDetailElement(this, parentElement
);
1801 } else if(definedTermClass
.equals(Language
.class)){
1802 element
= new LanguageDetailElement(this, parentElement
);
1804 element
= new DefinedTermDetailElement(this, parentElement
);
1809 parentElement
.addElement(element
);
1813 public CharacterNodeDetailSection
createCharacterNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1814 CharacterNodeDetailSection section
= new CharacterNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1815 addAndAdaptSection(parentElement
, section
);
1819 public CharacterNodeDtoDetailSection
createCharacterNodeDtoDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1820 CharacterNodeDtoDetailSection section
= new CharacterNodeDtoDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1821 addAndAdaptSection(parentElement
, section
);
1825 public CharacterDetailSection
createCharacterDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1826 CharacterDetailSection section
= new CharacterDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1827 addAndAdaptSection(parentElement
, section
);
1831 public CharacterDtoDetailSection
createCharacterDtoDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1832 CharacterDtoDetailSection section
= new CharacterDtoDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1833 addAndAdaptSection(parentElement
, section
);
1837 public CharacterNodeDetailElement
createCharacterNodeDetailElement(ICdmFormElement parentElement
, int style
){
1838 CharacterNodeDetailElement element
= new CharacterNodeDetailElement(this, parentElement
);
1839 addAndAdaptElement(parentElement
, element
);
1842 public CharacterNodeDtoDetailElement
createCharacterNodeDtoDetailElement(ICdmFormElement parentElement
, int style
){
1843 CharacterNodeDtoDetailElement element
= new CharacterNodeDtoDetailElement(this, parentElement
);
1844 addAndAdaptElement(parentElement
, element
);
1848 public CharacterDetailElement
createCharacterDetailElement(ICdmFormElement parentElement
, int style
){
1849 CharacterDetailElement element
= new CharacterDetailElement(this, parentElement
);
1850 addAndAdaptElement(parentElement
, element
);
1853 public CharacterDtoDetailElement
createCharacterDtoDetailElement(ICdmFormElement parentElement
, int style
){
1854 CharacterDtoDetailElement element
= new CharacterDtoDetailElement(this, parentElement
);
1855 addAndAdaptElement(parentElement
, element
);
1859 public TermTreeDetailElement
createFeatureTreeDetailElement(ICdmFormElement parentElement
, int style
){
1860 TermTreeDetailElement element
= new TermTreeDetailElement(this, parentElement
);
1861 addAndAdaptElement(parentElement
, element
);
1866 * @param parentElement
1870 public AbstractCdmDetailElement
<TermTree
> createFeatureTreeDetailElementForTree(
1871 AbstractCdmDetailSection
<TermTree
> parentElement
, int style
) {
1872 TermTreeDetailElementForNode element
= new TermTreeDetailElementForNode(this, parentElement
);
1873 addAndAdaptElement(parentElement
, element
);
1877 public TermNodeDetailElement
createFeatureNodeDetailElement(ICdmFormElement parentElement
, int style
){
1878 TermNodeDetailElement element
= new TermNodeDetailElement(this, parentElement
);
1879 addAndAdaptElement(parentElement
, element
);
1884 //--------DetailSections---------
1885 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1886 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1887 addAndAdaptSection(parentElement
, section
);
1891 public TermNodeDetailSection
createFeatureNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1892 TermNodeDetailSection section
= new TermNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1893 addAndAdaptSection(parentElement
, section
);
1897 public TermTreeDetailSection
createFeatureTreeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1898 TermTreeDetailSection section
= new TermTreeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1899 addAndAdaptSection(parentElement
, section
);
1902 public TermTreeDetailSectionForNode
createFeatureTreeDetailSectionForTree(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1903 TermTreeDetailSectionForNode section
= new TermTreeDetailSectionForNode(this, conversation
, parentElement
, selectionProvider
, style
);
1904 addAndAdaptSection(parentElement
, section
);
1908 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1909 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1910 addAndAdaptSection(parentElement
, section
);
1914 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1915 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1916 addAndAdaptSection(parentElement
, section
);
1920 public OriginalSourceAdvancedSection
createOriginalSourceAdvancedSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1921 OriginalSourceAdvancedSection section
= new OriginalSourceAdvancedSection(this, conversation
, parentElement
, selectionProvider
, style
);
1922 addAndAdaptSection(parentElement
, section
);
1926 public AdvancedSourceElement
createAdvancedSourceDetailElement(ICdmFormElement parentElement
, int style
){
1927 AdvancedSourceElement element
= new AdvancedSourceElement(this, parentElement
);
1928 addAndAdaptElement(parentElement
, element
);
1932 public AdvancedSourceElement
createAdvancedNomenclaturalSourceDetailElement(ICdmFormElement parentElement
, int style
){
1933 AdvancedNomenclaturalSourceElement element
= new AdvancedNomenclaturalSourceElement(this, parentElement
);
1934 addAndAdaptElement(parentElement
, element
);
1938 public SingleSourceSection
createSingleSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, CdmBase cdmEntity
, ISelectionProvider selectionProvider
, String label
, int style
){
1939 SingleSourceSection section
= new SingleSourceSection(this, conversation
, parentElement
, cdmEntity
, selectionProvider
, style
, label
);
1940 addAndAdaptSection(parentElement
, section
);
1944 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1945 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1946 addAndAdaptSection(parentElement
, section
);
1950 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1951 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1952 addAndAdaptSection(parentElement
, section
);
1956 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1957 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1958 addAndAdaptSection(parentElement
, section
);
1962 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1963 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1964 addAndAdaptSection(parentElement
, section
);
1968 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1969 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1970 addAndAdaptSection(parentElement
, section
);
1974 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1975 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1976 addAndAdaptSection(parentElement
, section
);
1980 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1981 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1982 addAndAdaptSection(parentElement
, section
);
1986 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1987 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1988 addAndAdaptSection(parentElement
, section
);
1994 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, boolean nameChoosable
, int style
){
1995 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, nameChoosable
, style
);
1996 addAndAdaptSection(parentElement
, section
);
2000 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2001 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
2002 addAndAdaptSection(parentElement
, section
);
2006 public FieldUnitFacadeDetailSection
createFieldUnitFacadeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2007 FieldUnitFacadeDetailSection section
= new FieldUnitFacadeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2008 addAndAdaptSection(parentElement
, section
);
2012 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2013 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2014 addAndAdaptSection(parentElement
, section
);
2018 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2019 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2020 addAndAdaptSection(parentElement
, section
);
2024 public DerivedUnitTypeDesignationSection
createDerivedUnitTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2025 DerivedUnitTypeDesignationSection section
= new DerivedUnitTypeDesignationSection(this, conversation
, parentElement
, style
);
2026 addAndAdaptSection(parentElement
, section
);
2030 public TaxonAssociationDetailSection
createTaxonAssociationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2031 TaxonAssociationDetailSection section
= new TaxonAssociationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2032 addAndAdaptSection(parentElement
, section
);
2036 public OriginalLabelDataSection
createOriginalLabelDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2037 OriginalLabelDataSection section
= new OriginalLabelDataSection(this, conversation
, parentElement
, selectionProvider
, style
);
2038 addAndAdaptSection(parentElement
, section
);
2042 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2043 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
2044 addAndAdaptSection(parentElement
, section
);
2048 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2049 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2050 addAndAdaptSection(parentElement
, section
);
2054 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2055 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2056 addAndAdaptSection(parentElement
, section
);
2060 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2061 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2062 addAndAdaptSection(parentElement
, section
);
2066 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2067 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2068 addAndAdaptSection(parentElement
, section
);
2072 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2073 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2074 addAndAdaptSection(parentElement
, section
);
2078 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2079 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2080 addAndAdaptSection(parentElement
, section
);
2084 public FieldUnitFacadeGeneralDetailSection
createFieldUnitFacadeGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2085 FieldUnitFacadeGeneralDetailSection section
= new FieldUnitFacadeGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2086 addAndAdaptSection(parentElement
, section
);
2090 public DerivedUnitGeneralDetailSection
createDerivedUnitGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2091 DerivedUnitGeneralDetailSection section
= new DerivedUnitGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2092 addAndAdaptSection(parentElement
, section
);
2096 public PreservedSpecimenGeneralDetailSection
createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2097 PreservedSpecimenGeneralDetailSection section
= new PreservedSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2098 addAndAdaptSection(parentElement
, section
);
2102 public TissueSampleGeneralDetailSection
createTissueSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2103 TissueSampleGeneralDetailSection section
= new TissueSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2104 addAndAdaptSection(parentElement
, section
);
2108 public DnaSampleGeneralDetailSection
createDnaSampleGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2109 DnaSampleGeneralDetailSection section
= new DnaSampleGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2110 addAndAdaptSection(parentElement
, section
);
2114 public DnaSamplePreparationPreservationSection
createDnaSamplePreparationPreservationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2115 DnaSamplePreparationPreservationSection section
= new DnaSamplePreparationPreservationSection(this, conversation
, parentElement
, selectionProvider
, style
);
2116 addAndAdaptSection(parentElement
, section
);
2120 public DnaQualityDetailSection
createDnaQualityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2121 DnaQualityDetailSection section
= new DnaQualityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2122 addAndAdaptSection(parentElement
, section
);
2126 public SequenceGeneralDetailSection
createSequenceGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2127 SequenceGeneralDetailSection section
= new SequenceGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2128 addAndAdaptSection(parentElement
, section
);
2132 public SequenceContigFileCollectionDetailSection
createSequenceContigFileCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2133 SequenceContigFileCollectionDetailSection section
= new SequenceContigFileCollectionDetailSection(this, conversation
, parentElement
, style
);
2134 addAndAdaptSection(parentElement
, section
);
2138 public SingleReadPherogramCollectionDetailSection
createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2139 SingleReadPherogramCollectionDetailSection section
= new SingleReadPherogramCollectionDetailSection(this, conversation
, parentElement
, style
);
2140 addAndAdaptSection(parentElement
, section
);
2144 public SequenceReferenceCollectionDetailSection
createSequenceReferenceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2145 SequenceReferenceCollectionDetailSection section
= new SequenceReferenceCollectionDetailSection(this, conversation
, parentElement
, style
);
2146 addAndAdaptSection(parentElement
, section
);
2150 public SingleReadGeneralDetailSection
createSingleReadGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2151 SingleReadGeneralDetailSection section
= new SingleReadGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2152 addAndAdaptSection(parentElement
, section
);
2156 public AmplificationGeneralDetailSection
createAmplificationGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2157 AmplificationGeneralDetailSection section
= new AmplificationGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2158 addAndAdaptSection(parentElement
, section
);
2162 public AmplificationPrimerDetailSection
createAmplificationPrimerDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2163 AmplificationPrimerDetailSection section
= new AmplificationPrimerDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2164 addAndAdaptSection(parentElement
, section
);
2168 public AmplificationCloningDetailSection
createAmplificationCloningDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2169 AmplificationCloningDetailSection section
= new AmplificationCloningDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2170 addAndAdaptSection(parentElement
, section
);
2174 public AmplificationGelPhotoCollectionDetailSection
createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2175 AmplificationGelPhotoCollectionDetailSection section
= new AmplificationGelPhotoCollectionDetailSection(this, conversation
, parentElement
, style
);
2176 addAndAdaptSection(parentElement
, section
);
2180 public MediaSpecimenGeneralDetailSection
createMediaSpecimenGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2181 MediaSpecimenGeneralDetailSection section
= new MediaSpecimenGeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2182 addAndAdaptSection(parentElement
, section
);
2186 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2187 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2188 addAndAdaptSection(parentElement
, section
);
2192 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2193 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2194 addAndAdaptSection(parentElement
, section
);
2198 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2199 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2200 addAndAdaptSection(parentElement
, section
);
2204 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2205 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2206 addAndAdaptSection(parentElement
, section
);
2210 public SampleDesignationDetailSection
createSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2211 SampleDesignationDetailSection section
= new SampleDesignationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2212 addAndAdaptSection(parentElement
, section
);
2216 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2217 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
, true);
2218 addAndAdaptSection(parentElement
, section
);
2222 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2223 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2224 addAndAdaptSection(parentElement
, section
);
2228 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2229 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2230 addAndAdaptSection(parentElement
, section
);
2234 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2235 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2236 addAndAdaptSection(parentElement
, section
);
2240 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2241 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2242 addAndAdaptSection(parentElement
, section
);
2246 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
2247 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
2248 addAndAdaptSection(parentElement
, section
);
2252 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
2253 parentElement
.addElement(section
);
2257 //--------DetailElements------------
2259 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
2260 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
2261 addAndAdaptElement(parentElement
, element
);
2265 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
2266 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
2267 addAndAdaptElement(parentElement
, element
);
2271 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
2272 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
2273 addAndAdaptElement(parentElement
, element
);
2277 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
2278 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
2279 addAndAdaptElement(parentElement
, element
);
2283 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
2284 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
2285 addAndAdaptElement(parentElement
, element
);
2288 public OriginalSourceElement
createOriginalSourceElement(ICdmFormElement parentElement
, CdmBase cdmEntity
, String label
){
2289 OriginalSourceElement element
= new OriginalSourceElement(this, parentElement
, cdmEntity
, label
);
2290 addAndAdaptElement(parentElement
, element
);
2294 public SecundumSourceElement
createSecundumSourceElement(ICdmFormElement parentElement
, CdmBase cdmEntity
, String label
){
2295 SecundumSourceElement element
= new SecundumSourceElement(this, parentElement
, cdmEntity
, label
);
2296 addAndAdaptElement(parentElement
, element
);
2299 public NomenclaturalSourceElement
createNomenclaturalSourceElement(ICdmFormElement parentElement
, CdmBase cdmEntity
, String label
){
2300 NomenclaturalSourceElement element
= new NomenclaturalSourceElement(this, parentElement
, cdmEntity
, label
);
2301 addAndAdaptElement(parentElement
, element
);
2305 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
2306 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
2307 addAndAdaptElement(parentElement
, element
);
2311 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
2312 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
2313 addAndAdaptElement(parentElement
, element
);
2317 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
2318 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
2319 addAndAdaptElement(parentElement
, element
);
2323 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
2324 UserDetailElement element
= new UserDetailElement(this, parentElement
);
2325 addAndAdaptElement(parentElement
, element
);
2329 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
2330 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
2331 addAndAdaptElement(parentElement
, element
);
2335 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
2336 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
2337 addAndAdaptElement(parentElement
, element
);
2341 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
2342 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
2343 addAndAdaptElement(parentElement
, element
);
2347 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
2348 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
2349 addAndAdaptElement(parentElement
, element
);
2353 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
2354 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
2355 addAndAdaptElement(parentElement
, element
);
2359 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionElement(ICdmFormElement parentElement
, ConversationHolder conversation
, int style
){
2360 TaxonNodeAgentRelationCollectionSection element
= new TaxonNodeAgentRelationCollectionSection(this, conversation
, parentElement
, style
);
2362 parentElement
.addElement(element
);
2367 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
, boolean createNew
){
2368 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
, createNew
);
2369 addAndAdaptElement(parentElement
, element
);
2373 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
2374 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
2375 addAndAdaptElement(parentElement
, element
);
2379 public CloneClassificationDetailElement
createCloneClassificationDetailElement(ICdmFormElement parentElement
){
2380 CloneClassificationDetailElement element
= new CloneClassificationDetailElement(this, parentElement
);
2381 addAndAdaptElement(parentElement
, element
);
2385 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
2386 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
2387 addAndAdaptElement(parentElement
, element
);
2391 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
2392 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
2393 addAndAdaptElement(parentElement
, element
);
2397 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
2398 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
2399 addAndAdaptElement(parentElement
, element
);
2403 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
2404 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
2405 addAndAdaptElement(parentElement
, element
);
2409 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
2410 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
2411 addAndAdaptElement(parentElement
, element
);
2415 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
2416 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
2417 addAndAdaptElement(parentElement
, element
);
2421 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2422 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
, isNomenclatural
);
2423 addAndAdaptElement(parentElement
, element
);
2427 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
2428 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
2429 addAndAdaptElement(parentElement
, element
);
2433 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
2434 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
2435 addAndAdaptElement(parentElement
, element
);
2439 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
2440 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
2441 addAndAdaptElement(parentElement
, element
);
2445 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2446 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
2447 addAndAdaptElement(parentElement
, element
);
2451 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
2452 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
2453 addAndAdaptElement(parentElement
, element
);
2458 public FieldUnitFacadeGeneralDetailElement
createFieldUnitFacadeGeneralDetailElement(ICdmFormElement parentElement
){
2459 FieldUnitFacadeGeneralDetailElement element
= new FieldUnitFacadeGeneralDetailElement(this, parentElement
);
2460 addAndAdaptElement(parentElement
, element
);
2464 public DerivedUnitGeneralDetailElement
createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement
){
2465 DerivedUnitGeneralDetailElement element
= new DerivedUnitGeneralDetailElement(this, parentElement
);
2466 addAndAdaptElement(parentElement
, element
);
2470 public TaxonAssociationDetailElement
createTaxonAssociationDetailElement(ICdmFormElement parentElement
){
2471 TaxonAssociationDetailElement element
= new TaxonAssociationDetailElement(this, parentElement
);
2472 addAndAdaptElement(parentElement
, element
);
2476 public PreservedSpecimenGeneralDetailElement
createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2477 PreservedSpecimenGeneralDetailElement element
= new PreservedSpecimenGeneralDetailElement(this, parentElement
);
2478 addAndAdaptElement(parentElement
, element
);
2482 public TissueSampleGeneralDetailElement
createTissueSampleGeneralDetailElement(ICdmFormElement parentElement
){
2483 TissueSampleGeneralDetailElement element
= new TissueSampleGeneralDetailElement(this, parentElement
);
2484 addAndAdaptElement(parentElement
, element
);
2488 public DnaSampleGeneralDetailElement
createDnaSampleGeneralDetailElement(ICdmFormElement parentElement
){
2489 DnaSampleGeneralDetailElement element
= new DnaSampleGeneralDetailElement(this, parentElement
);
2490 addAndAdaptElement(parentElement
, element
);
2494 public DnaSamplePreparationPreservationDetailElement
createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement
){
2495 DnaSamplePreparationPreservationDetailElement element
= new DnaSamplePreparationPreservationDetailElement(this, parentElement
);
2496 addAndAdaptElement(parentElement
, element
);
2500 public DnaQualityDetailElement
createDnaQualityDetailElement(ICdmFormElement parentElement
){
2501 DnaQualityDetailElement element
= new DnaQualityDetailElement(this, parentElement
);
2502 addAndAdaptElement(parentElement
, element
);
2506 public SequenceGeneralDetailElement
createSequenceGeneralDetailElement(ICdmFormElement parentElement
){
2507 SequenceGeneralDetailElement element
= new SequenceGeneralDetailElement(this, parentElement
);
2508 addAndAdaptElement(parentElement
, element
);
2512 public SingleReadGeneralDetailElement
createSingleReadGeneralDetailElement(ICdmFormElement parentElement
){
2513 SingleReadGeneralDetailElement element
= new SingleReadGeneralDetailElement(this, parentElement
);
2514 addAndAdaptElement(parentElement
, element
);
2518 public PrimerGeneralDetailElement
createPrimerGeneralDetailElement(ICdmFormElement parentElement
){
2519 PrimerGeneralDetailElement element
= new PrimerGeneralDetailElement(this, parentElement
);
2520 addAndAdaptElement(parentElement
, element
);
2524 public AmplificationGeneralDetailElement
createAmplificationGeneralDetailElement(ICdmFormElement parentElement
){
2525 AmplificationGeneralDetailElement element
= new AmplificationGeneralDetailElement(this, parentElement
);
2526 addAndAdaptElement(parentElement
, element
);
2530 public AmplificationPrimerDetailElement
createAmplificationPrimerDetailElement(ICdmFormElement parentElement
){
2531 AmplificationPrimerDetailElement element
= new AmplificationPrimerDetailElement(this, parentElement
);
2532 addAndAdaptElement(parentElement
, element
);
2536 public AmplificationCloningDetailElement
createAmplificationCloningDetailElement(ICdmFormElement parentElement
){
2537 AmplificationCloningDetailElement element
= new AmplificationCloningDetailElement(this, parentElement
);
2538 addAndAdaptElement(parentElement
, element
);
2542 public AmplificationGelPhotoDetailElement
createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement
){
2543 AmplificationGelPhotoDetailElement element
= new AmplificationGelPhotoDetailElement(this, parentElement
);
2544 addAndAdaptElement(parentElement
, element
);
2548 public MediaSpecimenGeneralDetailElement
createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement
){
2549 MediaSpecimenGeneralDetailElement element
= new MediaSpecimenGeneralDetailElement(this, parentElement
);
2550 addAndAdaptElement(parentElement
, element
);
2554 public MediaDetailElement
createMediaDetailElement(ICdmFormElement parentElement
){
2555 MediaDetailElement mediaDetailElement
= new MediaDetailElement(this, parentElement
);
2556 addAndAdaptElement(parentElement
, mediaDetailElement
);
2557 return mediaDetailElement
;
2560 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
2561 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
2562 addAndAdaptElement(parentElement
, element
);
2566 public FieldUnitFacadeDetailElement
createFieldUnitFacadeDetailElement(ICdmFormElement parentElement
) {
2567 FieldUnitFacadeDetailElement element
= new FieldUnitFacadeDetailElement(this, parentElement
);
2568 addAndAdaptElement(parentElement
, element
);
2572 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
2573 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
2574 addAndAdaptElement(parentElement
, element
);
2578 public OriginalLabelDataElement
createOriginalLabelDataElement(ICdmFormElement parentElement
) {
2579 OriginalLabelDataElement element
= new OriginalLabelDataElement(this, parentElement
);
2580 addAndAdaptElement(parentElement
, element
);
2584 public PreservedSpecimenDetailElement
createPreservedSpecimenDetailElement(ICdmFormElement parentElement
) {
2585 PreservedSpecimenDetailElement element
= new PreservedSpecimenDetailElement(this, parentElement
);
2586 addAndAdaptElement(parentElement
, element
);
2590 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
2591 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
2592 addAndAdaptElement(parentElement
, element
);
2596 public SampleDesignationDetailElement
createSampleDesignationDetailElement(ICdmFormElement parentElement
) {
2597 SampleDesignationDetailElement element
= new SampleDesignationDetailElement(this, parentElement
);
2598 addAndAdaptElement(parentElement
, element
);
2603 * @param parentElement
2606 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
2608 parentElement
.addElement(element
);
2611 //--------EntityCollectionSection----------
2612 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
, boolean isNomenclatural
){
2613 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
, isNomenclatural
);
2614 addAndAdaptSection(parentElement
, section
);
2618 public InapplicableIfEntityCollectionSection
createInapplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2619 InapplicableIfEntityCollectionSection section
= new InapplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2620 addAndAdaptSection(parentElement
, section
);
2624 public OnlyApplicableIfEntityCollectionSection
createOnlyApplicableIfEntityCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2625 OnlyApplicableIfEntityCollectionSection section
= new OnlyApplicableIfEntityCollectionSection(this, conversation
, parentElement
, style
);
2626 addAndAdaptSection(parentElement
, section
);
2630 public InapplicableIfEntityCollectionSectionForNode
createInapplicableIfEntityCollectionSectionForNode(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2631 InapplicableIfEntityCollectionSectionForNode section
= new InapplicableIfEntityCollectionSectionForNode(this, conversation
, parentElement
, style
);
2632 addAndAdaptSection(parentElement
, section
);
2636 public OnlyApplicableIfEntityCollectionSectionForNode
createOnlyApplicableIfEntityCollectionSectionForNode(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2637 OnlyApplicableIfEntityCollectionSectionForNode section
= new OnlyApplicableIfEntityCollectionSectionForNode(this, conversation
, parentElement
, style
);
2638 addAndAdaptSection(parentElement
, section
);
2642 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2643 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
2644 addAndAdaptSection(parentElement
, section
);
2648 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2649 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
2650 addAndAdaptSection(parentElement
, section
);
2653 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2654 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
2655 addAndAdaptSection(parentElement
, section
);
2658 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, Reference defaultSource
, int style
){
2659 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, defaultSource
, style
);
2660 addAndAdaptSection(parentElement
, section
);
2664 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2665 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
2666 addAndAdaptSection(parentElement
, section
);
2670 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2671 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
2672 addAndAdaptSection(parentElement
, section
);
2676 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2677 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
2678 addAndAdaptSection(parentElement
, section
);
2682 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2683 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
2684 addAndAdaptSection(parentElement
, section
);
2688 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2689 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
2690 addAndAdaptSection(parentElement
, section
);
2694 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2695 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
2696 addAndAdaptSection(parentElement
, section
);
2700 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2701 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
2702 addAndAdaptSection(parentElement
, section
);
2706 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2707 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
2708 addAndAdaptSection(parentElement
, section
);
2712 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2713 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
2714 addAndAdaptSection(parentElement
, section
);
2718 // public ProtologueSection createProtologueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
2719 // ProtologueSection section = new ProtologueSection(this, conversation, parentElement, style);
2720 // addAndAdaptSection(parentElement, section);
2723 public ExternalLinksSection
createExternalLinksSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2724 ExternalLinksSection section
= new ExternalLinksSection(this, conversation
, parentElement
, style
);
2725 addAndAdaptSection(parentElement
, section
);
2729 public ExternalLinksSection
createExternalLinksSection(ConversationHolder conversation
, ICdmFormElement parentElement
, String label
, int style
){
2730 ExternalLinksSection section
= new ExternalLinksSection(this, conversation
, parentElement
, true, label
, style
);
2731 addAndAdaptSection(parentElement
, section
);
2735 public ExternalLinksSection
createExternalLinksSection(ConversationHolder conversation
, ICdmFormElement parentElement
, String label
, boolean isWithTypeAndDesc
, int style
){
2736 ExternalLinksSection section
= new ExternalLinksSection(this, conversation
, parentElement
, isWithTypeAndDesc
, label
, style
);
2737 addAndAdaptSection(parentElement
, section
);
2741 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2742 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
2744 addAndAdaptSection(parentElement
, section
);
2748 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2749 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
2750 addAndAdaptSection(parentElement
, section
);
2754 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2755 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
2756 addAndAdaptSection(parentElement
, section
);
2760 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2761 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
2762 addAndAdaptSection(parentElement
, section
);
2766 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2767 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
2768 addAndAdaptSection(parentElement
, section
);
2772 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2773 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
2774 addAndAdaptSection(parentElement
, section
);
2778 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2779 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
2780 addAndAdaptSection(parentElement
, section
);
2784 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2785 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
2786 addAndAdaptSection(parentElement
, section
);
2790 public StateVocabularyCollectionSection
createStateVocabulariesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2791 StateVocabularyCollectionSection section
= new StateVocabularyCollectionSection(this, conversation
, parentElement
, style
);
2792 addAndAdaptSection(parentElement
, section
);
2796 public StateVocabularyDtoCollectionSection
createStateVocabulariesDtoSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2797 StateVocabularyDtoCollectionSection section
= new StateVocabularyDtoCollectionSection(this, conversation
, parentElement
, style
);
2798 addAndAdaptSection(parentElement
, section
);
2802 public RecommendedModifierVocabulariesCollectionSection
createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2803 RecommendedModifierVocabulariesCollectionSection section
= new RecommendedModifierVocabulariesCollectionSection(this, conversation
, parentElement
, style
);
2804 addAndAdaptSection(parentElement
, section
);
2807 public RecommendedModifierVocabulariesDtoCollectionSection
createRecommendedModifierVocabulariesDtoCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2808 RecommendedModifierVocabulariesDtoCollectionSection section
= new RecommendedModifierVocabulariesDtoCollectionSection(this, conversation
, parentElement
, style
);
2809 addAndAdaptSection(parentElement
, section
);
2813 public MeasurementUnitCollectionSection
createMeasurementUnitCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2814 MeasurementUnitCollectionSection section
= new MeasurementUnitCollectionSection(this, conversation
, parentElement
, style
);
2815 addAndAdaptSection(parentElement
, section
);
2819 public MeasurementUnitDtoCollectionSection
createMeasurementUnitDtoCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2820 MeasurementUnitDtoCollectionSection section
= new MeasurementUnitDtoCollectionSection(this, conversation
, parentElement
, style
);
2821 addAndAdaptSection(parentElement
, section
);
2824 public StatisticalMeasureCollectionSection
createStatisticalMeasureCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2825 StatisticalMeasureCollectionSection section
= new StatisticalMeasureCollectionSection(this, conversation
, parentElement
, style
);
2826 addAndAdaptSection(parentElement
, section
);
2830 public StatisticalMeasureDtoCollectionSection
createStatisticalMeasureDtoCollectionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2831 StatisticalMeasureDtoCollectionSection section
= new StatisticalMeasureDtoCollectionSection(this, conversation
, parentElement
, style
);
2832 addAndAdaptSection(parentElement
, section
);
2836 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2837 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
2838 addAndAdaptSection(parentElement
, section
);
2842 public GeoScopeDetailSection
createGeoScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2843 GeoScopeDetailSection section
= new GeoScopeDetailSection(this, conversation
, parentElement
, style
);
2844 addAndAdaptSection(parentElement
, section
);
2848 public GeoScopePolyKeyDetailSection
createGeoScopePolyKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2849 GeoScopePolyKeyDetailSection section
= new GeoScopePolyKeyDetailSection(this, conversation
, parentElement
, style
);
2850 addAndAdaptSection(parentElement
, section
);
2854 public IdentifierSection
createIdentifierDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2855 IdentifierSection section
= new IdentifierSection(this, conversation
, parentElement
, style
);
2856 addAndAdaptSection(parentElement
, section
);
2860 public DerivedUnitFacadeIdentifierSection
createDerivedUnitFacadeIdentifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2861 DerivedUnitFacadeIdentifierSection section
= new DerivedUnitFacadeIdentifierSection(this, conversation
, parentElement
, style
);
2862 addAndAdaptSection(parentElement
, section
);
2866 public CurrentSampleDesignationDetailSection
createCurrentSampleDesignationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2867 CurrentSampleDesignationDetailSection section
= new CurrentSampleDesignationDetailSection(this, conversation
, parentElement
, style
);
2868 addAndAdaptSection(parentElement
, section
);
2872 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2873 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2874 addAndAdaptSection(parentElement
, section
);
2878 public PreservedSpecimenCurrentDeterminationDetailSection
createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2879 PreservedSpecimenCurrentDeterminationDetailSection section
= new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2880 addAndAdaptSection(parentElement
, section
);
2884 public SampleDesignationHistoryDetailSection
createSampleDesignationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2885 SampleDesignationHistoryDetailSection section
= new SampleDesignationHistoryDetailSection(this, conversation
, parentElement
, style
);
2886 addAndAdaptSection(parentElement
, section
);
2890 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2891 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2892 addAndAdaptSection(parentElement
, section
);
2896 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2897 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2898 addAndAdaptSection(parentElement
, section
);
2902 public PreservedSpecimenSourceCollectionDetailSection
createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2903 PreservedSpecimenSourceCollectionDetailSection section
= new PreservedSpecimenSourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2904 addAndAdaptSection(parentElement
, section
);
2908 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2909 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2910 addAndAdaptSection(parentElement
, section
);
2914 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2915 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2916 addAndAdaptSection(parentElement
, section
);
2920 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2921 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2922 addAndAdaptSection(parentElement
, section
);
2926 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2927 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2928 addAndAdaptSection(parentElement
, section
);
2932 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2933 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2934 addAndAdaptSection(parentElement
, section
);
2938 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2939 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2940 addAndAdaptSection(parentElement
, section
);
2944 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2945 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2946 AbstractEntityCollectionElement
<?
> element
= null;
2948 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2950 if (entity
instanceof Annotation
) {
2951 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2952 }else if (entity
instanceof Person
) {
2953 boolean isNomenclatural
= false;
2954 if (parentElement
instanceof TeamMemberSection
){
2955 isNomenclatural
= ((TeamMemberSection
) parentElement
).isNomenclaturalTeam();
2957 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
, isNomenclatural
);
2958 } else if (entity
instanceof Credit
) {
2959 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2960 } else if (entity
instanceof Extension
) {
2961 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2962 } else if (entity
instanceof ExternalLink
) {
2963 boolean isAdvanced
= true;
2964 if(parentElement
instanceof ExternalLinksSection
){
2965 isAdvanced
= ((ExternalLinksSection
)parentElement
).isAdvanced();
2967 element
= new ExternalLinksElement(this, parentElement
, (ExternalLink
) entity
, isAdvanced
, removeListener
, style
);
2968 } else if (entity
instanceof Marker
) {
2969 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2970 } else if (entity
instanceof TaxonNodeAgentRelation
) {
2971 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
, removeListener
, backgroundColor
, style
);
2972 }else if (entity
instanceof Media
) {
2973 element
= new MediaMetaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2974 } else if (entity
instanceof MediaRepresentation
) {
2975 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2977 } else if (entity
instanceof ImageFile
) {
2978 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2979 } else if (entity
instanceof MediaRepresentationPart
) {
2980 element
= new MediaRepresentationPartElement
<>(this, parentElement
, (MediaRepresentationPart
) entity
,
2981 removeListener
, style
);
2982 } else if (entity
instanceof NomenclaturalStatus
) {
2983 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2985 } else if (entity
instanceof Rights
) {
2986 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2987 } else if (entity
instanceof DescriptionElementSource
&& parentElement
.getEntity() instanceof CommonTaxonName
) {
2988 element
= new CommonNameSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2989 removeListener
, style
);
2990 } else if (entity
instanceof DescriptionElementSource
&& parentElement
.getEntity() instanceof Distribution
) {
2991 Composite parent
= null;
2992 if (parentElement
instanceof DescriptionElementSourceSection
){
2993 parent
= ((DescriptionElementSourceSection
)parentElement
).getParent();
2995 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2996 removeListener
, style
, false);
2997 } else if (entity
instanceof DescriptionElementSource
) {
2998 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2999 removeListener
, style
, false);
3000 }else if (entity
instanceof TaxonNodeAgentRelation
) {
3001 element
= new TaxonNodeAgentRelationCollectionElement(this, parentElement
, (TaxonNodeAgentRelation
) entity
,
3002 removeListener
,backgroundColor
, style
);
3003 }else if (entity
instanceof IdentifiableSource
&& parentElement
.getEntity() instanceof DescriptionElementBase
) {
3004 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
3006 } else if (entity
instanceof IdentifiableSource
) {
3007 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
3009 } else if (entity
instanceof DefinedTerm
) {
3010 switch(((DefinedTerm
)entity
).getTermType()) {
3012 element
= new ScopeElement(this,
3014 (DefinedTerm
) entity
,
3019 element
= new ModifierElement(this,
3021 (DefinedTerm
) entity
,
3029 } else if (entity
instanceof Reference
) {
3030 if(parentElement
instanceof SequenceReferenceCollectionDetailSection
){
3031 element
= new SequenceReferenceCollectionDetailElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
3034 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
3036 } else if (entity
instanceof NameTypeDesignation
) {
3037 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
3039 } else if (entity
instanceof TextualTypeDesignation
) {
3040 element
= new TextTypeDesignationElement(this, parentElement
, (TextualTypeDesignation
) entity
, removeListener
,
3042 } else if (entity
instanceof NameRelationship
) {
3043 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
3045 } else if (entity
instanceof SpecimenTypeDesignation
) {
3046 if(parentElement
instanceof DerivedUnitTypeDesignationSection
){
3047 element
= new DerivedUnitTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
3048 removeListener
, style
);
3051 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
3052 removeListener
, style
);
3054 } else if (entity
instanceof StateData
) {
3055 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
3056 } else if (entity
instanceof StatisticalMeasurementValue
) {
3057 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
3058 removeListener
, style
);
3059 } else if (entity
instanceof DerivedUnit
) {
3060 switch(((DerivedUnit
)entity
).getRecordBasis()) {
3061 case LivingSpecimen
:
3062 case PreservedSpecimen
:
3064 element
= new SpecimenCollectionDetailElement(this,
3066 (DerivedUnit
) entity
,
3071 element
= new DerivedUnitElement(this,
3073 (DerivedUnit
) entity
,
3077 } else if (entity
instanceof NamedArea
) {
3078 element
= new CollectingAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
3079 } else if (entity
instanceof DeterminationEvent
) {
3080 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
3081 } else if (entity
instanceof User
) {
3082 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
3083 } else if (entity
instanceof GrantedAuthority
) {
3084 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
, ((Group
)parentElement
.getEntity()),
3085 removeListener
, style
);
3086 } else if (entity
instanceof Group
) {
3087 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
3088 } else if (entity
instanceof Taxon
) {
3089 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
3090 } else if (entity
instanceof DescriptionElementBase
) {
3091 // this is the special case for protologs, maybe we can do this
3092 // differently when API improves
3093 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
3094 // if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
3095 // element = new ProtologueElement(this, parentElement, descriptionElement, removeListener, style);
3097 } else if (entity
instanceof Identifier
) {
3098 if(parentElement
instanceof AbstractSampleDesignationDetailSection
){
3099 element
= new SampleDesignationTextDetailElement(this, parentElement
, (Identifier
) entity
, removeListener
, backgroundColor
, style
);
3102 element
= new IdentifierElement(this, parentElement
, (Identifier
) entity
, removeListener
, style
);
3104 } else if (entity
instanceof TermVocabulary
) {
3105 TermVocabulary
<?
> termVocabulary
= (TermVocabulary
<?
>)entity
;
3106 switch (termVocabulary
.getTermType()) {
3108 element
= new StateVocabularyCollectionElement(this, parentElement
, (TermVocabulary
<State
>) entity
, removeListener
, backgroundColor
, style
);
3111 element
= new RecommendedModifierVocabulariesElement(this, parentElement
, (TermVocabulary
<DefinedTerm
>) entity
, removeListener
, backgroundColor
, style
);
3116 }else if (entity
instanceof TermVocabularyDto
) {
3117 TermVocabularyDto termVocabulary
= (TermVocabularyDto
)entity
;
3118 switch (termVocabulary
.getTermType()) {
3120 element
= new StateVocabularyDtoCollectionElement(this, parentElement
, termVocabulary
, removeListener
, backgroundColor
, style
);
3123 element
= new RecommendedModifierDtoVocabulariesElement(this, parentElement
, termVocabulary
, removeListener
, backgroundColor
, style
);
3128 }else if (entity
instanceof MeasurementUnit
) {
3129 element
= new MeasurementUnitCollectionElement(this, parentElement
, (MeasurementUnit
) entity
, removeListener
, backgroundColor
, style
);
3130 }else if (entity
instanceof TermDto
) {
3131 if(((TermDto
)entity
).getTermType().equals(TermType
.MeasurementUnit
)){
3132 element
= new MeasurementUnitDtoCollectionElement(this, parentElement
, (TermDto
) entity
, removeListener
, backgroundColor
, style
);
3133 }else if (((TermDto
)entity
).getTermType().equals(TermType
.StatisticalMeasure
)){
3134 element
= new StatisticalMeasureDtoCollectionElement(this, parentElement
, (TermDto
) entity
, removeListener
, backgroundColor
, style
);
3136 }else if (entity
instanceof StatisticalMeasure
) {
3137 element
= new StatisticalMeasureCollectionElement(this, parentElement
, (StatisticalMeasure
) entity
, removeListener
, backgroundColor
, style
);
3138 } else if (entity
instanceof FeatureState
&& parentElement
instanceof InapplicableIfEntityCollectionSection
) {
3139 element
= new InapplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
3140 } else if (entity
instanceof FeatureState
&& parentElement
instanceof OnlyApplicableIfEntityCollectionSection
) {
3141 element
= new OnlyApplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
3142 } else if (entity
instanceof FeatureState
&& parentElement
instanceof InapplicableIfEntityCollectionSectionForNode
) {
3143 element
= new InapplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
3144 } else if (entity
instanceof FeatureState
&& parentElement
instanceof OnlyApplicableIfEntityCollectionSectionForNode
) {
3145 element
= new OnlyApplicableIfCollectionElement(this, parentElement
, (FeatureState
) entity
, removeListener
, backgroundColor
, style
);
3148 //check for parent section when entity is null
3149 //this happens when AbstractUnboundEntityCollectionSection is used
3151 if(parentElement
instanceof ScopeSection
|| parentElement
instanceof ScopeRestrictionSection
){
3152 element
= new ScopeElement(this,
3154 (DefinedTerm
) entity
,
3158 else if(parentElement
instanceof ModifierSection
){
3159 element
= new ModifierElement(this,
3161 (DefinedTerm
) entity
,
3168 if (element
== null) {
3169 MessagingUtils
.messageDialog(
3170 String
.format("Error when creating section %s",
3171 parentElement
.getClass().getSimpleName()),
3173 String
.format("Could not generate collection element for entity of class %s."
3174 + " Looks like the case is not yet handled. Check implementation.\n"
3175 + "Entity: %s", entity
.getClass(), entity
.toString()), null);
3179 if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
3180 element
.setPersistentBackground(backgroundColor
);
3183 parentElement
.addElement(element
);
3191 * Creates a selection element for the given type T.
3194 * <strong>Selection elements not handled by this method:</strong>
3196 * <li>{@link TaxonNodeSelectionElement} see
3197 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
3199 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
3200 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
3206 * a {@link Class} object of the type that you want the selection
3208 * @param parentElement
3209 * a {@link ICdmFormElement} object.
3210 * @param labelString
3211 * a {@link String} object.
3212 * @param selectionType
3214 * a {@link ICdmBase} object.
3217 * @param conversation
3218 * a {@link ConversationHolder} object.
3219 * @return a {@link EntitySelectionElement} object.
3221 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
3222 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
3223 int style
, Integer limit
) {
3224 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this,
3225 parentElement
, clazz
,
3226 labelString
, selection
, mode
, style
, limit
);
3228 parentElement
.addElement(element
);
3232 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
3233 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
3234 int style
, boolean filterElement
) {
3235 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, //conversation,
3236 parentElement
, clazz
,
3237 labelString
, selection
, mode
, style
, filterElement
);
3239 parentElement
.addElement(element
);
3243 public <T
extends CdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
3244 // ConversationHolder conversation,
3245 ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
3247 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this,
3248 parentElement
, clazz
,
3249 labelString
, selection
, mode
, style
);
3251 parentElement
.addElement(element
);
3255 public CommonNameReferenceSelectionElement
createCommonNameReferenceSelectionElement(ICdmFormElement parentElement
, String labelString
, Reference selection
, int mode
,
3257 CommonNameReferenceSelectionElement element
= new CommonNameReferenceSelectionElement(this,
3258 parentElement
, labelString
, selection
, mode
, style
);
3260 parentElement
.addElement(element
);
3266 * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
3269 * <strong>Selection elements not handled by this method:</strong>
3271 * <li>{@link TaxonNodeSelectionElement} see
3272 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
3274 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
3275 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
3281 * a {@link Class} object of the type that you want the selection
3283 * @param parentElement
3284 * a {@link ICdmFormElement} object.
3285 * @param labelString
3286 * a {@link String} object.
3287 * @param selectionType
3289 * a {@link ICdmBase} object.
3292 * @param conversation
3293 * a {@link ConversationHolder} object.
3294 * @return a {@link EntitySelectionElement} object.
3296 public <T
extends CdmBase
> EntitySelectionElementWithAbbreviatedTitle
<T
> createSelectionElementWithAbbreviatedTitle(
3297 Class
<T
> clazz
, ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
,
3298 T selection
, int mode
, int style
) {
3299 EntitySelectionElementWithAbbreviatedTitle
<T
> element
= new EntitySelectionElementWithAbbreviatedTitle
<T
>(this, //conversation,
3300 parentElement
, clazz
,
3301 labelString
, selection
, mode
, style
);
3303 parentElement
.addElement(element
);
3307 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
3308 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
3309 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this,
3311 labelString
, selection
, mode
, style
, null);
3313 parentElement
.addElement(element
);
3316 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
3317 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
, Integer limit
) {
3318 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, //conversation,
3320 labelString
, selection
, mode
, style
, limit
);
3322 parentElement
.addElement(element
);
3327 // public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
3328 // ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
3329 // int mode, int style) {
3330 // NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
3331 // conversation, parentElement, labelString, selection, mode, style);
3333 // parentElement.addElement(element);
3337 /** {@inheritDoc} */
3338 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
3339 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
3340 adapt(labelElement
);
3341 parentElement
.addElement(labelElement
);
3342 return labelElement
;
3347 // public DateElementFormElement createDateElementForm(ICdmFormElement formElement, String labelText, DateTime dateTime, int style){
3348 // Label label = new Label(formElement.getLayoutComposite(), style);
3349 // label.setText(labelText+" (yyyy-MM-dd)");
3350 // DateElementFormElement dateElement = new DateElementFormElement(this, dateTime, style, formElement.getLayoutComposite());
3351 // dateElement.initInternalController();
3353 // return dateElement;
3356 public DateElement
createDateElement(ICdmFormElement formElement
, String labelText
, DateTime dateTime
, int style
, boolean editableText
){
3357 Label label
= new Label(formElement
.getLayoutComposite(), style
);
3358 label
.setText(labelText
);
3359 label
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3360 DateElement dateElement
= new DateElement(formElement
.getLayoutComposite(), dateTime
, labelText
, style
, editableText
);
3361 dateElement
.initController(this, formElement
);
3362 dateElement
.setLayoutData(new TableWrapData(TableWrapData
.LEFT
, TableWrapData
.MIDDLE
, 1, 1));
3368 * Getter for the field <code>selectionProvider</code>.
3371 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
3373 public ISelectionProvider
getSelectionProvider() {
3374 return selectionProvider
;
3379 * createDetailedDescriptionDetailElement
3382 * @param parentElement
3383 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
3387 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
3392 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
3395 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
3396 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
, boolean enabled
) {
3397 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
3399 if (entity
instanceof CategoricalData
) {
3400 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
3401 (CategoricalData
) entity
, style
);
3402 } else if (entity
instanceof CommonTaxonName
) {
3403 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
3405 } else if (entity
instanceof Distribution
&& !enabled
) {
3406 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3408 } else if (entity
instanceof Distribution
) {
3409 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
3411 }else if (entity
instanceof IndividualsAssociation
) {
3412 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
3413 (IndividualsAssociation
) entity
, style
);
3414 } else if (entity
instanceof QuantitativeData
) {
3415 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
3416 (QuantitativeData
) entity
, style
);
3417 } else if (entity
instanceof TaxonInteraction
) {
3418 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
3419 (TaxonInteraction
) entity
, style
);
3420 } else if (entity
instanceof TemporalData
) {
3421 detailedDescriptionElement
= new TemporalDataDetailElement(this, parentElement
, (TemporalData
) entity
, style
);
3422 } else if (entity
instanceof TextData
) {
3423 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
3426 throw new IllegalStateException("There is no interface for the given description element");
3428 detailedDescriptionElement
.setEnabled(enabled
);
3429 adapt(detailedDescriptionElement
);
3430 parentElement
.addElement(detailedDescriptionElement
);
3431 return detailedDescriptionElement
;
3436 * Creates a styled text as a part of the form.
3441 * the text initial value
3444 * @return the text widget
3446 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
3447 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
3448 if (value
!= null) {
3449 text
.setText(value
);
3451 text
.setForeground(getColors().getForeground());
3452 text
.setBackground(getColors().getBackground());
3453 // text.addFocusListener(visibilityHandler);
3457 public PreservedSpecimenDetailSection
createPreservedSpecimenDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
3458 PreservedSpecimenDetailSection section
= new PreservedSpecimenDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
3459 addAndAdaptSection(parentElement
, section
);
3464 * @param formElement
3465 * @param conversationHolder
3469 public TaxonNodeAgentRelationCollectionSection
createTaxonNodeAgentRelationCollectionSection(
3470 ICdmFormElement formElement
, ConversationHolder conversationHolder
, int style
) {
3471 TaxonNodeAgentRelationCollectionSection section
= new TaxonNodeAgentRelationCollectionSection(this, conversationHolder
, formElement
, style
);
3472 addAndAdaptSection(formElement
, section
);
3477 public TaxonOfRelationshipElement
createTaxonOfRelationshipDetailElement(
3478 ICdmFormElement parentElement
, int style
) {
3479 TaxonOfRelationshipElement section
= new TaxonOfRelationshipElement(this, parentElement
, style
);
3480 addAndAdaptElement(parentElement
, section
);
3484 public TaxonDetailSection
createTaxonDetailSection(ConversationHolder conversationHolder
,
3485 ICdmFormElement formElement
, ISelectionProvider selectionProvider
, int style
) {
3486 TaxonDetailSection section
= new TaxonDetailSection(this, conversationHolder
, formElement
, selectionProvider
, style
);
3487 addAndAdaptSection(formElement
, section
);
3494 * createTextWithLabelElement
3497 * @param parentElement
3498 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
3500 * @param labelString
3501 * a {@link java.lang.String} object.
3502 * @param initialText
3503 * a {@link java.lang.String} object.
3504 * @param textLimit maximal number of characters allowed
3507 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
3510 public RuleConsideredElement
createRuleConsideredElement(ICdmFormElement parentElement
, String labelString
, boolean isShowCodeEdition
, int style
) {
3511 RuleConsideredElement element
= new RuleConsideredElement(this, parentElement
, labelString
, isShowCodeEdition
, style
);
3513 parentElement
.addElement(element
);
3519 * @param formElement
3526 public EntitySelectionElementWithIdInVocabulary
createSelectionElementWithIdInVocabulary(Class
<NamedArea
> clazz
,
3527 ICdmFormElement formElement
, String labelString
, NamedArea area
, int mode
, int style
) {
3528 EntitySelectionElementWithIdInVocabulary element
= new EntitySelectionElementWithIdInVocabulary(this,
3529 formElement
, clazz
, labelString
, area
, mode
, style
);
3531 formElement
.addElement(element
);
3536 * @param extendedTimePeriodElement
3540 public ExtendedTimeDetailSection
createExtendedTimeDetailSection(
3541 ExtendedTimePeriodElement parentElement
, int style
) {
3542 ExtendedTimeDetailSection section
= new ExtendedTimeDetailSection(this, parentElement
, style
);
3543 parentElement
.addElement(section
);
3547 public ExtendedTimePeriodElement
createExtendedTimePeriodElement(
3548 ICdmFormElement parentElement
, String labelString
, ExtendedTimePeriod timePeriod
, int style
) {
3549 ExtendedTimePeriodElement section
= new ExtendedTimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
3550 parentElement
.addElement(section
);
3558 // public RichTextWithLabelElement createRichTextLabelElement(ICdmFormElement parentElement, String labelString, String initialText, int textHeight, int style) {
3559 // RichTextWithLabelElement element = new RichTextWithLabelElement(this, parentElement, labelString,
3560 // initialText, textHeight, style);
3562 // parentElement.addElement(element);