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
.api
.facade
.DerivedUnitFacade
;
45 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
46 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
47 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
48 import eu
.etaxonomy
.cdm
.model
.common
.Annotation
;
49 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
50 import eu
.etaxonomy
.cdm
.model
.common
.Credit
;
51 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
52 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
53 import eu
.etaxonomy
.cdm
.model
.common
.Extension
;
54 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
55 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
56 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
57 import eu
.etaxonomy
.cdm
.model
.common
.IEnumTerm
;
58 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableSource
;
59 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
60 import eu
.etaxonomy
.cdm
.model
.common
.LanguageString
;
61 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
62 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
63 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
64 import eu
.etaxonomy
.cdm
.model
.common
.User
;
65 import eu
.etaxonomy
.cdm
.model
.common
.VersionableEntity
;
66 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
67 import eu
.etaxonomy
.cdm
.model
.description
.CommonTaxonName
;
68 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
69 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementSource
;
70 import eu
.etaxonomy
.cdm
.model
.description
.Distribution
;
71 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
72 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
73 import eu
.etaxonomy
.cdm
.model
.description
.KeyStatement
;
74 import eu
.etaxonomy
.cdm
.model
.description
.QuantitativeData
;
75 import eu
.etaxonomy
.cdm
.model
.description
.StateData
;
76 import eu
.etaxonomy
.cdm
.model
.description
.StatisticalMeasurementValue
;
77 import eu
.etaxonomy
.cdm
.model
.description
.TaxonInteraction
;
78 import eu
.etaxonomy
.cdm
.model
.description
.TextData
;
79 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
80 import eu
.etaxonomy
.cdm
.model
.location
.NamedAreaLevel
;
81 import eu
.etaxonomy
.cdm
.model
.location
.Point
;
82 import eu
.etaxonomy
.cdm
.model
.media
.ImageFile
;
83 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
84 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentation
;
85 import eu
.etaxonomy
.cdm
.model
.media
.MediaRepresentationPart
;
86 import eu
.etaxonomy
.cdm
.model
.media
.Rights
;
87 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
88 import eu
.etaxonomy
.cdm
.model
.name
.NameTypeDesignation
;
89 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
90 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
91 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
92 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
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
.element
.MinMaxTextSection
.UnitType
;
101 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.IOpenUrlEnabled
;
102 import eu
.etaxonomy
.taxeditor
.ui
.openurl
.OpenUrlSelectorElement
;
103 import eu
.etaxonomy
.taxeditor
.ui
.password
.EditPasswordElement
;
104 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
105 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailSection
;
106 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionElement
;
107 import eu
.etaxonomy
.taxeditor
.ui
.section
.EmptyElement
;
108 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailElement
;
109 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.InstitutionDetailSection
;
110 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailElement
;
111 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
112 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailElement
;
113 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberElement
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamMemberSection
;
116 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaElement
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailElement
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailSection
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldObservationDetailElement
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldObservationDetailSection
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
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 public void adapt(Composite composite
) {
404 composite
.addMouseListener(selectionMouseHandler
);
405 super.adapt(composite
);
410 * Adapts the {@link AbstractCdmFormElement}:<br>
411 * - sets the {@link IPropertyChangeListener}s handled by this class
416 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
419 public void adapt(AbstractCdmFormElement formElement
) {
420 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
425 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
427 control
.addFocusListener(selectionFocusHandler
);
429 super.adapt(control
, trackFocus
, trackKeyboard
);
438 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
441 public void destroyElement(ICdmFormElement formElement
) {
442 // return if element was not initialized
443 if (formElement
== null) {
446 // destroy selection arbitrator, if any
447 if (formElement
instanceof ISelectableElement
) {
448 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
450 // remove this element form its parents list of elements
451 // ICdmFormElement parentElement = formElement.getParentElement();
452 // if(parentElement != null){
453 // parentElement.removeElement(formElement);
455 // call destroy on child elements recursively
456 for (ICdmFormElement childElement
: formElement
.getElements()) {
457 destroyElement(childElement
);
459 // dispose of the controls
460 for (Control control
: formElement
.getControls()) {
461 // we added the layoutComposite of the parental element as the
462 // layout composite to this formElement
463 // but we do not want to destroy it.
464 if (control
.equals(formElement
.getLayoutComposite())) {
479 * a {@link org.eclipse.swt.widgets.Composite} object.
480 * @return a {@link org.eclipse.swt.widgets.Label} object.
482 public Label
createEmptyCell(Composite parent
) {
483 return this.createLabel(parent
, null);
488 * createMultilineTextWithLabel
492 * a {@link java.lang.String} object.
497 * @param parentElement
498 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
500 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
503 public TextWithLabelElement
createMultilineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
504 int textHeight
, int style
) {
505 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, style
);
507 parentElement
.addElement(element
);
513 * createMultiLanguageTextElement
516 * @param parentElement
517 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
520 * a {@link java.lang.String} object.
521 * @param multilanguageText
522 * a {@link java.util.Map} object.
528 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
531 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
532 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
533 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
534 multilanguageText
, textHeight
, style
);
536 parentElement
.addElement(element
);
540 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
541 KeyStatement keyStatement
, int textHeight
, int style
) {
542 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
545 parentElement
.addElement(element
);
551 * createTextWithLabelElement
555 * a {@link java.lang.String} object.
557 * a {@link java.lang.String} object.
560 * @param parentElement
561 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
563 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
566 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
567 String initialText
, int style
) {
568 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
571 parentElement
.addElement(element
);
575 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
576 URI initialUri
, int style
) {
577 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
579 parentElement
.addElement(element
);
590 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
591 IOpenUrlEnabled openUrlEnabled
, int style
) {
592 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
595 parentElement
.addElement(element
);
601 * @param parentElement
603 * @param conversationEnabled
608 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
609 ConversationHolder conversation
, User user
, int style
) {
610 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
612 parentElement
.addElement(element
);
618 * createIntegerTextWithLabelElement
621 * @param parentElement
622 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
625 * a {@link java.lang.String} object.
626 * @param initialInteger
627 * a {@link java.lang.Integer} object.
631 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
634 public NumberWithLabelElement
createNumberTextWithLabelElement(
635 ICdmFormElement parentElement
, String labelString
,
636 Number initialNumber
, int style
) {
637 NumberWithLabelElement element
= new NumberWithLabelElement(this,
638 parentElement
, labelString
, initialNumber
, style
);
640 parentElement
.addElement(element
);
647 * createLanguageStringWithLabelElement
650 * @param parentElement
651 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
654 * a {@link java.lang.String} object.
655 * @param languageString
656 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
660 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
663 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
664 String labelString
, LanguageString languageString
, int style
) {
665 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
666 languageString
, style
);
668 parentElement
.addElement(element
);
674 * createLanguageStringWithLabelElement
677 * @param parentElement
678 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
681 * a {@link java.lang.String} object.
682 * @param languageString
683 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
689 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
692 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
693 String labelString
, LanguageString languageString
, int height
, int style
) {
694 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
695 languageString
, height
, style
);
697 parentElement
.addElement(element
);
706 * @param parentElement
707 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
710 * a {@link java.lang.String} object.
713 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
716 public TextWithLabelElement
createTextElement(ICdmFormElement parentElement
, String initialText
, int style
) {
717 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, null, initialText
, null, style
);
719 parentElement
.addElement(element
);
725 * createKeyValueViewerElement
728 * @param parentElement
729 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
732 * a {@link java.lang.String} object.
733 * @param valueHeading
734 * a {@link java.lang.String} object.
736 * a {@link java.util.Map} object.
737 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
740 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
741 String valueHeading
, Map
<Object
, Object
> map
) {
742 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
744 parentElement
.addElement(element
);
750 * createTermComboElement
753 * @param termComboType
755 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
757 * @param parentElement
758 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
761 * a {@link java.lang.String} object.
763 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
767 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
771 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
772 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
773 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
776 parentElement
.addElement(element
);
782 * createTermComboElement
785 * @param termComboType
787 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
789 * @param parentElement
790 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
793 * a {@link java.lang.String} object.
795 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
799 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
803 public <T
extends DefinedTermBase
> TermComboElement
<T
> createDefinedTermComboElement(
805 ICdmFormElement parentElement
,
809 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termType
, labelString
, selection
, style
);
811 parentElement
.addElement(element
);
817 * createEnumComboElement
820 * @param enumComboType
822 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
824 * @param parentElement
825 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
829 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
832 public <T
extends IEnumTerm
> EnumComboElement
<T
> createEnumComboElement(
833 Class
<T
> enumComboType
, ICdmFormElement parentElement
,
835 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
837 parentElement
.addElement(element
);
843 * createBrowserElement
847 * a {@link java.net.URI} object.
850 * @param parentElement
851 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
853 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
856 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
857 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
859 parentElement
.addElement(element
);
868 * @param parentElement
869 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
872 * a {@link java.net.URI} object.
875 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
877 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
878 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
880 parentElement
.addElement(element
);
886 * createTextActionElement
890 * a {@link java.lang.String} object.
892 * a {@link java.lang.String} object.
895 * @param parentElement
896 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
899 * a {@link java.lang.String} object.
900 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
903 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
904 String buttonLabel
, String initialText
, int style
) {
905 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
908 parentElement
.addElement(element
);
917 * @param parentElement
918 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
921 * a {@link java.lang.String} object.
922 * @param initialState
926 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
929 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, boolean initialState
, int style
) {
930 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
932 parentElement
.addElement(element
);
937 * Creates a section as a part of the form.
939 * @return the section widget
942 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
945 public Section
adapt(AbstractFormSection section
) {
946 section
.setMenu(section
.getLayoutComposite().getMenu());
947 adapt(section
, true, true);
949 // handle focus and property change events for cdm use
950 section
.addFocusListener(selectionFocusHandler
);
951 section
.setPropertyChangeListeners(propertyChangeListeners
);
953 if (section
.getToggle() != null) {
954 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
955 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
958 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
960 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
961 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
962 getColors().initializeSectionToolBarColors();
963 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
964 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
966 // call setTitleBarForeground regardless as it also sets the label color
967 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
971 private class BoldFontHolder2
{
972 private Font normalFont
;
974 private Font boldFont
;
976 public BoldFontHolder2() {
979 public Font
getBoldFont(Font font
) {
980 createBoldFont(font
);
984 private void createBoldFont(Font font
) {
985 if (normalFont
== null || !normalFont
.equals(font
)) {
989 if (boldFont
== null) {
990 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
994 public void dispose() {
995 if (boldFont
!= null) {
996 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1004 * createToggleableTextField
1007 * @param parentElement
1008 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1010 * @param labelString
1011 * a {@link java.lang.String} object.
1012 * @param initialText
1013 * a {@link java.lang.String} object.
1014 * @param initialState
1018 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1021 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1022 String initialText
, boolean initialState
, int style
) {
1023 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1024 initialState
, style
| orientation
);
1026 parentElement
.addElement(element
);
1032 * createTimePeriodElement
1035 * @param parentElement
1036 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1038 * @param labelString
1039 * a {@link java.lang.String} object.
1041 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1044 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1047 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1048 TimePeriod timePeriod
, int style
) {
1049 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1051 parentElement
.addElement(element
);
1057 * createGatheringEventUnitElement
1060 * @param parentElement
1061 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1063 * @param labelString
1064 * a {@link java.lang.String} object.
1066 * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
1069 * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
1072 public GatheringEventUnitElement
createGatheringEventUnitElement(
1073 ICdmFormElement parentElement
,
1075 DerivedUnitFacade gatheringEvent
,
1076 MinMaxTextSection
.UnitType unitType
,
1078 GatheringEventUnitElement element
= new GatheringEventUnitElement(this,
1085 parentElement
.addElement(element
);
1091 * createPointElement
1096 * @param parentElement
1097 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1100 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1101 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1103 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1104 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1106 parentElement
.addElement(element
);
1112 * createDateDetailSection
1115 * @param parentElement
1116 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1120 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1123 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1124 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1125 parentElement
.addElement(section
);
1132 * createDateDetailSection
1135 * @param parentElement
1136 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1140 * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
1143 public MinMaxTextSection
createMinMaxTextSection(ICdmFormElement parentElement
, UnitType unitType
, int style
) {
1144 MinMaxTextSection section
= new MinMaxTextSection(this, parentElement
, unitType
, style
);
1145 parentElement
.addElement(section
);
1152 * createPartialElement
1155 * @param parentElement
1156 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1158 * @param labelString
1159 * a {@link java.lang.String} object.
1161 * a {@link org.joda.time.Partial} object.
1164 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1167 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1169 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1171 parentElement
.addElement(element
);
1177 * addSelectionListener
1181 * a {@link org.eclipse.swt.events.SelectionListener} object.
1183 public void addSelectionListener(SelectionListener listener
) {
1184 selectionListenerList
.add(listener
);
1189 * removeSelectionListener
1193 * a {@link org.eclipse.swt.events.SelectionListener} object.
1195 public void removeSelectionListener(SelectionListener listener
) {
1196 if (listener
== null) {
1197 AbstractUtility
.error(this.getClass(),
1198 "Tried to remove a selection listener from this factories listeners but was null", null);
1200 selectionListenerList
.remove(listener
);
1206 * addPropertyChangeListener
1210 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1213 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1214 if(propertyChangeListeners
.contains(listener
)){
1217 propertyChangeListeners
.add(0, listener
);
1222 * removePropertyChangeListener
1226 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1229 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1230 propertyChangeListeners
.remove(listener
);
1235 * createHorizontalSeparator
1238 * @param parentElement
1239 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1243 * @return a {@link org.eclipse.swt.widgets.Label} object.
1245 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1246 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1247 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1253 * createVersionElement
1256 * @param parentElement
1257 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1260 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1265 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1268 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1269 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1271 parentElement
.addElement(element
);
1276 * @param cdmBaseSection
1281 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1282 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1284 parentElement
.addElement(element
);
1291 * createVersionSection
1294 * @param parentElement
1295 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1300 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1303 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1304 VersionSection section
= new VersionSection(this, parentElement
, style
);
1305 parentElement
.addElement(section
);
1315 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1316 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1317 parentElement
.addElement(section
);
1324 * createEmptyElement
1327 * @param parentElement
1328 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1330 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1332 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
) {
1333 EmptyElement element
= new EmptyElement(this, parentElement
, null, SWT
.NULL
);
1335 parentElement
.addElement(element
);
1341 * createHeadlineSection
1344 * @param parentElement
1345 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1348 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1351 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1352 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1353 parentElement
.addElement(section
);
1360 * createParsingMessageElement
1363 * @param parentElement
1364 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1366 * @param parserProblem
1367 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1372 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1375 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1376 ParserProblem parserProblem
, int style
) {
1377 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1379 parentElement
.addElement(element
);
1383 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1384 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1386 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1387 selectionProvider
, style
);
1389 parentElement
.addElement(section
);
1396 * @param definedTermClass
1397 * @param formElement
1401 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
, AbstractCdmDetailSection parentElement
, int style
) {
1402 AbstractCdmDetailElement element
= null;
1404 if (NamedArea
.class.isAssignableFrom(definedTermClass
)){
1405 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1407 element
= new DefinedTermDetailElement(this, parentElement
);
1411 parentElement
.addElement(element
);
1416 //--------DetailSections---------
1417 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1418 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1419 addAndAdaptSection(parentElement
, section
);
1423 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1424 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1425 addAndAdaptSection(parentElement
, section
);
1429 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1430 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1431 addAndAdaptSection(parentElement
, section
);
1435 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1436 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1437 addAndAdaptSection(parentElement
, section
);
1441 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1442 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1443 addAndAdaptSection(parentElement
, section
);
1447 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1448 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1449 addAndAdaptSection(parentElement
, section
);
1453 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1454 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1455 addAndAdaptSection(parentElement
, section
);
1459 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1460 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1461 addAndAdaptSection(parentElement
, section
);
1465 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1466 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1467 addAndAdaptSection(parentElement
, section
);
1471 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1472 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1473 addAndAdaptSection(parentElement
, section
);
1477 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1478 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1479 addAndAdaptSection(parentElement
, section
);
1483 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1484 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1485 addAndAdaptSection(parentElement
, section
);
1489 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1490 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1491 addAndAdaptSection(parentElement
, section
);
1495 public DerivedUnitFacadeDetailSection
createDerivedUnitFacadeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1496 DerivedUnitFacadeDetailSection section
= new DerivedUnitFacadeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1497 addAndAdaptSection(parentElement
, section
);
1501 public FieldObservationDetailSection
createFieldObservationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1502 FieldObservationDetailSection section
= new FieldObservationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1503 addAndAdaptSection(parentElement
, section
);
1507 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1508 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1509 addAndAdaptSection(parentElement
, section
);
1513 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1514 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1515 addAndAdaptSection(parentElement
, section
);
1519 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1520 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1521 addAndAdaptSection(parentElement
, section
);
1525 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1526 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1527 addAndAdaptSection(parentElement
, section
);
1531 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1532 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1533 addAndAdaptSection(parentElement
, section
);
1537 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1538 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1539 addAndAdaptSection(parentElement
, section
);
1543 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1544 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1545 addAndAdaptSection(parentElement
, section
);
1549 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1550 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1551 addAndAdaptSection(parentElement
, section
);
1555 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1556 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1557 addAndAdaptSection(parentElement
, section
);
1561 public GeneralDetailSection
createGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1562 GeneralDetailSection section
= new GeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1563 addAndAdaptSection(parentElement
, section
);
1567 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1568 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1569 addAndAdaptSection(parentElement
, section
);
1573 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1574 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1575 addAndAdaptSection(parentElement
, section
);
1579 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1580 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1581 addAndAdaptSection(parentElement
, section
);
1585 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1586 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1587 addAndAdaptSection(parentElement
, section
);
1591 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1592 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1593 addAndAdaptSection(parentElement
, section
);
1597 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1598 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1599 addAndAdaptSection(parentElement
, section
);
1603 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1604 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1605 addAndAdaptSection(parentElement
, section
);
1610 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1611 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1612 addAndAdaptSection(parentElement
, section
);
1616 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1617 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1618 addAndAdaptSection(parentElement
, section
);
1622 public GeneralDetailSection
createFOSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1623 GeneralDetailSection section
= new GeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1624 addAndAdaptSection(parentElement
, section
);
1628 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1629 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1630 addAndAdaptSection(parentElement
, section
);
1634 public FieldObservationDetailSection
createFODetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1635 FieldObservationDetailSection section
= new FieldObservationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1636 addAndAdaptSection(parentElement
, section
);
1640 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1641 parentElement
.addElement(section
);
1645 //--------DetailElements------------
1647 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1648 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1649 addAndAdaptElement(parentElement
, element
);
1653 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1654 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1655 addAndAdaptElement(parentElement
, element
);
1659 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1660 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1661 addAndAdaptElement(parentElement
, element
);
1665 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1666 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1667 addAndAdaptElement(parentElement
, element
);
1671 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1672 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1673 addAndAdaptElement(parentElement
, element
);
1677 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1678 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1679 addAndAdaptElement(parentElement
, element
);
1683 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1684 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1685 addAndAdaptElement(parentElement
, element
);
1689 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1690 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1691 addAndAdaptElement(parentElement
, element
);
1695 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1696 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1697 addAndAdaptElement(parentElement
, element
);
1701 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1702 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1703 addAndAdaptElement(parentElement
, element
);
1707 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1708 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1709 addAndAdaptElement(parentElement
, element
);
1713 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1714 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1715 addAndAdaptElement(parentElement
, element
);
1719 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1720 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1721 addAndAdaptElement(parentElement
, element
);
1725 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1726 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1727 addAndAdaptElement(parentElement
, element
);
1731 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1732 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1733 addAndAdaptElement(parentElement
, element
);
1737 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1738 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1739 addAndAdaptElement(parentElement
, element
);
1743 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1744 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1745 addAndAdaptElement(parentElement
, element
);
1749 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1750 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1751 addAndAdaptElement(parentElement
, element
);
1755 public DerivedUnitFacadeDetailElement
createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement
){
1756 DerivedUnitFacadeDetailElement element
= new DerivedUnitFacadeDetailElement(this, parentElement
);
1757 addAndAdaptElement(parentElement
, element
);
1761 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1762 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1763 addAndAdaptElement(parentElement
, element
);
1767 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1768 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1769 addAndAdaptElement(parentElement
, element
);
1773 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1774 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1775 addAndAdaptElement(parentElement
, element
);
1779 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1780 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1781 addAndAdaptElement(parentElement
, element
);
1785 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1786 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1787 addAndAdaptElement(parentElement
, element
);
1791 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1792 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1793 addAndAdaptElement(parentElement
, element
);
1797 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1798 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1799 addAndAdaptElement(parentElement
, element
);
1803 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1804 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1805 addAndAdaptElement(parentElement
, element
);
1809 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1810 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
1811 addAndAdaptElement(parentElement
, element
);
1815 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1816 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
1817 addAndAdaptElement(parentElement
, element
);
1822 public GeneralDetailElement
createGeneralDetailElement(ICdmFormElement parentElement
){
1823 GeneralDetailElement element
= new GeneralDetailElement(this, parentElement
);
1824 addAndAdaptElement(parentElement
, element
);
1828 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
1829 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
1830 addAndAdaptElement(parentElement
, element
);
1834 public FieldObservationDetailElement
createFieldObservationDetailElement(ICdmFormElement parentElement
) {
1835 FieldObservationDetailElement element
= new FieldObservationDetailElement(this, parentElement
);
1836 addAndAdaptElement(parentElement
, element
);
1840 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
1841 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
1842 addAndAdaptElement(parentElement
, element
);
1846 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
1847 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
1848 addAndAdaptElement(parentElement
, element
);
1853 * @param parentElement
1856 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
1858 parentElement
.addElement(element
);
1861 //--------EntityCollectionSection----------
1862 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1863 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
1864 addAndAdaptSection(parentElement
, section
);
1868 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1869 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
1870 addAndAdaptSection(parentElement
, section
);
1874 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1875 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
1876 addAndAdaptSection(parentElement
, section
);
1880 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1881 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
1882 addAndAdaptSection(parentElement
, section
);
1886 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1887 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
1888 addAndAdaptSection(parentElement
, section
);
1892 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1893 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
1894 addAndAdaptSection(parentElement
, section
);
1898 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1899 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
1900 addAndAdaptSection(parentElement
, section
);
1904 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1905 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
1906 addAndAdaptSection(parentElement
, section
);
1910 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1911 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
1912 addAndAdaptSection(parentElement
, section
);
1916 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1917 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
1918 addAndAdaptSection(parentElement
, section
);
1922 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1923 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
1924 addAndAdaptSection(parentElement
, section
);
1928 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1929 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
1930 addAndAdaptSection(parentElement
, section
);
1934 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1935 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
1936 addAndAdaptSection(parentElement
, section
);
1940 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1941 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
1942 addAndAdaptSection(parentElement
, section
);
1946 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1947 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
1948 addAndAdaptSection(parentElement
, section
);
1952 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1953 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
1954 addAndAdaptSection(parentElement
, section
);
1958 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1959 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
1960 addAndAdaptSection(parentElement
, section
);
1964 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1965 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
1966 addAndAdaptSection(parentElement
, section
);
1970 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1971 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
1972 addAndAdaptSection(parentElement
, section
);
1976 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1977 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
1978 addAndAdaptSection(parentElement
, section
);
1982 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1983 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
1984 addAndAdaptSection(parentElement
, section
);
1988 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1989 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
1990 addAndAdaptSection(parentElement
, section
);
1994 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1995 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
1996 addAndAdaptSection(parentElement
, section
);
2000 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2001 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
2002 addAndAdaptSection(parentElement
, section
);
2006 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2007 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
2008 addAndAdaptSection(parentElement
, section
);
2012 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2013 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
2014 addAndAdaptSection(parentElement
, section
);
2018 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2019 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
2020 addAndAdaptSection(parentElement
, section
);
2024 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2025 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
2026 addAndAdaptSection(parentElement
, section
);
2030 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2031 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
2032 addAndAdaptSection(parentElement
, section
);
2036 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2037 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
2038 addAndAdaptSection(parentElement
, section
);
2042 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2043 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2044 addAndAdaptSection(parentElement
, section
);
2048 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2049 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2050 addAndAdaptSection(parentElement
, section
);
2054 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2055 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2056 addAndAdaptSection(parentElement
, section
);
2062 * createEntityCollectionElement
2065 * @param removeListener
2066 * a {@link org.eclipse.swt.events.SelectionListener} object.
2069 * @param parentElement
2071 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
2073 * @param versionableEntity
2074 * a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
2076 * @param backgroundColor
2077 * a {@link org.eclipse.swt.graphics.Color} object.
2079 * {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
2082 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2083 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2084 AbstractEntityCollectionElement element
= null;
2086 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2088 if (entity
instanceof Annotation
) {
2089 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2090 } else if (entity
instanceof Person
) {
2091 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2092 } else if (entity
instanceof Credit
) {
2093 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2094 } else if (entity
instanceof Extension
) {
2095 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2096 } else if (entity
instanceof Marker
) {
2097 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2098 } else if (entity
instanceof Media
) {
2099 element
= new MediaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2100 } else if (entity
instanceof MediaRepresentation
) {
2101 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2103 } else if (entity
instanceof ImageFile
) {
2104 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2105 } else if (entity
instanceof MediaRepresentationPart
){
2106 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2107 removeListener
, style
);
2108 } else if (entity
instanceof NomenclaturalStatus
) {
2109 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2111 } else if (entity
instanceof Rights
) {
2112 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2113 } else if (entity
instanceof DescriptionElementSource
) {
2114 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2115 removeListener
, style
);
2116 } else if (entity
instanceof IdentifiableSource
) {
2117 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2119 } else if (entity
instanceof DefinedTerm
) {
2120 switch(((DefinedTerm
)entity
).getTermType()) {
2122 element
= new ScopeElement(this,
2124 (DefinedTerm
) entity
,
2129 element
= new ModifierElement(this,
2131 (DefinedTerm
) entity
,
2136 //FIXME : Actually we should through an exception here
2141 } else if (entity
instanceof Reference
) {
2142 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2143 } else if (entity
instanceof NameTypeDesignation
) {
2144 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2146 } else if (entity
instanceof NameRelationship
) {
2147 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2149 } else if (entity
instanceof SpecimenTypeDesignation
) {
2150 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2151 removeListener
, style
);
2152 } else if (entity
instanceof StateData
) {
2153 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2154 } else if (entity
instanceof StatisticalMeasurementValue
) {
2155 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2156 removeListener
, style
);
2157 } else if (entity
instanceof DerivedUnit
) {
2158 switch(((DerivedUnit
)entity
).getRecordBasis()) {
2159 case LivingSpecimen
:
2160 case PreservedSpecimen
:
2162 element
= new SpecimenCollectionDetailElement(this,
2164 (DerivedUnit
) entity
,
2169 element
= new DerivedUnitElement(this,
2171 (DerivedUnit
) entity
,
2176 } else if (entity
instanceof NamedArea
) {
2177 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2178 } else if (entity
instanceof DeterminationEvent
) {
2179 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
,
2180 removeListener
, style
);
2181 } else if (entity
instanceof User
) {
2182 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2183 } else if (entity
instanceof GrantedAuthority
) {
2184 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2185 removeListener
, style
);
2186 } else if (entity
instanceof Group
) {
2187 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2188 } else if (entity
instanceof Taxon
) {
2189 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2190 } else if (entity
instanceof DescriptionElementBase
) {
2191 // this is the special case for protologs, maybe we can do this
2192 // differently when API improves
2193 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2194 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2195 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2199 if (element
== null) {
2200 AbstractUtility
.errorDialog("No element for entity", this,
2201 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2206 else if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2207 element
.setPersistentBackground(backgroundColor
);
2211 parentElement
.addElement(element
);
2217 * Creates a selection element for the given type T.
2220 * <strong>Selection elements not handled by this method:</strong>
2222 * <li>{@link TaxonNodeSelectionElement} see
2223 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2225 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2226 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2232 * a {@link Class} object of the type that you want the selection
2234 * @param parentElement
2235 * a {@link ICdmFormElement} object.
2236 * @param labelString
2237 * a {@link String} object.
2238 * @param selectionType
2240 * a {@link ICdmBase} object.
2243 * @param conversation
2244 * a {@link ConversationHolder} object.
2245 * @return a {@link EntitySelectionElement} object.
2247 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2248 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2250 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2251 labelString
, selection
, mode
, style
);
2253 parentElement
.addElement(element
);
2257 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2258 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2259 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2260 labelString
, selection
, mode
, style
);
2262 parentElement
.addElement(element
);
2266 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2267 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2268 int mode
, int style
) {
2269 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2270 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2272 parentElement
.addElement(element
);
2277 /** {@inheritDoc} */
2278 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2279 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2280 adapt(labelElement
);
2281 parentElement
.addElement(labelElement
);
2282 return labelElement
;
2287 * Getter for the field <code>selectionProvider</code>.
2290 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2292 public ISelectionProvider
getSelectionProvider() {
2293 return selectionProvider
;
2298 * createDetailedDescriptionDetailElement
2301 * @param parentElement
2302 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2306 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2311 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2314 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2315 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2316 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2318 if (entity
instanceof CategoricalData
) {
2319 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2320 (CategoricalData
) entity
, style
);
2321 } else if (entity
instanceof CommonTaxonName
) {
2322 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2324 } else if (entity
instanceof Distribution
) {
2325 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2327 } else if (entity
instanceof IndividualsAssociation
) {
2328 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2329 (IndividualsAssociation
) entity
, style
);
2330 } else if (entity
instanceof QuantitativeData
) {
2331 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2332 (QuantitativeData
) entity
, style
);
2333 } else if (entity
instanceof TaxonInteraction
) {
2334 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2335 (TaxonInteraction
) entity
, style
);
2336 } else if (entity
instanceof TextData
) {
2337 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2339 throw new IllegalStateException("There is no interface for the given description element");
2341 adapt(detailedDescriptionElement
);
2342 parentElement
.addElement(detailedDescriptionElement
);
2343 return detailedDescriptionElement
;
2348 * Creates a styled text as a part of the form.
2353 * the text initial value
2356 * @return the text widget
2358 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2359 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2360 if (value
!= null) {
2361 text
.setText(value
);
2363 text
.setForeground(getColors().getForeground());
2364 text
.setBackground(getColors().getBackground());
2365 // text.addFocusListener(visibilityHandler);