import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementSourceSection;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceElement;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceSection;
+import eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection;
import eu.etaxonomy.taxeditor.ui.section.description.ModifierElement;
import eu.etaxonomy.taxeditor.ui.section.description.ModifierSection;
import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageDetailElement;
private MouseListener selectionMouseHandler;
private FocusListener selectionFocusHandler;
- private final Set selectionListenerList = new HashSet();
+ private final Set<SelectionListener> selectionListenerList = new HashSet<SelectionListener>();
private final List<IPropertyChangeListener> propertyChangeListeners = new ArrayList<IPropertyChangeListener>();
event.widget = e.widget;
SelectionEvent selectionEvent = new SelectionEvent(event);
- for (Object listener : selectionListenerList) {
- ((SelectionListener) listener).widgetSelected(selectionEvent);
+ for (SelectionListener listener : selectionListenerList) {
+ listener.widgetSelected(selectionEvent);
}
}
return element;
}
- public GeneralDetailSection createFOSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
- GeneralDetailSection generalSection = new GeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
- parentElement.addElement(generalSection);
- adapt(generalSection);
- return generalSection;
- }
-
- public GatheringEventDetailSection createGatheringSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
- GatheringEventDetailSection gatheringSection = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
- parentElement.addElement(gatheringSection);
- adapt(gatheringSection);
- return gatheringSection;
- }
-
- public FieldObservationDetailSection createFODetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
- FieldObservationDetailSection foDetailsSection = new FieldObservationDetailSection(this, conversation, parentElement, selectionProvider, style);
- parentElement.addElement(foDetailsSection);
- adapt(foDetailsSection);
- return foDetailsSection;
- }
-
/**
* <p>
* createCdmDetailSection
ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
AbstractFormSection section = null;
-// System.out.println("DetailSection: " + detailType);
switch (detailType) {
case SCIENTIFICNAME:
section = new NameDetailSection(this, conversation, parentElement, selectionProvider, style);
return section;
}
+ public NameDetailSection createNameDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ NameDetailSection section = new NameDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public ReferenceDetailSection createReferenceDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ ReferenceDetailSection section = new ReferenceDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public NomenclaturalReferenceDetailSection createNomenclaturalReferenceDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ NomenclaturalReferenceDetailSection section = new NomenclaturalReferenceDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public TaxonBaseDetailSection createTaxonBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TaxonBaseDetailSection section = new TaxonBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public AuthorshipDetailSection createAuthorshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ AuthorshipDetailSection section = new AuthorshipDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public TeamOrPersonBaseDetailSection createTeamOrPersonBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TeamOrPersonBaseDetailSection section = new TeamOrPersonBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public TeamDetailSection createTeamDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ TeamDetailSection section = new TeamDetailSection(this, conversation, parentElement, null, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public PersonDetailSection createPersonDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ PersonDetailSection section = new PersonDetailSection(this, conversation, parentElement, null, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public DescriptionDetailSection createDescriptionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DescriptionDetailSection section = new DescriptionDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public DescriptionElementDetailSection createDescriptionElementDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DescriptionElementDetailSection section = new DescriptionElementDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public ParsingMessagesSection createParsingMessagesSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ ParsingMessagesSection section = new ParsingMessagesSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public NonViralNameDetailSection createNonViralNameDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ NonViralNameDetailSection section = new NonViralNameDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public MediaDetailsSection createMediaDetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ MediaDetailsSection section = new MediaDetailsSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public DerivedUnitFacadeDetailSection createDerivedUnitFacadeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DerivedUnitFacadeDetailSection section = new DerivedUnitFacadeDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public FieldObservationDetailSection createFieldObservationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ FieldObservationDetailSection section = new FieldObservationDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public GatheringEventDetailSection createGatheringEventDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public DerivedUnitBaseDetailSection createDerivedUnitBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DerivedUnitBaseDetailSection section = new DerivedUnitBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public NaturalLanguageSection createNaturalLanguageSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ NaturalLanguageSection section = new NaturalLanguageSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public FeatureDistributionDetailSection createFeatureDistributionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ FeatureDistributionDetailSection section = new FeatureDistributionDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public ClassificationDetailSection createClassificationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ ClassificationDetailSection section = new ClassificationDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public TaxonNodeDetailSection createTaxonNodeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TaxonNodeDetailSection section = new TaxonNodeDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public PolytomousKeyDetailSection createPolytomousKeyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ PolytomousKeyDetailSection section = new PolytomousKeyDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public PolytomousKeyNodeDetailSection createPolytomousKeyNodeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ PolytomousKeyNodeDetailSection section = new PolytomousKeyNodeDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public InstitutionDetailSection createInstitutionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ InstitutionDetailSection section = new InstitutionDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public GeneralDetailSection createGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ GeneralDetailSection section = new GeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public HybridDetailSection createHybridDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ HybridDetailSection section = new HybridDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public UserDetailSection createUserDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ UserDetailSection section = new UserDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public GroupDetailSection createGroupDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ GroupDetailSection section = new GroupDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public DeterminationDetailSection createDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DeterminationDetailSection section = new DeterminationDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public TaxonRelationshipDetailSection createTaxonRelationshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TaxonRelationshipDetailSection section = new TaxonRelationshipDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public ReferencedEntityDetailSection createReferencedEntityDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ ReferencedEntityDetailSection section = new ReferencedEntityDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public TermVocabularyDetailSection createTermVocabularyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TermVocabularyDetailSection section = new TermVocabularyDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+
+ public NamedAreaDetailSection createNamedAreaDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ NamedAreaDetailSection section = new NamedAreaDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public UseRecordDetailSection createUseRecordDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ UseRecordDetailSection section = new UseRecordDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public GeneralDetailSection createFOSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ GeneralDetailSection section = new GeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public GatheringEventDetailSection createGatheringSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdapt(parentElement, section);
+ return section;
+ }
+
+ public FieldObservationDetailSection createFODetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ FieldObservationDetailSection foDetailsSection = new FieldObservationDetailSection(this, conversation, parentElement, selectionProvider, style);
+ parentElement.addElement(foDetailsSection);
+ adapt(foDetailsSection);
+ return foDetailsSection;
+ }
+
+ private void addAndAdapt(ICdmFormElement parentElement, AbstractFormSection<?> section) {
+ parentElement.addElement(section);
+ adapt(section);
+ }
+
+
/**
* <p>
* createCdmDetailElement
return element;
}
+ public GeneralDetailElement createGeneralDetailElement(ICdmFormElement parentElement){
+ GeneralDetailElement element = new GeneralDetailElement(this, parentElement);
+ addAndAdapt(parentElement, element);
+ return element;
+ }
+
+ public GatheringEventDetailElement createGatheringEventDetailElement(ICdmFormElement parentElement) {
+ GatheringEventDetailElement element = new GatheringEventDetailElement(this, parentElement);
+ addAndAdapt(parentElement, element);
+ return element;
+ }
+
+ public FieldObservationDetailElement createFieldObservationDetailElement(ICdmFormElement parentElement) {
+ FieldObservationDetailElement element = new FieldObservationDetailElement(this, parentElement);
+ addAndAdapt(parentElement, element);
+ return element;
+ }
+
+ public DerivedUnitBaseDetailElement createDerivedUnitBaseDetailElement(ICdmFormElement parentElement) {
+ DerivedUnitBaseDetailElement element = new DerivedUnitBaseDetailElement(this, parentElement);
+ addAndAdapt(parentElement, element);
+ return element;
+ }
+
+ public DeterminationDetailElement createDeterminationDetailElement(ICdmFormElement parentElement) {
+ DeterminationDetailElement element = new DeterminationDetailElement(this, parentElement);
+ addAndAdapt(parentElement, element);
+ return element;
+ }
+
+ /**
+ * @param parentElement
+ * @param element
+ */
+ private void addAndAdapt(ICdmFormElement parentElement, AbstractCdmDetailElement<?> element) {
+ adapt(element);
+ parentElement.addElement(element);
+ }
+
/**
*
* Used to define which {@link AbstractEntityCollectionSection} should be