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
.DeterminationEventDetailElementComposite
;
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
.GatheringEventDetailElementComposite
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeneralDetailElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeneralDetailSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
256 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
260 * CdmFormFactory class.
264 * @created Feb 24, 2010
267 public class CdmFormFactory
extends FormToolkit
{
269 private BoldFontHolder2 boldFontHolder2
;
270 private MouseListener selectionMouseHandler
;
271 private FocusListener selectionFocusHandler
;
273 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
275 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
277 private final int orientation
= Window
.getDefaultOrientation();
278 private ISelectionProvider selectionProvider
;
280 /** Constant <code>EMPTY_SELECTION</code> */
281 public static ISelection EMPTY_SELECTION
= new ISelection() {
283 public boolean isEmpty() {
294 private class SelectionMouseHandler
extends MouseAdapter
{
296 public void mouseDown(MouseEvent e
) {
297 notifySelectionListeners(e
);
307 private class SelectionFocusHandler
extends FocusAdapter
{
309 public void focusGained(FocusEvent e
) {
310 notifySelectionListeners(e
);
314 private void notifySelectionListeners(TypedEvent e
) {
315 Event event
= new Event();
316 event
.widget
= e
.widget
;
317 SelectionEvent selectionEvent
= new SelectionEvent(event
);
319 for (SelectionListener listener
: selectionListenerList
) {
320 listener
.widgetSelected(selectionEvent
);
326 * Constructor for CdmFormFactory.
330 * a {@link org.eclipse.swt.widgets.Display} object.
331 * @param selectionProvider
332 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
334 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
336 this.selectionProvider
= selectionProvider
;
342 * Constructor for CdmFormFactory.
346 * a {@link org.eclipse.swt.widgets.Display} object.
348 public CdmFormFactory(Display display
) {
356 private void init() {
357 boldFontHolder2
= new BoldFontHolder2();
358 selectionMouseHandler
= new SelectionMouseHandler();
359 selectionFocusHandler
= new SelectionFocusHandler();
363 * Creates an instance initialized with the correct selectionProvider
365 * Make sure to remove the instance when the entityComposite disposes via
366 * destroySelectionArbitrator(..)
368 * @param entityElement
369 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
371 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
374 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
375 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
376 selectionArbitrator
.addSelectionProvider(selectionProvider
);
377 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
378 addSelectionListener(selectionArbitrator
);
379 return selectionArbitrator
;
384 * destroySelectionArbitrator
387 * @param selectionArbitrator
389 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
392 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
393 removeSelectionListener(selectionArbitrator
);
394 if (selectionProvider
!= null) {
395 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
397 AbstractUtility
.error(this.getClass(),
398 "Tried to destroy a selection listener from this factories listeners but was null", null);
404 * Adapts the {@link AbstractCdmFormElement}:<br>
405 * - sets the {@link IPropertyChangeListener}s handled by this class
410 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
413 public void adapt(AbstractCdmFormElement formElement
) {
414 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
417 public void adapt(AbstractCdmFormElementComposite formElement
) {
418 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
425 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
427 control
.addFocusListener(selectionFocusHandler
);
429 super.adapt(control
, trackFocus
, trackKeyboard
);
434 public void adapt(Composite composite
) {
435 composite
.addMouseListener(selectionMouseHandler
);
436 super.adapt(composite
);
445 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
448 public void destroyElement(ICdmFormElement formElement
) {
449 // return if element was not initialized
450 if (formElement
== null) {
453 // destroy selection arbitrator, if any
454 if (formElement
instanceof ISelectableElement
) {
455 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
457 // remove this element form its parents list of elements
458 // ICdmFormElement parentElement = formElement.getParentElement();
459 // if(parentElement != null){
460 // parentElement.removeElement(formElement);
462 // call destroy on child elements recursively
463 for (ICdmFormElement childElement
: formElement
.getElements()) {
464 destroyElement(childElement
);
466 // dispose of the controls
467 for (Control control
: formElement
.getControls()) {
468 // we added the layoutComposite of the parental element as the
469 // layout composite to this formElement
470 // but we do not want to destroy it.
471 if (control
.equals(formElement
.getLayoutComposite())) {
486 * a {@link org.eclipse.swt.widgets.Composite} object.
487 * @return a {@link org.eclipse.swt.widgets.Label} object.
489 public Label
createEmptyCell(Composite parent
) {
490 return this.createLabel(parent
, null);
495 * createMultilineTextWithLabel
499 * a {@link java.lang.String} object.
504 * @param parentElement
505 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
507 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
510 public TextWithLabelElement
createMultilineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
511 int textHeight
, int style
) {
512 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, style
);
514 parentElement
.addElement(element
);
520 * createMultiLanguageTextElement
523 * @param parentElement
524 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
527 * a {@link java.lang.String} object.
528 * @param multilanguageText
529 * a {@link java.util.Map} object.
535 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
538 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
539 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
540 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
541 multilanguageText
, textHeight
, style
);
543 parentElement
.addElement(element
);
547 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
548 KeyStatement keyStatement
, int textHeight
, int style
) {
549 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
552 parentElement
.addElement(element
);
558 * createTextWithLabelElement
562 * a {@link java.lang.String} object.
564 * a {@link java.lang.String} object.
567 * @param parentElement
568 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
570 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
573 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
574 String initialText
, int style
) {
575 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
578 parentElement
.addElement(element
);
582 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
583 URI initialUri
, int style
) {
584 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
586 parentElement
.addElement(element
);
597 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
598 IOpenUrlEnabled openUrlEnabled
, int style
) {
599 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
602 parentElement
.addElement(element
);
608 * @param parentElement
610 * @param conversationEnabled
615 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
616 ConversationHolder conversation
, User user
, int style
) {
617 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
619 parentElement
.addElement(element
);
625 * createIntegerTextWithLabelElement
628 * @param parentElement
629 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
632 * a {@link java.lang.String} object.
633 * @param initialInteger
634 * a {@link java.lang.Integer} object.
638 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
641 public NumberWithLabelElement
createIntegerTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
642 Integer initialInteger
, int style
) {
643 NumberWithLabelElement element
= new NumberWithLabelElement(this, parentElement
, labelString
, initialInteger
,
646 parentElement
.addElement(element
);
652 * createFloatTextWithLabelElement
655 * @param parentElement
656 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
659 * a {@link java.lang.String} object.
660 * @param initialFloat
665 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
668 public NumberWithLabelElement
createFloatTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
669 float initialFloat
, int style
) {
670 NumberWithLabelElement element
= new NumberWithLabelElement(this, parentElement
, labelString
, initialFloat
,
673 parentElement
.addElement(element
);
679 * createLanguageStringWithLabelElement
682 * @param parentElement
683 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
686 * a {@link java.lang.String} object.
687 * @param languageString
688 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
692 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
695 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
696 String labelString
, LanguageString languageString
, int style
) {
697 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
698 languageString
, style
);
700 parentElement
.addElement(element
);
706 * createLanguageStringWithLabelElement
709 * @param parentElement
710 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
713 * a {@link java.lang.String} object.
714 * @param languageString
715 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
721 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
724 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
725 String labelString
, LanguageString languageString
, int height
, int style
) {
726 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
727 languageString
, height
, style
);
729 parentElement
.addElement(element
);
738 * @param parentElement
739 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
742 * a {@link java.lang.String} object.
745 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
748 public TextWithLabelElement
createTextElement(ICdmFormElement parentElement
, String initialText
, int style
) {
749 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, null, initialText
, null, style
);
751 parentElement
.addElement(element
);
757 * createKeyValueViewerElement
760 * @param parentElement
761 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
764 * a {@link java.lang.String} object.
765 * @param valueHeading
766 * a {@link java.lang.String} object.
768 * a {@link java.util.Map} object.
769 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
772 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
773 String valueHeading
, Map
<Object
, Object
> map
) {
774 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
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
> createTermComboElement(Class
<T
> termComboType
,
804 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
805 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
808 parentElement
.addElement(element
);
814 * createEnumComboElement
817 * @param enumComboType
819 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
821 * @param parentElement
822 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
826 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
829 public <T
extends IDefinedTerm
> EnumComboElement
<T
> createEnumComboElement(Class
<T
> enumComboType
,
830 ICdmFormElement parentElement
, int style
) {
831 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
833 parentElement
.addElement(element
);
839 * createBrowserElement
843 * a {@link java.net.URI} object.
846 * @param parentElement
847 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
849 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
852 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
853 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
855 parentElement
.addElement(element
);
864 * @param parentElement
865 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
868 * a {@link java.net.URI} object.
871 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
873 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
874 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
876 parentElement
.addElement(element
);
882 * createTextActionElement
886 * a {@link java.lang.String} object.
888 * a {@link java.lang.String} object.
891 * @param parentElement
892 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
895 * a {@link java.lang.String} object.
896 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
899 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
900 String buttonLabel
, String initialText
, int style
) {
901 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
904 parentElement
.addElement(element
);
913 * @param parentElement
914 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
917 * a {@link java.lang.String} object.
918 * @param initialState
922 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
925 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, boolean initialState
, int style
) {
926 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
928 parentElement
.addElement(element
);
933 * Creates a section as a part of the form.
935 * @return the section widget
938 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
941 public Section
adapt(AbstractFormSection section
) {
942 section
.setMenu(section
.getLayoutComposite().getMenu());
943 adapt(section
, true, true);
945 // handle focus and property change events for cdm use
946 section
.addFocusListener(selectionFocusHandler
);
947 section
.setPropertyChangeListeners(propertyChangeListeners
);
949 if (section
.getToggle() != null) {
950 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
951 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
954 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
956 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
957 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
958 getColors().initializeSectionToolBarColors();
959 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
960 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
962 // call setTitleBarForeground regardless as it also sets the label color
963 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
967 private class BoldFontHolder2
{
968 private Font normalFont
;
970 private Font boldFont
;
972 public BoldFontHolder2() {
975 public Font
getBoldFont(Font font
) {
976 createBoldFont(font
);
980 private void createBoldFont(Font font
) {
981 if (normalFont
== null || !normalFont
.equals(font
)) {
985 if (boldFont
== null) {
986 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
990 public void dispose() {
991 if (boldFont
!= null) {
992 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
1000 * createToggleableTextField
1003 * @param parentElement
1004 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1006 * @param labelString
1007 * a {@link java.lang.String} object.
1008 * @param initialText
1009 * a {@link java.lang.String} object.
1010 * @param initialState
1014 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1017 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1018 String initialText
, boolean initialState
, int style
) {
1019 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1020 initialState
, style
| orientation
);
1022 parentElement
.addElement(element
);
1028 * createTimePeriodElement
1031 * @param parentElement
1032 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1034 * @param labelString
1035 * a {@link java.lang.String} object.
1037 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1040 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1043 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1044 TimePeriod timePeriod
, int style
) {
1045 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1047 parentElement
.addElement(element
);
1053 * createPointElement
1058 * @param parentElement
1059 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1062 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1063 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1065 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1066 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1068 parentElement
.addElement(element
);
1074 * createDateDetailSection
1077 * @param parentElement
1078 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1082 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1085 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1086 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1087 parentElement
.addElement(section
);
1094 * createPartialElement
1097 * @param parentElement
1098 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1100 * @param labelString
1101 * a {@link java.lang.String} object.
1103 * a {@link org.joda.time.Partial} object.
1106 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1109 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1111 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1113 parentElement
.addElement(element
);
1119 * addSelectionListener
1123 * a {@link org.eclipse.swt.events.SelectionListener} object.
1125 public void addSelectionListener(SelectionListener listener
) {
1126 selectionListenerList
.add(listener
);
1131 * removeSelectionListener
1135 * a {@link org.eclipse.swt.events.SelectionListener} object.
1137 public void removeSelectionListener(SelectionListener listener
) {
1138 if (listener
== null) {
1139 AbstractUtility
.error(this.getClass(),
1140 "Tried to remove a selection listener from this factories listeners but was null", null);
1142 selectionListenerList
.remove(listener
);
1148 * addPropertyChangeListener
1152 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1155 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1156 if (propertyChangeListeners
.contains(listener
)) {
1159 propertyChangeListeners
.add(0, listener
);
1164 * removePropertyChangeListener
1168 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1171 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1172 propertyChangeListeners
.remove(listener
);
1176 * @return the propertyChangeListeners
1178 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1179 return propertyChangeListeners
;
1184 * createHorizontalSeparator
1187 * @param parentElement
1188 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1192 * @return a {@link org.eclipse.swt.widgets.Label} object.
1194 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1195 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1196 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1202 * createVersionElement
1205 * @param parentElement
1206 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1209 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1214 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1217 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1218 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1220 parentElement
.addElement(element
);
1225 * @param cdmBaseSection
1230 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1231 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1233 parentElement
.addElement(element
);
1239 * createVersionSection
1242 * @param parentElement
1243 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1248 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1251 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1252 VersionSection section
= new VersionSection(this, parentElement
, style
);
1253 parentElement
.addElement(section
);
1263 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1264 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1265 parentElement
.addElement(section
);
1272 * createEmptyElement
1275 * @param parentElement
1276 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1278 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1280 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
) {
1281 EmptyElement element
= new EmptyElement(this, parentElement
, null, SWT
.NULL
);
1283 parentElement
.addElement(element
);
1289 * createHeadlineSection
1292 * @param parentElement
1293 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1296 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1299 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1300 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1301 parentElement
.addElement(section
);
1308 * createParsingMessageElement
1311 * @param parentElement
1312 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1314 * @param parserProblem
1315 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1320 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1323 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1324 ParserProblem parserProblem
, int style
) {
1325 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1327 parentElement
.addElement(element
);
1331 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1332 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1334 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1335 selectionProvider
, style
);
1337 parentElement
.addElement(section
);
1344 * @param definedTermClass
1345 * @param formElement
1349 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
, AbstractCdmDetailSection parentElement
, int style
) {
1350 AbstractCdmDetailElement element
= null;
1352 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1353 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1355 element
= new DefinedTermDetailElement(this, parentElement
);
1359 parentElement
.addElement(element
);
1364 //--------DetailSections---------
1365 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1366 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1367 addAndAdaptSection(parentElement
, section
);
1371 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1372 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1373 addAndAdaptSection(parentElement
, section
);
1377 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1378 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1379 addAndAdaptSection(parentElement
, section
);
1383 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1384 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1385 addAndAdaptSection(parentElement
, section
);
1389 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1390 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1391 addAndAdaptSection(parentElement
, section
);
1395 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1396 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1397 addAndAdaptSection(parentElement
, section
);
1401 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1402 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1403 addAndAdaptSection(parentElement
, section
);
1407 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1408 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1409 addAndAdaptSection(parentElement
, section
);
1413 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1414 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1415 addAndAdaptSection(parentElement
, section
);
1419 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1420 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1421 addAndAdaptSection(parentElement
, section
);
1425 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1426 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1427 addAndAdaptSection(parentElement
, section
);
1431 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1432 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1433 addAndAdaptSection(parentElement
, section
);
1437 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1438 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1439 addAndAdaptSection(parentElement
, section
);
1443 public DerivedUnitFacadeDetailSection
createDerivedUnitFacadeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1444 DerivedUnitFacadeDetailSection section
= new DerivedUnitFacadeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1445 addAndAdaptSection(parentElement
, section
);
1449 public FieldObservationDetailSection
createFieldObservationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1450 FieldObservationDetailSection section
= new FieldObservationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1451 addAndAdaptSection(parentElement
, section
);
1455 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1456 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1457 addAndAdaptSection(parentElement
, section
);
1461 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1462 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1463 addAndAdaptSection(parentElement
, section
);
1467 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1468 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1469 addAndAdaptSection(parentElement
, section
);
1473 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1474 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1475 addAndAdaptSection(parentElement
, section
);
1479 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1480 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1481 addAndAdaptSection(parentElement
, section
);
1485 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1486 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1487 addAndAdaptSection(parentElement
, section
);
1491 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1492 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1493 addAndAdaptSection(parentElement
, section
);
1497 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1498 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1499 addAndAdaptSection(parentElement
, section
);
1503 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1504 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1505 addAndAdaptSection(parentElement
, section
);
1509 public GeneralDetailSection
createGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1510 GeneralDetailSection section
= new GeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1511 addAndAdaptSection(parentElement
, section
);
1515 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1516 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1517 addAndAdaptSection(parentElement
, section
);
1521 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1522 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1523 addAndAdaptSection(parentElement
, section
);
1527 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1528 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1529 addAndAdaptSection(parentElement
, section
);
1533 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1534 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1535 addAndAdaptSection(parentElement
, section
);
1539 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1540 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1541 addAndAdaptSection(parentElement
, section
);
1545 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1546 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1547 addAndAdaptSection(parentElement
, section
);
1551 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1552 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1553 addAndAdaptSection(parentElement
, section
);
1558 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1559 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1560 addAndAdaptSection(parentElement
, section
);
1564 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1565 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1566 addAndAdaptSection(parentElement
, section
);
1570 public GeneralDetailSection
createFOSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1571 GeneralDetailSection section
= new GeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1572 addAndAdaptSection(parentElement
, section
);
1576 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1577 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1578 addAndAdaptSection(parentElement
, section
);
1582 public FieldObservationDetailSection
createFODetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1583 FieldObservationDetailSection section
= new FieldObservationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1584 addAndAdaptSection(parentElement
, section
);
1588 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1589 parentElement
.addElement(section
);
1593 //--------DetailElements------------
1595 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1596 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1597 addAndAdaptElement(parentElement
, element
);
1601 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1602 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1603 addAndAdaptElement(parentElement
, element
);
1607 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1608 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1609 addAndAdaptElement(parentElement
, element
);
1613 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1614 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1615 addAndAdaptElement(parentElement
, element
);
1619 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1620 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1621 addAndAdaptElement(parentElement
, element
);
1625 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1626 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1627 addAndAdaptElement(parentElement
, element
);
1631 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1632 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1633 addAndAdaptElement(parentElement
, element
);
1637 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1638 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1639 addAndAdaptElement(parentElement
, element
);
1643 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1644 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1645 addAndAdaptElement(parentElement
, element
);
1649 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1650 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1651 addAndAdaptElement(parentElement
, element
);
1655 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1656 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1657 addAndAdaptElement(parentElement
, element
);
1661 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1662 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1663 addAndAdaptElement(parentElement
, element
);
1667 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1668 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1669 addAndAdaptElement(parentElement
, element
);
1673 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1674 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1675 addAndAdaptElement(parentElement
, element
);
1679 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1680 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1681 addAndAdaptElement(parentElement
, element
);
1685 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1686 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1687 addAndAdaptElement(parentElement
, element
);
1691 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1692 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1693 addAndAdaptElement(parentElement
, element
);
1697 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1698 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1699 addAndAdaptElement(parentElement
, element
);
1703 public DerivedUnitFacadeDetailElement
createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement
){
1704 DerivedUnitFacadeDetailElement element
= new DerivedUnitFacadeDetailElement(this, parentElement
);
1705 addAndAdaptElement(parentElement
, element
);
1709 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1710 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1711 addAndAdaptElement(parentElement
, element
);
1715 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1716 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1717 addAndAdaptElement(parentElement
, element
);
1721 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1722 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1723 addAndAdaptElement(parentElement
, element
);
1727 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1728 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1729 addAndAdaptElement(parentElement
, element
);
1733 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1734 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1735 addAndAdaptElement(parentElement
, element
);
1739 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1740 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1741 addAndAdaptElement(parentElement
, element
);
1745 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1746 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1747 addAndAdaptElement(parentElement
, element
);
1751 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1752 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1753 addAndAdaptElement(parentElement
, element
);
1757 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1758 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
1759 addAndAdaptElement(parentElement
, element
);
1763 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1764 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
1765 addAndAdaptElement(parentElement
, element
);
1770 public GeneralDetailElement
createGeneralDetailElement(ICdmFormElement parentElement
){
1771 GeneralDetailElement element
= new GeneralDetailElement(this, parentElement
);
1772 addAndAdaptElement(parentElement
, element
);
1776 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
1777 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
1778 addAndAdaptElement(parentElement
, element
);
1782 public GatheringEventDetailElementComposite
createGatheringEventDetailElementComposite(ICdmFormElement parentElement
) {
1783 GatheringEventDetailElementComposite element
= new GatheringEventDetailElementComposite(parentElement
.getLayoutComposite(), this, parentElement
, SWT
.NONE
);
1785 parentElement
.addElement(element
);
1789 public FieldObservationDetailElement
createFieldObservationDetailElement(ICdmFormElement parentElement
) {
1790 FieldObservationDetailElement element
= new FieldObservationDetailElement(this, parentElement
);
1791 addAndAdaptElement(parentElement
, element
);
1795 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
1796 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
1797 addAndAdaptElement(parentElement
, element
);
1801 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
1802 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
1803 addAndAdaptElement(parentElement
, element
);
1808 * @param parentElement
1811 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
1813 parentElement
.addElement(element
);
1816 //--------EntityCollectionSection----------
1817 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1818 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
1819 addAndAdaptSection(parentElement
, section
);
1823 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1824 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
1825 addAndAdaptSection(parentElement
, section
);
1829 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1830 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
1831 addAndAdaptSection(parentElement
, section
);
1835 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1836 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
1837 addAndAdaptSection(parentElement
, section
);
1841 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1842 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
1843 addAndAdaptSection(parentElement
, section
);
1847 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1848 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
1849 addAndAdaptSection(parentElement
, section
);
1853 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1854 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
1855 addAndAdaptSection(parentElement
, section
);
1859 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1860 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
1861 addAndAdaptSection(parentElement
, section
);
1865 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1866 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
1867 addAndAdaptSection(parentElement
, section
);
1871 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1872 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
1873 addAndAdaptSection(parentElement
, section
);
1877 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1878 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
1879 addAndAdaptSection(parentElement
, section
);
1883 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1884 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
1885 addAndAdaptSection(parentElement
, section
);
1889 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1890 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
1891 addAndAdaptSection(parentElement
, section
);
1895 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1896 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
1897 addAndAdaptSection(parentElement
, section
);
1901 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1902 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
1903 addAndAdaptSection(parentElement
, section
);
1907 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1908 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
1909 addAndAdaptSection(parentElement
, section
);
1913 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1914 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
1915 addAndAdaptSection(parentElement
, section
);
1919 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1920 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
1921 addAndAdaptSection(parentElement
, section
);
1925 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1926 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
1927 addAndAdaptSection(parentElement
, section
);
1931 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1932 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
1933 addAndAdaptSection(parentElement
, section
);
1937 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1938 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
1939 addAndAdaptSection(parentElement
, section
);
1943 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1944 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
1945 addAndAdaptSection(parentElement
, section
);
1949 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1950 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
1951 addAndAdaptSection(parentElement
, section
);
1955 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1956 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
1957 addAndAdaptSection(parentElement
, section
);
1961 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1962 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
1963 addAndAdaptSection(parentElement
, section
);
1967 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1968 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
1969 addAndAdaptSection(parentElement
, section
);
1973 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1974 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
1975 addAndAdaptSection(parentElement
, section
);
1979 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1980 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
1981 addAndAdaptSection(parentElement
, section
);
1985 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1986 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
1987 addAndAdaptSection(parentElement
, section
);
1991 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1992 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
1993 addAndAdaptSection(parentElement
, section
);
1997 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1998 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
1999 addAndAdaptSection(parentElement
, section
);
2003 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2004 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2005 addAndAdaptSection(parentElement
, section
);
2009 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2010 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2011 addAndAdaptSection(parentElement
, section
);
2017 * createEntityCollectionElement
2020 * @param removeListener
2021 * a {@link org.eclipse.swt.events.SelectionListener} object.
2024 * @param parentElement
2026 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
2028 * @param versionableEntity
2029 * a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
2031 * @param backgroundColor
2032 * a {@link org.eclipse.swt.graphics.Color} object.
2034 * {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
2037 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2038 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2039 AbstractEntityCollectionElement element
= null;
2041 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2043 if (entity
instanceof Annotation
) {
2044 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2045 } else if (entity
instanceof Person
) {
2046 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2047 } else if (entity
instanceof Credit
) {
2048 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2049 } else if (entity
instanceof Extension
) {
2050 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2051 } else if (entity
instanceof Marker
) {
2052 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2053 } else if (entity
instanceof Media
) {
2054 element
= new MediaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2055 } else if (entity
instanceof MediaRepresentation
) {
2056 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2058 } else if (entity
instanceof ImageFile
) {
2059 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2060 } else if (entity
instanceof MediaRepresentationPart
) {
2061 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2062 removeListener
, style
);
2063 } else if (entity
instanceof NomenclaturalStatus
) {
2064 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2066 } else if (entity
instanceof Rights
) {
2067 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2068 } else if (entity
instanceof DescriptionElementSource
) {
2069 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2070 removeListener
, style
);
2071 } else if (entity
instanceof IdentifiableSource
) {
2072 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2074 } else if (entity
instanceof Scope
) {
2075 element
= new ScopeElement(this, parentElement
, (Scope
) entity
, removeListener
, style
);
2076 } else if (entity
instanceof Modifier
) {
2077 element
= new ModifierElement(this, parentElement
, (Modifier
) entity
, removeListener
, style
);
2078 } else if (entity
instanceof Reference
) {
2079 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2080 } else if (entity
instanceof NameTypeDesignation
) {
2081 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2083 } else if (entity
instanceof NameRelationship
) {
2084 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2086 } else if (entity
instanceof SpecimenTypeDesignation
) {
2087 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2088 removeListener
, style
);
2089 } else if (entity
instanceof StateData
) {
2090 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2091 } else if (entity
instanceof StatisticalMeasurementValue
) {
2092 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2093 removeListener
, style
);
2094 } else if (entity
instanceof DerivedUnit
) {
2095 element
= new DerivedUnitElement(this, parentElement
, (DerivedUnit
) entity
, removeListener
, style
);
2096 } else if (entity
instanceof NamedArea
) {
2097 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2098 } else if (entity
instanceof DeterminationEvent
) {
2099 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, 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
);
2129 parentElement
.addElement(element
);
2135 public DeterminationEventDetailElementComposite
createDeterminationEventDetailElementComposite(AbstractFormSection parentElement
,
2136 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
){
2137 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2138 DeterminationEventDetailElementComposite element
= new DeterminationEventDetailElementComposite(parentElement
.getLayoutComposite(), this, parentElement
, (DeterminationEvent
) entity
,
2139 removeListener
, style
);
2141 parentElement
.addElement(element
);
2147 * Creates a selection element for the given type T.
2150 * <strong>Selection elements not handled by this method:</strong>
2152 * <li>{@link TaxonNodeSelectionElement} see
2153 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2155 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2156 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2162 * a {@link Class} object of the type that you want the selection
2164 * @param parentElement
2165 * a {@link ICdmFormElement} object.
2166 * @param labelString
2167 * a {@link String} object.
2168 * @param selectionType
2170 * a {@link ICdmBase} object.
2173 * @param conversation
2174 * a {@link ConversationHolder} object.
2175 * @return a {@link EntitySelectionElement} object.
2177 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2178 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2180 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2181 labelString
, selection
, mode
, style
);
2183 parentElement
.addElement(element
);
2187 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2188 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2189 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2190 labelString
, selection
, mode
, style
);
2192 parentElement
.addElement(element
);
2196 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2197 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2198 int mode
, int style
) {
2199 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2200 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2202 parentElement
.addElement(element
);
2206 /** {@inheritDoc} */
2207 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2208 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2209 adapt(labelElement
);
2210 parentElement
.addElement(labelElement
);
2211 return labelElement
;
2216 * Getter for the field <code>selectionProvider</code>.
2219 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2221 public ISelectionProvider
getSelectionProvider() {
2222 return selectionProvider
;
2227 * createDetailedDescriptionDetailElement
2230 * @param parentElement
2231 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2235 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2240 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2243 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2244 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2245 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2247 if (entity
instanceof CategoricalData
) {
2248 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2249 (CategoricalData
) entity
, style
);
2250 } else if (entity
instanceof CommonTaxonName
) {
2251 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2253 } else if (entity
instanceof Distribution
) {
2254 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2256 } else if (entity
instanceof IndividualsAssociation
) {
2257 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2258 (IndividualsAssociation
) entity
, style
);
2259 } else if (entity
instanceof QuantitativeData
) {
2260 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2261 (QuantitativeData
) entity
, style
);
2262 } else if (entity
instanceof TaxonInteraction
) {
2263 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2264 (TaxonInteraction
) entity
, style
);
2265 } else if (entity
instanceof TextData
) {
2266 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2268 throw new IllegalStateException("There is no interface for the given description element");
2270 adapt(detailedDescriptionElement
);
2271 parentElement
.addElement(detailedDescriptionElement
);
2272 return detailedDescriptionElement
;
2277 * Creates a styled text as a part of the form.
2282 * the text initial value
2285 * @return the text widget
2287 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2288 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2289 if (value
!= null) {
2290 text
.setText(value
);
2292 text
.setForeground(getColors().getForeground());
2293 text
.setBackground(getColors().getBackground());
2294 // text.addFocusListener(visibilityHandler);