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
.campanula
.FieldObservationGeneralElement
;
117 import eu
.etaxonomy
.taxeditor
.ui
.section
.campanula
.FieldObservationGeneralElementController
;
118 import eu
.etaxonomy
.taxeditor
.ui
.section
.campanula
.GatheringEventDetailsElement
;
119 import eu
.etaxonomy
.taxeditor
.ui
.section
.campanula
.GatheringEventDetailsElementController
;
120 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailElement
;
121 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationDetailSection
;
122 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailElement
;
123 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.TaxonNodeDetailSection
;
124 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferenceEntityDetailElement
;
125 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
126 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DerivedUnitElement
;
127 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
128 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailElement
;
129 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
130 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailElement
;
131 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
132 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
133 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceElement
;
134 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
135 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceElement
;
136 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
137 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
138 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierElement
;
139 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ModifierSection
;
140 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageDetailElement
;
141 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
142 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeElement
;
143 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
144 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataElement
;
145 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StateDataSection
;
146 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueElement
;
147 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.StatisticalMeasurementValueSection
;
148 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.AbstractDetailedDescriptionDetailElement
;
149 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CategoricalDataDetailElement
;
150 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.CommonNameDetailElement
;
151 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.DistributionDetailElement
;
152 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.IndividualsAssociationDetailElement
;
153 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.QuantitativeDataDetailElement
;
154 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TaxonInteractionDetailElement
;
155 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.detail
.TextDataDetailElement
;
156 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailElement
;
157 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
158 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityCollectionElement
;
159 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailElement
;
160 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
161 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailElement
;
162 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
163 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailElement
;
164 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
165 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
166 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailElement
;
167 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
168 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailElement
;
169 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
170 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
171 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
172 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.ImageFileElement
;
173 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaElement
;
174 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationElement
;
175 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartElement
;
176 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationPartSection
;
177 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaRepresentationSection
;
178 import eu
.etaxonomy
.taxeditor
.ui
.section
.media
.MediaSection
;
179 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailElement
;
180 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.AuthorshipDetailSection
;
181 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailElement
;
182 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
183 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailElement
;
184 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameDetailSection
;
185 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailElement
;
186 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
187 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameTypeDesignationElement
;
188 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusElement
;
189 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
190 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailElement
;
191 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
192 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueElement
;
193 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
194 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.SpecimenTypeDesignationElement
;
195 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
196 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectingAreasDetailSection
;
197 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CollectionDetailElement
;
198 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.CurrentDeterminationDetailSection
;
199 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailElement
;
200 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
201 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailElement
;
202 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitFacadeDetailSection
;
203 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailElement
;
204 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
205 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationEventDetailElement
;
206 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationHistoryDetailSection
;
207 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldObservationDetailElement
;
208 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldObservationDetailSection
;
209 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailElement
;
210 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
211 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeneralDetailElement
;
212 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeneralDetailSection
;
213 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.NamedAreaDetailElement
;
214 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SourceCollectionDetailSection
;
215 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailElement
;
216 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.SpecimenCollectionDetailSection
;
217 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailElement
;
218 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
219 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailElement
;
220 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
221 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationElement
;
222 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.AnnotationSection
;
223 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseElement
;
224 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CdmBaseSection
;
225 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditElement
;
226 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.CreditSection
;
227 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionElement
;
228 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.ExtensionSection
;
229 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.HeadlineSection
;
230 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.IdentifiableSourceElement
;
231 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerElement
;
232 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.MarkerSection
;
233 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsElement
;
234 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
235 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.SourceSection
;
236 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionElement
;
237 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.VersionSection
;
238 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessageElement
;
239 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
240 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailElement
;
241 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
242 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonDetailElement
;
243 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailElement
;
244 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
245 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailElement
;
246 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
247 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailElement
;
248 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
249 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailElement
;
250 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
251 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailElement
;
252 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.DefinedTermDetailSection
;
253 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailSection
;
254 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailElement
;
255 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
256 import eu
.etaxonomy
.taxeditor
.ui
.selection
.EntitySelectionElement
;
257 import eu
.etaxonomy
.taxeditor
.ui
.selection
.NomenclaturalAuthorTeamSelectionElement
;
258 import eu
.etaxonomy
.taxeditor
.ui
.selection
.TaxonNodeSelectionElement
;
262 * CdmFormFactory class.
266 * @created Feb 24, 2010
269 public class CdmFormFactory
extends FormToolkit
{
271 private BoldFontHolder2 boldFontHolder2
;
272 private MouseListener selectionMouseHandler
;
273 private FocusListener selectionFocusHandler
;
275 private final Set
<SelectionListener
> selectionListenerList
= new HashSet
<SelectionListener
>();
277 private final List
<IPropertyChangeListener
> propertyChangeListeners
= new ArrayList
<IPropertyChangeListener
>();
279 private final int orientation
= Window
.getDefaultOrientation();
280 private ISelectionProvider selectionProvider
;
282 /** Constant <code>EMPTY_SELECTION</code> */
283 public static ISelection EMPTY_SELECTION
= new ISelection() {
285 public boolean isEmpty() {
296 private class SelectionMouseHandler
extends MouseAdapter
{
298 public void mouseDown(MouseEvent e
) {
299 notifySelectionListeners(e
);
309 private class SelectionFocusHandler
extends FocusAdapter
{
311 public void focusGained(FocusEvent e
) {
312 notifySelectionListeners(e
);
316 private void notifySelectionListeners(TypedEvent e
) {
317 Event event
= new Event();
318 event
.widget
= e
.widget
;
319 SelectionEvent selectionEvent
= new SelectionEvent(event
);
321 for (SelectionListener listener
: selectionListenerList
) {
322 listener
.widgetSelected(selectionEvent
);
328 * Constructor for CdmFormFactory.
332 * a {@link org.eclipse.swt.widgets.Display} object.
333 * @param selectionProvider
334 * a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
336 public CdmFormFactory(Display display
, ISelectionProvider selectionProvider
) {
338 this.selectionProvider
= selectionProvider
;
344 * Constructor for CdmFormFactory.
348 * a {@link org.eclipse.swt.widgets.Display} object.
350 public CdmFormFactory(Display display
) {
358 private void init() {
359 boldFontHolder2
= new BoldFontHolder2();
360 selectionMouseHandler
= new SelectionMouseHandler();
361 selectionFocusHandler
= new SelectionFocusHandler();
365 * Creates an instance initialized with the correct selectionProvider
367 * Make sure to remove the instance when the entityComposite disposes via
368 * destroySelectionArbitrator(..)
370 * @param entityElement
371 * a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
373 * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
376 public SelectionArbitrator
createSelectionArbitrator(IEntityElement entityElement
) {
377 SelectionArbitrator selectionArbitrator
= new SelectionArbitrator(entityElement
);
378 selectionArbitrator
.addSelectionProvider(selectionProvider
);
379 selectionProvider
.addSelectionChangedListener(selectionArbitrator
);
380 addSelectionListener(selectionArbitrator
);
381 return selectionArbitrator
;
386 * destroySelectionArbitrator
389 * @param selectionArbitrator
391 * {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
394 public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator
) {
395 removeSelectionListener(selectionArbitrator
);
396 if (selectionProvider
!= null) {
397 selectionProvider
.removeSelectionChangedListener(selectionArbitrator
);
399 AbstractUtility
.error(this.getClass(),
400 "Tried to destroy a selection listener from this factories listeners but was null", null);
406 * Adapts the {@link AbstractCdmFormElement}:<br>
407 * - sets the {@link IPropertyChangeListener}s handled by this class
412 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
415 public void adapt(AbstractCdmFormElement formElement
) {
416 formElement
.setPropertyChangeListeners(propertyChangeListeners
);
421 public void adapt(Control control
, boolean trackFocus
, boolean trackKeyboard
) {
423 control
.addFocusListener(selectionFocusHandler
);
425 super.adapt(control
, trackFocus
, trackKeyboard
);
430 public void adapt(Composite composite
) {
431 composite
.addMouseListener(selectionMouseHandler
);
432 super.adapt(composite
);
441 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
444 public void destroyElement(ICdmFormElement formElement
) {
445 // return if element was not initialized
446 if (formElement
== null) {
449 // destroy selection arbitrator, if any
450 if (formElement
instanceof ISelectableElement
) {
451 destroySelectionArbitrator(((ISelectableElement
) formElement
).getSelectionArbitrator());
453 // remove this element form its parents list of elements
454 // ICdmFormElement parentElement = formElement.getParentElement();
455 // if(parentElement != null){
456 // parentElement.removeElement(formElement);
458 // call destroy on child elements recursively
459 for (ICdmFormElement childElement
: formElement
.getElements()) {
460 destroyElement(childElement
);
462 // dispose of the controls
463 for (Control control
: formElement
.getControls()) {
464 // we added the layoutComposite of the parental element as the
465 // layout composite to this formElement
466 // but we do not want to destroy it.
467 if (control
.equals(formElement
.getLayoutComposite())) {
482 * a {@link org.eclipse.swt.widgets.Composite} object.
483 * @return a {@link org.eclipse.swt.widgets.Label} object.
485 public Label
createEmptyCell(Composite parent
) {
486 return this.createLabel(parent
, null);
491 * createMultilineTextWithLabel
495 * a {@link java.lang.String} object.
500 * @param parentElement
501 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
503 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
506 public TextWithLabelElement
createMultilineTextWithLabel(ICdmFormElement parentElement
, String labelString
,
507 int textHeight
, int style
) {
508 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, "", textHeight
, style
);
510 parentElement
.addElement(element
);
516 * createMultiLanguageTextElement
519 * @param parentElement
520 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
523 * a {@link java.lang.String} object.
524 * @param multilanguageText
525 * a {@link java.util.Map} object.
531 * {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
534 public MultilanguageTextElement
createMultiLanguageTextElement(ICdmFormElement parentElement
, String labelString
,
535 Map
<Language
, LanguageString
> multilanguageText
, int textHeight
, int style
) {
536 MultilanguageTextElement element
= new MultilanguageTextElement(this, parentElement
, labelString
,
537 multilanguageText
, textHeight
, style
);
539 parentElement
.addElement(element
);
543 public KeyStatementElement
createKeyStatementElement(ICdmFormElement parentElement
, String labelString
,
544 KeyStatement keyStatement
, int textHeight
, int style
) {
545 KeyStatementElement element
= new KeyStatementElement(this, parentElement
, labelString
, keyStatement
,
548 parentElement
.addElement(element
);
554 * createTextWithLabelElement
558 * a {@link java.lang.String} object.
560 * a {@link java.lang.String} object.
563 * @param parentElement
564 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
566 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
569 public TextWithLabelElement
createTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
570 String initialText
, int style
) {
571 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, labelString
, initialText
, null,
574 parentElement
.addElement(element
);
578 public UriWithLabelElement
createUriWithLabelElement(ICdmFormElement parentElement
, String labelString
,
579 URI initialUri
, int style
) {
580 UriWithLabelElement element
= new UriWithLabelElement(this, parentElement
, labelString
, initialUri
, null, style
);
582 parentElement
.addElement(element
);
593 public OpenUrlSelectorElement
createOpenUrlSelectorElement(ICdmFormElement parentElement
, String labelString
,
594 IOpenUrlEnabled openUrlEnabled
, int style
) {
595 OpenUrlSelectorElement element
= new OpenUrlSelectorElement(this, parentElement
, labelString
, openUrlEnabled
,
598 parentElement
.addElement(element
);
604 * @param parentElement
606 * @param conversationEnabled
611 public EditPasswordElement
createEditPasswordElement(ICdmFormElement parentElement
, String labelString
,
612 ConversationHolder conversation
, User user
, int style
) {
613 EditPasswordElement element
= new EditPasswordElement(this, parentElement
, labelString
, user
, conversation
);
615 parentElement
.addElement(element
);
621 * createIntegerTextWithLabelElement
624 * @param parentElement
625 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
628 * a {@link java.lang.String} object.
629 * @param initialInteger
630 * a {@link java.lang.Integer} object.
634 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
637 public NumberWithLabelElement
createIntegerTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
638 Integer initialInteger
, int style
) {
639 NumberWithLabelElement element
= new NumberWithLabelElement(this, parentElement
, labelString
, initialInteger
,
642 parentElement
.addElement(element
);
648 * createFloatTextWithLabelElement
651 * @param parentElement
652 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
655 * a {@link java.lang.String} object.
656 * @param initialFloat
661 * {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
664 public NumberWithLabelElement
createFloatTextWithLabelElement(ICdmFormElement parentElement
, String labelString
,
665 float initialFloat
, int style
) {
666 NumberWithLabelElement element
= new NumberWithLabelElement(this, parentElement
, labelString
, initialFloat
,
669 parentElement
.addElement(element
);
675 * createLanguageStringWithLabelElement
678 * @param parentElement
679 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
682 * a {@link java.lang.String} object.
683 * @param languageString
684 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
688 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
691 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
692 String labelString
, LanguageString languageString
, int style
) {
693 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
694 languageString
, style
);
696 parentElement
.addElement(element
);
702 * createLanguageStringWithLabelElement
705 * @param parentElement
706 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
709 * a {@link java.lang.String} object.
710 * @param languageString
711 * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
717 * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
720 public LanguageStringWithLabelElement
createLanguageStringWithLabelElement(ICdmFormElement parentElement
,
721 String labelString
, LanguageString languageString
, int height
, int style
) {
722 LanguageStringWithLabelElement element
= new LanguageStringWithLabelElement(this, parentElement
, labelString
,
723 languageString
, height
, style
);
725 parentElement
.addElement(element
);
734 * @param parentElement
735 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
738 * a {@link java.lang.String} object.
741 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
744 public TextWithLabelElement
createTextElement(ICdmFormElement parentElement
, String initialText
, int style
) {
745 TextWithLabelElement element
= new TextWithLabelElement(this, parentElement
, null, initialText
, null, style
);
747 parentElement
.addElement(element
);
753 * createKeyValueViewerElement
756 * @param parentElement
757 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
760 * a {@link java.lang.String} object.
761 * @param valueHeading
762 * a {@link java.lang.String} object.
764 * a {@link java.util.Map} object.
765 * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
768 public KeyValueViewerElement
createKeyValueViewerElement(ICdmFormElement parentElement
, String keyHeading
,
769 String valueHeading
, Map
<Object
, Object
> map
) {
770 KeyValueViewerElement element
= new KeyValueViewerElement(this, parentElement
, keyHeading
, valueHeading
, map
);
772 parentElement
.addElement(element
);
778 * createTermComboElement
781 * @param termComboType
783 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
785 * @param parentElement
786 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
789 * a {@link java.lang.String} object.
791 * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
795 * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
799 public <T
extends DefinedTermBase
> TermComboElement
<T
> createTermComboElement(Class
<T
> termComboType
,
800 ICdmFormElement parentElement
, String labelString
, T selection
, int style
) {
801 TermComboElement
<T
> element
= new TermComboElement
<T
>(this, parentElement
, termComboType
, labelString
,
804 parentElement
.addElement(element
);
810 * createEnumComboElement
813 * @param enumComboType
815 * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
817 * @param parentElement
818 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
822 * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
825 public <T
extends IDefinedTerm
> EnumComboElement
<T
> createEnumComboElement(Class
<T
> enumComboType
,
826 ICdmFormElement parentElement
, int style
) {
827 EnumComboElement
<T
> element
= new EnumComboElement
<T
>(this, parentElement
, enumComboType
, style
);
829 parentElement
.addElement(element
);
835 * createBrowserElement
839 * a {@link java.net.URI} object.
842 * @param parentElement
843 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
845 * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
848 public BrowserElement
createBrowserElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
849 BrowserElement element
= new BrowserElement(this, parentElement
, imageUri
, style
);
851 parentElement
.addElement(element
);
860 * @param parentElement
861 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
864 * a {@link java.net.URI} object.
867 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
869 public ImageElement
createImageElement(ICdmFormElement parentElement
, URI imageUri
, int style
) {
870 ImageElement element
= new ImageElement(this, parentElement
, imageUri
, style
);
872 parentElement
.addElement(element
);
878 * createTextActionElement
882 * a {@link java.lang.String} object.
884 * a {@link java.lang.String} object.
887 * @param parentElement
888 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
891 * a {@link java.lang.String} object.
892 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
895 public TextActionElement
createTextActionElement(ICdmFormElement parentElement
, String labelString
,
896 String buttonLabel
, String initialText
, int style
) {
897 TextActionElement element
= new TextActionElement(this, parentElement
, labelString
, buttonLabel
, initialText
,
900 parentElement
.addElement(element
);
909 * @param parentElement
910 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
913 * a {@link java.lang.String} object.
914 * @param initialState
918 * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
921 public CheckboxElement
createCheckbox(ICdmFormElement parentElement
, String label
, boolean initialState
, int style
) {
922 CheckboxElement element
= new CheckboxElement(this, parentElement
, label
, initialState
, style
| orientation
);
924 parentElement
.addElement(element
);
929 * Creates a section as a part of the form.
931 * @return the section widget
934 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
937 public Section
adapt(AbstractFormSection section
) {
938 section
.setMenu(section
.getLayoutComposite().getMenu());
939 adapt(section
, true, true);
941 // handle focus and property change events for cdm use
942 section
.addFocusListener(selectionFocusHandler
);
943 section
.setPropertyChangeListeners(propertyChangeListeners
);
945 if (section
.getToggle() != null) {
946 section
.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE_HOVER
));
947 section
.getToggle().setDecorationColor(getColors().getColor(IFormColors
.TB_TOGGLE
));
950 section
.setFont(boldFontHolder2
.getBoldFont(section
.getLayoutComposite().getFont()));
952 if ((section
.getStyle() & ExpandableComposite
.TITLE_BAR
) != 0
953 || (section
.getStyle() & ExpandableComposite
.SHORT_TITLE_BAR
) != 0) {
954 getColors().initializeSectionToolBarColors();
955 section
.setTitleBarBackground(getColors().getColor(IFormColors
.TB_BG
));
956 section
.setTitleBarBorderColor(getColors().getColor(IFormColors
.TB_BORDER
));
958 // call setTitleBarForeground regardless as it also sets the label color
959 section
.setTitleBarForeground(getColors().getColor(IFormColors
.TB_TOGGLE
));
963 private class BoldFontHolder2
{
964 private Font normalFont
;
966 private Font boldFont
;
968 public BoldFontHolder2() {
971 public Font
getBoldFont(Font font
) {
972 createBoldFont(font
);
976 private void createBoldFont(Font font
) {
977 if (normalFont
== null || !normalFont
.equals(font
)) {
981 if (boldFont
== null) {
982 boldFont
= FormFonts
.getInstance().getBoldFont(getColors().getDisplay(), normalFont
);
986 public void dispose() {
987 if (boldFont
!= null) {
988 FormFonts
.getInstance().markFinished(boldFont
, getColors().getDisplay());
996 * createToggleableTextField
999 * @param parentElement
1000 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1002 * @param labelString
1003 * a {@link java.lang.String} object.
1004 * @param initialText
1005 * a {@link java.lang.String} object.
1006 * @param initialState
1010 * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
1013 public ToggleableTextElement
createToggleableTextField(ICdmFormElement parentElement
, String labelString
,
1014 String initialText
, boolean initialState
, int style
) {
1015 ToggleableTextElement element
= new ToggleableTextElement(this, parentElement
, labelString
, initialText
,
1016 initialState
, style
| orientation
);
1018 parentElement
.addElement(element
);
1024 * createTimePeriodElement
1027 * @param parentElement
1028 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1030 * @param labelString
1031 * a {@link java.lang.String} object.
1033 * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
1036 * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
1039 public TimePeriodElement
createTimePeriodElement(ICdmFormElement parentElement
, String labelString
,
1040 TimePeriod timePeriod
, int style
) {
1041 TimePeriodElement element
= new TimePeriodElement(this, parentElement
, labelString
, timePeriod
, style
);
1043 parentElement
.addElement(element
);
1049 * createPointElement
1054 * @param parentElement
1055 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1058 * a {@link eu.etaxonomy.cdm.model.location.Point} object.
1059 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
1061 public PointElement
createPointElement(ICdmFormElement parentElement
, Point point
, int style
) {
1062 PointElement element
= new PointElement(this, parentElement
, point
, style
);
1064 parentElement
.addElement(element
);
1070 * createDateDetailSection
1073 * @param parentElement
1074 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1078 * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
1081 public DateDetailSection
createDateDetailSection(ICdmFormElement parentElement
, int style
) {
1082 DateDetailSection section
= new DateDetailSection(this, parentElement
, style
);
1083 parentElement
.addElement(section
);
1090 * createPartialElement
1093 * @param parentElement
1094 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1096 * @param labelString
1097 * a {@link java.lang.String} object.
1099 * a {@link org.joda.time.Partial} object.
1102 * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
1105 public PartialElement
createPartialElement(ICdmFormElement parentElement
, String labelString
, Partial partial
,
1107 PartialElement element
= new PartialElement(this, parentElement
, labelString
, style
);
1109 parentElement
.addElement(element
);
1115 * addSelectionListener
1119 * a {@link org.eclipse.swt.events.SelectionListener} object.
1121 public void addSelectionListener(SelectionListener listener
) {
1122 selectionListenerList
.add(listener
);
1127 * removeSelectionListener
1131 * a {@link org.eclipse.swt.events.SelectionListener} object.
1133 public void removeSelectionListener(SelectionListener listener
) {
1134 if (listener
== null) {
1135 AbstractUtility
.error(this.getClass(),
1136 "Tried to remove a selection listener from this factories listeners but was null", null);
1138 selectionListenerList
.remove(listener
);
1144 * addPropertyChangeListener
1148 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1151 public void addPropertyChangeListener(IPropertyChangeListener listener
) {
1152 if (propertyChangeListeners
.contains(listener
)) {
1155 propertyChangeListeners
.add(0, listener
);
1160 * removePropertyChangeListener
1164 * a {@link org.eclipse.jface.util.IPropertyChangeListener}
1167 public void removePropertyChangeListener(IPropertyChangeListener listener
) {
1168 propertyChangeListeners
.remove(listener
);
1172 * @return the propertyChangeListeners
1174 public List
<IPropertyChangeListener
> getPropertyChangeListeners() {
1175 return propertyChangeListeners
;
1180 * createHorizontalSeparator
1183 * @param parentElement
1184 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1188 * @return a {@link org.eclipse.swt.widgets.Label} object.
1190 public Label
createHorizontalSeparator(ICdmFormElement parentElement
, int style
) {
1191 Label separator
= this.createSeparator(parentElement
.getLayoutComposite(), SWT
.HORIZONTAL
| style
);
1192 separator
.setLayoutData(LayoutConstants
.FILL_HORIZONTALLY());
1198 * createVersionElement
1201 * @param parentElement
1202 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1205 * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
1210 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
1213 public VersionElement
createVersionElement(ICdmFormElement parentElement
, VersionableEntity entity
, int style
) {
1214 VersionElement element
= new VersionElement(this, parentElement
, entity
, style
);
1216 parentElement
.addElement(element
);
1221 * @param cdmBaseSection
1226 public CdmBaseElement
createCdmBaseElement(ICdmFormElement parentElement
, CdmBase entity
, int style
) {
1227 CdmBaseElement element
= new CdmBaseElement(this, parentElement
, entity
, style
);
1229 parentElement
.addElement(element
);
1235 * createVersionSection
1238 * @param parentElement
1239 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1244 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
1247 public VersionSection
createVersionSection(ICdmFormElement parentElement
, int style
) {
1248 VersionSection section
= new VersionSection(this, parentElement
, style
);
1249 parentElement
.addElement(section
);
1259 public CdmBaseSection
createCdmBaseSection(ICdmFormElement parentElement
, int style
) {
1260 CdmBaseSection section
= new CdmBaseSection(this, parentElement
, style
);
1261 parentElement
.addElement(section
);
1268 * createEmptyElement
1271 * @param parentElement
1272 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1274 * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
1276 public EmptyElement
createEmptyElement(ICdmFormElement parentElement
) {
1277 EmptyElement element
= new EmptyElement(this, parentElement
, null, SWT
.NULL
);
1279 parentElement
.addElement(element
);
1285 * createHeadlineSection
1288 * @param parentElement
1289 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1292 * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
1295 public HeadlineSection
createHeadlineSection(ICdmFormElement parentElement
) {
1296 HeadlineSection section
= new HeadlineSection(this, parentElement
, SWT
.NULL
);
1297 parentElement
.addElement(section
);
1304 * createParsingMessageElement
1307 * @param parentElement
1308 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
1310 * @param parserProblem
1311 * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
1316 * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
1319 public ParsingMessageElement
createParsingMessageElement(ICdmFormElement parentElement
,
1320 ParserProblem parserProblem
, int style
) {
1321 ParsingMessageElement element
= new ParsingMessageElement(this, parentElement
, parserProblem
, style
);
1323 parentElement
.addElement(element
);
1327 public AbstractFormSection
createDefinedTermDetailSection(Class definedTermClass
, ConversationHolder conversation
,
1328 ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
) {
1330 AbstractFormSection section
= new DefinedTermDetailSection(this, definedTermClass
, conversation
, parentElement
,
1331 selectionProvider
, style
);
1333 parentElement
.addElement(section
);
1340 * @param definedTermClass
1341 * @param formElement
1345 public AbstractCdmDetailElement
createDefinedTermDetailElement(Class definedTermClass
, AbstractCdmDetailSection parentElement
, int style
) {
1346 AbstractCdmDetailElement element
= null;
1348 if (NamedArea
.class.isAssignableFrom(definedTermClass
)) {
1349 element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1351 element
= new DefinedTermDetailElement(this, parentElement
);
1355 parentElement
.addElement(element
);
1360 //--------DetailSections---------
1361 public NameDetailSection
createNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1362 NameDetailSection section
= new NameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1363 addAndAdaptSection(parentElement
, section
);
1367 public ReferenceDetailSection
createReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1368 ReferenceDetailSection section
= new ReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1369 addAndAdaptSection(parentElement
, section
);
1373 public NomenclaturalReferenceDetailSection
createNomenclaturalReferenceDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1374 NomenclaturalReferenceDetailSection section
= new NomenclaturalReferenceDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1375 addAndAdaptSection(parentElement
, section
);
1379 public TaxonBaseDetailSection
createTaxonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1380 TaxonBaseDetailSection section
= new TaxonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1381 addAndAdaptSection(parentElement
, section
);
1385 public AuthorshipDetailSection
createAuthorshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1386 AuthorshipDetailSection section
= new AuthorshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1387 addAndAdaptSection(parentElement
, section
);
1391 public TeamOrPersonBaseDetailSection
createTeamOrPersonBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1392 TeamOrPersonBaseDetailSection section
= new TeamOrPersonBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1393 addAndAdaptSection(parentElement
, section
);
1397 public TeamDetailSection
createTeamDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1398 TeamDetailSection section
= new TeamDetailSection(this, conversation
, parentElement
, null, style
);
1399 addAndAdaptSection(parentElement
, section
);
1403 public PersonDetailSection
createPersonDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1404 PersonDetailSection section
= new PersonDetailSection(this, conversation
, parentElement
, null, style
);
1405 addAndAdaptSection(parentElement
, section
);
1409 public DescriptionDetailSection
createDescriptionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1410 DescriptionDetailSection section
= new DescriptionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1411 addAndAdaptSection(parentElement
, section
);
1415 public DescriptionElementDetailSection
createDescriptionElementDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1416 DescriptionElementDetailSection section
= new DescriptionElementDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1417 addAndAdaptSection(parentElement
, section
);
1421 public ParsingMessagesSection
createParsingMessagesSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1422 ParsingMessagesSection section
= new ParsingMessagesSection(this, conversation
, parentElement
, selectionProvider
, style
);
1423 addAndAdaptSection(parentElement
, section
);
1427 public NonViralNameDetailSection
createNonViralNameDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1428 NonViralNameDetailSection section
= new NonViralNameDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1429 addAndAdaptSection(parentElement
, section
);
1433 public MediaDetailsSection
createMediaDetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1434 MediaDetailsSection section
= new MediaDetailsSection(this, conversation
, parentElement
, selectionProvider
, style
);
1435 addAndAdaptSection(parentElement
, section
);
1439 public DerivedUnitFacadeDetailSection
createDerivedUnitFacadeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1440 DerivedUnitFacadeDetailSection section
= new DerivedUnitFacadeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1441 addAndAdaptSection(parentElement
, section
);
1445 public FieldObservationDetailSection
createFieldObservationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1446 FieldObservationDetailSection section
= new FieldObservationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1447 addAndAdaptSection(parentElement
, section
);
1451 public GatheringEventDetailSection
createGatheringEventDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1452 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1453 addAndAdaptSection(parentElement
, section
);
1457 public DerivedUnitBaseDetailSection
createDerivedUnitBaseDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1458 DerivedUnitBaseDetailSection section
= new DerivedUnitBaseDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1459 addAndAdaptSection(parentElement
, section
);
1463 public NaturalLanguageSection
createNaturalLanguageSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1464 NaturalLanguageSection section
= new NaturalLanguageSection(this, conversation
, parentElement
, selectionProvider
, style
);
1465 addAndAdaptSection(parentElement
, section
);
1469 public FeatureDistributionDetailSection
createFeatureDistributionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1470 FeatureDistributionDetailSection section
= new FeatureDistributionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1471 addAndAdaptSection(parentElement
, section
);
1475 public ClassificationDetailSection
createClassificationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1476 ClassificationDetailSection section
= new ClassificationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1477 addAndAdaptSection(parentElement
, section
);
1481 public TaxonNodeDetailSection
createTaxonNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1482 TaxonNodeDetailSection section
= new TaxonNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1483 addAndAdaptSection(parentElement
, section
);
1487 public PolytomousKeyDetailSection
createPolytomousKeyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1488 PolytomousKeyDetailSection section
= new PolytomousKeyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1489 addAndAdaptSection(parentElement
, section
);
1493 public PolytomousKeyNodeDetailSection
createPolytomousKeyNodeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1494 PolytomousKeyNodeDetailSection section
= new PolytomousKeyNodeDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1495 addAndAdaptSection(parentElement
, section
);
1499 public InstitutionDetailSection
createInstitutionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1500 InstitutionDetailSection section
= new InstitutionDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1501 addAndAdaptSection(parentElement
, section
);
1505 public GeneralDetailSection
createGeneralDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1506 GeneralDetailSection section
= new GeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1507 addAndAdaptSection(parentElement
, section
);
1511 public HybridDetailSection
createHybridDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1512 HybridDetailSection section
= new HybridDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1513 addAndAdaptSection(parentElement
, section
);
1517 public UserDetailSection
createUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1518 UserDetailSection section
= new UserDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1519 addAndAdaptSection(parentElement
, section
);
1523 public GroupDetailSection
createGroupDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1524 GroupDetailSection section
= new GroupDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1525 addAndAdaptSection(parentElement
, section
);
1529 public DeterminationDetailSection
createDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1530 DeterminationDetailSection section
= new DeterminationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1531 addAndAdaptSection(parentElement
, section
);
1535 public TaxonRelationshipDetailSection
createTaxonRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1536 TaxonRelationshipDetailSection section
= new TaxonRelationshipDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1537 addAndAdaptSection(parentElement
, section
);
1541 public ReferencedEntityDetailSection
createReferencedEntityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1542 ReferencedEntityDetailSection section
= new ReferencedEntityDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1543 addAndAdaptSection(parentElement
, section
);
1547 public TermVocabularyDetailSection
createTermVocabularyDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1548 TermVocabularyDetailSection section
= new TermVocabularyDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1549 addAndAdaptSection(parentElement
, section
);
1554 public NamedAreaDetailSection
createNamedAreaDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1555 NamedAreaDetailSection section
= new NamedAreaDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1556 addAndAdaptSection(parentElement
, section
);
1560 public UseRecordDetailSection
createUseRecordDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1561 UseRecordDetailSection section
= new UseRecordDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1562 addAndAdaptSection(parentElement
, section
);
1566 public GeneralDetailSection
createFOSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1567 GeneralDetailSection section
= new GeneralDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1568 addAndAdaptSection(parentElement
, section
);
1572 public GatheringEventDetailSection
createGatheringSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1573 GatheringEventDetailSection section
= new GatheringEventDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1574 addAndAdaptSection(parentElement
, section
);
1578 public FieldObservationDetailSection
createFODetailsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, ISelectionProvider selectionProvider
, int style
){
1579 FieldObservationDetailSection section
= new FieldObservationDetailSection(this, conversation
, parentElement
, selectionProvider
, style
);
1580 addAndAdaptSection(parentElement
, section
);
1584 private void addAndAdaptSection(ICdmFormElement parentElement
, AbstractFormSection
<?
> section
) {
1585 parentElement
.addElement(section
);
1589 //--------DetailElements------------
1591 public UseRecordDetailElement
createUseRecordDetailElement(ICdmFormElement parentElement
){
1592 UseRecordDetailElement element
= new UseRecordDetailElement(this, parentElement
);
1593 addAndAdaptElement(parentElement
, element
);
1597 public DefinedTermDetailElement
<NamedAreaLevel
> createNamedAreaLevelElement(ICdmFormElement parentElement
){
1598 DefinedTermDetailElement
<NamedAreaLevel
> element
= new DefinedTermDetailElement
<NamedAreaLevel
>(this, parentElement
);
1599 addAndAdaptElement(parentElement
, element
);
1603 public eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement
createNamedAreaDetailElement(ICdmFormElement parentElement
){
1604 eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement element
= new eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.NamedAreaDetailElement(this, parentElement
);
1605 addAndAdaptElement(parentElement
, element
);
1609 public TermVocabularyDetailElement
createTermVocabularyDetailElement(ICdmFormElement parentElement
){
1610 TermVocabularyDetailElement element
= new TermVocabularyDetailElement(this, parentElement
);
1611 addAndAdaptElement(parentElement
, element
);
1615 public ReferenceEntityDetailElement
createReferenceEntityDetailElement(ICdmFormElement parentElement
){
1616 ReferenceEntityDetailElement element
= new ReferenceEntityDetailElement(this, parentElement
);
1617 addAndAdaptElement(parentElement
, element
);
1621 public TaxonRelationshipDetailElement
createTaxonRelationshipDetailElement(ICdmFormElement parentElement
){
1622 TaxonRelationshipDetailElement element
= new TaxonRelationshipDetailElement(this, parentElement
);
1623 addAndAdaptElement(parentElement
, element
);
1627 public GrantedAuthorityDetailElement
createGrantedAuthorityDetailElement(ICdmFormElement parentElement
){
1628 GrantedAuthorityDetailElement element
= new GrantedAuthorityDetailElement(this, parentElement
);
1629 addAndAdaptElement(parentElement
, element
);
1633 public GroupDetailElement
createGroupDetailElement(ICdmFormElement parentElement
){
1634 GroupDetailElement element
= new GroupDetailElement(this, parentElement
);
1635 addAndAdaptElement(parentElement
, element
);
1639 public UserDetailElement
createUserDetailElement(ICdmFormElement parentElement
){
1640 UserDetailElement element
= new UserDetailElement(this, parentElement
);
1641 addAndAdaptElement(parentElement
, element
);
1645 public HybridDetailElement
createHybridDetailElement(ICdmFormElement parentElement
){
1646 HybridDetailElement element
= new HybridDetailElement(this, parentElement
);
1647 addAndAdaptElement(parentElement
, element
);
1651 public InstitutionDetailElement
createInstitutionDetailElement(ICdmFormElement parentElement
){
1652 InstitutionDetailElement element
= new InstitutionDetailElement(this, parentElement
);
1653 addAndAdaptElement(parentElement
, element
);
1657 public PolytomousKeyNodeDetailElement
createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement
){
1658 PolytomousKeyNodeDetailElement element
= new PolytomousKeyNodeDetailElement(this, parentElement
);
1659 addAndAdaptElement(parentElement
, element
);
1663 public PolytomousKeyDetailElement
createPolytomousKeyDetailElement(ICdmFormElement parentElement
){
1664 PolytomousKeyDetailElement element
= new PolytomousKeyDetailElement(this, parentElement
);
1665 addAndAdaptElement(parentElement
, element
);
1669 public CollectionDetailElement
createCollectionDetailElement(ICdmFormElement parentElement
){
1670 CollectionDetailElement element
= new CollectionDetailElement(this, parentElement
);
1671 addAndAdaptElement(parentElement
, element
);
1675 public TaxonNodeDetailElement
createTaxonNodeDetailElement(ICdmFormElement parentElement
){
1676 TaxonNodeDetailElement element
= new TaxonNodeDetailElement(this, parentElement
);
1677 addAndAdaptElement(parentElement
, element
);
1681 public ClassificationDetailElement
createClassificationDetailElement(ICdmFormElement parentElement
){
1682 ClassificationDetailElement element
= new ClassificationDetailElement(this, parentElement
);
1683 addAndAdaptElement(parentElement
, element
);
1687 public FeatureDistributionDetailElement
createFeatureDistributionDetailElement(ICdmFormElement parentElement
){
1688 FeatureDistributionDetailElement element
= new FeatureDistributionDetailElement(this, parentElement
);
1689 addAndAdaptElement(parentElement
, element
);
1693 public NaturalLanguageDetailElement
createNaturalLanguageDetailElement(ICdmFormElement parentElement
){
1694 NaturalLanguageDetailElement element
= new NaturalLanguageDetailElement(this, parentElement
);
1695 addAndAdaptElement(parentElement
, element
);
1699 public DerivedUnitFacadeDetailElement
createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement
){
1700 DerivedUnitFacadeDetailElement element
= new DerivedUnitFacadeDetailElement(this, parentElement
);
1701 addAndAdaptElement(parentElement
, element
);
1705 public NonViralNameDetailElement
createNonViralNameDetailElement(ICdmFormElement parentElement
){
1706 NonViralNameDetailElement element
= new NonViralNameDetailElement(this, parentElement
);
1707 addAndAdaptElement(parentElement
, element
);
1711 public DescriptionElementDetailElement
createDescriptionElementDetailElement(ICdmFormElement parentElement
, int style
){
1712 DescriptionElementDetailElement element
= new DescriptionElementDetailElement(this, parentElement
, style
);
1713 addAndAdaptElement(parentElement
, element
);
1717 public DescriptionDetailElement
createDescriptionDetailElement(ICdmFormElement parentElement
, int style
){
1718 DescriptionDetailElement element
= new DescriptionDetailElement(this, parentElement
, style
);
1719 addAndAdaptElement(parentElement
, element
);
1723 public PersonDetailElement
createPersonDetailElement(ICdmFormElement parentElement
, int style
){
1724 PersonDetailElement element
= new PersonDetailElement(this, parentElement
, style
);
1725 addAndAdaptElement(parentElement
, element
);
1729 public TeamDetailElement
createTeamDetailElement(ICdmFormElement parentElement
, int style
){
1730 TeamDetailElement element
= new TeamDetailElement(this, parentElement
, style
);
1731 addAndAdaptElement(parentElement
, element
);
1735 public AuthorshipDetailElement
createAuthorshipDetailElement(ICdmFormElement parentElement
, int style
){
1736 AuthorshipDetailElement element
= new AuthorshipDetailElement(this, parentElement
, style
);
1737 addAndAdaptElement(parentElement
, element
);
1741 public TaxonBaseDetailElement
createTaxonBaseDetailElement(ICdmFormElement parentElement
, int style
){
1742 TaxonBaseDetailElement element
= new TaxonBaseDetailElement(this, parentElement
, style
);
1743 addAndAdaptElement(parentElement
, element
);
1747 public NameDetailElement
createNameDetailElement(ICdmFormElement parentElement
, int style
){
1748 NameDetailElement element
= new NameDetailElement(this, parentElement
, style
);
1749 addAndAdaptElement(parentElement
, element
);
1753 public ReferenceDetailElement
createReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1754 ReferenceDetailElement element
= new ReferenceDetailElement(this, parentElement
, style
);
1755 addAndAdaptElement(parentElement
, element
);
1759 public NomenclaturalReferenceDetailElement
createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement
, int style
){
1760 NomenclaturalReferenceDetailElement element
= new NomenclaturalReferenceDetailElement(this, parentElement
, style
);
1761 addAndAdaptElement(parentElement
, element
);
1766 public GeneralDetailElement
createGeneralDetailElement(ICdmFormElement parentElement
){
1767 GeneralDetailElement element
= new GeneralDetailElement(this, parentElement
);
1768 addAndAdaptElement(parentElement
, element
);
1772 public FieldObservationGeneralElementController
createFieldObservationGeneralElement(ICdmFormElement parentElement
){
1773 FieldObservationGeneralElementController element
= new FieldObservationGeneralElementController(new FieldObservationGeneralElement(parentElement
.getLayoutComposite(), SWT
.NONE
), this, parentElement
);
1774 addAndAdaptElement(parentElement
, element
);
1778 public GatheringEventDetailElement
createGatheringEventDetailElement(ICdmFormElement parentElement
) {
1779 GatheringEventDetailElement element
= new GatheringEventDetailElement(this, parentElement
);
1780 addAndAdaptElement(parentElement
, element
);
1784 public GatheringEventDetailsElementController
createGatheringEventDetailsElementController(ICdmFormElement parentElement
) {
1785 GatheringEventDetailsElementController element
= new GatheringEventDetailsElementController(new GatheringEventDetailsElement(parentElement
.getLayoutComposite(), SWT
.NONE
), this, parentElement
);
1787 parentElement
.addElement(element
);
1791 public FieldObservationDetailElement
createFieldObservationDetailElement(ICdmFormElement parentElement
) {
1792 FieldObservationDetailElement element
= new FieldObservationDetailElement(this, parentElement
);
1793 addAndAdaptElement(parentElement
, element
);
1797 public DerivedUnitBaseDetailElement
createDerivedUnitBaseDetailElement(ICdmFormElement parentElement
) {
1798 DerivedUnitBaseDetailElement element
= new DerivedUnitBaseDetailElement(this, parentElement
);
1799 addAndAdaptElement(parentElement
, element
);
1803 public DeterminationDetailElement
createDeterminationDetailElement(ICdmFormElement parentElement
) {
1804 DeterminationDetailElement element
= new DeterminationDetailElement(this, parentElement
);
1805 addAndAdaptElement(parentElement
, element
);
1810 * @param parentElement
1813 private void addAndAdaptElement(ICdmFormElement parentElement
, AbstractCdmDetailElement
<?
> element
) {
1815 parentElement
.addElement(element
);
1818 //--------EntityCollectionSection----------
1819 public TeamMemberSection
createTeamMemberSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1820 TeamMemberSection section
= new TeamMemberSection(this, conversation
, parentElement
, style
);
1821 addAndAdaptSection(parentElement
, section
);
1825 public AnnotationSection
createAnnotationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1826 AnnotationSection section
= new AnnotationSection(this, conversation
, parentElement
, style
);
1827 addAndAdaptSection(parentElement
, section
);
1831 public CreditSection
createCreditSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1832 CreditSection section
= new CreditSection(this, conversation
, parentElement
, style
);
1833 addAndAdaptSection(parentElement
, section
);
1837 public DescriptionElementSourceSection
createDescriptionElementSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1838 DescriptionElementSourceSection section
= new DescriptionElementSourceSection(this, conversation
, parentElement
, style
);
1839 addAndAdaptSection(parentElement
, section
);
1843 public ExtensionSection
createExtensionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1844 ExtensionSection section
= new ExtensionSection(this, conversation
, parentElement
, style
);
1845 addAndAdaptSection(parentElement
, section
);
1849 public MarkerSection
createMarkerSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1850 MarkerSection section
= new MarkerSection(this, conversation
, parentElement
, style
);
1851 addAndAdaptSection(parentElement
, section
);
1855 public MediaSection
createMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1856 MediaSection section
= new MediaSection(this, conversation
, parentElement
, style
);
1857 addAndAdaptSection(parentElement
, section
);
1861 public DescriptionElementMediaSection
createDescriptionElementMediaSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1862 DescriptionElementMediaSection section
= new DescriptionElementMediaSection(this, conversation
, parentElement
, style
);
1863 addAndAdaptSection(parentElement
, section
);
1867 public MediaRepresentationSection
createMediaRepresentationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1868 MediaRepresentationSection section
= new MediaRepresentationSection(this, conversation
, parentElement
, style
);
1869 addAndAdaptSection(parentElement
, section
);
1873 public MediaRepresentationPartSection
createMediaRepresentationPartSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1874 MediaRepresentationPartSection section
= new MediaRepresentationPartSection(this, conversation
, parentElement
, style
);
1875 addAndAdaptSection(parentElement
, section
);
1879 public ModifierSection
createModifierSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1880 ModifierSection section
= new ModifierSection(this, conversation
, parentElement
, style
);
1881 addAndAdaptSection(parentElement
, section
);
1885 public NomenclaturalStatusSection
createNomenclaturalStatusSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1886 NomenclaturalStatusSection section
= new NomenclaturalStatusSection(this, conversation
, parentElement
, style
);
1887 addAndAdaptSection(parentElement
, section
);
1891 public NameRelationshipDetailSection
createNameRelationshipDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1892 NameRelationshipDetailSection section
= new NameRelationshipDetailSection(this, conversation
, parentElement
, style
);
1893 addAndAdaptSection(parentElement
, section
);
1897 public ProtologueSection
createProtologueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1898 ProtologueSection section
= new ProtologueSection(this, conversation
, parentElement
, style
);
1899 addAndAdaptSection(parentElement
, section
);
1903 public RightsSection
createRightsSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1904 RightsSection section
= new RightsSection(this, conversation
, parentElement
, style
);
1905 addAndAdaptSection(parentElement
, section
);
1909 public SourceSection
createSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1910 SourceSection section
= new SourceSection(this, conversation
, parentElement
, style
);
1911 addAndAdaptSection(parentElement
, section
);
1915 public ScopeSection
createScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1916 ScopeSection section
= new ScopeSection(this, conversation
, parentElement
, style
);
1917 addAndAdaptSection(parentElement
, section
);
1921 public DescriptionSourceSection
createDescriptionSourceSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1922 DescriptionSourceSection section
= new DescriptionSourceSection(this, conversation
, parentElement
, style
);
1923 addAndAdaptSection(parentElement
, section
);
1927 public TypeDesignationSection
createTypeDesignationSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1928 TypeDesignationSection section
= new TypeDesignationSection(this, conversation
, parentElement
, style
);
1929 addAndAdaptSection(parentElement
, section
);
1933 public StateDataSection
createStateDataSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1934 StateDataSection section
= new StateDataSection(this, conversation
, parentElement
, style
);
1935 addAndAdaptSection(parentElement
, section
);
1939 public StatisticalMeasurementValueSection
createStatisticalMeasurementValueSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1940 StatisticalMeasurementValueSection section
= new StatisticalMeasurementValueSection(this, conversation
, parentElement
, style
);
1941 addAndAdaptSection(parentElement
, section
);
1945 public DescribedSpecimenSection
createDescribedSpecimenSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1946 DescribedSpecimenSection section
= new DescribedSpecimenSection(this, conversation
, parentElement
, style
);
1947 addAndAdaptSection(parentElement
, section
);
1951 public CollectingAreasDetailSection
createCollectingAreasDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1952 CollectingAreasDetailSection section
= new CollectingAreasDetailSection(this, conversation
, parentElement
, style
);
1953 addAndAdaptSection(parentElement
, section
);
1957 public CurrentDeterminationDetailSection
createCurrentDeterminationDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1958 CurrentDeterminationDetailSection section
= new CurrentDeterminationDetailSection(this, conversation
, parentElement
, style
);
1959 addAndAdaptSection(parentElement
, section
);
1963 public DeterminationHistoryDetailSection
createDeterminationHistoryDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1964 DeterminationHistoryDetailSection section
= new DeterminationHistoryDetailSection(this, conversation
, parentElement
, style
);
1965 addAndAdaptSection(parentElement
, section
);
1969 public SpecimenCollectionDetailSection
createSpecimenCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1970 SpecimenCollectionDetailSection section
= new SpecimenCollectionDetailSection(this, conversation
, parentElement
, style
);
1971 addAndAdaptSection(parentElement
, section
);
1975 public SourceCollectionDetailSection
createSourceCollectionDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1976 SourceCollectionDetailSection section
= new SourceCollectionDetailSection(this, conversation
, parentElement
, style
);
1977 addAndAdaptSection(parentElement
, section
);
1981 public GeographicalScopeDetailSection
createGeographicalScopeDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1982 GeographicalScopeDetailSection section
= new GeographicalScopeDetailSection(this, conversation
, parentElement
, style
);
1983 addAndAdaptSection(parentElement
, section
);
1987 public ScopeRestrictionSection
createScopeRestrictionSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1988 ScopeRestrictionSection section
= new ScopeRestrictionSection(this, conversation
, parentElement
, style
);
1989 addAndAdaptSection(parentElement
, section
);
1993 public MemberDetailSection
createMemberDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
1994 MemberDetailSection section
= new MemberDetailSection(this, conversation
, parentElement
, style
);
1995 addAndAdaptSection(parentElement
, section
);
1999 public GrantedAuthorityDetailSection
createGrantedAuthorityDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2000 GrantedAuthorityDetailSection section
= new GrantedAuthorityDetailSection(this, conversation
, parentElement
, style
);
2001 addAndAdaptSection(parentElement
, section
);
2005 public GroupsByUserDetailSection
createGroupsByUserDetailSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2006 GroupsByUserDetailSection section
= new GroupsByUserDetailSection(this, conversation
, parentElement
, style
);
2007 addAndAdaptSection(parentElement
, section
);
2011 public TaxonomicScopeSection
createTaxonomicScopeSection(ConversationHolder conversation
, ICdmFormElement parentElement
, int style
){
2012 TaxonomicScopeSection section
= new TaxonomicScopeSection(this, conversation
, parentElement
, style
);
2013 addAndAdaptSection(parentElement
, section
);
2019 * createEntityCollectionElement
2022 * @param removeListener
2023 * a {@link org.eclipse.swt.events.SelectionListener} object.
2026 * @param parentElement
2028 * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
2030 * @param versionableEntity
2031 * a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
2033 * @param backgroundColor
2034 * a {@link org.eclipse.swt.graphics.Color} object.
2036 * {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
2039 public AbstractEntityCollectionElement
createEntityCollectionElement(AbstractFormSection parentElement
,
2040 Object versionableEntity
, SelectionListener removeListener
, Color backgroundColor
, int style
) {
2041 AbstractEntityCollectionElement element
= null;
2043 Object entity
= HibernateProxyHelper
.deproxy(versionableEntity
);
2045 if (entity
instanceof Annotation
) {
2046 element
= new AnnotationElement(this, parentElement
, (Annotation
) entity
, removeListener
, style
);
2047 } else if (entity
instanceof Person
) {
2048 element
= new TeamMemberElement(this, parentElement
, (Person
) entity
, removeListener
, style
);
2049 } else if (entity
instanceof Credit
) {
2050 element
= new CreditElement(this, parentElement
, (Credit
) entity
, removeListener
, style
);
2051 } else if (entity
instanceof Extension
) {
2052 element
= new ExtensionElement(this, parentElement
, (Extension
) entity
, removeListener
, style
);
2053 } else if (entity
instanceof Marker
) {
2054 element
= new MarkerElement(this, parentElement
, (Marker
) entity
, removeListener
, style
);
2055 } else if (entity
instanceof Media
) {
2056 element
= new MediaElement(this, parentElement
, (Media
) entity
, removeListener
, style
);
2057 } else if (entity
instanceof MediaRepresentation
) {
2058 element
= new MediaRepresentationElement(this, parentElement
, (MediaRepresentation
) entity
, removeListener
,
2060 } else if (entity
instanceof ImageFile
) {
2061 element
= new ImageFileElement(this, parentElement
, (ImageFile
) entity
, removeListener
, style
);
2062 } else if (entity
instanceof MediaRepresentationPart
) {
2063 element
= new MediaRepresentationPartElement(this, parentElement
, (MediaRepresentationPart
) entity
,
2064 removeListener
, style
);
2065 } else if (entity
instanceof NomenclaturalStatus
) {
2066 element
= new NomenclaturalStatusElement(this, parentElement
, (NomenclaturalStatus
) entity
, removeListener
,
2068 } else if (entity
instanceof Rights
) {
2069 element
= new RightsElement(this, parentElement
, (Rights
) entity
, removeListener
, style
);
2070 } else if (entity
instanceof DescriptionElementSource
) {
2071 element
= new DescriptionElementSourceElement(this, parentElement
, (DescriptionElementSource
) entity
,
2072 removeListener
, style
);
2073 } else if (entity
instanceof IdentifiableSource
) {
2074 element
= new IdentifiableSourceElement(this, parentElement
, (IdentifiableSource
) entity
, removeListener
,
2076 } else if (entity
instanceof Scope
) {
2077 element
= new ScopeElement(this, parentElement
, (Scope
) entity
, removeListener
, style
);
2078 } else if (entity
instanceof Modifier
) {
2079 element
= new ModifierElement(this, parentElement
, (Modifier
) entity
, removeListener
, style
);
2080 } else if (entity
instanceof Reference
) {
2081 element
= new DescriptionSourceElement(this, parentElement
, (Reference
) entity
, removeListener
, style
);
2082 } else if (entity
instanceof NameTypeDesignation
) {
2083 element
= new NameTypeDesignationElement(this, parentElement
, (NameTypeDesignation
) entity
, removeListener
,
2085 } else if (entity
instanceof NameRelationship
) {
2086 element
= new NameRelationshipDetailElement(this, parentElement
, (NameRelationship
) entity
, removeListener
,
2088 } else if (entity
instanceof SpecimenTypeDesignation
) {
2089 element
= new SpecimenTypeDesignationElement(this, parentElement
, (SpecimenTypeDesignation
) entity
,
2090 removeListener
, style
);
2091 } else if (entity
instanceof StateData
) {
2092 element
= new StateDataElement(this, parentElement
, (StateData
) entity
, removeListener
, style
);
2093 } else if (entity
instanceof StatisticalMeasurementValue
) {
2094 element
= new StatisticalMeasurementValueElement(this, parentElement
, (StatisticalMeasurementValue
) entity
,
2095 removeListener
, style
);
2096 } else if (entity
instanceof DerivedUnit
) {
2097 element
= new DerivedUnitElement(this, parentElement
, (DerivedUnit
) entity
, removeListener
, style
);
2098 } else if (entity
instanceof NamedArea
) {
2099 element
= new NamedAreaDetailElement(this, parentElement
, (NamedArea
) entity
, removeListener
, style
);
2100 } else if (entity
instanceof DeterminationEvent
) {
2101 element
= new DeterminationEventDetailElement(this, parentElement
, (DeterminationEvent
) entity
, removeListener
, style
);
2102 } else if (entity
instanceof Specimen
) {
2103 element
= new SpecimenCollectionDetailElement(this, parentElement
, (Specimen
) entity
, removeListener
, style
);
2104 } else if (entity
instanceof User
) {
2105 element
= new MemberDetailElement(this, parentElement
, (User
) entity
, removeListener
, style
);
2106 } else if (entity
instanceof GrantedAuthority
) {
2107 element
= new GrantedAuthorityCollectionElement(this, parentElement
, (GrantedAuthorityImpl
) entity
,
2108 removeListener
, style
);
2109 } else if (entity
instanceof Group
) {
2110 element
= new GroupsByUserDetailElement(this, parentElement
, (Group
) entity
, removeListener
, style
);
2111 } else if (entity
instanceof Taxon
) {
2112 element
= new TaxonDetailElement(this, parentElement
, (Taxon
) entity
, removeListener
, style
);
2113 } else if (entity
instanceof DescriptionElementBase
) {
2114 // this is the special case for protologs, maybe we can do this
2115 // differently when API improves
2116 DescriptionElementBase descriptionElement
= (DescriptionElementBase
) entity
;
2117 if (descriptionElement
.getFeature().equals(Feature
.PROTOLOGUE())) {
2118 element
= new ProtologueElement(this, parentElement
, descriptionElement
, removeListener
, style
);
2122 if (element
== null) {
2123 AbstractUtility
.errorDialog("No element for entity", this,
2124 "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
2128 else if (backgroundColor
!= null && !backgroundColor
.isDisposed()) {
2129 element
.setPersistentBackground(backgroundColor
);
2131 parentElement
.addElement(element
);
2139 * Creates a selection element for the given type T.
2142 * <strong>Selection elements not handled by this method:</strong>
2144 * <li>{@link TaxonNodeSelectionElement} see
2145 * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
2147 * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
2148 * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
2154 * a {@link Class} object of the type that you want the selection
2156 * @param parentElement
2157 * a {@link ICdmFormElement} object.
2158 * @param labelString
2159 * a {@link String} object.
2160 * @param selectionType
2162 * a {@link ICdmBase} object.
2165 * @param conversation
2166 * a {@link ConversationHolder} object.
2167 * @return a {@link EntitySelectionElement} object.
2169 public <T
extends ICdmBase
> EntitySelectionElement
<T
> createSelectionElement(Class
<T
> clazz
,
2170 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, T selection
, int mode
,
2172 EntitySelectionElement
<T
> element
= new EntitySelectionElement
<T
>(this, conversation
, parentElement
, clazz
,
2173 labelString
, selection
, mode
, style
);
2175 parentElement
.addElement(element
);
2179 public TaxonNodeSelectionElement
createTaxonNodeSelectionElement(ConversationHolder conversation
,
2180 ICdmFormElement parentElement
, String labelString
, TaxonNode selection
, int mode
, int style
) {
2181 TaxonNodeSelectionElement element
= new TaxonNodeSelectionElement(this, conversation
, parentElement
,
2182 labelString
, selection
, mode
, style
);
2184 parentElement
.addElement(element
);
2188 public NomenclaturalAuthorTeamSelectionElement
createNomenclaturalAuthorTeamSelectionElement(
2189 ConversationHolder conversation
, ICdmFormElement parentElement
, String labelString
, Team selection
,
2190 int mode
, int style
) {
2191 NomenclaturalAuthorTeamSelectionElement element
= new NomenclaturalAuthorTeamSelectionElement(this,
2192 conversation
, parentElement
, labelString
, selection
, mode
, style
);
2194 parentElement
.addElement(element
);
2198 /** {@inheritDoc} */
2199 public LabelElement
createLabel(ICdmFormElement parentElement
, String text
) {
2200 LabelElement labelElement
= new LabelElement(this, parentElement
, text
);
2201 adapt(labelElement
);
2202 parentElement
.addElement(labelElement
);
2203 return labelElement
;
2208 * Getter for the field <code>selectionProvider</code>.
2211 * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
2213 public ISelectionProvider
getSelectionProvider() {
2214 return selectionProvider
;
2219 * createDetailedDescriptionDetailElement
2222 * @param parentElement
2223 * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
2227 * {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
2232 * {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
2235 public AbstractDetailedDescriptionDetailElement
createDetailedDescriptionDetailElement(
2236 ICdmFormElement parentElement
, DescriptionElementBase entity
, int style
) {
2237 AbstractDetailedDescriptionDetailElement detailedDescriptionElement
= null;
2239 if (entity
instanceof CategoricalData
) {
2240 detailedDescriptionElement
= new CategoricalDataDetailElement(this, parentElement
,
2241 (CategoricalData
) entity
, style
);
2242 } else if (entity
instanceof CommonTaxonName
) {
2243 detailedDescriptionElement
= new CommonNameDetailElement(this, parentElement
, (CommonTaxonName
) entity
,
2245 } else if (entity
instanceof Distribution
) {
2246 detailedDescriptionElement
= new DistributionDetailElement(this, parentElement
, (Distribution
) entity
,
2248 } else if (entity
instanceof IndividualsAssociation
) {
2249 detailedDescriptionElement
= new IndividualsAssociationDetailElement(this, parentElement
,
2250 (IndividualsAssociation
) entity
, style
);
2251 } else if (entity
instanceof QuantitativeData
) {
2252 detailedDescriptionElement
= new QuantitativeDataDetailElement(this, parentElement
,
2253 (QuantitativeData
) entity
, style
);
2254 } else if (entity
instanceof TaxonInteraction
) {
2255 detailedDescriptionElement
= new TaxonInteractionDetailElement(this, parentElement
,
2256 (TaxonInteraction
) entity
, style
);
2257 } else if (entity
instanceof TextData
) {
2258 detailedDescriptionElement
= new TextDataDetailElement(this, parentElement
, (TextData
) entity
, style
);
2260 throw new IllegalStateException("There is no interface for the given description element");
2262 adapt(detailedDescriptionElement
);
2263 parentElement
.addElement(detailedDescriptionElement
);
2264 return detailedDescriptionElement
;
2269 * Creates a styled text as a part of the form.
2274 * the text initial value
2277 * @return the text widget
2279 public StyledText
createStyledText(Composite parent
, String value
, int style
) {
2280 StyledText text
= new StyledText(parent
, getBorderStyle() | style
| getOrientation());
2281 if (value
!= null) {
2282 text
.setText(value
);
2284 text
.setForeground(getColors().getForeground());
2285 text
.setBackground(getColors().getBackground());
2286 // text.addFocusListener(visibilityHandler);