4 package eu
.etaxonomy
.taxeditor
.ui
.element
;
7 import java
.util
.ArrayList
;
8 import java
.util
.HashSet
;
13 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
14 import org
.eclipse
.jface
.viewers
.ISelection
;
15 import org
.eclipse
.jface
.viewers
.ISelectionProvider
;
16 import org
.eclipse
.jface
.window
.Window
;
17 import org
.eclipse
.swt
.SWT
;
18 import org
.eclipse
.swt
.custom
.StyledText
;
19 import org
.eclipse
.swt
.events
.FocusAdapter
;
20 import org
.eclipse
.swt
.events
.FocusEvent
;
21 import org
.eclipse
.swt
.events
.FocusListener
;
22 import org
.eclipse
.swt
.events
.MouseAdapter
;
23 import org
.eclipse
.swt
.events
.MouseEvent
;
24 import org
.eclipse
.swt
.events
.MouseListener
;
25 import org
.eclipse
.swt
.events
.SelectionEvent
;
26 import org
.eclipse
.swt
.events
.SelectionListener
;
27 import org
.eclipse
.swt
.events
.TypedEvent
;
28 import org
.eclipse
.swt
.graphics
.Color
;
29 import org
.eclipse
.swt
.graphics
.Font
;
30 import org
.eclipse
.swt
.widgets
.Composite
;
31 import org
.eclipse
.swt
.widgets
.Control
;
32 import org
.eclipse
.swt
.widgets
.Display
;
33 import org
.eclipse
.swt
.widgets
.Event
;
34 import org
.eclipse
.swt
.widgets
.Label
;
35 import org
.eclipse
.ui
.forms
.IFormColors
;
36 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
37 import org
.eclipse
.ui
.forms
.widgets
.FormToolkit
;
38 import org
.eclipse
.ui
.forms
.widgets
.Section
;
39 import org
.eclipse
.ui
.internal
.forms
.widgets
.FormFonts
;
40 import org
.joda
.time
.Partial
;
41 import org
.springframework
.security
.core
.GrantedAuthority
;
43 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
44 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
45 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
46 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
47 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
48 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
49 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
50 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
51 import eu
.etaxonomy
.cdm
.model
.common
.DescriptionElementSource
;
52 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
53 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
54 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
55 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
56 import eu
.etaxonomy
.cdm
.model
.common
.IDefinedTerm
;
57 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
58 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
59 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
60 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
61 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
62 import eu
.etaxonomy
.cdm
.model
.common
.User
;
63 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
64 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
65 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
66 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
67 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
68 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
69 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
70 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
71 import eu
.etaxonomy
.cdm
.model
.description
.Modifier
;
72 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
73 import eu
.etaxonomy
.cdm
.model
.description
.Scope
;
74 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
75 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
76 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
77 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
78 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
79 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
80 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
81 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
82 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
83 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
84 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
85 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
86 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
87 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
88 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
89 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
90 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
91 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
92 import eu
.etaxonomy
.cdm
.model
.occurrence
.Specimen
;
93 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
94 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
95 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
96 import eu
.etaxonomy
.cdm
.strategy
.parser
.ParserProblem
;
97 import eu
.etaxonomy
.taxeditor
.model
.AbstractUtility
;
98 import eu
.etaxonomy
.taxeditor
.ui
.combo
.EnumComboElement
;
99 import eu
.etaxonomy
.taxeditor
.ui
.combo
.TermComboElement
;
100 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
101 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
102 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
103 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
104 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
105 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
106 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
107 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
108 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
109 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
110 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
111 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
112 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
113 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
116 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldObservationDetailElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldObservationDetailSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElementComposite
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeneralDetailElement
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeneralDetailSection
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
254 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
259 * CdmFormFactory class.
263 * @created Feb 24, 2010
266 public class CdmFormFactory
extends FormToolkit
{
268 private BoldFontHolder2 boldFontHolder2
;
269 private MouseListener selectionMouseHandler
;
270 private FocusListener selectionFocusHandler
;
272 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
274 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
276 private final int orientation
= Window
.getDefaultOrientation();
277 private ISelectionProvider selectionProvider
;
279 /** Constant <code>EMPTY_SELECTION</code> */
280 public static ISelection EMPTY_SELECTION
= new ISelection() {
282 public boolean isEmpty() {
293 private class SelectionMouseHandler
extends MouseAdapter
{
295 public void mouseDown(MouseEvent e
) {
296 notifySelectionListeners(e
);
306 private class SelectionFocusHandler
extends FocusAdapter
{
308 public void focusGained(FocusEvent e
) {
309 notifySelectionListeners(e
);
313 private void notifySelectionListeners(TypedEvent e
) {
314 Event event
= new Event();
315 event
.widget
= e
.widget
;
316 SelectionEvent selectionEvent
= new SelectionEvent(event
);
318 for (SelectionListener listener
: selectionListenerList
) {
319 listener
.widgetSelected(selectionEvent
);
325 * Constructor for CdmFormFactory.
329 * a {@link org.eclipse.swt.widgets.Display} object.
330 * @param selectionProvider
331 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
333 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
335 this.selectionProvider
= selectionProvider
;
341 * Constructor for CdmFormFactory.
345 * a {@link org.eclipse.swt.widgets.Display} object.
347 public CdmFormFactory(Display display
) {
355 private void init() {
356 boldFontHolder2
= new BoldFontHolder2();
357 selectionMouseHandler
= new SelectionMouseHandler();
358 selectionFocusHandler
= new SelectionFocusHandler();
362 * Creates an instance initialized with the correct selectionProvider
364 * Make sure to remove the instance when the entityComposite disposes via
365 * destroySelectionArbitrator(..)
367 * @param entityElement
368 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
370 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
373 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
374 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
375 selectionArbitrator
.addSelectionProvider(selectionProvider
);
376 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
377 addSelectionListener(selectionArbitrator
);
378 return selectionArbitrator
;
383 * destroySelectionArbitrator
386 * @param selectionArbitrator
388 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
391 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
392 removeSelectionListener(selectionArbitrator
);
393 if (selectionProvider
!= null) {
394 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
396 AbstractUtility
.error(this.getClass(),
397 "Tried to destroy a selection listener from this factories listeners but was null", null);
403 * Adapts the {@link AbstractCdmFormElement}:<br>
404 * - sets the {@link IPropertyChangeListener}s handled by this class
409 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
412 public void adapt(AbstractCdmFormElement formElement
) {
413 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
416 public void adapt(AbstractCdmFormElementComposite formElement
) {
417 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
424 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
426 control
.addFocusListener(selectionFocusHandler
);
428 super.adapt(control
, trackFocus
, trackKeyboard
);
433 public void adapt(Composite composite
) {
434 composite
.addMouseListener(selectionMouseHandler
);
435 super.adapt(composite
);
444 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
447 public void destroyElement(ICdmFormElement formElement
) {
448 // return if element was not initialized
449 if (formElement
== null) {
452 // destroy selection arbitrator, if any
453 if (formElement
instanceof ISelectableElement
) {
454 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
456 // remove this element form its parents list of elements
457 // ICdmFormElement parentElement = formElement.getParentElement();
458 // if(parentElement != null){
459 // parentElement.removeElement(formElement);
461 // call destroy on child elements recursively
462 for (ICdmFormElement childElement
: formElement
.getElements()) {
463 destroyElement(childElement
);
465 // dispose of the controls
466 for (Control control
: formElement
.getControls()) {
467 // we added the layoutComposite of the parental element as the
468 // layout composite to this formElement
469 // but we do not want to destroy it.
470 if (control
.equals(formElement
.getLayoutComposite())) {
485 * a {@link org.eclipse.swt.widgets.Composite} object.
486 * @return a {@link org.eclipse.swt.widgets.Label} object.
488 public Label
createEmptyCell(Composite parent
) {
489 return this.createLabel(parent
, null);
494 * createMultilineTextWithLabel
498 * a {@link java.lang.String} object.
503 * @param parentElement
504 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
506 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
509 public TextWithLabelElement
createMultilineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
510 int textHeight
, int style
) {
511 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, style
);
513 parentElement
.addElement(element
);
519 * createMultiLanguageTextElement
522 * @param parentElement
523 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
526 * a {@link java.lang.String} object.
527 * @param multilanguageText
528 * a {@link java.util.Map} object.
534 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
537 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
538 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
539 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
540 multilanguageText
, textHeight
, style
);
542 parentElement
.addElement(element
);
546 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
547 KeyStatement keyStatement
, int textHeight
, int style
) {
548 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
551 parentElement
.addElement(element
);
557 * createTextWithLabelElement
561 * a {@link java.lang.String} object.
563 * a {@link java.lang.String} object.
566 * @param parentElement
567 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
569 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
572 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
573 String initialText
, int style
) {
574 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
577 parentElement
.addElement(element
);
581 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
582 URI initialUri
, int style
) {
583 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
585 parentElement
.addElement(element
);
596 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
597 IOpenUrlEnabled openUrlEnabled
, int style
) {
598 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
601 parentElement
.addElement(element
);
607 * @param parentElement
609 * @param conversationEnabled
614 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
615 ConversationHolder conversation
, User user
, int style
) {
616 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
618 parentElement
.addElement(element
);
624 * createIntegerTextWithLabelElement
627 * @param parentElement
628 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
631 * a {@link java.lang.String} object.
632 * @param initialInteger
633 * a {@link java.lang.Integer} object.
637 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
640 public NumberWithLabelElement
createIntegerTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
641 Integer initialInteger
, int style
) {
642 NumberWithLabelElement element
= new NumberWithLabelElement(this, parentElement
, labelString
, initialInteger
,
645 parentElement
.addElement(element
);
651 * createFloatTextWithLabelElement
654 * @param parentElement
655 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
658 * a {@link java.lang.String} object.
659 * @param initialFloat
664 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
667 public NumberWithLabelElement
createFloatTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
668 float initialFloat
, int style
) {
669 NumberWithLabelElement element
= new NumberWithLabelElement(this, parentElement
, labelString
, initialFloat
,
672 parentElement
.addElement(element
);
678 * createLanguageStringWithLabelElement
681 * @param parentElement
682 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
685 * a {@link java.lang.String} object.
686 * @param languageString
687 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
691 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
694 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
695 String labelString
, LanguageString languageString
, int style
) {
696 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
697 languageString
, style
);
699 parentElement
.addElement(element
);
705 * createLanguageStringWithLabelElement
708 * @param parentElement
709 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
712 * a {@link java.lang.String} object.
713 * @param languageString
714 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
720 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
723 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
724 String labelString
, LanguageString languageString
, int height
, int style
) {
725 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
726 languageString
, height
, style
);
728 parentElement
.addElement(element
);
737 * @param parentElement
738 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
741 * a {@link java.lang.String} object.
744 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
747 public TextWithLabelElement
createTextElement(ICdmFormElement parentElement
, String initialText
, int style
) {
748 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, null, initialText
, null, style
);
750 parentElement
.addElement(element
);
756 * createKeyValueViewerElement
759 * @param parentElement
760 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
763 * a {@link java.lang.String} object.
764 * @param valueHeading
765 * a {@link java.lang.String} object.
767 * a {@link java.util.Map} object.
768 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
771 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
772 String valueHeading
, Map
<Object
, Object
> map
) {
773 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
775 parentElement
.addElement(element
);
781 * createTermComboElement
784 * @param termComboType
786 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
788 * @param parentElement
789 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
792 * a {@link java.lang.String} object.
794 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
798 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
802 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
803 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
804 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
807 parentElement
.addElement(element
);
813 * createEnumComboElement
816 * @param enumComboType
818 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
820 * @param parentElement
821 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
825 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
828 public <T
extends IDefinedTerm
> EnumComboElement
<T
> createEnumComboElement(Class
<T
> enumComboType
,
829 ICdmFormElement parentElement
, int style
) {
830 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
832 parentElement
.addElement(element
);
838 * createBrowserElement
842 * a {@link java.net.URI} object.
845 * @param parentElement
846 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
848 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
851 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
852 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
854 parentElement
.addElement(element
);
863 * @param parentElement
864 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
867 * a {@link java.net.URI} object.
870 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
872 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
873 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
875 parentElement
.addElement(element
);
881 * createTextActionElement
885 * a {@link java.lang.String} object.
887 * a {@link java.lang.String} object.
890 * @param parentElement
891 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
894 * a {@link java.lang.String} object.
895 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
898 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
899 String buttonLabel
, String initialText
, int style
) {
900 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
903 parentElement
.addElement(element
);
912 * @param parentElement
913 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
916 * a {@link java.lang.String} object.
917 * @param initialState
921 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
924 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, boolean initialState
, int style
) {
925 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
927 parentElement
.addElement(element
);
932 * Creates a section as a part of the form.
934 * @return the section widget
937 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
940 public Section
adapt(AbstractFormSection section
) {
941 section
.setMenu(section
.getLayoutComposite().getMenu());
942 adapt(section
, true, true);
944 // handle focus and property change events for cdm use
945 section
.addFocusListener(selectionFocusHandler
);
946 section
.setPropertyChangeListeners(propertyChangeListeners
);
948 if (section
.getToggle() != null) {
949 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
950 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
953 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
955 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
956 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
957 getColors().initializeSectionToolBarColors();
958 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
959 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
961 // call setTitleBarForeground regardless as it also sets the label color
962 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
966 private class BoldFontHolder2
{
967 private Font normalFont
;
969 private Font boldFont
;
971 public BoldFontHolder2() {
974 public Font
getBoldFont(Font font
) {
975 createBoldFont(font
);
979 private void createBoldFont(Font font
) {
980 if (normalFont
== null || !normalFont
.equals(font
)) {
984 if (boldFont
== null) {
985 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
989 public void dispose() {
990 if (boldFont
!= null) {
991 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
999 * createToggleableTextField
1002 * @param parentElement
1003 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1005 * @param labelString
1006 * a {@link java.lang.String} object.
1007 * @param initialText
1008 * a {@link java.lang.String} object.
1009 * @param initialState
1013 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1016 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1017 String initialText
, boolean initialState
, int style
) {
1018 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1019 initialState
, style
| orientation
);
1021 parentElement
.addElement(element
);
1027 * createTimePeriodElement
1030 * @param parentElement
1031 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1033 * @param labelString
1034 * a {@link java.lang.String} object.
1036 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1039 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1042 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1043 TimePeriod timePeriod
, int style
) {
1044 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1046 parentElement
.addElement(element
);
1052 * createPointElement
1057 * @param parentElement
1058 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1061 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1062 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1064 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1065 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1067 parentElement
.addElement(element
);
1073 * createDateDetailSection
1076 * @param parentElement
1077 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1081 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1084 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1085 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1086 parentElement
.addElement(section
);
1093 * createPartialElement
1096 * @param parentElement
1097 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1099 * @param labelString
1100 * a {@link java.lang.String} object.
1102 * a {@link org.joda.time.Partial} object.
1105 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1108 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1110 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1112 parentElement
.addElement(element
);
1118 * addSelectionListener
1122 * a {@link org.eclipse.swt.events.SelectionListener} object.
1124 public void addSelectionListener(SelectionListener listener
) {
1125 selectionListenerList
.add(listener
);
1130 * removeSelectionListener
1134 * a {@link org.eclipse.swt.events.SelectionListener} object.
1136 public void removeSelectionListener(SelectionListener listener
) {
1137 if (listener
== null) {
1138 AbstractUtility
.error(this.getClass(),
1139 "Tried to remove a selection listener from this factories listeners but was null", null);
1141 selectionListenerList
.remove(listener
);
1147 * addPropertyChangeListener
1151 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1154 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1155 if (propertyChangeListeners
.contains(listener
)) {
1158 propertyChangeListeners
.add(0, listener
);
1163 * removePropertyChangeListener
1167 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1170 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1171 propertyChangeListeners
.remove(listener
);
1175 * @return the propertyChangeListeners
1177 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1178 return propertyChangeListeners
;
1183 * createHorizontalSeparator
1186 * @param parentElement
1187 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1191 * @return a {@link org.eclipse.swt.widgets.Label} object.
1193 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1194 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1195 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1201 * createVersionElement
1204 * @param parentElement
1205 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1208 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1213 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1216 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1217 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1219 parentElement
.addElement(element
);
1224 * @param cdmBaseSection
1229 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1230 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1232 parentElement
.addElement(element
);
1238 * createVersionSection
1241 * @param parentElement
1242 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1247 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1250 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1251 VersionSection section
= new VersionSection(this, parentElement
, style
);
1252 parentElement
.addElement(section
);
1262 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1263 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1264 parentElement
.addElement(section
);
1271 * createEmptyElement
1274 * @param parentElement
1275 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1277 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1279 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
) {
1280 EmptyElement element
= new EmptyElement(this, parentElement
, null, SWT
.NULL
);
1282 parentElement
.addElement(element
);
1288 * createHeadlineSection
1291 * @param parentElement
1292 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1295 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1298 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1299 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1300 parentElement
.addElement(section
);
1307 * createParsingMessageElement
1310 * @param parentElement
1311 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1313 * @param parserProblem
1314 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1319 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1322 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1323 ParserProblem parserProblem
, int style
) {
1324 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1326 parentElement
.addElement(element
);
1330 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1331 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1333 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1334 selectionProvider
, style
);
1336 parentElement
.addElement(section
);
1343 * @param definedTermClass
1344 * @param formElement
1348 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
, AbstractCdmDetailSection parentElement
, int style
) {
1349 AbstractCdmDetailElement element
= null;
1351 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1352 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1354 element
= new DefinedTermDetailElement(this, parentElement
);
1358 parentElement
.addElement(element
);
1363 //--------DetailSections---------
1364 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1365 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1366 addAndAdaptSection(parentElement
, section
);
1370 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1371 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1372 addAndAdaptSection(parentElement
, section
);
1376 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1377 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1378 addAndAdaptSection(parentElement
, section
);
1382 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1383 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1384 addAndAdaptSection(parentElement
, section
);
1388 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1389 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1390 addAndAdaptSection(parentElement
, section
);
1394 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1395 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1396 addAndAdaptSection(parentElement
, section
);
1400 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1401 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1402 addAndAdaptSection(parentElement
, section
);
1406 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1407 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1408 addAndAdaptSection(parentElement
, section
);
1412 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1413 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1414 addAndAdaptSection(parentElement
, section
);
1418 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1419 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1420 addAndAdaptSection(parentElement
, section
);
1424 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1425 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1426 addAndAdaptSection(parentElement
, section
);
1430 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1431 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1432 addAndAdaptSection(parentElement
, section
);
1436 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1437 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1438 addAndAdaptSection(parentElement
, section
);
1442 public DerivedUnitFacadeDetailSection
createDerivedUnitFacadeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1443 DerivedUnitFacadeDetailSection section
= new DerivedUnitFacadeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1444 addAndAdaptSection(parentElement
, section
);
1448 public FieldObservationDetailSection
createFieldObservationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1449 FieldObservationDetailSection section
= new FieldObservationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1450 addAndAdaptSection(parentElement
, section
);
1454 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1455 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1456 addAndAdaptSection(parentElement
, section
);
1460 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1461 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1462 addAndAdaptSection(parentElement
, section
);
1466 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1467 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1468 addAndAdaptSection(parentElement
, section
);
1472 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1473 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1474 addAndAdaptSection(parentElement
, section
);
1478 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1479 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1480 addAndAdaptSection(parentElement
, section
);
1484 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1485 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1486 addAndAdaptSection(parentElement
, section
);
1490 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1491 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1492 addAndAdaptSection(parentElement
, section
);
1496 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1497 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1498 addAndAdaptSection(parentElement
, section
);
1502 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1503 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1504 addAndAdaptSection(parentElement
, section
);
1508 public GeneralDetailSection
createGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1509 GeneralDetailSection section
= new GeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1510 addAndAdaptSection(parentElement
, section
);
1514 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1515 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1516 addAndAdaptSection(parentElement
, section
);
1520 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1521 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1522 addAndAdaptSection(parentElement
, section
);
1526 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1527 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1528 addAndAdaptSection(parentElement
, section
);
1532 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1533 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1534 addAndAdaptSection(parentElement
, section
);
1538 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1539 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1540 addAndAdaptSection(parentElement
, section
);
1544 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1545 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1546 addAndAdaptSection(parentElement
, section
);
1550 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1551 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1552 addAndAdaptSection(parentElement
, section
);
1557 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1558 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1559 addAndAdaptSection(parentElement
, section
);
1563 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1564 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1565 addAndAdaptSection(parentElement
, section
);
1569 public GeneralDetailSection
createFOSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1570 GeneralDetailSection section
= new GeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1571 addAndAdaptSection(parentElement
, section
);
1575 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1576 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1577 addAndAdaptSection(parentElement
, section
);
1581 public FieldObservationDetailSection
createFODetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1582 FieldObservationDetailSection section
= new FieldObservationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1583 addAndAdaptSection(parentElement
, section
);
1587 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1588 parentElement
.addElement(section
);
1592 //--------DetailElements------------
1594 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1595 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1596 addAndAdaptElement(parentElement
, element
);
1600 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1601 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1602 addAndAdaptElement(parentElement
, element
);
1606 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1607 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1608 addAndAdaptElement(parentElement
, element
);
1612 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1613 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1614 addAndAdaptElement(parentElement
, element
);
1618 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1619 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1620 addAndAdaptElement(parentElement
, element
);
1624 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1625 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1626 addAndAdaptElement(parentElement
, element
);
1630 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1631 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1632 addAndAdaptElement(parentElement
, element
);
1636 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1637 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1638 addAndAdaptElement(parentElement
, element
);
1642 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1643 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1644 addAndAdaptElement(parentElement
, element
);
1648 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1649 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1650 addAndAdaptElement(parentElement
, element
);
1654 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1655 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1656 addAndAdaptElement(parentElement
, element
);
1660 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1661 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1662 addAndAdaptElement(parentElement
, element
);
1666 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1667 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1668 addAndAdaptElement(parentElement
, element
);
1672 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1673 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1674 addAndAdaptElement(parentElement
, element
);
1678 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1679 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1680 addAndAdaptElement(parentElement
, element
);
1684 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1685 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1686 addAndAdaptElement(parentElement
, element
);
1690 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1691 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1692 addAndAdaptElement(parentElement
, element
);
1696 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1697 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1698 addAndAdaptElement(parentElement
, element
);
1702 public DerivedUnitFacadeDetailElement
createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement
){
1703 DerivedUnitFacadeDetailElement element
= new DerivedUnitFacadeDetailElement(this, parentElement
);
1704 addAndAdaptElement(parentElement
, element
);
1708 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1709 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1710 addAndAdaptElement(parentElement
, element
);
1714 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1715 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1716 addAndAdaptElement(parentElement
, element
);
1720 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1721 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1722 addAndAdaptElement(parentElement
, element
);
1726 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1727 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1728 addAndAdaptElement(parentElement
, element
);
1732 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1733 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1734 addAndAdaptElement(parentElement
, element
);
1738 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1739 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1740 addAndAdaptElement(parentElement
, element
);
1744 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1745 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1746 addAndAdaptElement(parentElement
, element
);
1750 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1751 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1752 addAndAdaptElement(parentElement
, element
);
1756 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1757 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
1758 addAndAdaptElement(parentElement
, element
);
1762 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1763 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
1764 addAndAdaptElement(parentElement
, element
);
1769 public GeneralDetailElement
createGeneralDetailElement(ICdmFormElement parentElement
){
1770 GeneralDetailElement element
= new GeneralDetailElement(this, parentElement
);
1771 addAndAdaptElement(parentElement
, element
);
1775 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
1776 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
1777 addAndAdaptElement(parentElement
, element
);
1781 public GatheringEventDetailElementComposite
createGatheringEventDetailElementComposite(ICdmFormElement parentElement
) {
1782 GatheringEventDetailElementComposite element
= new GatheringEventDetailElementComposite(parentElement
.getLayoutComposite(), this, parentElement
, SWT
.NONE
);
1784 parentElement
.addElement(element
);
1788 public FieldObservationDetailElement
createFieldObservationDetailElement(ICdmFormElement parentElement
) {
1789 FieldObservationDetailElement element
= new FieldObservationDetailElement(this, parentElement
);
1790 addAndAdaptElement(parentElement
, element
);
1794 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
1795 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
1796 addAndAdaptElement(parentElement
, element
);
1800 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
1801 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
1802 addAndAdaptElement(parentElement
, element
);
1807 * @param parentElement
1810 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
1812 parentElement
.addElement(element
);
1815 //--------EntityCollectionSection----------
1816 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1817 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
1818 addAndAdaptSection(parentElement
, section
);
1822 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1823 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
1824 addAndAdaptSection(parentElement
, section
);
1828 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1829 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
1830 addAndAdaptSection(parentElement
, section
);
1834 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1835 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
1836 addAndAdaptSection(parentElement
, section
);
1840 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1841 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
1842 addAndAdaptSection(parentElement
, section
);
1846 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1847 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
1848 addAndAdaptSection(parentElement
, section
);
1852 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1853 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
1854 addAndAdaptSection(parentElement
, section
);
1858 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1859 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
1860 addAndAdaptSection(parentElement
, section
);
1864 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1865 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
1866 addAndAdaptSection(parentElement
, section
);
1870 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1871 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
1872 addAndAdaptSection(parentElement
, section
);
1876 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1877 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
1878 addAndAdaptSection(parentElement
, section
);
1882 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1883 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
1884 addAndAdaptSection(parentElement
, section
);
1888 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1889 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
1890 addAndAdaptSection(parentElement
, section
);
1894 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1895 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
1896 addAndAdaptSection(parentElement
, section
);
1900 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1901 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
1902 addAndAdaptSection(parentElement
, section
);
1906 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1907 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
1908 addAndAdaptSection(parentElement
, section
);
1912 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1913 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
1914 addAndAdaptSection(parentElement
, section
);
1918 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1919 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
1920 addAndAdaptSection(parentElement
, section
);
1924 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1925 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
1926 addAndAdaptSection(parentElement
, section
);
1930 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1931 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
1932 addAndAdaptSection(parentElement
, section
);
1936 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1937 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
1938 addAndAdaptSection(parentElement
, section
);
1942 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1943 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
1944 addAndAdaptSection(parentElement
, section
);
1948 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1949 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
1950 addAndAdaptSection(parentElement
, section
);
1954 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1955 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
1956 addAndAdaptSection(parentElement
, section
);
1960 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1961 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
1962 addAndAdaptSection(parentElement
, section
);
1966 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1967 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
1968 addAndAdaptSection(parentElement
, section
);
1972 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1973 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
1974 addAndAdaptSection(parentElement
, section
);
1978 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1979 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
1980 addAndAdaptSection(parentElement
, section
);
1984 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1985 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
1986 addAndAdaptSection(parentElement
, section
);
1990 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1991 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
1992 addAndAdaptSection(parentElement
, section
);
1996 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1997 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
1998 addAndAdaptSection(parentElement
, section
);
2002 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2003 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2004 addAndAdaptSection(parentElement
, section
);
2008 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2009 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2010 addAndAdaptSection(parentElement
, section
);
2016 * createEntityCollectionElement
2019 * @param removeListener
2020 * a {@link org.eclipse.swt.events.SelectionListener} object.
2023 * @param parentElement
2025 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
2027 * @param versionableEntity
2028 * a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
2030 * @param backgroundColor
2031 * a {@link org.eclipse.swt.graphics.Color} object.
2033 * {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
2036 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2037 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2038 AbstractEntityCollectionElement element
= null;
2040 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2042 if (entity
instanceof Annotation
) {
2043 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2044 } else if (entity
instanceof Person
) {
2045 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2046 } else if (entity
instanceof Credit
) {
2047 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2048 } else if (entity
instanceof Extension
) {
2049 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2050 } else if (entity
instanceof Marker
) {
2051 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2052 } else if (entity
instanceof Media
) {
2053 element
= new MediaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2054 } else if (entity
instanceof MediaRepresentation
) {
2055 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2057 } else if (entity
instanceof ImageFile
) {
2058 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2059 } else if (entity
instanceof MediaRepresentationPart
) {
2060 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2061 removeListener
, style
);
2062 } else if (entity
instanceof NomenclaturalStatus
) {
2063 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2065 } else if (entity
instanceof Rights
) {
2066 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2067 } else if (entity
instanceof DescriptionElementSource
) {
2068 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2069 removeListener
, style
);
2070 } else if (entity
instanceof IdentifiableSource
) {
2071 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2073 } else if (entity
instanceof Scope
) {
2074 element
= new ScopeElement(this, parentElement
, (Scope
) entity
, removeListener
, style
);
2075 } else if (entity
instanceof Modifier
) {
2076 element
= new ModifierElement(this, parentElement
, (Modifier
) entity
, removeListener
, style
);
2077 } else if (entity
instanceof Reference
) {
2078 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2079 } else if (entity
instanceof NameTypeDesignation
) {
2080 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2082 } else if (entity
instanceof NameRelationship
) {
2083 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2085 } else if (entity
instanceof SpecimenTypeDesignation
) {
2086 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2087 removeListener
, style
);
2088 } else if (entity
instanceof StateData
) {
2089 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2090 } else if (entity
instanceof StatisticalMeasurementValue
) {
2091 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2092 removeListener
, style
);
2093 } else if (entity
instanceof DerivedUnit
) {
2094 element
= new DerivedUnitElement(this, parentElement
, (DerivedUnit
) entity
, removeListener
, style
);
2095 } else if (entity
instanceof NamedArea
) {
2096 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2097 } else if (entity
instanceof DeterminationEvent
) {
2098 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
,
2099 removeListener
, style
);
2100 } else if (entity
instanceof Specimen
) {
2101 element
= new SpecimenCollectionDetailElement(this, parentElement
, (Specimen
) entity
, removeListener
, style
);
2102 } else if (entity
instanceof User
) {
2103 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2104 } else if (entity
instanceof GrantedAuthority
) {
2105 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2106 removeListener
, style
);
2107 } else if (entity
instanceof Group
) {
2108 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2109 } else if (entity
instanceof Taxon
) {
2110 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2111 } else if (entity
instanceof DescriptionElementBase
) {
2112 // this is the special case for protologs, maybe we can do this
2113 // differently when API improves
2114 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2115 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2116 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2120 if (element
== null) {
2121 AbstractUtility
.errorDialog("No element for entity", this,
2122 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2126 else if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2127 element
.setPersistentBackground(backgroundColor
);
2131 parentElement
.addElement(element
);
2137 * Creates a selection element for the given type T.
2140 * <strong>Selection elements not handled by this method:</strong>
2142 * <li>{@link TaxonNodeSelectionElement} see
2143 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2145 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2146 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2152 * a {@link Class} object of the type that you want the selection
2154 * @param parentElement
2155 * a {@link ICdmFormElement} object.
2156 * @param labelString
2157 * a {@link String} object.
2158 * @param selectionType
2160 * a {@link ICdmBase} object.
2163 * @param conversation
2164 * a {@link ConversationHolder} object.
2165 * @return a {@link EntitySelectionElement} object.
2167 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2168 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2170 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2171 labelString
, selection
, mode
, style
);
2173 parentElement
.addElement(element
);
2177 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2178 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2179 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2180 labelString
, selection
, mode
, style
);
2182 parentElement
.addElement(element
);
2186 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2187 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2188 int mode
, int style
) {
2189 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2190 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2192 parentElement
.addElement(element
);
2196 /** {@inheritDoc} */
2197 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2198 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2199 adapt(labelElement
);
2200 parentElement
.addElement(labelElement
);
2201 return labelElement
;
2206 * Getter for the field <code>selectionProvider</code>.
2209 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2211 public ISelectionProvider
getSelectionProvider() {
2212 return selectionProvider
;
2217 * createDetailedDescriptionDetailElement
2220 * @param parentElement
2221 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2225 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2230 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2233 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2234 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2235 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2237 if (entity
instanceof CategoricalData
) {
2238 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2239 (CategoricalData
) entity
, style
);
2240 } else if (entity
instanceof CommonTaxonName
) {
2241 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2243 } else if (entity
instanceof Distribution
) {
2244 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2246 } else if (entity
instanceof IndividualsAssociation
) {
2247 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2248 (IndividualsAssociation
) entity
, style
);
2249 } else if (entity
instanceof QuantitativeData
) {
2250 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2251 (QuantitativeData
) entity
, style
);
2252 } else if (entity
instanceof TaxonInteraction
) {
2253 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2254 (TaxonInteraction
) entity
, style
);
2255 } else if (entity
instanceof TextData
) {
2256 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2258 throw new IllegalStateException("There is no interface for the given description element");
2260 adapt(detailedDescriptionElement
);
2261 parentElement
.addElement(detailedDescriptionElement
);
2262 return detailedDescriptionElement
;
2267 * Creates a styled text as a part of the form.
2272 * the text initial value
2275 * @return the text widget
2277 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2278 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2279 if (value
!= null) {
2280 text
.setText(value
);
2282 text
.setForeground(getColors().getForeground());
2283 text
.setBackground(getColors().getBackground());
2284 // text.addFocusListener(visibilityHandler);
2289 * @param formFactory
2290 * @param parentElement
2293 private static void addAndAdapt(FormToolkit formFactory
, ICdmFormElement parentElement
, TextWithLabelComposite element
) {
2294 if(formFactory
instanceof CdmFormFactory
){
2295 ((CdmFormFactory
) formFactory
).adapt(element
);
2296 parentElement
.addElement(element
);
2301 * @wbp.factory.parameter.source formFactory formFactory
2302 * @wbp.factory.parameter.source parentFormElement parentFormElement
2303 * @wbp.factory.parameter.source labelString "Elevation Minimum (m)"
2304 * @wbp.factory.parameter.source initialText (java.lang.String) null
2305 * @wbp.factory.parameter.source textHeight (java.lang.Integer) null
2306 * @wbp.factory.parameter.source style 0
2308 public static TextWithLabelComposite
createTextWithLabelComposite(Composite parent
, FormToolkit formFactory
, ICdmFormElement parentFormElement
, String labelString
, String initialText
, Integer textHeight
, int style
) {
2309 TextWithLabelComposite textWithLabelComposite
= new TextWithLabelComposite(parent
, formFactory
, parentFormElement
, labelString
, initialText
, textHeight
, style
);
2310 // addAndAdapt(formFactory, parentFormElement, textWithLabelComposite);
2311 return textWithLabelComposite
;
2315 * @wbp.factory.parameter.source formFactory getFormFactory()
2316 * @wbp.factory.parameter.source parentElement parentFormElement
2317 * @wbp.factory.parameter.source labelString "Elevation Minimum (m)"
2318 * @wbp.factory.parameter.source initialFloat new java.lang.Float(0)
2319 * @wbp.factory.parameter.source style org.eclipse.swt.SWT.NONE
2321 public static NumberWithLabelElementComposite
createNumberWithLabelElementComposite(Composite parent
, FormToolkit formFactory
, ICdmFormElement parentElement
, String labelString
, Float initialFloat
, int style
) {
2322 NumberWithLabelElementComposite numberWithLabelElementComposite
= new NumberWithLabelElementComposite(parent
, formFactory
, parentElement
, labelString
, initialFloat
, style
);
2323 return numberWithLabelElementComposite
;